PHP Classes

File: docs/BANK.md

Recommend this page to a friend!
  Classes of Ujah Chigozie peter   PHP Payment Gateway Library   docs/BANK.md   Download  
File: docs/BANK.md
Role: Auxiliary data
Content type: text/markdown
Description: Auxiliary data
Class: PHP Payment Gateway Library
Process payments with multiple gateways
Author: By
Last change: Update BANK.md
Update BANK.md
Date: 4 months ago
Size: 2,442 bytes
 

Contents

Class file image Download

BANKS & DEDICATED VIRTUAL ACCOUNTS

If you are using getInstance then you must access the bank instance by using $merchant->bank-> else if you are working with getBankInstance you can directly call the bank class method.

Create dedicated virtual bank account

$result = $bank->createVirtualAccount($customerCode, $bankId, [fields]);
if($result->isSuccess()){
//Do something
}

Create dedicated virtual bank account with bank model instance Passing BankModel you don't need to specify other optional parameters, all your options can be set in BankModel methods see Bank Model for method reference.

use \Luminova\ExtraUtils\Payment\Models\BankModel;
$bankModel = new BankModel();
$bankModel->setCustomerName($customer->first_name, $customer->last_name);
$bankModel->setCustomerPhone($customer->phone);

$result = $bank->createVirtualAccount($bankModel);
if($result->isSuccess()){
//Do something
}

Assign dedicated virtual bank account to customer

$result = $bank->assignVirtualAccount([fields]);
if($result->isSuccess()){
//Do something
}

List dedicated virtual accounts

$result = $bank->listVirtualAccount($active, $currency, array $fields = []);
if($result->isSuccess()){
//Do something
}

Find dedicated virtual accounts

$result = $bank->findVirtualAccount($account_id);
if($result->isSuccess()){
//Do something
}

Re-query dedicated virtual accounts

$result = $bank->queryVirtualAccount(String $account, string $slug, string $date = '');
if($result->isSuccess()){
//Do something
}

List dedicated virtual account bank providers

$result = $bank->virtualAccountProviders();
if($result->isSuccess()){
//Do something
}

Resolve customer account number and bank verification number

$result = $bank->resolveAccount(string|int $account, string|int $bic);
if($result->isSuccess()){
//Do something
}

Resolve customer bank verification number (BVN)

$result = $bank->resolveBvn(string|int $bvn);
if($result->isSuccess()){
//Do something
}

List bank in a specific country

$result = $bank->list(string $country = 'nigeria', int $limit = 50, bool $cursor = false);
if($result->isSuccess()){
//Do something
}

Get bank by bank code or name in a specific country

$result = $bank->get(string|int $identification, string $country = 'nigeria');
if($result->isSuccess()){
//Do something
}