-->

ads

list of credit card bank identification numbers

Credit / debit card numbers are referred to as PAN, or Main Account Numbers. The first six digits of the PAN are taken from the issuing bank's IIN, or Issuer Identification Number, (IIN was formerly known as BIN - Bank Identification Number - so you can see references to the term in some documents). The six digits conform to the international standard, ISO / IEC 7812, and can be used to determine the card type of the number.


list of credit card bank identification numbers


Unfortunately the actual ISO / IEC 7812 database is not available to the public, however, there is an unofficial list, both commercial and free, including on Wikipedia.


However, to detect the type of number, you can use the regular expression as below: Credit for the original expression


Visa: ^ 4 [0-9] {6,} $ Visa card numbers starting with the number 4.


MasterCard: ^ 5 [1-5] [0-9] {5,} | 222 [1-9] [0-9] {3,} | 22 [3-9] [0-9] {4,} | 2 [3-6] [0-9] {5,} | 27 [01] [0-9] {4,} | 2720 ​​[0-9] {3,} $ Prior to 2016, MasterCard numbers started with the numbers 51 to 55, but would only detect MasterCard credit cards; there are other cards issued using the MasterCard system that are not included in this IIN range. In 2016, they will add the numbers in the range (222100-272099).


American Express: ^ 3 [47] [0-9] {5,} American Express card numbers starting with 34 or 37.


Diners Club: ^ 3 (?: 0 [0-5] | [68] [0-9]) [0-9] {4,} $ Diners Club card numbers starting with 300 to 305, 36, or 38. Diners Clubs that start with 5 and have 16 digits. This is a joint venture between Diners Club and MasterCard and should be processed like MasterCard.


Find: ^ 6 (?: 011 | 5 [0-9] {2}) [0-9] {3,} $ Find card numbers that start with 6011 or 65.


JCB: ^ (?: 2131 | 1800 | 35 [0-9] {3}) [0-9] {3,} $ JCB cards starting with 2131, 1800 or 35.


Unfortunately, there are a number of cards processed with the MasterCard system that do not fall within the IIN MasterCard range (numbers from 51 ... 55); the most prominent cases are the Maestro cards, many of which have been removed from other banks' IIN ranges and placed throughout the numeral space. As a result, it might be better to assume that all non-card types that you accept must be MasterCard.


Important: the length of the card number varies; for example, Visa has a previously issued card with a 13 digit PAN and a card with a 16 digit PAN. Current Visa documentation indicates that the number can be issued or issued with between 12 and 19 digits. Therefore, you should not check the length of the card number, other than to verify that the number has at least 7 digits (for the complete IIN plus one check digit, which must match the value predicted by the Luhn algorithm).


One further hint: before processing the cardholder PAN, remove any spaces and punctuation characters from the input. Why? Because it's usually easier to enter numbers in groups, similar to the one displayed on the front of an actual credit card.


4444 4444 4444 4444

much easier to insert correctly than


4444444444444444

There is absolutely no point punishing the user because they have entered a character you don't expect here.


It also implies making sure that your entry fields have space for at least 24 characters, otherwise users who enter the space will run out of space. I recommend that you make the field wide enough to display 32 characters and allow up to 64; which provides plenty of headroom for expansion.

LihatTutupKomentar