Magento2: Authorized.net "Sorry, but something went wrong. Please contact the seller."

Created on 1 Nov 2016  路  31Comments  路  Source: magento/magento2

Preconditions

Magento 2.1.0
PHP 5.6.26
MySQL .6.26

Steps to reproduce

Go to checkout and pay with authorized.net (sandbox or production, i tested both)
should see a message "Sorry, but something went wrong. Please contact the seller."

Expected result

Should see success page after pay.

Actual result

After click in "placer order" with authorized.net i get that error. I searched about it in the code and appear in the file

app/code/Magento/Authorizenet/view/frontend/web/js/view/payment/method-renderer/authorizenet-directpost.js

Line 16 : timeoutMessage: 'Sorry, but something went wrong. Please contact the seller.'

The debug.log show me the array sent to authorized, and it seem good.

Do anyone have a clue about how to fix it?

Any clue in any log file

selection_014

Payment Format is valid needs update bug report

Most helpful comment

All 31 comments

Hi @mvaisberg, thanks for reporting.
Could you check errors in a browser console, attach debug log and response from transact.dll request?

Hi @joni-jones thank you for the answer.

This is the response log in the debug.xml:

selection_017

In my console of the browser i haven't any error, this is the screenshot:

selection_016

You can try reproduce the error trying to buying in https://billiespecansm2.121getsitdone.com/
I used this sandbox card number: 5424000000000015

In the first screenshot appear my local url but the same log appear in the staging environment (https://billiespecansm2.121getsitdone.com/).

Do you need anything else?

Do you use Authorize.net production or sandbox mode?
Also, your x_relay_url looks like URL for a local environment, but authorize don't work for local instances.

I tried with sandbox credentials and production credentials, both same issue. The screenshot are from sandbox credentials.

Same error apear in staging enviroment too.

selection_018

For sandbox environment, the Test Mode option should be disabled (x_test_request), this option only for production mode.

I changed test mode to "No" and still not working

selection_021

Please, attach response from transact.dll request.

How can i get it? is there a log or i have to debug the core?

You can get response from browser network console.

After click in place order this request response appear

selection_024

selection_023

The second one is:

{"success":true,"authorizenet_directpost":{"fields":{"x_version":"3.1","x_delim_data":"FALSE","x_relay_response":"TRUE","x_test_request":"FALSE","x_login":"9J3dXq88rc","x_method":"CC","x_relay_url":"https://billiespecansm2.121getsitdone.com/authorizenet/directpost_payment/response","x_type":"AUTH_CAPTURE","x_fp_sequence":"64","x_invoice_num":"000000028","x_amount":26.39,"x_currency_code":"USD","x_tax":"0.00","x_freight":"0.00","x_first_name":"Francis","x_last_name":"Spencer","x_company":"","x_address":"14349 Washington Blvd","x_city":"Cleveland","x_state":"Ohio","x_zip":"44118","x_country":"","x_phone":"2165866656","x_fax":"","x_cust_id":"","x_customer_ip":"206.123.129.223","x_customer_tax_id":"","x_email":"[email protected]","x_email_customer":"0","x_merchant_email":"[email protected]","x_ship_to_first_name":"Francis","x_ship_to_last_name":"Spencer","x_ship_to_company":"","x_ship_to_address":"14349 Washington Blvd","x_ship_to_city":"Cleveland","x_ship_to_state":"Ohio","x_ship_to_zip":"44118","x_ship_to_country":"","x_po_num":"","x_fp_timestamp":1478095743,"x_fp_hash":"466d2668857d41df686e7f9a4cfe809f","controller_action_name":"directpost_payment","is_secure":"1"}}}

You need a response from transact.dll.
transactdll
Also, check if URL for transact.dll is correct (https://test.authorize.net/gateway/transact.dll for sandbox)

ok, changing that for sandbox it works!

should i use "https://secure.authorize.net/gateway/transact.dll" ?

Thanks, it works perfecto in both sandbox and production now !!!

thanks you very much!!

I'm experiencing the same issue,
I'm in production mode and using the correct Production URLs,
Any help?

Thank you!

Do you have authorized.net in live mode and Test Mode => No in the configuration of magento?

Attach please the response in var/log/debug.xml

authorize.net is in live mode,
(replaced domain with changed.com)
debug.log.txt

Thanks for your help!

So, we were experiencing this problem over the past 2 weeks, and have hunted for the problem the entire time. For us, it turns out, that once I asked our Host provider to see if they could see any responses back from authorize.net's network at the time of the timestamp, Auth.net was hitting our maintenance mode flag.

We have been running the site in Maintenance mode with a set of whitelisted IPs to allow us access, but blocking public access.

Well, as soon as I disabled the maintenance flag, re-did a purchase that I have done a bunch of time, the entire sequence suddenly started to work flawlessly (from what we can tell at this time), we actually get a Order# and the message: "We'll email you an order confirmation with details and tracking info.".

On a side note, if you are running multiple stores and store views, the setting at each Store IS NOT being used. It is defaulting to the base website settings. There is a fix (see issue #7943)
But these two items combined caused nearly two weeks of troubleshooting to find these resolutions.

Hope this helps somebody.

I have used all the following url for authoirize.net account setup in Magento 2.1.1 but still getting same error "Sorry, but something went wrong. Please contact the seller"

Sandbox URLs:
https://test.authorize.net/gateway/transact.dll - gateway
https://apitest.authorize.net/xml/v1/request.api - transaction details

Production URLs:
https://secure.authorize.net/gateway/transact.dll - gateway
https://api.authorize.net/xml/v1/request.api - transaction details

https://secure2.authorize.net/gateway/transact.dll
https://api2.authorize.net/xml/v1/request.api

here i am attaching transact.dll console of my sandbox account

transact

did you find a solution? i as well am getting the same issue in 2.1.4

I would like to update this item where we found another item that can cause this problem. If you've got a multi-store configuration and you've got Geo-IP forwarding setup, it seem as though some Geo-IP extensions are preventing the final response back from authorize.net's network that the sale was successful, and so the end user is seeing the "something went wrong..." message, when in fact the order was successful. We disabled our Geo-IP as a quick test and "voila" things started to work again. I'm not going to name the extension vendor, as they are working on resolving the problem, but I thought it would be prudent to tell some people of this situation. Again though, the order is successful (on both M2 backend and in Authorize.net's network), but the buyer is getting the wrong message.

Hi,
I am getting issue below like this but my credentials working fine in magento1.9 but in magento2 it's not working i configured in sandbox mode please check the error below.






Debug log:
[2017-07-17 10:16:20] main.DEBUG: array (
'request' =>
array (
'x_version' => '3.1',
'x_delim_data' => 'FALSE',
'x_relay_response' => 'TRUE',
'x_test_request' => 'TRUE',
'x_login' => '**',
'x_method' => 'CC',
'x_relay_url' => 'http://xxxxxx/authorizenet/directpost_payment/response',
'x_type' => 'AUTH_ONLY',
'x_fp_sequence' => '129',
'x_invoice_num' => '000000072',
'x_amount' => 408,
'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' => '[email protected]',
'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' => 1500286580,
'x_fp_hash' => '5b364690c3df53ef5b254bc574de09d9',
),
) {"is_exception":false} []

@Jeevachezhiyan it looks like your response URL is too long (unless you've modified it): "success/0/error_msg/Please enter a transaction ID to authorize this payment./controller_action_name/directpost_payment/"

it should look something like : "https://www.website.com/authorizenet/directpost_payment/response"

Oh, and your URL MUST use https for authorize.net or it will not respond correctly.

@spyrule that one is default magento response url , i did n't change anything and one more thing in magento 1.9 working fine with http.

@joni-jones what if transact.dll doesn't appear in Network Console?
same as @mvaisberg shown

ec3881e6-a116-11e6-828f-06a66ee00d31

I have used all the following url for authoirize.net account setup in Magento 2.2.3 but still getting same error "Sorry, but something went wrong. Please contact the seller"
Sandbox URLs:
https://test.authorize.net/gateway/transact.dll - gateway
https://apitest.authorize.net/xml/v1/request.api - transaction details

I'm attaching my transaction.dll
authorizenet

And also receiving email from authorize.net as below

Authorize.Net Developer Center Merchant,

Your script timed out while we were trying to post transaction results to it.
Transaction ID: 0
Transaction Result: This transaction has been approved.

The following message was displayed to the customer:

------------------------------The reporting of this transaction to the Merchant has timed out. An e-mail has been sent to the merchant informing them of the error. The following is the result of the attempt to charge your credit card.

This transaction has been approved.

It is advisable for you to contact the merchant to verify that you will receive the product or service.


and the response is

The reporting of this transaction to the Merchant has timed out. An e-mail has been sent to the merchant informing them of the error. The following is the result of the attempt to charge your credit card.

      This transaction has been approved.

It is advisable for you to contact the merchant to verify that you will receive the product or service.

Help me out to solve the issue
Thank you!

I'm getting this issue on v2.2.2, transactions are showing up on the authorize.net account, but there is nothing in the debug log (as in no transaction details - server is currently in development mode, authorize settings have Debug set to Yes)

We re-ran another test and checked the details of the transact.dll ajax call as one of the posters did above and I was able to validate that magento/jquery is receiving the default timeout response from authorize mentioned in a few of the postings. The x_relay_url looks fine but because we are using a varnish cache, I do not it says x_customer_ip as 127.0.0.1 in the request. I'm assuming this doesn't cause a problem as it appears the transaction is going through but magento is not completing on it's end.

x_customer_ip | 127.0.0.1
...
x_relay_url | https://www.oursite.com/authorizenet/directpost_payment/response

checking the access log I see nothing for a grep of directpost_payment

Facing same issue in magento2.2.3. Have any update for it?

Just in case someone stumbles in here, this might save you some time - if you've checked everything above, check your sandbox account's "Response/Receipt URLs" under Settings. It's a whitelist as to where the sandbox will accept requests from...make sure you've whitelisted your current testing site.

For anyone using Google's PageSpeed, try disabling it first see if it'll fix the issue. The JS defer was causing the issue in my case and the Magento asset files was mistakenly being loaded relatively to authorize.net

https://secure.authorize.net/static/version1543968498/frontend/custom_template/custom/en_US/css/styles-l.css

Instead of

https://mydomain.com/static/version1543968498/frontend/custom_template/custom/en_US/css/styles-l.css

Was this page helpful?
0 / 5 - 0 ratings