Description
Already working on a fix, please await the PR
Describe the bug
When initiating a POS payment using one of the following endpoints:
/V1/adyen/orders/guest-carts/:cartId/pos-payment
/V1/adyen/orders/carts/mine/pos-payment
The browser might receive a timeout if the POS payment takes a bit of time and the webserver (or proxy) is configured with a reasonable (shorter) timeout period. Cloudflare for example has a timeout of 100 seconds, a value which only can modified when using one of the Enterprise plans. This could be fixed using some kind of polling mechanism. Actually the frontend code already seems to include logic for this purpose:
When the browser encounters a (proxy) timeout the response will generally not include "In Progress" and this solution is also not working out-of-the-box for PWA's.
To Reproduce
Steps to reproduce the behavior:
- Ensure the webserver or proxy is configured with a timeout of, for example, 60 seconds
- Start a POS / terminal payment
- Wait for a minute before finishing the payment
- See error
Expected behavior
The payment should be polled as long as the POS payment status isn't final.
Magento version
2.4.7-p3
Plugin version
Tested on 9.6.0, the logic is the same at the current version (9.14.0).
Desktop (please complete the following information):
- OS: MacOS
- Browser: Firefox
- Version: 134.0.2
Smartphone (please complete the following information):
N/A
Additional context
N/A