-
Notifications
You must be signed in to change notification settings - Fork 211
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
Slow POS payments cause proxy timeout #2867
Comments
There is a config path for timeouts: Testing how things are handled if configured. |
Lowering this timeout (10 seconds for testing) leads to an internal server error:
Frontend receives the following response: {"message":"Internal Error. Details are available in Magento log file. Report ID: webapi-[...]"} Conclusion: Lowering the configured timeout alone will not resolve this issue. Digging in the code seems that we are using the sync API:
We probably should use the async instead: Working on a patch. |
It seems the POS implementation in the Adyen Magento module does not follow the guidelines as documented by Adyen: https://docs.adyen.com/point-of-sale/design-your-integration/choose-your-architecture/cloud/
|
Encountered a bug during testing:
The ServiceID used in POS Cloud API requests is a timestamp. If multiple requests are created in the same second, you will get an error. I'll change this to a more unique value. |
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:
adyen-magento2/view/frontend/web/js/view/payment/method-renderer/adyen-pos-cloud-method.js
Line 116 in cacef78
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:
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).
Screenshots
Desktop (please complete the following information):
Smartphone (please complete the following information):
N/A
Additional context
N/A
The text was updated successfully, but these errors were encountered: