更新时间:2022-12-23 15:04:36
不同的信用卡公司使用不同的校验和来对卡进行初始验证(请确保该卡的有效格式适用于该品牌的卡)。
您可以在此处找到有关使用的不同校验和的信息 p>
编辑:为澄清起见,我也许会使用这种方法进行验证,它无法证明它是有效的信用卡,只是一种有效的格式。
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?
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.