2
Vote

Luhn Test fails for valid credit card numbers

description

Using both real card numbers and the publicly available test numbers, the CreditCard.IsValid method fails. Several published c# examples online also fail so this may explain the confusion. I found an example that works flawlessly. I've attached a subversion patch file that includes the change and a test to exercise both positive and negative test.

file attachments

comments

levous wrote Aug 17, 2009 at 9:20 PM

that attachment is a subversion patch. Sorry I forgot to give it an extension

wrote Aug 17, 2009 at 9:20 PM

wrote Sep 24, 2010 at 6:07 AM

wrote Feb 21, 2013 at 10:38 PM