donalrafferty Posted July 24, 2005 Share Posted July 24, 2005 I process credit cards manually in my shop. Can anyone tell me how to turn off osCommerce's automatic credit card validation? Even with the updated card identifiers it still does not accept many Irish VISA and Mastercards. Link to comment Share on other sites More sharing options...
Guest Posted July 25, 2005 Share Posted July 25, 2005 You can change your credit card validation criteria in: catalog/includes/classes/cc_validation.php or you can try commenting out the line: include(DIR_WS_CLASSES . 'cc_validation.php'); in includes/modules/payment/cc.php (not sure if this will work, you can try it :) ) Link to comment Share on other sites More sharing options...
donalrafferty Posted July 25, 2005 Author Share Posted July 25, 2005 I've just installed the Paypal website payments pro Contribution and it also uses the cc_validation.php file? Is this necessary? Thanks for your help Jemlin. I know it's a matter of changing something in the cc_validation.php file - maybe to comment out the if loop containing the identifiers and replacing the return -1 with a return 1. I'm just a bit reluctant to go messing around with it. Surely there must be someone who has disabled cc_validation already? Link to comment Share on other sites More sharing options...
donalrafferty Posted July 27, 2005 Author Share Posted July 27, 2005 Surely someone must have disabled credit card validation already - or at least come up with better verifyers that work with more cards. Vger, maybe you know? Link to comment Share on other sites More sharing options...
burt Posted July 27, 2005 Share Posted July 27, 2005 includes/classes/cc_validation.php Change from: if (ereg('^4[0-9]{12}([0-9]{3})?$', $this->cc_number)) { $this->cc_type = 'Visa'; } elseif (ereg('^5[1-5][0-9]{14}$', $this->cc_number)) { $this->cc_type = 'Master Card'; } elseif (ereg('^3[47][0-9]{13}$', $this->cc_number)) { $this->cc_type = 'American Express'; } elseif (ereg('^3(0[0-5]|[68][0-9])[0-9]{11}$', $this->cc_number)) { $this->cc_type = 'Diners Club'; } elseif (ereg('^6011[0-9]{12}$', $this->cc_number)) { $this->cc_type = 'Discover'; } elseif (ereg('^(3[0-9]{4}|2131|1800)[0-9]{11}$', $this->cc_number)) { $this->cc_type = 'JCB'; } elseif (ereg('^5610[0-9]{12}$', $this->cc_number)) { $this->cc_type = 'Australian BankCard'; } else { return -1; } To: if (ereg('^4[0-9]{12}([0-9]{3})?$', $this->cc_number)) { $this->cc_type = 'Visa'; } elseif (ereg('^5[1-5][0-9]{14}$', $this->cc_number)) { $this->cc_type = 'Master Card'; } elseif (ereg('^3[47][0-9]{13}$', $this->cc_number)) { $this->cc_type = 'American Express'; } elseif (ereg('^3(0[0-5]|[68][0-9])[0-9]{11}$', $this->cc_number)) { $this->cc_type = 'Diners Club'; } elseif (ereg('^6011[0-9]{12}$', $this->cc_number)) { $this->cc_type = 'Discover'; } elseif (ereg('^(3[0-9]{4}|2131|1800)[0-9]{11}$', $this->cc_number)) { $this->cc_type = 'JCB'; } elseif (ereg('^5610[0-9]{12}$', $this->cc_number)) { $this->cc_type = 'Australian BankCard'; } else { $this->cc_type = 'Credit/Debit Card'; } Rock and roll. Link to comment Share on other sites More sharing options...
donalrafferty Posted July 27, 2005 Author Share Posted July 27, 2005 Hi Burt, From what I can see here, this code will let anything through as just an unverified Credit/Debit Card if it doesn't pass Visa, Mastercard, etc. - which is exactly what I want! Thank you SO much! You're a star. Link to comment Share on other sites More sharing options...
burt Posted July 27, 2005 Share Posted July 27, 2005 From what I can see here, this code will let anything through as just an unverified Credit/Debit Card if it doesn't pass Visa, Mastercard, etc. - which is exactly what I want! <{POST_SNAPBACK}> Exactly so. If those strings don't pick up the Card as a recognised card, it just goes as "Credit/Debit Card". Obviously you'd then need to be certain that the Card is valid before sending out the order to the Customer. Link to comment Share on other sites More sharing options...
bongo Posted November 9, 2005 Share Posted November 9, 2005 I have tried to change the code as said over but i still get an error when inserting my card number of 16 characters. I have tried another card and that works. the two cards have diffiren numbers. 4925 5188 xxxx xxxx this one gets an error. 4025 0549 xxxx xxxx this goes thru Does anyone nows why? Regards Thomas B Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.