vbanksdk/vbank-php-sdk

Laravel SDK to easily work with the VDF Microfinance Bank APIs.

0.0.4 2023-06-23 14:33 UTC

This package is auto-updated.

Last update: 2024-04-15 11:24:03 UTC


README

Latest Version on Packagist Tests Total Downloads

Laravel PHP SDK to easily work with the VDF Microfinance Bank APIs.

Installation

You can install the package via composer:

composer require vbanksdk/vbank-php-sdk

Usage

$vdf = new VBank\SDK\VBank(ACCESSTOKEN, APIKEY, APISECRET);

$vdf->onboard(USERNAME, WALLETNAME, SHORTNAME, WEBHOOKURL,IMPLEMENTATION); // Returns array

// Get your coporate acount details
$vdf->corporateAccount(); // Returns instance of CorporateAccount  resource class

// Create fixed bank account with customer's full details
$vdf->createFixedAccount(firstname, lastname, middlename, dateOfBirth, address, gender, phone, bvn); // Returns instance of FixedAccount  resource class

// Create fixed bank account with customer's BVN and date of birth.
$vdf->createFixedAccountWithBVN(bvn, dateOfBirth); // Returns instance of FixedAccount  resource class

// Create fixed corporate bank account.
$vdf->createFixedCorporateAccount(rcNumber, companyName, incorporationDate, bvn); // Returns instance of FixedCorporateAccount  resource class

// Create virtual account with expiry time.
$vdf->createVirtualAccount(amount, reference, validityTimeout, merchantId, merchantName); // Returns instance of VirtualAccount  resource class

// Update valid amount for virtual account transaction.
$vdf->updateVirtualAccountTransactionAmount(amount, accountReference); // Returns instance of VirtualAccount  resource class

// List banks 
$vdf->bankList();

// Resolve bank account
$vdf->validateBankAccount(accountNumber, bankCode, TransferType::INTER); // Returns instance of Beneficiary resource class

// Intiate bank transfer
$vdf->initiateTransfer(corporateAccount, beneficiary, amount, reference, narration); // Returns instance of Transfer resource class

// Get transaction details 
$vdf->transactionDetails(transactionId): // Returns instance of Transaction resource class

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.