I am trying to write a function in VB 4 which takes a credit card number and returns...
* Whether the card number is valid or not.
* The type of credit card (Visa, MasterCard, Discover, American Express etc).
I know there is a mathematical algorithm which can check for valid credit card number patterns. Can anyone provide me with a routine which does the above and/or an algorithm to do this please? I think that the card type can easily be detected by looking at the first digit of a credit card number, but which value represents which card type?