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

Checkout with PayPal throws a "Something went wrong ......" error #28092

Open
chequille opened this issue May 3, 2020 · 90 comments
Open

Checkout with PayPal throws a "Something went wrong ......" error #28092

chequille opened this issue May 3, 2020 · 90 comments
Labels
Area: Payments CD Issue recommended for the contribution day Component: Payment Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: ready for dev Reported on 2.3.4 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround.

Comments

@chequille
Copy link

chequille commented May 3, 2020

Preconditions (*)

  1. Magento Version 2.4 -develop
  2. Paypal Sandbox Configuration Enabled
  3. InContext Checkout Disabled

Steps to reproduce (*)

  1. Do a Checkout
  2. Click Paypal Radio and Click on "Continue to Paypal" button

Expected result (*)

  1. Of course not showing this error, because PayPal is still opened and the order is processed till the end

Actual result (*)

  1. Getting this error after Pay Button is pressed, but the change to the PayPal site is still happening.
    errormessagepaypalpayment

I just installed my backups from 2.3.4 version and there it does not happen.
So something within the 2.3.5-p1 update must be the reason for this.

Ok, the order is still processed but sorry, I do not want to see this error message, even if it is disappearing after a few seconds and the page is moving to PayPal sites.

Unfortunately, nothing logged in the log directory or in the the report directory.

@m2-assistant
Copy link

m2-assistant bot commented May 3, 2020

Hi @chequille. Thank you for your report.
To help us process this issue please make sure that you provided the following information:

  • Summary of the issue
  • Information on your environment
  • Steps to reproduce
  • Expected and actual results

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

@chequille do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?

  • yes
  • no

@ghost ghost added this to Ready for QA in Community Backlog May 3, 2020
@magento-engcom-team magento-engcom-team added the Issue: Format is valid Gate 1 Passed. Automatic verification of issue format passed label May 3, 2020
@chequille
Copy link
Author

@magento give me 2.4-develop instance - upcoming 2.4.x release

@magento-engcom-team
Copy link
Contributor

Hi @chequille. Thank you for your request. I'm working on Magento 2.4-develop instance for you

@magento-engcom-team
Copy link
Contributor

Hi @chequille, here is your Magento instance.
Admin access: https://i-28092-2-4-develop.instances.magento-community.engineering/admin_d845
Login: 31c6188a Password: b042640d8753
Instance will be terminated in up to 3 hours.

@chequille
Copy link
Author

chequille commented May 4, 2020

Hi,
I confirm it is happening as well on the 2.4-develop instance.
Here is the screenshot
errorondevinstance

Screenshot was made after the button "Continue to PayPal" was pressed.

Used my sandbox account and "InContext Checkout" is disabled.

If "InContext Checkout" is enabled, the error messages does not appear.

@chequille
Copy link
Author

Any idea yet?

@m2-assistant
Copy link

m2-assistant bot commented May 12, 2020

Hi @prasannachelladurai90. Thank you for working on this issue.
In order to make sure that issue has enough information and ready for development, please read and check the following instruction: 👇

  • 1. Verify that issue has all the required information. (Preconditions, Steps to reproduce, Expected result, Actual result).

    DetailsIf the issue has a valid description, the label Issue: Format is valid will be added to the issue automatically. Please, edit issue description if needed, until label Issue: Format is valid appears.

  • 2. Verify that issue has a meaningful description and provides enough information to reproduce the issue. If the report is valid, add Issue: Clear Description label to the issue by yourself.

  • 3. Add Component: XXXXX label(s) to the ticket, indicating the components it may be related to.

  • 4. Verify that the issue is reproducible on 2.4-develop branch

    Details- Add the comment @magento give me 2.4-develop instance to deploy test instance on Magento infrastructure.
    - If the issue is reproducible on 2.4-develop branch, please, add the label Reproduced on 2.4.x.
    - If the issue is not reproducible, add your comment that issue is not reproducible and close the issue and stop verification process here!

  • 5. Add label Issue: Confirmed once verification is complete.

  • 6. Make sure that automatic system confirms that report has been added to the backlog.

@prasannachelladurai-ziffity

@magento give me 2.4-develop instance

@magento-engcom-team
Copy link
Contributor

Magento instance deployment temporary unavailable due to service maintenance.

@plastikschnitzer
Copy link

As long as I see its not distracting the paypal checkout workflow.

With Website Payment Standard, the option "InContext Checkout" enabled @chequille described above is not available.

Quick and (very) dirty fix to hide the message from customers with css:
.checkout-index-index .message.message-error div{display: none !important;}

@chequille
Copy link
Author

Hi, this is relly quick and dirty. I thought to do so as well, but if a real error occurs, the message is also not shown.
Therefore no solution.
What I found is, that it does not happen every checkout. Sometimes it went through without showing the message, the next time it is showing.
Maybe it has to do with the PayPal Sandbox??????

Nevertheless, as this error was not there in 2.3.4, there is some change somewhere cuasing this and therefore it needs to be investigated.
My opinion!!

Best regards and stay healthy :-)

@prasannachelladurai-ziffity

@magento give me 2.4-develop instance

