issues
search
kbohinski
/
CCValidator
Sample Credit Card Validator Implementation Using Java.
1
stars
0
forks
source link
Are you using Luhn-10 algorithm for CreditCard validation? If so it is wrong it seems.
#1
Open
Aariv
opened
5 years ago
Aariv
commented
5 years ago
This is based on Luhn-10 algorithm - The algorithm works as follows
Step 1: Start from right most digit and double to value of every second digit
Step 2: if doubling of number results in the digit number greater than 9 than add
digits of the product to get single digit.
Step 3: take the sum of all digits
Step 4: If total modulus 10 equal to 0 then it is valid credit card accoding to Luhn algorithm.
This is based on Luhn-10 algorithm - The algorithm works as follows