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

Issue/2867 use async pos payments #2868

Closed

Conversation

pmzandbergen
Copy link
Contributor

Description
Using an asynchronous call to initiate POS payment request, followed by synchronous status calls. Polls every ~2 seconds for the status until it's final.

Tested scenarios

  1. Place order
  2. Start POS payment
    a. Cancel payment, check result (OK)
    b. Approve payment, check result (OK)

I've created functional tests for our PWA platform. Didn't test the Magento frontend. Since it's already checking for the "In Progress" string if the POS payment request fails, it should be working. Please add the necessary unit / functional tests if desired.

We could exchange the status requests for a request with a more reasonable timeout (e.g. 30 seconds) which gives a response as soon as the notification has been received by the webhook, or when it hits the timeout (in which case the client should retry). This would eliminate the 2 seconds delay and provide a quicker response. Since this requires more changes, I have left it at that for now.

Note: If I would have implemented the Adyen (POS) API directly in a custom module things would probably have been organized a bit different in order to create a more robust solution (see comments in the created issue).

Fixes #2867

@pmzandbergen
Copy link
Contributor Author

Replaced by: #2869 (based on main branch)

@pmzandbergen pmzandbergen deleted the issue/2867-use-async-pos-payments branch January 28, 2025 13:12
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.

Slow POS payments cause proxy timeout
2 participants