Magento2: Magento 2.1 Authorize.net not redirecting to failure or success page after migration from 2.0.4 to 2.1

Created on 14 Jul 2016  Â·  72Comments  Â·  Source: magento/magento2

Steps to reproduce

Go to http://www.kidsafetystore.com
Add Any Product to cart
Proceed to checkout
Select Credit Card Authorize.net 
Enter the below details Card No : 4111111111111111 Any Expiry Date Any CVV

Expected result

  1. Redirect to failure page

    Actual result

  2. Loader just loading
    magento 2 1 authorize net error

Payment Format is not valid Ready for Work bug report

Most helpful comment

Guys : I tried commenting the code $this->checkTransId(); in line number 689 in vendor/magento/module-authorizenet/Model/Directpost.php and it started working in server but in local its still rejecting as Magento is not responding with a patch or fix I tried to debug and this fix started working in server and for client its working and got going. I have overridden the vendor module and made a module. Please contact me for patch.

All 72 comments

@arunkrsigmainfo Your payment processor setup is invalid. Moreover as with the 2.0 bug you had checking out from an http form while submitting via authorize.net directpost is not supported.

In this case at least the error message is quite clear: your server is blocking authorize.net from confirming the order.

Steps to confirm:
Use Google chrome
Go to Checkout, enter shipping information and continue to payment page.
When the payment page loads, immediately right click on the screen and choose "inspect this element" for any element[in order to activate the developer console]
On the developer console go to the "network" tab
Make sure that "preserve log" is enabled
Enter your payment information as above
Click submit
Allow authorize.net a minute to attempt and fail to process the payment
Scroll down the list of and find the attempted connection to "transact.dll" on an authorize.net domain.
Click on this transaction
Go to "Response" tab
Note the response:

<html>
    <head>
        <script>
                    window.location="http://www.kidsafetystore.com/authorizenet/directpost_payment/redirect/x_invoice_num/000030012/success/0/error_msg/Gateway error: An error occurred during processing. Call Merchant Service Provider./controller_action_name/directpost_payment/";
                </script>
    </head>
    <body></body>
</html>

Magento2 is doing an ajax post of the payment information to authorize.net. Authorize.net in turn will connect to http://www.kidsafetystore.com/authorizenet/directpost_payment on your server to inform the server that the payment succeeded or failed. Whatever your server sends back is passed directly back to the web client. Your server is supposed to provide a bunch of json code which the web client can then process.

Issue 1: Your server did not respond. So instead of a json response, the web client was sent html.
Issue 2: The web client is unable to parse and process html, so it is stalled and will do nothing.
Issue 3: Even though the above MIGHT work with a sandbox account, authorize.net will NOT connect to your server for live payments over http - the connection MUST be secure.

Hi @arunkrsigmainfo

We've created MAGETWO-56932 internal ticket regarding this issue.
Thank you.

Thanks a lot. Please let me know once its fixed or any fix as we are facing
this many client even after we are using Magento 2.1.

We have a lot of clients Migrating from M1 to M2 and we would suggest that
because of performance and these issues the clients started re-thinking.

Hope you understand.

Thanks and regards,

Arun Kranth Rayudu
Technical Architect
Magento Certified Developer || Magento Certified Solution Specialist
_arun.[email protected] arun.[email protected]_| _www.sigmainfo.net
http://www.sigmainfo.net/_ | +91-9535543354
[image: Description: unnamed]

On Wed, Aug 31, 2016 at 7:38 PM, Elena Marchenko [email protected]
wrote:

Hi @arunkrsigmainfo https://github.com/arunkrsigmainfo

We've created MAGETWO-56932 internal ticket regarding this issue.
Thank you.

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/magento/magento2/issues/5642#issuecomment-243775491,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AMD2HVwdH-Bh9xmQMdqcc_2QwVwe9xrzks5qlYrOgaJpZM4JMm73
.

What's the progress regarding this indefinite spinner problem?

Since, I am having exactly the same problem (https://github.com/magento/magento2/issues/6474#issuecomment-244588997), and I really need a solution, I tested this thoroughly:

  1. The behavior was the same in 2 cases: 1) 2.1.1 version, upgraded from 2.0.9 and 2) 2.1.1 fresh install
  2. If I use wrong settings in the backend regarding the Merchant MD5, Transaction Key and API Login ID, I get to see the Warning "Sorry, but something went wrong. Please contact the seller." (https://github.com/magento/magento2/issues/5934) in the new window, and after clicking the OK button, I am correctly redirected to home page.
  3. As soon as I use the correct authorize.net settings, I get the "An error occurred on the server. Please try to place the order again." warning for a short while, and after that THE INDEFINITE SPINNER. In this case, in the authorize.net interface, I am seeing a declined transaction - so the settings must be correct and transaction itself is successfully forwarded from Magento to authorize.net.
  4. I am using HTTPS for all pages.

Hi @arunkrsigmainfo!

Fix for MAGETWO-56932 ticket is already merged to develop branch, please wait until to next release to apply it.
Closing the issue, please feel free to reopen if the issue still reproducible for you.

@dyushkin where might I find the actual fix for this problem without completely pulling the develop branch? there are many bugs in v2.1.1 that I've already applied patches for to fix bugs that I don't want to have to go an repatch after pulling the latest develop... if you could let us know what exactly fixes the issue, that would be great. thank you.

I think it might be that we are forcing ssl on all pages... no idea...

Here is my issue:
https://www.dropbox.com/s/5yl4v9fj1q37cuo/Payment-Hangs-Magento2.1.1.mp4?dl=0

@dyushkin I need to fix this issue, as my client is asking to fix the issue as soon as possible, can you please share the files which you have committed for the fix then that would be great.

@dyushkin : Can you please atleast provide the commit ID so I can see what changes you made and put a patch untill the next stable release as our client uses only Authorize.net and loosing lot of business and he is thinking to move off from magento to someother ecommerce.. Its really urgent for us.

Magento2.1.1 still "400 (Bad Request)" issue generate while place order using custom payment method...magneto2.1.0 in working perfect but magneto2.1.1 in getting this issue.
payment

{"message":"An error occurred on the server. Please try to place the order again.","trace":"#0 /Users/jvreeken/Sites/morganjewelers/vendor/magento/framework/Interception/Interceptor.php(146): MagentoCheckoutModelPaymentInformationManagement->savePaymentInformationAndPlaceOrder(15699, Object(MagentoQuoteModelQuotePayment), Object(MagentoQuoteModelQuoteAddress))n#1 /Users/jvreeken/Sites/morganjewelers/var/generation/Magento/Checkout/Model/PaymentInformationManagement/Interceptor.php(26): MagentoCheckoutModelPaymentInformationManagementInterceptor->___callPlugins('savePaymentInfo...', Array, Array)n#2 [internal function]: MagentoCheckoutModelPaymentInformationManagementInterceptor->savePaymentInformationAndPlaceOrder(15699, Object(MagentoQuoteModelQuotePayment), Object(MagentoQuoteModelQuoteAddress))n#3 /Users/jvreeken/Sites/morganjewelers/vendor/magento/module-webapi/Controller/Rest.php(307): call_user_func_array(Array, Array)n#4 /Users/jvreeken/Sites/morganjewelers/vendor/magento/module-webapi/Controller/Rest.php(216): MagentoWebapiControllerRest->processApiRequest()n#5 /Users/jvreeken/Sites/morganjewelers/var/generation/Magento/Webapi/Controller/Rest/Interceptor.php(37): MagentoWebapiControllerRest->dispatch(Object(MagentoFrameworkAppRequestHttp))n#6 /Users/jvreeken/Sites/morganjewelers/vendor/magento/framework/App/Http.php(135): MagentoWebapiControllerRestInterceptor->dispatch(Object(MagentoFrameworkAppRequestHttp))n#7 /Users/jvreeken/Sites/morganjewelers/vendor/magento/framework/App/Bootstrap.php(258): MagentoFrameworkAppHttp->launch()n#8 /Users/jvreeken/Sites/morganjewelers/index.php(39): MagentoFrameworkAppBootstrap->run(Object(MagentoFrameworkAppHttp))n#9 {main}"}

I am using m2.1.1 directly from https://www.magentocommerce.com/download I am getting the same issue. Since I didn't install using git I am not wishing to screw things up on my server. Can you push out a patch for those who can make use of the update feature?

@alena-marchenko - It seems like this is a huge issue for many customers and doesn't look like it is actually fixed. Any updates? Thanks!!!

@alena-marchenko My client is being impacted by this bug as well, and I'm not sure how to assist them. At this time, they're basically dead in the water, with no ability to collect payments. Is there a patch available for this?

Any help is much appreciated!

Not fixed in v2.1.2
I am still getting:
"An error occurred on the server. Please try to place the order again."

Console shows 400 (Bad Request)

Confirmed. I'm still receiving the error after the latest upgrade as well.

Not fixed in v2.1.2
I am still getting:
"An error occurred on the server. Please try to place the order again."

Console shows 400 (Bad Request)...still wait for the solution of this error.

Hi aLL,

ANY UPDATES ON THIS? IS THIS FIXED IN MAGENTO 2.1.2?

@nagrgk This has not been resolved in 2.1.2.

Guys : I tried commenting the code $this->checkTransId(); in line number 689 in vendor/magento/module-authorizenet/Model/Directpost.php and it started working in server but in local its still rejecting as Magento is not responding with a patch or fix I tried to debug and this fix started working in server and for client its working and got going. I have overridden the vendor module and made a module. Please contact me for patch.

@arunkrsigmainfo How can I get in touch with you? :-) I'd love for you to provide the patch to me, as my client is having a very tough time. Thanks!

@brianschroeter : please send your details to arun.[email protected] and we can talk further on this.

@arunkrsigmainfo Thanks! Email sent.

Weird,

I got it to work on local, but not on staging after I tried commenting the code $this->checkTransId(); in line number 689 in vendor/magento/module-authorizenet/Model/Directpost.php like @arunkrsigmainfo suggested...
I'm using a test key on local and a live key on staging:
https://www.dropbox.com/s/6dt0kh7rgikvtt3/Screenshot%202016-10-18%2017.26.48.png?dl=0

I think it has something to do with the use of the type of key you are using.
I cannot get a live key to work in test mode, It works in live mode with real cc data.

Hi Guys,

I am having the same issue, friend has asked my help and I can't believe there is not solution. His partner is furious and I am not sure what to tell them, can anyone take a look and let me know if you see the issue.

I tried commenting that line and it didn't work. It looks like everything is sent to auth.net but the response is not being read by M2.

http://tinyurl.com/z6tmv5c

Console response
<HTML><BODY><TABLE Width="600"><TR><TD>An error occurred while trying to report this transaction to the merchant. 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. <BR><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This transaction has been declined. <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<BR></TD></TR></TABLE></BODY></HTML>

Message from Auth.net email

Authorize.Net Merchant,
Your script timed out while we were trying to post transaction results to it.
  Transaction ID: 40013774159
Transaction Result: This transaction has been declined.

The user sees a generic message then clicks [ok] and they are logged out and sent to a blank cart. The order DOES go into Magento as PENDING.

I've tried just about everything, and couldn't get this to work. 50+ hours in, we've opted to just use BrainTree. That works fine for our needs.

Thanks @brianschroeter,

Yeah I am 20 hours into it myself, mindblowing that we cant figure it out. It is like magento is not handling the response.

@graffxdesign

Any time! I tried the following...

  • Fresh install with 2.0.X (with, and without SSL)
  • Fresh install with 2.1.X (with, and without SSL)
  • I've commented the line referenced above, to no avail
  • Disabled / Enabled cache, and recompiled the code
  • Read through the debug, and exception logs. Not much was helpful there!
  • Attempted to use the module with Credit Card Verification on, and off. I also tried it with auth only, vs auth and capture.
  • Tried the different URLs for the API settings (was reaching here)

I found that it will work if you turn test mode on. However, the card won't be charged in test mode. It will also work in sandbox accounts, but again that is not going to result in a charge.

Using a live account with a real credit card failed every time. Since they've closed this, and it's not fixed in 2.1.2, I don't know when or if they'll ever fix it.

I've found threads dating back to April, where people had this issue. No resolution was provided then either. Should we just accept that this is broken for good? I almost lost a very large maintenance contract due to this bug! That may not seem like a big deal, but this is how I feed my family. Seeing as I'm not alone, I'm surprised this isn't a higher priority.

@brianschroeter I understand fully, I have a huge client that is moving to M2 and if I didn't know this right now I could have lost the client on the new year.. and it would devastate my family until I found another.

Thank you very much for the information it is very helpful and I will go back to the CC company to find another solution!

I think magento not fixing this is just a ploy for them to get people to switch to braintree as that is owned by paypal which is owned by ebay which owns magento.

@jvreeken Very possible! However, I will say that Braintree worked incredibly well out of the box. Go figure, lol.

@brianschroeter , @jvreeken - it wouldn't be a problem at all, if Braintree wouldn't be so restrictive for smaller companies outside US (company of one of my clients got refused by Braintree. On the other hand, they had no problems registering with Authorize.net). So, now what, wait over a month for 2.1.3 release which won't fix the problem again? Magento development team, c'mon 👎

@brianschroeter do you think someone can just make a direct post module? I would think that would be the best solution.

@jernejh Ah, that certainly is a problem. I don't know when / if this'll be fixed, as it was apparently fixed (as per the comments above), but there is no commit referencing this ticket. Furthermore, the dev files do not fix this issue (I've tried), and the last changes to the authorize.net module had nothing to do with this.

@graffxdesign That was the route that I was going to take, until my client was approved for Braintree. Heads up -- it was supposed to take 24 hours, but took 5 days! 5 days of downtime. 5 days of stress, and 5 days of hearing, "I thought Magento was supposed to be good...".

Guys -- we can't continue to recommend this platform to our clientele, when bugs are not even addressed. I understand that this is a community effort, but certainly someone could speak up on this. The "patch" mentioned above did not work for our live sites, and editing core files is not recommended anyway. What are we as developers supposed to think, when our bug reports are ignored?

Does anyone know what was the last version of 2.x.x that worked?

I see most people talking about a problem with Authorize.net but I just wanted to say I'm having the same issue using Paypal payflow.

I've also tried Braintree in sandbox mode and was able to get guest orders through with only one address line but if I tried to login with an account that was created already the order would fail with the error message.

Has anyone be able to get it to work without a workaround?

Rich

Maybe I was not clear in previous posts, in both 2.1.1 and 2.1.2 I am still getting trouble with the infinite spinner for failure scenarios (entering test visa card number for instance), but for valid credit card numbers I was able to successfully finish the payments through Authorize.net.

So I tried it in the admin backend and it does show the error at least and the wheel doesn't spin for ever. I still got the standard email from auth.net saying that the script timed out. So I tried to it with a valid card, my card was charged but I got this error below. It seems like the response from auth.net is getting lost when it is supposed to hit magento.

Order saving error: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '000000026-1' for key 'SALES_ORDER_INCREMENT_ID_STORE_ID', query was: INSERT INTOsales_order(state,status,protect_code,shipping_description,is_virtual,store_id,customer_id,base_discount_amount,base_grand_total,base_shipping_amount,base_shipping_tax_amount,base_subtotal,base_tax_amount,base_to_global_rate,base_to_order_rate,discount_amount,grand_total,shipping_amount,shipping_tax_amount,store_to_base_rate,store_to_order_rate,subtotal,tax_amount,total_qty_ordered,customer_is_guest,customer_note_notify,customer_group_id,quote_id,base_shipping_discount_amount,base_subtotal_incl_tax,base_total_due,shipping_discount_amount,subtotal_incl_tax,total_due,weight,customer_dob,increment_id,applied_rule_ids,base_currency_code,customer_email,customer_firstname,customer_lastname,customer_middlename,discount_description,global_currency_code,order_currency_code,shipping_method,store_currency_code,store_name,customer_note,total_item_count,discount_tax_compensation_amount,base_discount_tax_compensation_amount,shipping_discount_tax_compensation_amount,shipping_incl_tax,base_shipping_incl_tax,gift_message_id) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, '2016-10-11 00:00:00', ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?)

@jernejh So on a successful transaction it worked fine for you?

@graffxdesign - I just tested 2.1.2 version and I was able to get the payment through. so, both 2.1.1. and 2.1.2 have the same behaviour - for positive scenario (valid credit card number), the payment gets through successfully, while for negative scenario (invalid test Visa number 4111111111111111), I am experiencing indefinite spinner problem - https://github.com/magento/magento2/issues/6474

Jernejh,
Is that with one or two address lines?

Do you have any other work around that your using?

I've been unable to get payments to go through trying multiple options?

How about guest checkout or logging in with a previously created account with two address lines?

Rich

Street address was in one line. In 2.1.1, I was able to do successful payments for both guest and logged in users. This time (for 2.1.1) I tested only for guest user - it worked. I never tried two address line scenario.

@Rich07082 what do you mean by workaround? I was not messing with Magento core code,

I ticked off just the following security options in authorize.net:

  • Reject Transaction If Card Code value... Does NOT Match (N)
  • B Transaction was submitted without a billing address.

what i meant by a work around was using only one address line instead of the two default.

Rejecting the CCV code value not matching I would consider a work around. I would think you'd want to use this for fraud protection.

Transactions not submitting billing address I would consider a work around also being you would want the billing address submitted for zip or avs verification.

Rich

Okay, so I think at this point we need to have someone build a direct post module that we can all use. Do any of you have any developers that are up for the task asap? I can throw some cash in if someone wants to handle the programmer, or if you have one I can manage him and give you all the files when it is complete.

Not sure this is the issue, but it looks like it might be sending the month as single digit, maybe that is causing an isssue? I will test it out.

So we fixed half of the issues, it will now process a payment and send you to the success page, it will also refresh the page after a failed transaction. The issue is with the 'region language detect'. I will get you more info ASAP.

@graffxdesign please share your fix/workaround :) we are still having problems in live mode for failed transactions.

Yes, any information @graffxdesign would be appreciated, as we're stuck in the same boat.

Hi, I paid another programmer to find the error, he is going to send me the files and when he does I will post them asap.

On the Currency.php the local is defaulting to 'NULL', you can set your default local on line 106.

        if (is_array($options)) {
            $this->setLocale($locale);
            $this->setFormat($options);
        } else if (Zend_Locale::isLocale($options, false, false)) {
            $this->setLocale($options);
            $options = $locale;
        } else {
            $this->setLocale('en_US');
        }

Anyone else not able to log onto github? I am getting server not found.

Anyway, I tried a successful order in the admin backend, I was told that it uses M1 code in the admin area, but I am getting an error.

An error occurred while trying to report this transaction to the merchant. 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. The referrer, relay response or receipt link URL is invalid.

@dyushkin @alena-marchenko What is the commit number for the fix?

@alena-marchenko Any updates on this issue?

Thank You!

As per #6474 fix for MAGETWO-56932 will in Magento 2.1.3.

Thanks!

@dyushkin @alena-marchenko Can you post the commit(s) where MAGETWO-56932 was fixed? For live merchants experiencing this problem, it is critical to be able to patch this issue without having to wait for 2.1.3 to be released.

@dyushkin @alena-marchenko I believe I may have found the commit. See this comment I just posted to @joni-jones: https://github.com/magento/magento2/issues/6474#issuecomment-261091365

I'm having this problem with Magento 2.1.1 and was wondering if there is a fix yet? We just keep getting the spinner going but the payment goes through to Authorize.net but never communicates to Magento nor does it send customer to success page.

@dyushkin, @alena-marchenko. I have a very angry client, they went live with their Magento 2 installation and Direct Post is not responding back to Magento at random. Most of the time it works as expected, but I randomly get times where no response is sent back to Magento and the customer gets in infinite spinning wheel. This is a critical issue, I'm running Magento 2.1.2 and there is still no resolution. @erikhansen, did you happen to find anything out.. The only fix I can find is the fix to correct the infinite spinning wheel, but that's just a sypmtom of the actual problem where Magento's logs state that a post has been sent to Authorize.net but Auth.net never actually receives it.

@duffner My clients have not reported issues where Authorize.net does not return a response.

@erikhansen, do you ever get orders in the "Pending" status within the Magento admin where Authorize.net was the payment method?

Hello folks,

it seems release 2.1.3 still delayed, so here we have fix for this issue on develop branch 2d31571

@dyushkin it doesn't look like the fix is for 2.1.1. The file structure isn't the same.

@SewHappy58 If you've installed Magento via Composer, then the app/code/Magento/Payment/view/frontend/web/js/view/payment/iframe.js file path will be located in vendor/magento/module-payment/view/frontend/web/js/view/payment/iframe.js.

I can confirm I'm having the same problem with the “spinning-wheel” and the bigger problem of the Attention pop-up “Sorry, but something went wrong. Please contact the seller.”

(PHP 7, Magento 2.1.2)

I'm working on getting the site a SSL/https, getting the business validated through Comodo, but the business is not on Dun & Bradstreet(dnb.com) or bbb.org. So, it's taking a couple of days.

The problem is that the Payments are going through to Authorize.net, but I'm getting the pop-up “Sorry, but something went wrong. Please contact the seller.” So, just last night a customer placed the order seven (7) times, and went to Authorize.net and was captured)

This is a big problem that needs fix please. I have tried all the different hacks on github with no luck. I'm really hoping that the SSL/https will fix it. I will let you know.

But until then, I have come up with a simple CSS fix:

In the pub/static/frontend/Magento/luma/en_US/css/styles-m.css

I added these rules (to change the message):

.modal-content {
display: none !important;
}

.modal-popup .modal-title::after {
content: " - Thank you for your order, you will receive a email confirmation. Please click the OK button to close this window. ";
}

Orders are going through and the customer now sees a clear message of that. Thanks

screen shot 2016-12-07 at 5 47 29 pm

screen shot 2016-12-08 at 9 50 29 am

Hello,

Can you verify that Magento is updating the order status, and emailing the
customer? In my case, it was not.

On Thu, Dec 8, 2016 at 10:17 AM parksdesign notifications@github.com
wrote:

I can confirm I'm having the same problem with the “spinning-wheel” and
the bigger problem of the Attention pop-up “Sorry, but something went
wrong. Please contact the seller.”

(PHP 7, Magento 2.1.2)

I'm working on getting the site a SSL/https, getting the business
validated through Comodo, but the business is not on Dun & Bradstreet(
dnb.com) or bbb.org. So, it's taking a couple of days.

The problem is that the Payments are going through to Authorize.net, but
I'm getting the pop-up “Sorry, but something went wrong. Please contact the
seller.” So, just last night a customer placed the order seven (7) times,
and went to Authorize.net and was captured)

This is a big problem that needs fix please. I have tried all the
different hacks on github with no luck. I'm really hoping that the
SSL/https will fix it. I will let you know.

But until then, I have come up with a simple CSS fix:

In the pub/static/frontend/Magento/luma/en_US/css/styles-m.css

I added these rules (to change the message):

.modal-content {

display: none !important;

}

.modal-popup .modal-title::after {

content: " - Thank you for your order, you will receive a email
confirmation. Please click the OK button to close this window. ";

}

Orders are going through and the customer now sees a clear message of
that. Thanks

[image: screen shot 2016-12-07 at 5 47 29 pm]
https://cloud.githubusercontent.com/assets/24457964/21015246/462b8cc8-bd2f-11e6-801c-cdba87f2c28e.png

[image: screen shot 2016-12-08 at 9 50 29 am]
https://cloud.githubusercontent.com/assets/24457964/21015268/5bf5b22c-bd2f-11e6-9937-05bde0d1e31a.png

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/magento/magento2/issues/5642#issuecomment-265764842,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AKjHwmNWx39joWe_ryPq-cHpK5zEZY6vks5rGB9ygaJpZM4JMm73
.

