Forum Moderators: coopster

Message Too Old, No Replies

Credit Card Number Verification

PHP Version of the Luhn10 check

         

wruk999

8:12 pm on May 10, 2004 (gmt 0)

10+ Year Member



Hi,

I could do with some serious help, with coverting the Luhn10/Mod10 credit card check to PHP.

Is there anyone who has this, or could help convert a PERL version which I can post?

I need to pass PHP a string, take out all spaces, dashes, slashes, and then perform the Luhn10 check on the number, and return a TRUE or FALSE value.

Anyone that can help?

Cheers,
wruk999

madmac

8:42 pm on May 10, 2004 (gmt 0)

10+ Year Member



ah heck with it. If this forum will not properly post code, so be it.

you can checkout osCommerce MS2... there is a file in catalog/includes/classes/cc_validation.php that does what you are looking for.

wruk999

3:33 pm on May 11, 2004 (gmt 0)

10+ Year Member



Hi,

Thanks for the heads-up on the OS-C page. I have downloaded the package, and am actviely studying it.

Cheers,
wruk999