Where do i find a list of dummy credit card numbers?

喜夏-厌秋 提交于 2019-12-10 11:34:40

问题


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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!