mrferos / bin-lookup
A took to look up BIN data
dev-master
2015-02-18 06:42 UTC
Requires
- guzzle/http: ~3.9
Requires (Dev)
- phpunit/phpunit: ~4.4
This package is auto-updated.
Last update: 2024-12-06 10:05:23 UTC
README
BinLookup
A tool to lookup Credit Card BINs from one or more providers easily.
Usage
Using the BinLookup library is simple, first instantiate the BinLookup class:
$binLookup = new BinLookup\BinLookup();
Add a Provider
$binLookup->addProvider(new \BinLookup\Provider\BinListNetApi());
And perform a search
var_dump($binLookup->search(431940));
Output:
class BinLookup\Provider\Result#14 (10) {
protected $_bin =>
string(6) "431940"
protected $_brand =>
string(4) "VISA"
protected $_countryCode =>
string(2) "IE"
protected $_country =>
string(7) "Ireland"
protected $_bank =>
string(15) "BANK OF IRELAND"
protected $_cardType =>
string(5) "DEBIT"
protected $_latitude =>
NULL
protected $_longitude =>
NULL
protected $_cardSubBrand =>
NULL
protected $_cardCategory =>
string(0) ""
}
Installing via Composer
The recommended way to install BinLookup is through Composer.
# Install Composer curl -sS https://getcomposer.org/installer | php
Next, run the Composer command to install the latest stable version of BinLookup:
composer require mrferos/bin-lookup
After installing, you need to require Composer's autoloader:
require 'vendor/autoload.php';