Archive

Posts Tagged ‘Fun Fact’

Luhn Algorithm & General Credit Card Validity

September 11th, 2009
A interesting little tidbit i heard about today. All the major credit card companies (in the US at least) use something called the ‘Luhn algorithm’ to do a general validation on a credit card number. Checking out the Wikipedia Article about the algorithm, a whole mess of identification uses this “mod 10″ algorithm.


Code
: E-Commerce Tip: Programmatically Validate Credit Card Numbers

Just a quick way to determine if you should even move on to more detailed validation (is it a Visa?) before trying to charge the charge itself.
There is your fun fact for the month.

Uncategorized