Skip to content

Encountering Random The value X provided for x-amz-pay-date should not be in future #19

@adrianpadurean

Description

@adrianpadurean

Hello,

I'm using the this dependency for a amazonPay instant checkout option. Every now and then some of the payments fail with this particular error (as mentioned in the title).
`
(
[status] => 400
[method] => PATCH
[url] => https://pay-api.amazon.eu/live/v2/checkoutSessions/e73fcfe0-9791-4a99-814a-92d102dbeca1
[headers] => Array
(
[0] => accept:application/json
[1] => authorization:AMZN-PAY-RSASSA-PSS PublicKeyId={}, SignedHeaders=accept;content-type;x-amz-pay-date;x-amz-pay-host;x-amz-pay-region, Signature={}
[2] => content-type:application/json
[3] => user-agent:amazon-pay-api-sdk-php/2.2.4 (PHP/7.3.27-9+ubuntu20.04.1+deb.sury.org+1; Linux/x86_64/5.4.0-1042-gcp)
[4] => x-amz-pay-date:20220131T094401Z
[5] => x-amz-pay-host:pay-api.amazon.eu
[6] => x-amz-pay-region:eu
)

[request] => {"webCheckoutDetails":{"checkoutResultReturnUrl":"{}"},"paymentDetails":{"paymentIntent":"Authorize","canHandlePendingAuthorization":false,"chargeAmount":{"amount":63.03,"currencyCode":"EUR"}},"merchantMetadata":{"merchantReferenceId":"ORD000000070180","merchantStoreName":"{}","noteToBuyer":"","customInformation":""}}
[response] => {"reasonCode":"InvalidHeaderValue","message":"The value 20220131T094401Z provided for x-amz-pay-date should not be in future"}
[request_id] => bb3dde4d-c33f-4452-a1cd-dc88c87395cc
[retries] => 0
[duration] => 112

)
`

I think most of the information needed is there, let me know what else I should provide.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions