Saturday, 16 June 2012
Reading Credit Card Numbers
Do you like this story?
Have you ever tried to figure out what a credit card
number represent or if there is any way to figure out if number itself is
correct. You surely cant check the validity of credit card just by number, but
can figure out if credit card number is
valid or not.|
4
|
4
|
1
|
7
|
|
First Char is industry specific
1,2 – Airlines
3 – Travel
4,5 – Banking
6 – Merchandizing
7 – petroleum
8 – Telecom
9 – National Assignment
|
|
||
|
First 6 Digits are Issuer
identification number
VISA – 4*****
MasterCard – 51**** -
55****
Amex – 34****, 37****
|
|||
|
1
|
2
|
3
|
4
|
|
|
|
|
|
|
First 6 Digits are Issuer
identification number
VISA – 4*****
MasterCard – 51**** -
55****
Amex – 34****, 37****
|
7th Digit to 15th
Digit are personal identification number
|
||
|
5
|
6
|
7
|
8
|
|
7th Digit to 15th
Digit are personal identification number
|
|||
|
9
|
1
|
1
|
2
|
|
7th Digit to 15th
Digit are personal identification number
|
Final digit is checksum
for Luhn Algorithm
|
||
Card Number
Validation
|
4
|
4
|
1
|
7
|
1
|
2
|
3
|
4
|
5
|
6
|
7
|
8
|
9
|
1
|
1
|
3
|
Double every alternate digit
|
8
|
|
2
|
|
2
|
|
6
|
|
10
|
|
14
|
|
18
|
|
2
|
|
Add these digits to undobled digits. But here 14 becomes, 1+4
similary 10 becomes 1+ 0 and 18 become 1+8
|
|
4
|
|
7
|
|
2
|
|
4
|
|
6
|
|
8
|
|
1
|
|
3
|
Total = 8+4+2+7+2+2+6+4+1+0+6+1+4+8+1+8+1+2+3 = 70
If this number divisible by 10, means credit card number
is correct.
So if you are creating application that needs to validate
credit card numbers, use above logic.
Subscribe to:
Post Comments (Atom)
0 Responses to “Reading Credit Card Numbers”
Post a Comment