开发者

Flex and Amazon Payments

开发者 https://www.devze.com 2023-01-14 17:10 出处:网络
I am trying to get amazon payments working w/ my flex app, as shown here: http://miti.pricope.com/2009/07/11/using-amazon-flexible-payment-system-with-flex/

I am trying to get amazon payments working w/ my flex app, as shown here: http://miti.pricope.com/2009/07/11/using-amazon-flexible-payment-system-with-flex/

I've done exactly as he says, I've downloaded the files & changed the access key & secret key. When I run it on localhost or my production server I get "Signature d开发者_如何学编程id not match"

What else do I need to get this to work? Is there something else I need that he forgot to include.?


Lets try next:

goto return.and find function validateQueryString() and change to this:

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";
}

and post output here please, including your Signature did not match

Thanks.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号