PHP Classes
elePHPant
Icontem

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

Recommend this page to a friend!
  Info   View files Documentation   View files View files (10)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2018-10-14 (3 hours ago) RSS 2.0 feedStarStarStarStar 66%Total: 186 All time: 8,261 This week: 294Up
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
Name: Yorch Ponce <contact>
Classes: 6 packages by
Country: Mexico Mexico
Innovation award
Innovation award
Nominee: 1x

Details

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  
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

 Version Control Unique User Downloads Download Rankings  
 100%
Total:186
This week:0
All time:8,261
This week:294Up
 User Ratings  
 
 All time
Utility:83%StarStarStarStarStar
Consistency:83%StarStarStarStarStar
Documentation:83%StarStarStarStarStar
Examples:-
Tests:83%StarStarStarStarStar
Videos:-
Overall:66%StarStarStarStar
Rank:677