ronr1999 Posted July 16, 2006 Share Posted July 16, 2006 A customer transposed the last two digits of his credit card (visa) and cc_validation.php caught it. At least I think it was cc_validation.php... it might also be: authorizenet.php. I was getting error message: " The credit card number entered is invalid. Please check the number and try again." ...it must be authorizenet.php... or ? RonR Quote Link to comment Share on other sites More sharing options...
borghe Posted July 17, 2006 Share Posted July 17, 2006 (edited) http://www.beachnet.com/~hstiles/cardtype.html as for which module caught it, it was cc_validation.php, which is a class instantiated in your CC module (cc.php or authorize.net where it is called). I have personally modded cc_validation further to prevent usage of non-visa/mc and check for a proper CVV (which my check will also check for proper CVV on AMEX if I ever decide to accept it). the mod10 check however is the most basic. if a CC doesn't pass mod10, there is no way the number will be correct. Edited July 17, 2006 by borghe Quote Link to comment Share on other sites More sharing options...
GregZ Posted July 21, 2006 Share Posted July 21, 2006 http://www.beachnet.com/~hstiles/cardtype.html I have personally modded cc_validation further to prevent usage of non-visa/mc and check for a proper CVV (which my check will also check for proper CVV on AMEX if I ever decide to accept it). I too only accept Visa and MC. I would like to know how you did the mod. I need to do the same. Quote Link to comment Share on other sites More sharing options...
borghe Posted July 21, 2006 Share Posted July 21, 2006 (edited) I believe I posted it elsewhere, but to mod cc_validation just look at the main check at the beginning of the validate function. let it go through and determine what kind of card it is and if it's valid. then at the bottom of the "if"s ad an if for something like if ($card->cc_type != 'Master Card' && $card->cc_type != 'Visa') return -6; then in your credit card module under the validation section add a case for -6 and have it throw an error message and break; I also added a CVV validation right above it in cc_validation. mine basically says if ((strlen($card->cc_cvv) != 4 && $card->cc_type == 'American Express') || strlen($card->cc_cvv) != 3) return -5; and then case -5: in the auth.net module is "please enter a valid card security code" Edited July 21, 2006 by borghe Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.