jcobhams / ngbanks
PHP Implementation for Lightweight Zero dependency npm package to get list of banks in Nigeria (Recognized by CBN)
Requires
- php: >=5.3
Requires (Dev)
- phpunit/phpunit: 6.*
This package is auto-updated.
Last update: 2024-12-15 21:23:14 UTC
README
PHP implementation of ng-banks.
###Installation Available for installation on packagist using composer.
composer require jcobhams/ngbanks
Usage
After installation and and require
ing vendor/autoload.php
file in your project,
use jcobhams\NgBanks\NgBanks; . . . $this->ngbanks = new NgBanks(); //Get All Banks $this->ngbanks->getBanks(); //Get Access Bank $this->ngbanks->getBank('044'); //Add New Bank $this->ngbanks->addBank('Cobhams Savings and Loans', '007', 'CSL', '*007#')
The package contains 3 methods:
-
getBanks()
: this method is used to retrieve all the banks in the system. -
getBank(param)
: this method is used to retrieve a particular bank based on the parameter supplied. The parameter can either the be the slug of the bank or the bank code. For slugs or code that don't exist, this method returns None. -
addBank($name, $code, $slug, $ussd_code)
: this method will extend the current list of banks on the fly. Returns a array with the new bank just added orthrows exception
if bankcode
orslug
already exists.
CONTRIBUTORS
This package is authored by Joseph Cobhams.