PHP Classes

PHP IIN and BIN: Identify card issuer and bank from numbers

Recommend this page to a friend!
  Info   Documentation   View files Files   Install with Composer Install with Composer   Download Download   Reputation   Support forum   Blog    
Ratings Unique User Downloads Download Rankings
StarStarStarStar 66%Total: 241 All time: 8,024 This week: 524Up
Version License PHP version Categories
phpbin 1.0.2Custom (specified...5PHP 5, E-Commerce, Web services
Description 

Author

This package can identify card issuer and bank from numbers.

It takes the first digits of a credit or debit card number and sends a request to the BinList API Web server to determine the card information.

Currently it returns the card issuer bank identifier number, brand, bank, card type, card category, country, country code, web site and phone number.

The class stores the retrieved information in a database for local caching.

Innovation Award
PHP Programming Innovation award nominee
July 2016
Number 11
The first digits of a credit or debit card are associated with the bank or the institution that issued the card.

This class can determine details about the bank or the card issuer by calling BinList API.

Manuel Lemos
Picture of Yorch Ponce
Name: Yorch Ponce <contact>
Classes: 6 packages by
Country: Mexico Mexico
Age: 43
All time rank: 205922 in Mexico Mexico
Week rank: 195 Up4 in Mexico Mexico Up
Innovation award
Innovation award
Nominee: 1x

Documentation

phpBIN

Description

PHP Library for validate BIN/IIN Numbers Cards

Requirements

Developer Documentation

Execute phpdoc -d phpBIN/

Unit Test

For run Unit Test, complete information connection and execute the next commands: > phpunit PhpBINTest.php > phpunit PhpBINTestMy.php > phpunit PhpBINTestMon.php

Installation

Create file composer.json


{
    "require": {
    	"php": ">=5.4.0",
        "yorch/phpbin" : "dev-master",
        "catfan/medoo": "dev-master"
    }
}

Execute composer.phar install

Example


$mybin = PhpBIN::getInstance('BinList');

var_dump($mybin->getInfo("111904"));

array(11) {
  'BIN' =>
  string(6) "111904"
  'BRAND' =>
  string(9) "Visa Plus"
  'BANK' =>
  NULL
  'CARD_TYPE' =>
  string(5) "DEBIT"
  'CARD_CATEGORY' =>
  string(4) "VISA"
  'COUNTRY' =>
  string(13) "United States"
  'CC_ISO3166_1' =>
  string(2) "US"
  'CC_ISO_A3' =>
  string(0) ""
  'COUNTRY_NUM' =>
  string(3) "840"
  'WEBSITE' =>
  NULL
  'PHONE' =>
  NULL
}

Notes

This library uses http://www.binlist.net/ with this limits.

Limits

Due to the high volume of queries we've implemented a throttling mechanism, which allows at most 10,000 queries per hour. After reaching this hourly quota, all your requests result in HTTP 403 (Forbidden) until it clears up on the next roll over.

For local Database implementation must configure with the connect method.

Check MySQL import script binbase.sql.

For import binbase to MongoDb check mongo.script and execute commands.

References

http://www.binlist.net/

P.D. Let's go play !!!


  Files folder image Files (10)  
File Role Description
Plain text file BIN.class.php Class Class source
Accessible without login Plain text file binbase.sql Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE Lic. License
Accessible without login Plain text file mongo.script Data Auxiliary data
Plain text file PhpBIN.class.php Class Class source
Accessible without login Plain text file PhpBINTest.php Test Unit test script
Accessible without login Plain text file PhpBINTestMon.php Test Unit test script
Accessible without login Plain text file PhpBINTestMy.php Test Unit test script
Accessible without login Plain text file README.md Doc. Documentation

The PHP Classes site has supported package installation using the Composer tool since 2013, as you may verify by reading this instructions page.
Install with Composer Install with Composer
 Version Control Unique User Downloads Download Rankings  
 100%
Total:241
This week:0
All time:8,024
This week:524Up
 User Ratings  
 
 All time
Utility:83%StarStarStarStarStar
Consistency:83%StarStarStarStarStar
Documentation:83%StarStarStarStarStar
Examples:-
Tests:83%StarStarStarStarStar
Videos:-
Overall:66%StarStarStarStar
Rank:513