Algorithm features:
1. Multiply the even number by 2 from the last digit of the card number. If the result of multiplying by 2 is a two-digit number, subtract 9 from the result.
Add up all the figures to get the total.
3. If the number is legal, the sum can be divisible by 10. (modulo 10 algorithm)
The algorithm is relatively simple, so I won't explain it much.
If readers need to verify the legitimacy of the bank card number and need more detailed results, they can use Ali's free API:
The return format is as follows:
Obtaining the bank name from the card number analysis can also be achieved by yourself, but the relevant data of the number at the beginning of the bank card number is needed and can be found on the Internet.