问题
I have a very simple JS check and i am looking for a list of dummy cc numbers which i can exclude. Just for mastercard AmEx and Visa
var dummyCCArr = new Array();
dummyCCArr=["5105105105105100","4111111111111111", "4012888888881881", "378282246310005","5454545454545454","5431111111111111",];
if(jQuery.inArray(cardNo, dummyCCArr)!=-1){
ccErrorNo = 5;
return false;
}
Any links?
回答1:
Different credit card companies use different checksums to do an initial validation of the card (make sure it's a valid format for that brand of card).
You can find info Here on the different checksums used
EDIT: To clarify, I would perhaps validate using this kind of approach, it can't prove the fact that it is a valid credit card, just a valid format.
回答2:
From the looks of it, you are in trouble! Because I just found a valid CC number generator. (Not tested though).
Maybe apart from the very basic ones, you'll actually have to validate a CC after all.
http://mediakey.dk/~cc/wp-dyn/credit-card-number-generator.php
Here is another link
http://www.paypalobjects.com/en_US/vhelp/paypalmanager_help/credit_card_numbers.htm
来源:https://stackoverflow.com/questions/6276884/where-do-i-find-a-list-of-dummy-credit-card-numbers