Zen Cart Logo
Forums / Addon Payment Modules / AuthorizeNet switch from test to production looses card pay option

AuthorizeNet switch from test to production looses card pay option

Views: 2,437

Results 1 to 14 of 14
11 May 2013, 7:39 AM
#1
kevin_a avatar

kevin_a

Zen Follower

Join Date:
Mar 2007
Location:
Worcester UK
Posts:
138
Plugin Contributions:
0

AuthorizeNet switch from test to production looses card pay option

I have set authorize.net AIM module to Production from Test.

While in test mode the card processing works.

Switching to Production mode and the pay by card option disappears in checkout.

https://www.romseybaitandtackle.co.uk/

Any help appreciated.
Thanks

11 May 2013, 8:37 AM
#2
kevin_a avatar

kevin_a

Zen Follower

Join Date:
Mar 2007
Location:
Worcester UK
Posts:
138
Plugin Contributions:
0

Re: AuthorizeNet switch from test to production looses card pay option

I have set the FOLLOWING

/includes/modules/payment/authorizenet.php
Line #434 : if (MODULE_PAYMENT_AUTHORIZENET_TESTMODE == 'Test') $submit_data['x_Test_Request'] = 'FALSE';

/includes/modules/payment/authorizenet_aim.php
Line #547 : $submit_data['x_test_request'] = 'FALSE';

/includes/modules/payment/authorizenet_echeck.php
Line #536 : $submit_data['x_test_request'] = 'FALSE';

11 May 2013, 8:39 PM
#3
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: AuthorizeNet switch from test to production looses card pay option

kevin_a:

I have set the FOLLOWING

/includes/modules/payment/authorizenet.php
Line #434 : if (MODULE_PAYMENT_AUTHORIZENET_TESTMODE == 'Test') $submit_data['x_Test_Request'] = 'FALSE';

/includes/modules/payment/authorizenet_aim.php
Line #547 : $submit_data['x_test_request'] = 'FALSE';

/includes/modules/payment/authorizenet_echeck.php
Line #536 : $submit_data['x_test_request'] = 'FALSE';

Undo any coding changes you've made to the module. There's no need to change the PHP code in order to switch from test to production. ONLY use the switch in the module's settings.
If you don't put the code back to original, there's no point in us engaging with you for troubleshooting.

11 May 2013, 8:40 PM
#4
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: AuthorizeNet switch from test to production looses card pay option

kevin_a:

I have set authorize.net AIM module to Production from Test.

While in test mode the card processing works.

Switching to Production mode and the pay by card option disappears in checkout.
Let's start with what Zen Cart version you're using.
And a list of all the mods/plugins you've installed.
How long has this store been "live"?
When did you first enable the Authnet AIM module?
What currency is your Authnet account configured for (at Authorize.net)?
What currency is your store using?

11 May 2013, 9:54 PM
#5
kevin_a avatar

kevin_a

Zen Follower

Join Date:
Mar 2007
Location:
Worcester UK
Posts:
138
Plugin Contributions:
0

Re: AuthorizeNet switch from test to production looses card pay option

I set the
/includes/modules/payment/authorizenet.php
/includes/modules/payment/authorizenet_aim.php
/includes/modules/payment/authorizenet_echeck.php

'x_test_request' to follow the advice on the authorizenet web page.
As follows.

"To disable Test Mode through your website, you will need to modify your script. If the script includes the field x_test_request then you would want to make sure it is set to "FALSE".

I have returned the setting to the default of "TRUE".

Let's start with what Zen Cart version you're using.

v1.5.1 [2012-12-19 14:23:34] (New Installation)

And a list of all the mods/plugins you've installed.

Shipping Modules

Store pick up
Zone Rates

Payment Modules

Authorize.net (AIM)
Check/Money Order
PayPal Express Checkout

Catalogue Add On

Easy Slider by Kerrin Hardy
Products with attributes Stock from Kuroi
Cookie Control (disabled)
Editable Sideboxes.

How long has this store been "live"?

Switched from Test to production 18hrs.

When did you first enable the Authnet AIM module?
Im not sure how to check the timing

This email from authorize.net on
Friday, May 10, 2013 4:25 PM
from authorize.Net
"We have been advised by Cardnet that we don’t need to contact them and provide them the TID to activate, but that the solution should be active as of now and work."