@magento-engcom-team
Copy link
Contributor

Hi @prasannachelladurai90. Thank you for your request. I'm working on Magento 2.4-develop instance for you

@magento-engcom-team
Copy link
Contributor

Hi @prasannachelladurai90, here is your Magento instance.
Admin access: https://i-28092-2-4-develop.instances.magento-community.engineering/admin_57d9
Login: 367d4cbf Password: e07f143057ef
Instance will be terminated in up to 3 hours.

@prasannachelladurai-ziffity

Hi @chequille I tried to reproduce the issue in Magento 2.4 and it did not occur to me
Please find the video attachment https://drive.google.com/open?id=1gN771KPKxUuRljOx7-PjUCBPAHrQN6aH. Am i missing something here ?

@chequille
Copy link
Author

Sorry, can not acces the video.

@prasannachelladurai-ziffity

Sorry I have granted Permission. You should able to see the Video now. And i did try multiple times going to Payment From Checkout.

@chequille
Copy link
Author

Sorry, still saying no permission to open the video.

@prasannachelladurai-ziffity

@chequille I think you should be able to view now

@chequille
Copy link
Author

Sorry, no.
Page is saying redirection error!?!?

@prasannachelladurai-ziffity

@chequille Permission is set from My end and this is the Link https://drive.google.com/file/d/1gN771KPKxUuRljOx7-PjUCBPAHrQN6aH/view?usp=sharing
Can you please try opening the Link again or Refreshing the Page?

@chequille
Copy link
Author

It is not working
grafik
To which email address you set the permission. Google is saying no permission. Do not know whats happening here !?

@chequille
Copy link
Author

In the picture it says Perrmission missing. I am logged in with the account for js@chequille.de

@prasannachelladurai-ziffity

@chequille Ah the Permission is set to your gmail account "chequille22@gmail.com" can you please open it from your gmail

@chequille
Copy link
Author

Hi Again,
ok, now I got it. Question: where did you get this email from? Im wondering, because here in github i am logged in with another one !?!?!?!

Ok, back to the problem:
it is clear, the error message does not occure if "InContext Checkout" is enabled.
You have to disable "InContext" in the configuration of PayPal.
Than you will get the error message, as I have it in my setup and as I could reproduce in the 2.4 develop instance.

  • Strange is, that if you change this now, it can be, that the frist checkout is ok, but if you try a second, third ect. checkout, thant the error message comes up.
  • Strange as well is, that all orders are proceeded correct.
  • Strange as well, this behaviour was definetely not within 2.3.4

Looking forward to hearing from you.
Best regards,
Jürgen

@Den4ik Den4ik added the Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed label May 4, 2021
@magento-engcom-team
Copy link
Contributor

✅ Confirmed by @Den4ik
Thank you for verifying the issue. Based on the provided information internal tickets MC-34638 were created

Issue Available: @Den4ik, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.

@Den4ik Den4ik removed the Triage: Ready for Triage Issue is ready to me triaged with Product Manager label May 4, 2021
@chequille
Copy link
Author

@5m-solutions
Hi, it does not work on my test shop using 2.3.5p2 version. I still get the error message "something went wrong ......."
Which version do you use?
Regards,
Chequille

@engcom-Oscar
Copy link

I could reproduce this issue on latest 2.4-develop branch using Firefox browser.

@chequille
Copy link
Author

I confirm this on 2.4.2
I cannot test develop branch.
But I do not wonder that it is still an issue, because it seems that nobody cares !!!!!!!
As it is with other things.
I am not happy, because I cannot switch to 2.4.x version. We rented a V-Server 6 months ago to get 2.4.x requirements and to be aible to switch but I am still online with 2.3.5 on a hosting server.
It is a shame, sorry guys but it is as I said.

Looking forward to find some solved issues here
Regards,
Chequille

@muxmix
Copy link

muxmix commented May 16, 2021

We resolved this by removing the 'Email Associated with PayPal Merchant Account' and leaving it blank. A capital in this was the issue and on another client account they got their email mixed up. As the API is used anyway you don't need this filled in on the new Magento versions we believe. Works fine without it.

This solution worked for me too! Thanks 5m

@plastikschnitzer
Copy link

Thank you @5m-solutions for the idea, I removed the email and the issue was still there.

Then checked all my paypal settings and disabled the method "Website Payment Standard" and enabled "PayPal Express" and the issue was gone! Not sure what Website Payment Standard is doing there because its handled by PayPal Express anyway as far as I can see.

So anyone who cannot solve it by simply removing the email address, check if you use website payment standard or PayPal Express and switch to express. Maybe this will solve it for you as well.

@m2-community-project m2-community-project bot moved this from Ready for Development to Dev In Progress in High Priority Backlog May 27, 2021
@m2-community-project m2-community-project bot moved this from Ready for Development to Dev In Progress in High Priority Backlog May 27, 2021
@m2-community-project m2-community-project bot moved this from Dev In Progress to Ready for Development in High Priority Backlog May 28, 2021
@chequille
Copy link
Author

Unbelievable, still happens in version 2.4.3
What are you going to do with this?

@MTheProgrammer
Copy link
Contributor

MTheProgrammer commented Oct 20, 2021

We had a similar issue in Firefox and Safari only and no error message appeared in Chrome.

This SO answer explains the cause:
https://stackoverflow.com/questions/4807572/jquery-ajax-error-handling-to-ignore-aborted/15141116#15141116

Firefox navigates to another page (paypal express checkout) and aborts all pending XHR requests.
PayPal catches exception with .fail() method, but it does not verify failure cause. Second argument (textStatus) fail() defines failure reason. Callback should verify whether textStatus !== 'abort'. However, Firefox always returns 'error' so there must be another condition (e.g. check if there was no redirect initiated).

Message is defined here:

# vendor/magento/module-paypal/view/frontend/web/js/in-context/express-checkout-wrapper.js
paymentActionError: $t('Something went wrong with your request. Please try again later.'),

It is used then in .fail() callbacks of these scripts:

  • vendor/magento/module-paypal/view/frontend/web/js/in-context/express-checkout-wrapper.js
  • vendor/magento/module-paypal/view/frontend/web/js/view/payment/method-renderer/in-context/checkout-express.js

The fast workaround is to enable In context checkout for PayPal. This way the customer is completing payment without being redirected to the gateway website.

@chequille
Copy link
Author

chequille commented Oct 20, 2021

Hi @MTheProgrammer ,
the fast workaround is no option for my shop, as I must have the button "order now" because of legal rights.
Therefore I cannot use InContext PayPal
Regarding Chrome I am not sure at the moment if it does not happen on my site. Have to test this again. But anyway there must be a solution for Firefox as well.

@MTheProgrammer
Copy link
Contributor

Yes, that is just a partial solution. Module should work for both cases. I think that you can add mixins or override those methods which I mentioned above and verify somehow whether there was a redirect.

@chequille
Copy link
Author

Little bit confused now!!!!
Just made a few orders on my site with firefox and did not get the error anymore.
My firefox is version 93.0
Could it be tht firefox changed something?

@MTheProgrammer
Copy link
Contributor

It depends on how fast is the request processing. Just verify request timing in dev tools whether it was finished before Navigating to PayPal express checkout.
Please verify it on Safari.
Although our clients were redirected to PayPal website they were confused with that error message and always contacted the support to explain this issue.

@convenient
Copy link
Contributor

We're seeing this issue as well on an enterprise client. Replicable on safari and firefox when you quickly click the paypal button after selecting the payment method.

@plastikschnitzer
Copy link

@convenient did you enter the paypal email address in the backend? Try to remove it and see if it still appears, this field is not mandatory and solved the issue for me.

@LLudas
Copy link

LLudas commented Jan 5, 2022

What we did:
We've updated magento to newer version (actually reinstalled freshly everything) and problem was solved. Probably there was a fix in newer version. This is the best and easiest solution to upgrade.
Another solution to disable Paypal payment. This should solve this problem too.
BR

@plastikschnitzer
Copy link

I updated to Magento 2.4.3-p1 and now the issue is back …

I got the advice to look at this issue: #33741
But unfortunately, it was not the solution for me :-/

@plastikschnitzer
Copy link

According to the release notes of Magento 2.4.4, the issue is fixed there! Maybe someone can test and confirm?

https://devdocs.magento.com/guides/v2.4/release-notes/open-source-2-4-4.html

@hostep
Copy link
Contributor

hostep commented Apr 19, 2022

The following is just FYI, no confirmation from my end.

@plastikschnitzer probably means this entry from the release notes of Magento 2.4.4:

Magento Open Source no longer displays an error during checkout with the PayPal Express payment method. Previously, although the checkout process completed, Magento Open Source displayed this error: Something went wrong.

This is linked to internal ticket number MC-42154 of which I can only find this commit: d266630

Again, no confirmation if this is a fix for this issue, this is just information I gathered from the release notes.

@plastikschnitzer
Copy link

I could not check with Magento 2.4.4 yet, but I used the chance now to apply the commit @hostep mentioned to Magento 2.4.3-p1 and it solves the issue for me. Thank you @hostep for doing the research for the commit!

Give it a try ;-)

@Xuanmoi
Copy link

Xuanmoi commented Sep 30, 2022

I also encountered this problem.
From the network point of view, the safari browser, using paypal to place an order, will repeatedly send the request, send 4 set-payment-information requests, (normally 2 times), and thus send 2 get-total requests (normally 1 time) times), the second get-total request fails, resulting in the display of an error message.
Temporary solution: The set-payment-information request sent when placing an order with paypal does not send a get-total request.
Hopefully there will be a better solution later.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Payments CD Issue recommended for the contribution day Component: Payment Issue: Confirmed Gate 3 Passed. Manual verification of the issue completed. Issue is confirmed Priority: P2 A defect with this priority could have functionality issues which are not to expectations. Progress: ready for dev Reported on 2.3.4 Indicates original Magento version for the Issue report. Reproduced on 2.4.x The issue has been reproduced on latest 2.4-develop branch Severity: S3 Affects non-critical data or functionality and does not force users to employ a workaround.
Projects
High Priority Backlog
  
Ready for Development
Development

No branches or pull requests