Re: Credit card number checker?

From: Date: Mon, 16 Jul 2001 22:37:00 +0000
Subject: Re: Credit card number checker?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-58126@lists.php.net to get a copy of this message
On 16 Jul 2001, Dr. Evil wrote: > > I'm wondering if anyone can refer me to a site that describes what > this format is, so I can write some PHP code that will check to see if > a credit card number format is correct. I don't even want to try to > run the card through my merchant account if the format is obviously > wrong. I assume that banks check the rejection rate on their merchant > accounts, and too many bogus cards would not look good. > My suggestion is to run an authorization for an extremely small amount of money ($1.00 is fairly standard) and that will tell you if the account is valid or not. Doing validation yourself implies a fully-publicly-understood credit card numbering system and also commits you to keeping on top of changes to that numbering system. All credit cards today may be 15-16 digits. What if they are 20 in the future? What if they're 14? Allowing the processor to worry about this means less maintenance on your code later and removes some entropy from your system. John -- John Donagher Application Engineer Intacct Corp. - Powerful Accounting on the Web 408-395-0989 720 University Ave. Los Gatos CA 95032 www.intacct.com Public key available off http://www.keyserver.net Key fingerprint = 4024 DF50 56EE 19A3 258A D628 22DE AD56 EEBE 8DDD

« previous php.general (#58126) next »