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

Fix cancelling payments #86

Merged
merged 5 commits into from
Sep 14, 2023
Merged

Fix cancelling payments #86

merged 5 commits into from
Sep 14, 2023

Conversation

GSadee
Copy link
Contributor

@GSadee GSadee commented Sep 12, 2023

This PR should fix 2 issues:

  • payment cancellations, after which the user would get a success message even though the payment had been cancelled

  • overlapping of synchronous and webhook processing, which could lead to a situation where the payment remained with the processing flag and there was no possibility to process it further, either to cancel it or to pay correctly.

Now,

  • if synchronous processing starts first, the webhook will not be processed,

  • if the webhook starts first, synchronous processing will wait until the webhook finishes and then check the status of the last and penultimate payment

@GSadee GSadee added the Bug label Sep 12, 2023
Copy link
Member

@Zales0123 Zales0123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The cancellation bug does not occur anymore... but it seems we're never going back to the thank you page after the successful payment 💃

First attempt:

01.mp4

Second attempt:

02.mp4

🔥

src/Controller/OrderController.php Outdated Show resolved Hide resolved
src/Controller/OrderController.php Outdated Show resolved Hide resolved
Copy link
Member

@Zales0123 Zales0123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's working, as far as I see 🫡 Good job, Grzegorz! 🖖

@Zales0123 Zales0123 merged commit ce168c8 into CommerceWeavers:main Sep 14, 2023
@Zales0123
Copy link
Member

Thank you, @GSadee! Let's test it out and 🤞 it will work properly in the real application 🎉

@GSadee GSadee deleted the fix-cancelling-payments branch September 14, 2023 11:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants