Re: Credit card number checker?

From: Date: Mon, 16 Jul 2001 22:43:51 +0000
Subject: Re: Credit card number checker?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-58128@lists.php.net to get a copy of this message
"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. http://www.hotscripts.com/PHP/Scripts_and_Programs/E-Commerce/Credit_Card_Processing/ Verifying the validity of a CC number is fairly simple. Just search Google for the 'Luhn Mod 10' formula and you'll find out how it's done (or follow the above link and get any of the scripts and go through them). However, as someone else pointed out, verifying whether the account is valid, is a different story. Sure, I can punch in any (valid) CC#, but who's to say that account actually exists? You won't know that till you submit data to the merchant, to see if the account actually exists. -- H | Hi, I'm currently out of my mind. Please leave a message. BEEEEP! +-------------------------------------------------------------------- Ashley M. Kirchner <mailto:ashley@pcraft.com> . 303.442.6410 x130 Director of Internet Operations / SysAdmin . 800.441.3873 x130 Photo Craft Laboratories, Inc. . 3550 Arapahoe Ave, #6 http://www.pcraft.com ..... . . . Boulder, CO 80303, U.S.A.

« previous php.general (#58128) next »