Sunday, January 23, 2011

Cracking The Credit Card Code | MintLife Blog | Personal Finance News & Advice

Cracking The Credit Card Code | MintLife Blog | Personal Finance News & Advice

This is probably the best presentation I have seen explaining how check digit routines work. We use these at work for non-credit card numbers, and usually you have to suffer through them once. If you are smart and you write proper object oriented code, you'll be able to reuse your check digit for say, Generic Airlines Frequent Flyer, as many times as you want since once they adopt the scheme odds are they'll stick for it for years.

When this turns challenging is when the spec documents are sloppy. I implemented one of these check digits for a customer in the hospitality industry, and their example case for the check digit routine had a tiny little redundancy error. The result? My check digit routine was WRONG, but it WORKED with the example account numbers. Fun times ...

No comments:

Post a Comment