woocommerce / woocommerce-paypal-payments

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

Error message displayed to customers during checkout #1281

Closed neo-con closed 5 months ago

neo-con commented 1 year ago

Describe the Bug

When a customer attempts to checkout, they receive an unfriendly and complex error message related to PayPal payment processing. The error message should be user-friendly and easily understood by the customer.

To Reproduce

Go to the WooCommerce store as a customer Add items to the cart Proceed to the checkout page Fill in the required information and choose PayPal as the payment method Click on the 'Place Order' button (authorized mode) See the error message

Expected Behavior

The customer should see a user-friendly error message that informs them there was a problem processing the payment and to try again or contact the shop admin for assistance.

Actual Behavior

The customer sees a complex error message that includes technical details, which can be confusing:

Failed to process the payment. Please try again or contact the shop admin. [UNPROCESSABLE_ENTITY] The requested action could not be performed, semantically incorrect, or failed business validation. https://developer.paypal.com/docs/api/orders/v2/#error-PAYER_CANNOT_PAY PayPalGateway.php:525 [UNPROCESSABLE_ENTITY] The requested action could not be performed, semantically incorrect, or failed business validation. https://developer.paypal.com/docs/api/orders/v2/#error-PAYER_CANNOT_PAY OrderEndpoint.php:406 Order status changed from Pending payment to Failed.

Environment

WordPress Version: 5.9.5 WooCommerce Version: 6.9.3 Plugin Version: 2.0.3 Browser: N/A (assuming issue occurs in all browsers) Other plugins installed: N/A (assuming issue occurs with or without other plugins)

Additional Details

Update the error handling code to display a generic user-friendly message such as: "Failed to process the payment. Please try again or contact the shop admin for assistance."

myclassicparts commented 1 year ago

I have the same issue and cannot find the solution

Sirvijver commented 1 year ago

Hello,

we have created an improvement request on this error message. Since this is not a payment affecting issue, this might take some time before picked up and resolved, so please be patient for the solution to become available.

Kind regards, Joost

myclassicparts commented 1 year ago

Dear Joost, Thank you for your reply. Actually, this was an error affecting the payments and no payments could be made because of this error.

That's for your information. Thank you

Mauricio Azar Founder & CEO, MY Classic Parts

Website: www.myclassicparts.comhttp://www.myclassicparts.com

Email: @.**@.>

Whatsapp: +971 58 58 28 918https://wa.me/message/BT77FHVAZPQLK1

Mailing address:

Madinat Badr, Qamar 4, 110

Muhaisnah 1, Dubai - UAE


