创建亚马逊灵活支付签名 [英] Creating an Amazon Flexible Payments Signature

查看:164
本文介绍了创建亚马逊灵活支付签名的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是从本教程在亚马逊创建签名:<一href="http://docs.amazonwebservices.com/AmazonFPS/latest/FPSBasicGuide/APPNDX_GeneratingaSignature.html" rel="nofollow">http://docs.amazonwebservices.com/AmazonFPS/latest/FPSBasicGuide/APPNDX_GeneratingaSignature.html

和我不明白,步骤a:排序UTF-8查询字符串组件与自然字节顺序参数名称。

什么UTF-8字符串他们在说什么?是否有可能做什么,他们是在谈论一个PHP的例子吗?

谢谢!

解决方案

查询字符串,在此情况下,是在URL后的?的部分。指令是什么,告诉你的是查询字符串的组成部分进行排序,即参数。例如,这些参数:

  $参数=阵列();
$参数['transactionAmount'] = 1.00;
$参数['RETURNURL'] ='https://mydomain.com/receipt';
$参数['货币code'] ='美元';
 

将被整理成一个查询部分的URL看起来是这样的:

<$p$p><$c$c>http://...?currency$c$c=USD&returnURL=httpshttp%3A%2F%2Fmydomain.com%2Freceipt&transactionAmount=1.00

有拨打电话,以FPS位于这里。在那个库是code表示签署所有请求(位于Am​​azon_FPS_CBUIPipeline级)。我会建议您使用库来产生所有的请求。

I am working from this tutorial in Amazon for creating signatures: http://docs.amazonwebservices.com/AmazonFPS/latest/FPSBasicGuide/APPNDX_GeneratingaSignature.html

and I don't understand step a: "Sort the UTF-8 query string components by parameter name with natural byte ordering."

What UTF-8 string are they talking about? Is there maybe a PHP example of doing what they are talking about?

Thanks!!

解决方案

The query string, in this case, is the part of the URL after the "?". What the instructions are telling you is to sort the components of the query string, i.e. the parameters. For example, these parameters:

$param = array();
$param['transactionAmount'] = 1.00;
$param['returnURL'] = 'https://mydomain.com/receipt';
$param['currencyCode'] = 'USD';

Would be sorted into a URL with a query part that looks something like:

http://...?currencyCode=USD&returnURL=httpshttp%3A%2F%2Fmydomain.com%2Freceipt&transactionAmount=1.00

There is a PHP library for making calls to FPS located here. Inside that library is code that signs all of the requests (located in the Amazon_FPS_CBUIPipeline class). I would recommend that you use the library to generate all of your requests.

这篇关于创建亚马逊灵活支付签名的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