amzn / amazon-pay-api-sdk-dotnet

Amazon Pay API SDK (.NET)
Apache License 2.0
18 stars 8 forks source link

.net core 3.1 InvalidRequestSignature #4

Closed RobinSCU closed 3 years ago

RobinSCU commented 4 years ago

Hi,

we encountered a problem with your Nuget Package when we update our shop to .net core 3.1.

We get the following response from the API when we call webStoreClient.CreateCheckoutSession:

{
   "reasonCode":"InvalidRequestSignature",
   "message":"Unable to verify signature, signing String [AMZN-PAY-RSASSA-PSS\n541....] , signature [Rc1E....]"
}

In .net core 2.0 and .net framework 4.6.2 (with your old Nuget Package https://www.nuget.org/packages/AmazonPayV2) the requests work fine with the same Private Key and Settings.

For our Testing we use the Sandbox mode.

bjguillot commented 4 years ago

Is it possible, as part of your upgrade, you may have upgraded your BouncyCastle library from 1.8.5 to 1.8.6.x?

We have seen this type of issue with versions of BouncyCastle greater than 1.8.5, and have an issue open with them: https://github.com/bcgit/bc-csharp/issues/252

If you're still at 1.8.5, then this might be a new issue we need to investigate further. Please confirm which version of BouncyCastle you are using.

lemked commented 3 years ago

Fixed in version 2.4.4 of our SDK: https://github.com/amzn/amazon-pay-api-sdk-dotnet/releases/tag/2.4.4

Closing issue. Please re-open, should you still encounter this issue.