Re: [GENERAL] Luhn algorithm (credit card verify / check) implementation - FIX

2009-05-12 Thread David Fetter
On Tue, May 12, 2009 at 02:54:29PM +0800, Craig Ringer wrote: > The Luhn algorithm implemention I posted earlier (upthread) is > internally consistent and will verify checksums it created, but it is > actually not a correct implementation of the Luhn algorithm. This looks like a great candidat

[GENERAL] Luhn algorithm (credit card verify / check) implementation - FIX

2009-05-11 Thread Craig Ringer
The Luhn algorithm implemention I posted earlier (upthread) is internally consistent and will verify checksums it created, but it is actually not a correct implementation of the Luhn algorithm. The earlier code added the doubled digits directly to the checksum, rather than adding each digit of