vbanksdk / vbank-php-sdk
Laravel SDK to easily work with the VDF Microfinance Bank APIs.
Fund package maintenance!
VBankSDK
Requires
- php: ^8.1
- guzzlehttp/guzzle: ^6.5.5 || ^7.0.1
- illuminate/http: ^9.0 || ^10.0
Requires (Dev)
- laravel/pint: ^1.2
- mockery/mockery: ^1.6
- pestphp/pest: ^1.20
README
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.