Manual Gateway

A Manual Gateway is used when a transaction cannot be verified automatically via API or SMS. The system provides the user with payment instructions, and the user must manually submit a Transaction ID (TrxID) or reference number for administrative approval.

Directory & File Setup

Consistency is key. Follow this structure exactly:

pp-gateways/
└── wise-manual/
    ├── class.php
    └── assets/
        └── logo.jpg

Naming Conventions

The class name inside class.php must follow the PascalCase version of your folder name + the word Gateway.


The Method Structure

Every manual gateway class must implement these six core methods:

I. info()

Defines the metadata. For manual gateways, the gateway_type and verify_by keys are mandatory.

public function info() {
    return [
        'title'        => 'Wise Manual',
        'logo'         => 'assets/logo.jpg',
        'currency'     => 'USD',
        'tab'          => 'global',
        'gateway_type' => 'manual', // Important: Must be 'manual'
        'verify_by'    => 'trxid',  // Tells the system to ask for a Transaction ID
    ];
}

II. color()

Defines the branding colors for the payment page.

III. fields()

These are the settings shown in the Admin Panel. For example, if you need the Admin to provide their Wise Email, you define it here.

public function fields() {
    return [
        [
            'name'  => 'recipient_wise_account',
            'label' => 'Recipient Wise Account',
            'type'  => 'text', // Options: text, number, image
        ]
    ];
}

IV. supported_languages()

Define which languages your instructions support.

'en' => 'English', 'bn' => 'বাংলা', etc.

V. lang_text()

This is your translation dictionary. Each numeric key represents a "step" in the payment process. Use placeholders like {amount} or {currency} to make them dynamic.

VI. instructions($data)

This builds the actual UI the customer sees. It maps the lang_text to the user interface.


Understanding the $data Array

The instructions($data) method automatically receives a $data array. Use it to pull live info:


Implementation Example

Here is the logic for a step that shows the account number and adds a "Copy" button:

[
    'text'  => '5', // Refers to lang_text key '5'
    'copy'  => true,
    'value' => $data['options']['recipient_wise_account'], 
    'vars'  => [
        '{recipient_wise_account}' => $data['options']['recipient_wise_account']
    ]
],

6. Verification Flow

  1. User sees the Instructions defined in your class.

  2. User makes the payment externally (e.g., on the Wise App).

  3. User enters their Transaction ID into the system (triggered by verify_by => trxid).

  4. The transaction status becomes Pending.

  5. The Admin manually verifies the ID and approves the payment in the backend.