Flex 和亚马逊支付

发布于 2024-09-18 03:47:43 字数 380 浏览 5 评论 0原文

我正在尝试让亚马逊付款与我的 Flex 应用程序一起使用,如下所示: 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 did not match"

What else do I need to get this to work?

Is there something else I need that he forgot to include?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

你是暖光i 2024-09-25 03:47:43

让我们尝试下一步:

转到 return.and 找到 function validateQueryString() 并更改为:

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

并在此处发布输出,包括您的签名不匹配

谢谢。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文