讓我們嘗試下:這裏
function validateQueryString()
{
echo "validing the query string now\n";
$querystring = $_SERVER['QUERY_STRING'];
echo $querystring."\n";
echo $_GET['signature'];
$obj = new Amazon_FPS_CBUIUtils(AWS_ACCESS_KEY_ID,AWS_SECRET_ACCESS_KEY);
//Original signature received in response from Amazon FPS should be specified.
$signatureMatched = $obj->validateQueryString($querystring,$_GET['signature']);
if ($signatureMatched) {
echo "signature matched \n";
$request = new Amazon_FPS_Model_PayRequest();
//set the proper senderToken here.
$request->setSenderTokenId($_GET['tokenID']);
$amount = new Amazon_FPS_Model_Amount();
$amount->setCurrencyCode("USD");
//set the transaction amount here;
$amount->setValue($_SESSION['transaction_amount']);
$request->setTransactionAmount($amount);
//set the unique caller reference here.
$request->setCallerReference($_GET['callerReference']);
$service = new Amazon_FPS_Client(AWS_ACCESS_KEY_ID,
AWS_SECRET_ACCESS_KEY);
invokePay($service, $request);
}
else
echo "Signature did not match \n";
}
,後輸出請,包括您的Signature did not match
感謝:
轉到return.and找到function validateQueryString()
並改變了這一點。
找出爲什麼這些變量是不同的: $查詢字符串和$ _GET [「簽名」] – Inigoesdr 2010-09-05 06:25:47
好......我在哪裏得到setSenderTokenId paramater我需要PaySample.php?亞馬遜文件中包含的自述文件說我從CBUISample.php中得到這個,但該頁面不返回任何類型的令牌 – kristen 2010-09-05 14:10:51
CBUISample.php文件中返回的變量如下: returnURL, pipelineName, callerKey, 版本, callerReference, transactionAmount, paymentReason, 簽名 – kristen 2010-09-05 14:42:13