@parksdesign In my case the culprit was TIMEOUT_TIME in app/code/Magento/Payment/Model/IframeConfigProvider.php being set to 30 seconds, in most cases it just wasn't enough time. I wrote a plugin to up that time and it seems to work.

ProTip. For me, turns out the issue was with CloudFlare. Needed to add a whitelist for the Authorize.net callback URL, in my case it was: https://domain.com/shop/authorizenet/directpost_payment/response

(Magento is installed in a subdirectory).

Just make sure that URL is reachable by Authorize.net (Not blocked by ModSecurity rules, CloudFlare, or other WAF.

My issue was also with CloudFlare. I had to create a page rule to bypass the WAF on the callback URL.

@twistedindustries I am still struggling with this. Can you please send the plugin so that I can try the solution.

I am am also looking into purchasing a third part Athorize.net extension. The problem is that it is a Authorize.Net CIM Payment Method. I gather that this is not the same as Direct Post.

Keeping the md5 hash value to just 10 characters solved the issue for me.

image
install successful but no style damin button can't click?

Facing timeout issue on Magento 2.1.9 having these configuration

  • PHP 7.0.22
  • Magento 2.1.9
  • nginx 1.10.3
  • Redis and Varnish enabled
  • Multistore and Multiwebsite configuration enabled
  • SSL is configured

Observations

  1. Order is created in Magento and Authorize.net sandbox have captured order.
    Nginx access log contains this string : [24/Oct/2017:11:08:52 +0000] "POST /authorizenet/directpost_payment/response HTTP/1.1" 500 12073 "-" "-"

  2. But curl request does not display any error curl https://subdomain.test.com/authorizenet/directpost_payment/response that is it shows 200 Ok

  3. Debug message is as follows
    Your script timed out while we were trying to post transaction results to it. Transaction ID: XXXXXXXXX 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.

Searched on Google and GitHub, all solution has been implemented still facing timeout issue.

Facing same issue which posted @aniruddhadeshpande, randomly not always in Magento2.2.3. Have any update regarding this issue.

I am using magento latest version 2.2.5 and configured the Authorize.net direct post method as payment method. when I tried to placed an order it saves the order in admin with pending status but after placed the order didn't redirect to success or failure page please any one can advice on this issue.

{success: true, authorizenet_directpost: {,…}}
authorizenet_directpost: {,…}
fields: {x_version: "3.1", x_delim_data: "FALSE", x_relay_response: "TRUE", x_test_request: "TRUE",…}
controller_action_name: "directpost_payment"
is_secure: "1"
x_address: "8778 High Ridge Drive"
x_amount: 1329.31
x_city: "Brooklyn"
x_company: "Test Company"
x_country: "US"
x_currency_code: "USD"
x_cust_id: ""
x_customer_ip: "111.11.11.111"
x_customer_tax_id: ""
x_delim_data: "FALSE"
x_email: "[email protected]"
x_email_customer: "0"
x_fax: ""
x_first_name: "Jag"
x_fp_hash: "d4594a75aab8b43f31136e3699409363"
x_fp_sequence: "51"
x_fp_timestamp: 1536640689
x_freight: "0.00"
x_invoice_num: "000000034"
x_last_name: "Ram"
x_login: "48nL9pR49pEb"
x_merchant_email: "[email protected]"
x_method: "CC"
x_phone: "01234567890"
x_po_num: ""
x_relay_response: "TRUE"
x_relay_url: "https://domain.com/authorizenet/directpost_payment/response"
x_ship_to_address: "8778 High Ridge Drive"
x_ship_to_city: "Brooklyn"
x_ship_to_company: "Test Company"
x_ship_to_country: "US"
x_ship_to_first_name: "Jagdish"
x_ship_to_last_name: "Ram"
x_ship_to_state: "New York"
x_ship_to_zip: "11206"
x_state: "New York"
x_tax: "101.31"
x_test_request: "TRUE"
x_type: "AUTH_CAPTURE"
x_version: "3.1"
x_zip: "11206"
success: true

authorize

Was this page helpful?
0 / 5 - 0 ratings