woocommerce / woocommerce-paypal-payments

https://wordpress.org/plugins/woocommerce-paypal-payments/
GNU General Public License v2.0
62 stars 47 forks source link

Could not retrieve order. OrderEndpoint.php:459 Order status changed from Pending payment to Failed. #918

Closed themenow closed 1 year ago

themenow commented 2 years ago

Describe the Bug

In our live site, an order from Oct 12 and another from Oct 17 received this error. The customer of Oct 12 switched to another payment method and completed the payment, the customer of Oct 17 abandoned the order.

To Reproduce

We have no knowledge of how this error was triggered, we can provide WordPress login if you need to check the failed orders.

Screenshots

image image

Environment

Murgator commented 2 years ago

Same error with an order the Oct 7 2022

NOTE: Payment in 4x by Paypal is active on my website. Might be a lead.

37b92b018ee3f13d0fecb0de4aaa8fb2

WordPress Version 6.0.3 WooCommerce Version 7.0.0 Plugin Version 1.9.4

themenow commented 2 years ago

It happened once again Oct 23

themenow commented 1 year ago

The issue showed up once again here Oct 26

khizar1556 commented 1 year ago

did you resolve this issue?

themenow commented 1 year ago

@khizar1556 No, happened again here on Nov 4

TrigodaUG commented 1 year ago

The same here. Combined with other failures. The same client did 2 orders and tried 3 times, always failing. It happens more often with different clients, but other clients can pay without problems.

order 2: Bildschirmfoto 2022-11-08 um 18 18 25 order 1: Bildschirmfoto 2022-11-08 um 18 19 14 Bildschirmfoto 2022-11-08 um 18 19 29

PS: This is just one example, it happens often here. We contacted Paypal with that, they ask us to contact developer, as they didn't find any errors on their site. They suggest:

To avoid the error - "ORDER_NOT_APPROVED" in future, I would advise you to please tweak your integration to call Show Order details API (https://developer.paypal.com/docs/api/orders/v2/#orders_get) before making the Capture call, to verify the status of Order first.

LaserUser-Com commented 1 year ago

I also get this same issue OrderEndpoint.php:459 Order status changed from Pending payment to Failed.

TrigodaUG commented 1 year ago

Meanwile on nearly every Woocommerce Installation Paypal payments seems to be broken. Several clients are reporting problems, a lot of them switched to Mollie Payments, as they can not afford to loose so many sales.

What is happening here?

FoundSoul9 commented 1 year ago

Just had this start occurring regularly enough that it was causing major issues. Looking back though, it's been happening for a while now, at least a month or more (I could go back further and check-- started working on resolution instead).

Order notes show "Could not retrieve order. OrderEndpoint.php:459 Order status changed from Pending Payment to Failed."

Customer can see "Could not retrieve order" on the screen when it fails.

Contacted WooCommerce support, they referred me directly to the developer. They opened a ticket, I have tried to do that directly as well, so far, I've not heard anything. No confirmation that a ticket is open or anything, so I'm not sure what to do.

Was running version 1.9.3. Found this thread. Upgraded to 1.9.5. Problem continued. Disabled WP Rocket entirely (caching and minify). Disabled minify on Cloudflare. Problem continued. Back-dated plugin to 1.9.1-scriptfix. Problem continued, maybe worse-- seemed like it failed every time now. I couldn't wait long to test/verify that possibility- I've removed this plugin and gone back to the Standard Paypal plugin for the time being.

Anyone else ever have any luck really understanding what was happening here and getting this resolved? Looks like it's impacted quite a few people, hopefully between us we can understand and work around/resolve this issue....

FoundSoul9 commented 1 year ago

So I went back to see just when this started to occur. Looks like 9-17-22 is the first date I had this exact error message in the order notes.

"Could not retrieve order. OrderEndpoint.php:459 Order status changed from Pending Payment to Failed."

Before that, I was having some Paypal orders fail, but the error message was different. On 9-13 and before, I would, with perhaps similar regularity, have failures with the message: "Could not process order. Could not retrieve order. Order status changed from Pending Payment to Failed."

I looked in my logs to see when the last time I updated this Paypal Plugin was.... and sure enough

[You ][September 14, 2022 - 4:09 pm (2 months ago)] Updated plugin "WooCommerce PayPal Payments" to 1.9.3 from 1.8.1 [View changelog]

Now-- it appears maybe the error was occurring before, but that 1.9.3 update (as compared to 1.8.1) reported it differently-- that's one theory.

What I don't understand, regardless, is why this started happening with a very high degree of frequency in the last few days. Somewhere in the 60%-99% range of frequency-- sometimes it would almost seem like it was going to start working again, a couple orders would come through successfully using Paypal. Then after giving me that false hope, it would just die, die, die, die, die.

Hoping for resolution....

LaserUser-Com commented 1 year ago

I paid for a Fiverr expert to look into the issue for me. His conclusion is that it's a plugin issue and to disable WooCommerce PayPal Payments until the issue is fixed with an update.

FoundSoul9 commented 1 year ago

I paid for a Fiverr expert to look into the issue for me. His conclusion is that it's a plugin issue and to disable WooCommerce PayPal Payments until the issue is fixed with an update.

Thanks for the info, unfortunately that's what I've come to as well. I've got a ticket open with the developer, and I reached out to my Paypal contacts who strongly encouraged me to change over to this plugin a few months ago to see if they can help, as they had a developer resource involved then too (maybe the same guy?).

For now, I'm just using a different plugin. Frustrating though.

FoundSoul9 commented 1 year ago

For anyone else having this problem-- turn on logging and capture the issue! Then get in touch with PayPal Payments Support woocommerce-support@inpsyde.com.

They just got back to me on my ticket, unfortunately it's too late, I've already moved on and I'm not willing to put the broken plugin back on my site at this time. Black Friday is coming, I must ensure my site is stable.

So I'm not able to get them these logs. If you are actively having the issue as well and can help them capture logs, it may help them resolve the problem for good.

Here's how:

To learn more about these orders, we would be interested in your plugin log files. These log files are only written when "Logging" is enabled in the plugin settings. If enabled, then every transaction will create a log entry that can be accessed from here: WooCommerce > Status > Logs > select "woocommerce-paypal-payments-[...]" in the dropdown and click on view.

Zielgestalt commented 1 year ago

Same here ERROR Payment failed: Could not retrieve order. OrderEndpoint.php:459

TrigodaUG commented 1 year ago

@FoundSoul9

Sorry, can not provide more details or debug logs anymore, it is weeks later in "end of year business", we switched all about 50 german shops to other payment methods

Can not understand inpsyde needing weeks to reply hiddenly to a ticket which affects so many. this is frightening...

themenow commented 1 year ago

This happened again and again, we have logs if you need

Sirvijver commented 1 year ago

Hello all,

thank you for reaching out to us. We are aware of this issue and have been working on improving our plugin in order to avoid this issue, but it is a rather complex issue and has a diverse range of causes. Some of which we have resolver with our last 4 releases, but at the moment we still encounter some instances of this issue that are harder to resolved.

The issue is caused by situations that cause the WooCommerce "Place Order" button, not to get replaced with the generic yellow "PayPal" button. When a customer presses the WooCommerce button when paying with PayPal, the order will fail with the known error "could not retrieve order". In the past this was caused by some 3rd party plugins and theme, but those issue were resolved in the previous release. At this moment, we believe that the majority of the instances of this issue are caused by customers using older, unsupported web browsers that don't allow our java-script to replace the WooCommerce button with ours. With every release, we try to improve the browser compatibility, but some browsers are simply not capable of performing this action. You can test this behavior by using the Internet Explorer browser.

We are still working on this issue, but can't say if it is possible to fix this issue 100%. The idea to use the default WooCommerce button has been raised with PayPal, but this is not something we as the plugin developer can decide on. We can only advise on this.

Since we don't provide plugin support via GitHub, I want to ask you to reach out to the support team directly for more guidance. In this way, we can also link your case to the bug that we still have open for this situation.

I will close this thread and let you reach out to our support team if you require additional support and information.

Kind regards, Joost

LaserUser-Com commented 1 year ago

Just found a solution and so far everything seems to be working.

Root cause was my Ezoic CDN interfering with https://sitename.com/wp-content/plugins/woocommerce/assets/js/frontend/checkout.min.js file.

The Ezoic CDN had a Minify CSS option that may have also caused issues.

Changed name servers to confirm it was a CDN issue, then back to Ezoic name servers.

Excluded the pages /basket/ and /checkout/ from everything to do with ezoic, ezoic cdn and Ezoic minify css.

While many of you won't be using Ezoic, this may give you some ideas of what could be causing your issues.

dyan commented 1 year ago

Hey everyone, I seemed to have fixed this on my site. WooCommerce > Payments tab > "All Payment Methods" > Paypal > Manage > Standard Payments tab > Paypal Buttons. I just changed the Paypal button styles from the default yellow to the white and it seems to have worked!

hobo99 commented 1 year ago

Hey everyone, I seemed to have fixed this on my site. WooCommerce > Payments tab > "All Payment Methods" > Paypal > Manage > Standard Payments tab > Paypal Buttons. I just changed the Paypal button styles from the default yellow to the white and it seems to have worked!

Yes thanks

lyhistory commented 1 year ago

Hey everyone, I seemed to have fixed this on my site. WooCommerce > Payments tab > "All Payment Methods" > Paypal > Manage > Standard Payments tab > Paypal Buttons. I just changed the Paypal button styles from the default yellow to the white and it seems to have worked!

works for me, thanks

affanhaseeb commented 2 months ago

Hello i need help i am having a problem i am doing below mention can anyone help me related to this problem why is it happening and how to solve it?

Payment provider declined the payment, please use a different payment method. OrderEndpoint.php:372 Order status changed from Pending payment to Failed.

affanhaseeb commented 2 months ago

Hey everyone, I seemed to have fixed this on my site. WooCommerce > Payments tab > "All Payment Methods" > Paypal > Manage > Standard Payments tab > Paypal Buttons. I just changed the Paypal button styles from the default yellow to the white and it seems to have worked!

but i am use Paypal Advanced Card Processing – Debit & Credit Cards

affanhaseeb commented 2 months ago

Just found a solution and so far everything seems to be working.

Root cause was my Ezoic CDN interfering with https://sitename.com/wp-content/plugins/woocommerce/assets/js/frontend/checkout.min.js file.

The Ezoic CDN had a Minify CSS option that may have also caused issues.

Changed name servers to confirm it was a CDN issue, then back to Ezoic name servers.

Excluded the pages /basket/ and /checkout/ from everything to do with ezoic, ezoic cdn and Ezoic minify css.

While many of you won't be using Ezoic, this may give you some ideas of what could be causing your issues.

Please explain to easyway and simplify i am dont understand