Skip to content

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

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

1 participant