Guest Posted March 16, 2003 Share Posted March 16, 2003 My client currently wants to manually enter the credit card information that he receives, so we are using the setting where the partial credit card information is sent via email. He currently takes only MC and VISA, no AMEX. Is there a way to reject AMEX formatted credit card numbers? Thanks for the help. Mark Link to comment Share on other sites More sharing options...
mugitty Posted March 16, 2003 Share Posted March 16, 2003 I also take only VISA and MC. In catalog/includes/classes/cc_validation.php, look for this section and comment accordingly: class cc_validation { var $cc_type, $cc_number, $cc_expiry_month, $cc_expiry_year; function validate($number, $expiry_m, $expiry_y) { $this->cc_number = ereg_replace('[^0-9]', '', $number); 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';} else {return -1;} // } 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'; ... if you want to REALLY see something that doesn't set up right out of the box without some tweaking, try being a Foster Parent! Link to comment Share on other sites More sharing options...
mugitty Posted March 16, 2003 Share Posted March 16, 2003 :oops: sorry, forgot to add: My version is from a 12/13/02 snapshot of osC2.2 If your version is different, your mileage may vary. ... if you want to REALLY see something that doesn't set up right out of the box without some tweaking, try being a Foster Parent! Link to comment Share on other sites More sharing options...
Guest Posted March 16, 2003 Share Posted March 16, 2003 So all you did was comment out the cards you don't take? Easy enough. Thanks for the quick reply. Link to comment Share on other sites More sharing options...
mugitty Posted March 16, 2003 Share Posted March 16, 2003 So all you did was comment out the cards you don't take? Yes, plus I've made sure that I point out which ones I do accept in a credit card infobox as well as making my define for credit cards read: Credit Card (VISA and MasterCard accepted) ... if you want to REALLY see something that doesn't set up right out of the box without some tweaking, try being a Foster Parent! Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.