amzn / amazon-payments-magento-2-plugin

Extension to enable Amazon Pay on Magento 2
https://amzn.github.io/amazon-payments-magento-2-plugin/
Apache License 2.0
109 stars 77 forks source link

pay button stuck with error message #1103

Closed sabirsaqib closed 2 years ago

sabirsaqib commented 2 years ago

checkout stuck

What I expected

complete order

successful order place

What happened instead

Steps to reproduce the issue

Your setup

debug log getCheckoutSession -> {"reasonCode":"InvalidHeaderValue","message":"The value 20220125T140736Z provided for x-amz-pay-date should not be in future","status":400}

The issue occurs after module upgrades from 1.6 with magento 2.3.7 to 5.9.1 with magento 2.4.3-p1

sign in with amazon is not working as well just reload the window with no js error.

sgabhart22 commented 2 years ago

Hello @sabirsaqib ,

Can you ensure your server clock is correct? The amazon-pay-api-sdk-php module relies on the standard PHP time() function to create the timestamp for this header; I think the only reason this should be invalid is if the server is providing inaccurate time values. I can only reproduce this on a fresh 2.4.3-p1 installation with 5.9.1 of our module if I set my system time in the future with timedatectl.

Please let me know if this helps!

sabirsaqib commented 2 years ago

Hello @sgabhart22, I can verify on my dev server but the same issue occurs on my localhost as well using docker. the checkout page stuck and refreshed again and again. Thanks,

sgabhart22 commented 2 years ago

@sabirsaqib I think we should create an internal ticket to track this issue further. Could you provide an email address we can use to include you? We'll likely request more information from you there.

Thanks, Spencer

sabirsaqib commented 2 years ago

sabirsaqib12@gmail.com

sgabhart22 commented 2 years ago

Thank you @sabirsaqib , you should be receiving an email from us shortly!