Forums / Bug Reports / [Fixed v1.5.1] "not accepting payments from your region" but zones=none

[Fixed v1.5.1] "not accepting payments from your region" but zones=none

Locked

Started by gregsmith on 9 May 2012, 5:56 PM · Views: 2,436

Results 1 to 3 of 3
This thread is locked. New replies are disabled.
9 May 2012, 5:56 PM
#1
gregsmith avatar

gregsmith

New Zenner

Join Date:
Jun 2008
Location:
Fort Lauderdale, Florida
Posts:
3
Plugin Contributions:
0

[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"

11 May 2012, 10:33 PM
#2
gregsmith avatar

gregsmith

New Zenner

Join Date:
Jun 2008
Location:
Fort Lauderdale, Florida
Posts:
3
Plugin Contributions:
0

Re: [Fixed v1.5.1] "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,

21 Jul 2012, 8:40 PM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,511
Plugin Contributions:
176

Re: [Fixed v1.5.1] "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.

.
Zen Cart - putting the dream of business ownership within reach of anyone!
Donate to: DrByte directly or to the Zen Cart team as a whole

Remember: Any code suggestions you see here are merely suggestions. You assume full responsibility for your use of any such suggestions, including any impact ANY alterations you make to your site may have on your PCI compliance.
Furthermore, any advice you see here about PCI matters is merely an opinion, and should not be relied upon as "official". Official PCI information should be obtained from the PCI Security Council directly or from one of their authorized Assessors.