[Fixed v1.5.1] "not accepting payments from your region" but zones=none
I just started testing an upgrade (to v.150) on one of our development servers. I made sure it was working properly as is (v.138a in "test mode") before starting the upgrade process. The upgrade went well and I copied in our template. Our content pages look good. Trying a purchase, uncovered a problem. After we fill in the form on the login page and hit "continue", we get a message (on the next page, page 2 of 3, "main_page=checkput_payment") saying "Sorry, we are not accepting payments from your region at this time", despite the fact that our products are "virtual", and we have "Payment Zone" set to "--none--". We use Authorize.net (AIM) if that helps.
I know a lot of work has gone into v.150 and it is impressive. Congratulations.
I decided to look, and found the bug ...
The bug is in the failure to recognize "test mode".
After the line
if (!defined('ENABLE_SSL') || ENABLE_SSL != 'true') ...
is changed to
if ((!defined('ENABLE_SSL') || ENABLE_SSL != 'true') && MODULE_PAYMENT_AUTHORIZENET_AIM_TESTMODE != 'Test') ...
then everything works correctly.
"Test mode" is an authorize.net feature for the purpose of working off-site - on a development server, not production.
I know a lot of work has gone into v.150 and it is impressive. I would say that if all bug fixes were this easy, "life could be a dream"
Re: "not accepting payments from your region" but zones=none
Sorry, for those developers who are not familiar with the payment modules, all payment module code is in [zc]/includes/modules/payment/ and the relevant authorize.net (AIM) code which I mentioned as the one we are using, is in
authorizenet_aim.php, ... the very first if statement in the function update_status.
right after the comment which should read
// if store is not running in SSL, or in test mode, ...
If I have missed documentation somewhere that explains how to implement Auth.net's test mode, on a development and testing server, please let me know. I apologize in advance.
Without it, the simple rational for this being a bug, is that "No one develops on their live server." Period. Everyone does their coding, degugging, and testing, testing, testing! Till everything has been tested and confirmed - off-site.
Thank you. Again,
Re: "not accepting payments from your region" but zones=none
The counter-argument is that if you're not using SSL and yet you're still submitting credit card numbers, even in test mode, then you're creating a fraud/security risk.
Why not just do it securely and set up a self-signed SSL certificate on your development server? That would give you the ability to properly test your development site in SSL mode, beyond just payment processing.