On 11/28/01, Jim McAtee penned: >Can anyone point me toward an authoritative source for the algorithms used >to validate credit card numbers and to identify card types based on the card >number? There are numerouse code examples to be found on the web, in >various languages (but with significant differences in both the checksum >validation and in the card identification). I'd like to find a source that >I can have a little more confidence in.
Not sure about the algorithm, but here is what I use the check the card type. <CFIF (cardtype is "MasterCard" and left(cardnum, 1) is not "5") or (cardtype is "Visa" and left(cardnum, 1) is not "4") or (cardtype is "American Express" and left(cardnum, 2) is not "37") or (cardtype is "Discover" and left(cardnum, 4) is not "6011")> Card number does not match card type. </cfif> -- Bud Schneehagen - Tropical Web Creations _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/ ColdFusion Solutions / eCommerce Development [EMAIL PROTECTED] http://www.twcreations.com/ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Structure your ColdFusion code with Fusebox. Get the official book at http://www.fusionauthority.com/bkinfo.cfm FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/[email protected]/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

