Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Authorize.net is not working in Magento2.1.7 version but working fine in magento1.9 for the same credentials #10293

Closed
Jeevachezhiyan opened this issue Jul 20, 2017 · 6 comments

Comments

@Jeevachezhiyan
Copy link

Jeevachezhiyan commented Jul 20, 2017

Preconditions

Magento 2.1.7
Ubuntu 14.04.1
PHP 7.0.15
Apache 2.4.18
MySql 5.7.18

Steps to reproduce
I have configured test credentials in magento2 back end and i made one order using test card but it throws error like Unable to make Order ,But in 1.9 same credentials working fine with out any errors,so i checked in console i got response like below,
<html><head><script> window.location="http://xxxxx/xxx/authorizenet/directpost_payment/redirect/x_invoice_num/000000069/success/0/error_msg/Please enter a transaction ID to authorize this payment./controller_action_name/directpost_payment/";</script></head><body></body></html>

Expected result
It goes to success page but it throws error like below ,

Actual result
It throws unable to make an order
<html><head><script> window.location="http://182.74.57.131/xxxx/xxxx/authorizenet/directpost_payment/redirect/x_invoice_num/000000069/success/0/error_msg/Please enter a transaction ID to authorize this payment./controller_action_name/directpost_payment/";</script></head><body></body></html>

@Jeevachezhiyan Jeevachezhiyan changed the title Authorize.net is not working in this version but working fine in magento1.9 for the same credentials Authorize.net is not working in Magento2.1.7 version but working fine in magento1.9 for the same credentials Jul 20, 2017
@joni-jones
Copy link
Contributor

Hi, @Jeevachezhiyan, please provide the response from Authorize.net transact.dll action (you can find it in the browser console log during place order flow on the payment step).

@Jeevachezhiyan
Copy link
Author

Jeevachezhiyan commented Jul 24, 2017

@joni-jones please find the request and response below
Request :
x_version:3.1 x_delim_data:FALSE x_relay_response:TRUE x_test_request:TRUE x_login:2B68weVc x_method:CC x_relay_url:http://xxxxx/authorizenet/directpost_payment/response x_type:AUTH_ONLY x_fp_sequence:144 x_invoice_num:000000079 x_amount:45333 x_currency_code:USD x_tax:0.00 x_freight:5.00 x_first_name:Tester x_last_name:Test x_company:Test x_address:Test x_city:Test x_state:Armed Forces Canada x_zip:123456 x_country: x_phone:1234567890 x_fax: x_cust_id: x_customer_ip:182.74.57.131 x_customer_tax_id: x_email:testingteamtest3@gmail.com x_email_customer:0 x_merchant_email: x_ship_to_first_name:Tester x_ship_to_last_name:Test x_ship_to_company:Test x_ship_to_address:Test x_ship_to_city:Test x_ship_to_state:Armed Forces Canada x_ship_to_zip:123456 x_ship_to_country: x_po_num: x_fp_timestamp:1500889848 x_fp_hash:0e88afb59fc7d104ca827e12d1f56bef controller_action_name:directpost_payment is_secure: x_card_code:123 x_exp_date:11/25 x_card_num:4111111111111111
Response:
<html><head><script> window.location="http://xxxxx/authorizenet/directpost_payment/redirect/x_invoice_num/000000079/success/0/error_msg/Please enter a transaction ID to authorize this payment./controller_action_name/directpost_payment/";</script></head> <body></body></html>

directpost_payment controller response this one returning from authorize.net:
<html><head><script> var require = window.top.require; require( [ 'jquery', 'Magento_Ui/js/model/messageList', 'mage/translate' ], function($, globalMessageList, $t) { var parent = window.top; $(parent).trigger('clearTimeout'); globalMessageList.addErrorMessage({ message: $t('Unable to place order. Please try again later.') }); } );</script> </head><body></body></html>

@joni-jones
Copy link
Contributor

@Jeevachezhiyan, if you are using sandbox account, you must disable Test Mode in Authorize.net configuration.

Test Mode - No
Gateway URL - https://test.authorize.net/gateway/transact.dll
Transaction Details URL - https://apitest.authorize.net/xml/v1/request.api

@Jeevachezhiyan
Copy link
Author

@joni-jones I already tried it throw like below,
<HTML><BODY><H3>The following errors have occurred.</H3>(13) The merchant login ID or password is invalid or the account is inactive.<BR></BODY></HTML>

But in previous response you can see the invoice number returning from the site and i enabled the sandbox mode in authorize.net side.In magento 1.9 i just enabled test mode and i did't change the url but it's working fine.Can you give any other solution.

@joni-jones
Copy link
Contributor

The invoice number is provided by Magento because the order at first created on Magento side. Try to create another sandbox account. Sandbox accounts do not work with enabled Test Mode - this mode only for production accounts.

@Jeevachezhiyan
Copy link
Author

@joni-jones now everything working fine thanks for your help...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants