我正在努力将 Amazon FPS 集成到我公司的网站中,但似乎无法生成正确的签名。这是亚马逊的文档所说的: http ://docs.amazonwebservices.com/AmazonFPS/latest/FPSAdvancedGuide/APPNDX_GeneratingaSignature.html
这是我散列的字符串:
GET\nfps.sandbox.amazonaws.com\n/\nAction=Reserve&AWSAccessKeyId=REMOVED&CallerDescription=Reserve&CallerReference=CallerReference05&RecipientTokenId=254656Example83987&SenderTokenId=553IPMACGAZ2J4N1L7BJ3UMNRFTQU4V9NT4RJCTVADDJKXQ6L1ZAKSIUNPIRTTI1&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2012-09-12T22%3A29%3A07.623Z&TransactionAmount.CurrencyCode=USD&TransactionAmount.Value=1.00&Version=2010-08-28
这是我发送的 HTTP 请求:
https://fps.sandbox.amazonaws.com?Action=Reserve&AWSAccessKeyId=REMOVED&CallerDescription=Reserve&CallerReference=CallerReference05&RecipientTokenId=254656Example83987&SenderTokenId=553IPMACGAZ2J4N1L7BJ3UMNRFTQU4V9NT4RJCTVADDJKXQ6L1ZAKSIUNPIRTTI1&Signature=t5r%2BWmV9PdoOGfHhtwLJ5nJ8zo%2BIJL4uWB6MOMpkZLw%3D&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=2012-09-12T22%3A29%3A07.623Z&TransactionAmount.CurrencyCode=USD&TransactionAmount.Value=1.00&Version=2010-08-28
这也是我收到的确切错误:
SignatureDoesNotMatch The request signature we calculated does not match the signature you provided. Check your AWS Secret Access Key and signing method. Consult the service documentation for details. RequestID - ac476abb-2bc6-4891-8854-e52cf33f8716
我正在使用带有 node.js 后端的咖啡脚本编写此内容。谁能发现我做错了什么?如果需要,我可以发布我的代码。