Having looked at the current credit card number validation routine, the method of identifying the card type by the first digit is incorrect. To have a full validation routine (such as the one here) would seem both difficult to maintain and also completely unnecessary. In my view, it's for the acquiring bank to determine if they like the card number -- all we have to do is check that it's numeric (re: this issue).
This will effectively put the onus on the individual payment gateways to provide feedback based on the error they receive from the card processing service.




Joined: 04/20/2008