From: Joost van de Vijver @.> Sent: Tuesday, April 4, 2023 2:14:34 PM To: woocommerce/woocommerce-paypal-payments @.> Cc: myclassicparts @.>; Comment @.> Subject: Re: [woocommerce/woocommerce-paypal-payments] Error message displayed to customers during checkout (Issue #1281)

Hello,

we have created an improvement request on this error message. Since this is not a payment affecting issue, this might take some time before picked up and resolved, so please be patient for the solution to become available.

Kind regards, Joost

— Reply to this email directly, view it on GitHubhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fwoocommerce%2Fwoocommerce-paypal-payments%2Fissues%2F1281%23issuecomment-1495706436&data=05%7C01%7C%7C32b56811ebf3462a7fa808db34f56452%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638162000789185692%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=aFU5c%2BVfMAHFABfTYdbF%2FP6GD64LojCiX6T2wuCdw%2F0%3D&reserved=0, or unsubscribehttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FA64KHXH6AFSDCEMY4QBQ3ITW7PYAVANCNFSM6AAAAAAWIE26LQ&data=05%7C01%7C%7C32b56811ebf3462a7fa808db34f56452%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638162000789185692%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=xhCJtSzW%2BanTtPGPRkfkbWKKSrhS5AChF%2B0w1MeNTAs%3D&reserved=0. You are receiving this because you commented.Message ID: @.***>

Sirvijver commented 1 year ago

Hello @myclassicparts yes, but the error is not caused by our plugin, but by the payment option that the customer is using. If you want to get more details on why the payment was declined, please reach out to PayPal Merchant Technical Support. They will be able to give you back-end details about the failed transaction. Please be sure to provide them with the Transaction ID and possibly the Debug ID (that you can find in the logs fi you activate it).

The only action we can take is on the error message improvement.

Kind regards, Joost

myclassicparts commented 1 year ago

Thank you again for a reply.

I reached out by email and through phone call and they confirmed that as per PayPal nothing was an issue for all the failed transactions. They confirmed that the issue was the website itself as a result the plug in for the payment and asked me to check with you instead.

Thank you

Mauricio Azar Founder & CEO, MY Classic Parts

Website: www.myclassicparts.comhttp://www.myclassicparts.com

Email: @.**@.>

Whatsapp: +971 58 58 28 918https://wa.me/message/BT77FHVAZPQLK1

Mailing address:

Madinat Badr, Qamar 4, 110

Muhaisnah 1, Dubai - UAE


From: Joost van de Vijver @.> Sent: Tuesday, April 4, 2023 4:23:36 PM To: woocommerce/woocommerce-paypal-payments @.> Cc: myclassicparts @.>; Mention @.> Subject: Re: [woocommerce/woocommerce-paypal-payments] Error message displayed to customers during checkout (Issue #1281)

Hello @myclassicpartshttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmyclassicparts&data=05%7C01%7C%7Cb49cd9c4e1a14e8fbbb808db35076a79%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638162078182281338%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=dstgEYBU%2FAz5qfZy8QUlesvZpMdu%2B%2B9JUTulMYCHNcY%3D&reserved=0 yes, but the error is not caused by our plugin, but by the payment option that the customer is using. If you want to get more details on why the payment was declined, please reach out to PayPal Merchant Technical Supporthttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.paypal-techsupport.com%2Fs%2Fcontactsupport&data=05%7C01%7C%7Cb49cd9c4e1a14e8fbbb808db35076a79%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638162078182281338%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=2y8R4Bm1irhc9M8z5TaF5TQRF0e%2BX13UTrlYXjtgaJI%3D&reserved=0. They will be able to give you back-end details about the failed transaction. Please be sure to provide them with the Transaction ID and possibly the Debug ID (that you can find in the logs fi you activate it).

The only action we can take is on the error message improvement.

Kind regards, Joost

— Reply to this email directly, view it on GitHubhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fwoocommerce%2Fwoocommerce-paypal-payments%2Fissues%2F1281%23issuecomment-1495880541&data=05%7C01%7C%7Cb49cd9c4e1a14e8fbbb808db35076a79%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638162078182281338%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=r2EIw40atYVsZGD%2BKztHQqqq2gFsazPTsKJFmgaVzew%3D&reserved=0, or unsubscribehttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FA64KHXHNHAPJ6YNS7KWUV43W7QHERANCNFSM6AAAAAAWIE26LQ&data=05%7C01%7C%7Cb49cd9c4e1a14e8fbbb808db35076a79%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638162078182281338%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=y7CV6WGmCiIL4cWYLAaBfxqMnlwLMMRQR03kaXFD%2BsE%3D&reserved=0. You are receiving this because you were mentioned.Message ID: @.***>

Sirvijver commented 1 year ago

Hello @myclassicparts

I checked with my team, but they agreed that PAYER_CANNOT_PAY is not a plugin problem. However, usually it is also not a technical problem, so the MTS may say that it is not their problem. We think this is something for the PayPal Merchant Support might be able to help you with if it happens to all potential buyers.

In any case, this is not a development case and should not be opened in GitHub. If you need our continued support, you can reach out to the support team directly for more guidance.

Kind regards, Joost

myclassicparts commented 1 year ago

The error was not payer cannot pay.

Failed to process the payment. Please try again or contact the shop admin. [UNPROCESSABLE_ENTITY] The requested action could not be performed, semantically incorrect, or failed business validation. https://developer.paypal.com/docs/api/orders/v2/#error-CITY_REQUIRED

Thank you

Mauricio Azar Founder & CEO, MY Classic Parts

Website: www.myclassicparts.comhttp://www.myclassicparts.com

Email: @.**@.>

Whatsapp: +971 58 58 28 918https://wa.me/message/BT77FHVAZPQLK1

Mailing address:

Madinat Badr, Qamar 4, 110

Muhaisnah 1, Dubai - UAE


From: Joost van de Vijver @.> Sent: Tuesday, April 4, 2023 6:00:12 PM To: woocommerce/woocommerce-paypal-payments @.> Cc: myclassicparts @.>; Mention @.> Subject: Re: [woocommerce/woocommerce-paypal-payments] Error message displayed to customers during checkout (Issue #1281)

Hello @myclassicpartshttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fmyclassicparts&data=05%7C01%7C%7Cb5a40b9e60d2419a175e08db3514e917%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638162136153621572%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=vbZwPMXttH02%2Fl000vPwmRsshkvTS34IdpiyTIqAOhU%3D&reserved=0

I checked with my team, but they agreed that PAYER_CANNOT_PAY is not a plugin problem. However, usually it is also not a technical problem, so the MTS may say that it is not their problem. We think this is something for the PayPal Merchant Supporthttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.paypal.com%2Fsmarthelp%2Fcontact-us%2F&data=05%7C01%7C%7Cb5a40b9e60d2419a175e08db3514e917%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638162136153621572%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=bOPFeHAKhNlkqCJKaWWaNwxwoWpy%2Fuzq3s13OQq14vY%3D&reserved=0 might be able to help you with if it happens to all potential buyers.

In any case, this is not a development case and should not be opened in GitHub. If you need our continued support, you can reach out to the support teamhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwoocommerce.com%2Fdocument%2Fwoocommerce-paypal-payments%2F%23get-help&data=05%7C01%7C%7Cb5a40b9e60d2419a175e08db3514e917%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638162136153621572%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=SE%2BPbhBv6hbygFt%2BV%2Fiy%2FgGZ6NqvTG37fqkLNOHMuZo%3D&reserved=0 directly for more guidance.

Kind regards, Joost

— Reply to this email directly, view it on GitHubhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fwoocommerce%2Fwoocommerce-paypal-payments%2Fissues%2F1281%23issuecomment-1496026840&data=05%7C01%7C%7Cb5a40b9e60d2419a175e08db3514e917%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638162136153621572%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=wQJOzzWQtfdAmnvKyZDu9HSXNZKHddRBYY1DBka5ASs%3D&reserved=0, or unsubscribehttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FA64KHXHAXU7VC2OBROKMPTLW7QSOZANCNFSM6AAAAAAWIE26LQ&data=05%7C01%7C%7Cb5a40b9e60d2419a175e08db3514e917%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638162136153621572%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=902UsMxmmMJVZjRg1UcRGK6bx6ttOYy9ZApBHbabEFY%3D&reserved=0. You are receiving this because you were mentioned.Message ID: @.***>

myrandomtips commented 1 year ago

I have been getting same thing some orders seem ok other seem to get this:

2023-03-19T00:04:00+00:00 CRITICAL Uncaught WooCommerce\PayPalCommerce\ApiClient\Exception\RuntimeException: Could not retrieve order. in /home/grasslan/public_html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-api-client/src/Endpoint/OrderEndpoint.php:455 Stack trace:

0 /home/grasslan/public_html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-wc-gateway/src/Endpoint/ReturnUrlEndpoint.php(64): WooCommerce\PayPalCommerce\ApiClient\Endpoint\OrderEndpoint->order()

1 /home/grasslan/public_html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-wc-gateway/src/WCGatewayModule.php(240): WooCommerce\PayPalCommerce\WcGateway\Endpoint\ReturnUrlEndpoint->handle_request()

2 /home/grasslan/public_html/wp-includes/class-wp-hook.php(308): WooCommerce\PayPalCommerce\WcGateway\WCGatewayModule::WooCommerce\PayPalCommerce\WcGateway{closure}()

3 /home/grasslan/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters()

4 /home/grasslan/public_html/wp-includes/plugin.php(517): WP_Hook->do_action()

5 /home/gra in /home/grasslan/public_html/wp-content/plugins/woocommerce-paypal-payments/modules/ppcp-api-client/src/Endpoint/OrderEndpoint.php on line 455

dakman commented 1 year ago

we are having this problem and it also is leading to duplicate orders... and orders with no customer/shipping addresses.. very weird

Aennemel commented 1 year ago

I have exactly the same problem! since yesterday, the orders are no longer going through correctly. Order numbers are assigned, but without data. The order with Paypal is correct, the money is also received on my Paypal account. After a few minutes, another doubled order be created. This includes the data, but the order is set to "failed". No automatic emails will be sent afterwards. Neither to the customer nor to me. The e-mails cannot be sent manually from the order either. Please fix this problem asap.

neo-con commented 1 year ago

@dakman @myrandomtips @Aennemel , you guys should open separate issue tickets, as this original issue is based on non-friendly error messages.

InpsydeNiklas commented 1 year ago

Hi @neo-con, thanks for the feedback, and apologies for the noise. Many API errors already result in a rather generic error, but the team is working on improving more front-end error messages, as some of them certainly could be more user-friendly. We hope to include some of the improved errors in the upcoming update.

But everyone else who is encountering any problems, please reach out to the support team directly for more guidance on how to deal with eventual errors, as this GitHub issue is not the right place to discuss eventual problems you encounter. Thanks!