Note that there are some explanatory texts on larger screens.

plurals
  1. POAmazon FPS Return URL Validation with verifySignature PHP api returning "InvalidSignature"
    text
    copied!<p>I'm trying to validate the return URL of Amazon FPS CBUI after the client confirm the payment in the CBUI. I 'm using the code examples from Amazon </p> <pre><code> public static function test() { $utils = new Amazon_FPS_SignatureUtilsForOutbound(); $params["signature"] = $_GET['signature']; $params["expiry"] = "10/2016"; $params["signatureVersion"] = $_GET['signatureVersion']; $params["signatureMethod"] = $_GET['signatureMethod']; $params["certificateUrl"] = $_GET['certificateUrl']; $params["tokenID"] = $_GET['tokenID']; $params["status"] = $_GET['status']; $params["callerReference"] = $_GET['callerReference']; $urlEndPoint = "http://mydomain.com/Amazon/IpnReturnUrlValidation/Samples/ReturnUrlVerificationSampleCode.php"; //Your return url end point. print "Verifying return url signed using signature v2 ....\n"; //return url is sent as a http GET request and hence we specify GET as the http method. //Signature verification does not require your secret key print "Is signature correct: " . $utils-&gt;validateRequest($params, $urlEndPoint, "GET") . "\n"; } </code></pre> <p>All the parameters that I use from the superglobal variable $_GET have the correct value (I think) but I always get this response:</p> <pre><code>&lt;Response&gt;&lt;Errors&gt;&lt;Error&gt;&lt;Code&gt;InvalidSignature&lt;/Code&gt;&lt;Message&gt;The request signature we calculated does not match the signature you provided.&lt;/Message&gt;&lt;/Error&gt;&lt;/Errors&gt;&lt;RequestID&gt;bb922e49-af5e-43ba-a3d0-464ce2851222&lt;/RequestID&gt;&lt;/Response&gt; </code></pre> <p>I also compared the value from the signature param that Amazon returns vs the one I send to the VerifySignature API and they look the same.</p> <p>Thanks in advance for any help.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload