A tool to lookup Credit Card BINs from one or more providers easily.
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) ""
}
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';