shiraz Posted February 3, 2007 Posted February 3, 2007 Hi all, Pretty new to this, very impressed with this software. This is probably a basic question but can't find answer in forum. I have merchant account and will be proccessing offline. I accept a handful of cards but not Amex. How do I get a drop down box or tick box or something so customers can choose credit card type. Cheers Quote
Zzenn Posted February 3, 2007 Posted February 3, 2007 No its not a bad question. I've spent 2 hours searching the forums and can not find an ounce of information on how to restrict Amex. I only have Master or visa capabilities and wish to dis-allow Amex. I'm going to keep searching but its not a common question. Quote
shiraz Posted February 4, 2007 Author Posted February 4, 2007 ZZen, There is a file called cc_validation.php in ../includes/classes which sets parameters for verifying cards. Its not the drop down menu I was hoping for, but iI believe if I delete the cards I am not using, it should do the job and come up with error message for anything else. ie change 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'; 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('^5610[0-9]{12}$', $this->cc_number)) { $this->cc_type = 'Australian BankCard'; then it should only accept these cards. As i don't have these actual cards to test can anyone tell me this is correct? Are there any other files that need changing? Shiraz Quote
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.
Note: Your post will require moderator approval before it will be visible.