What currency is your Authnet account configured for (at Authorize.net)?
USD

What currency is your store using?

Configured using settings on github to convert store GBP to USD

https://github.com/zencart/zencart/commit/d0e3100a2ee91a0cbae90cd10d5c0319a9933be7

I hope that is helpful.

kevin_a

11 May 2013, 10:15 PM
#6
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: AuthorizeNet switch from test to production looses card pay option

kevin_a:

What currency is your Authnet account configured for (at Authorize.net)?
USD

What currency is your store using?

Configured using settings on github to convert store GBP to USD

https://github.com/zencart/zencart/commit/d0e3100a2ee91a0cbae90cd10d5c0319a9933be7
So, your store is in the UK, and your customers shop in GBP, and you're converting everything to USD for payment to deposit into a USD bank account?

Edit:
Actually, I just went back and looked at your prior posts. It would have been helpful for you to include the link to the prior discussion. That would have helped at least answer some of the questions already asked. http://www.zen-cart.com/showthread.php?207882-Authorize-net-AIM-module-currency-code-invalid-unresolved&p=1201497#post1201497

11 May 2013, 10:16 PM
#7
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: AuthorizeNet switch from test to production looses card pay option

kevin_a:

Switching to Production mode and the pay by card option disappears in checkout.
To clarify, are you saying that when the customer clicks on their Shopping Cart, chooses a shipping method, and proceeds to the payment-selection page, the AIM module is not displaying?

11 May 2013, 10:21 PM
#8
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: AuthorizeNet switch from test to production looses card pay option

kevin_a:

https://www.romseybaitandtackle.co.uk/

  1. Why do you have the ENTIRE storefront running as SSL? Is there a business or security reason why you feel it necessary to encrypt "every" page of the site, and not just the pages which contain sensitive data (which Zen Cart will do automatically if you configure it properly) such as login/account/checkout.

  2. Why do you have ENABLE_SSL set to 'false' in your configure.php file? (that will disable the module)

12 May 2013, 1:37 AM
#9
kevin_a avatar

kevin_a

Zen Follower

Join Date:
Mar 2007
Location:
Worcester UK
Posts:
138
Plugin Contributions:
0

Re: AuthorizeNet switch from test to production looses card pay option

Thanks for the reply. I apologize for not pointing to a history. I thought each step prior was a closed issue.

I hope the following is of use.


--QUOTE---
To clarify, are you saying that when the customer clicks on their Shopping Cart, chooses a shipping method, and proceeds to the payment-selection page, the AIM module is not displaying?
--/QUOTE---

When a customer goes through checkout to the index.php?main_page=checkout_payment page, the payment options presented do not have a radio button for Credit Card.
This was working in Test mode, and test purchases were successful, but this button is not an option present in production mode.


--QUOTE---
So, your store is in the UK, and your customers shop in GBP, and you're converting everything to USD for payment to deposit into a USD bank account?
--/QUOTE---

The merchant account was set up by the store owner. Authorize Net was selected as a gateway because it was present as a default module and I expected it to be relatively seamless.


On the authorize Net web site the following claim is made.

"Payment Processing
• Signature debit cards: Visa Debit, Maestro
• Credit cards: Visa®, MasterCard®, JCB
• Currencies: GBP, Euros and USD."

When attempting to pay in GBP, the gateway declined payment, and I was advised by authorize.Net to find a code edit to deliver payment in USD. Hence my mods to the php files for currency conversion.

--QUOTE---
1. Why do you have the ENTIRE storefront running as SSL? Is there a business or security reason why you feel it necessary to encrypt "every" page of the site, and not just the pages which contain sensitive data (which Zen Cart will do automatically if you configure it properly) such as login/account/checkout.
--/QUOTE---

I put the store under SSL when I was having earlier difficulties, and didn’t expect it to present an operational problem.
I would address the store front SSL status when things are operating under the current set up. I also intended to pre-empt further obstacles from Authorize.Net over security issues.
I was presuming this to be superfluous rather than erroneous.


--QUOTE---
2. Why do you have ENABLE_SSL set to 'false' in your configure.php file? (that will disable the module)
--/QUOTE---

I am unable to locate the false setting. Opening the files on the server display all set to true.
Includes/configure.php
Line 23 define('ENABLE_SSL', ‘true’);
Admin/includes/ configure.php
define('ENABLE_SSL_ADMIN', 'true');
define('ENABLE_SSL_CATALOG', 'true')



I hope this covers your questions
Thanks for your help.

Kevin_a

12 May 2013, 2:13 AM
#10
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: AuthorizeNet switch from test to production looses card pay option

FYI, to "quote" something on this forum, use standard BBCode ... which is [ followed by the word QUOTE, followed by a closing ] .... and to close the quote, use [/ followed by QUOTE and ]

12 May 2013, 2:32 AM
#11
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: AuthorizeNet switch from test to production looses card pay option

Most payment modules work under the following premise, including Authorizenet-AIM:

  1. Module must be Enabled (Green or Amber dot next to it in the Admin, and the Status radio-button at the top of the module's settings set to True)
  2. Customer's billing address must fall within the zone restrictions you've assigned to the module in the module's Admin settings. If the Payment Zone setting is set to other than --None--, then it will only activate if the customer's billing address is in the zone selected (ie: appropriate country+state). If you don't intend to disable the module for any geographic reasons, leave it set at --None--, which is the default.
  3. If the module takes live card data directly on your site (as the AIM module does), then SSL must be properly configured in your store. This means the HTTPS_SERVER setting contains a valid working URL and ENABLE_SSL is set to a string value of 'true' (not a boolean value of true, note the difference in quotes vs none).
  4. Some modules only activate if the purchase price is below a certain threshold. The AIM module doesn't have this restriction.
13 May 2013, 8:44 AM
#12
kevin_a avatar

kevin_a

Zen Follower

Join Date:
Mar 2007
Location:
Worcester UK
Posts:
138
Plugin Contributions:
0

Re: AuthorizeNet switch from test to production looses card pay option

Thank you for your reply Dr.Byte.

I have checked through the points you made, and found the following

The quote marks for ‘true’ in the php file had left and right single quotation marks, HTML number &#8216/7 and not single quotation mark HTML number '

‘true’
not
'true'
the different type of quote mark must have failed being parsed, a frustrating error not plainly evident in the editor.
Thank you for the check list.

Unfortunately, although the correct display of the credit card option with fields is now presented, clicking ‘continue’ on the page passes to
checkout-confirm where the details are displayed,
then clicking Confirm Order , throws back to the checkout-payment page for re-entry of data.
the response has the error message,

The request field(s) are either invalid or missing. - Your credit card could not be authorized for this reason. Please correct the information and try again or contact us for further assistance.

despite the fact that the fields are correct, having been tried several times.

So I presume the aim module, or wherever this is processed, is not recognizing the details of the card holder.

Can you please suggest where I might look for this obstruction.

Thank you.

Kevin

13 May 2013, 11:09 AM
#13
kevin_a avatar

kevin_a

Zen Follower

Join Date:
Mar 2007
Location:
Worcester UK
Posts:
138
Plugin Contributions:
0

Re: AuthorizeNet switch from test to production looses card pay option

I have resolved the connection.
I appreciate that when you posted ..

Undo any coding changes you've made to the module. There's no need to change the PHP code in order to switch from test to production. ONLY use the switch in the module's settings.
If you don't put the code back to original, there's no point in us engaging with you for troubleshooting.

that working from a default file is a safer way to proceed for troubleshooting than on a file with any edits.

However, when I reinstated the edit for the 3 authorizenet files, setting 'x_test_request' to FALSE, as proposed by Authorize.Net, the links were successful and payment possible in production mode.

Hopefully this is a closed thread, and I appreciate you picking it up and being patient with help through the obstacles.

Regards

Kevin

13 May 2013, 6:37 PM
#14
drbyte avatar

drbyte

Sensei

Join Date:
Jan 2004
Posts:
63,513
Plugin Contributions:
177

Re: AuthorizeNet switch from test to production looses card pay option

kevin_a:

However, when I reinstated the edit for the 3 authorizenet files, setting 'x_test_request' to FALSE, as proposed by Authorize.Net, the links were successful and payment possible in production mode.
Things to note:

  1. The AIM module only uses the authorizenet_aim.php files. The other authorizenet files are NOT used by AIM. So best to put them back to originals.
  2. You said you had to make code changes related to x_test_request. That tells me that your admin switch settings are not properly being saved since, as you can see in the code, the only time the x_test_request parameters would be submitted as True is if the module's admin switch is set with test-mode as true.