Paypal Checkout Express空车问题

时间:2011-06-16 17:56:24

标签: php paypal checkout express nvp

我正在按照Paypal的API规范在我的网站上进行Paypal集成。我正在沙盒中测试它,并在发送 SetExpressCheckout 请求之后:

CURRENCYCODE=EUR
&RETURNURL=http%3A%2F%2Fwww.xxxxxxxx
&CANCELURL=http%3A%2F%2Fwww.xxxxxxxx
&PAYMENTACTION=Sale
&L_PAYMENTREQUEST_0_NAME0=T-shirt+ring-spun+attillata%3B+taglia+L%3B+colore+Navy
&L_PAYMENTREQUEST_0_NUMBER0=0LLR7IQ-B0SIE+%28Product+%230LLR7IQ-B0SIE%29
&L_PAYMENTREQUEST_0_DESC0=160+g%2Fm%C2%B2%2C+100+%25+cotone+ring-spun%2C+pre-ristretto%2C+simple+jersey%2C+scollatura+arrotondata%2C+maniche+corte%2C+impunture+sulla+scollatura%2C+sul+bordo+delle+maniche+e+sulla+base%2C+cuciture+laterali.
&L_PAYMENTREQUEST_0_AMT0=1.90
&L_PAYMENTREQUEST_0_QTY0=1
&L_PAYMENTREQUEST_0_NAME1=T-shirt+ring-spun+attillata%3B+taglia+M%3B+colore+Dark+Heather
&L_PAYMENTREQUEST_0_NUMBER1=0LLR7IQ-2KEI1+%28Product+%230LLR7IQ-2KEI1%29
&L_PAYMENTREQUEST_0_DESC1=160+g%2Fm%C2%B2%2C+100+%25+cotone+ring-spun%2C+pre-ristretto%2C+simple+jersey%2C+scollatura+arrotondata%2C+maniche+corte%2C+impunture+sulla+scollatura%2C+sul+bordo+delle+maniche+e+sulla+base%2C+cuciture+laterali.
&L_PAYMENTREQUEST_0_AMT1=1.90
&L_PAYMENTREQUEST_0_QTY1=1
&L_PAYMENTREQUEST_0_NAME2=T-shirt+ring-spun+attillata%3B+taglia+S%3B+colore+White
&L_PAYMENTREQUEST_0_NUMBER2=0LLR7IQ-TFOHI+%28Product+%230LLR7IQ-TFOHI%29
&L_PAYMENTREQUEST_0_DESC2=160+g%2Fm%C2%B2%2C+100+%25+cotone+ring-spun%2C+pre-ristretto%2C+simple+jersey%2C+scollatura+arrotondata%2C+maniche+corte%2C+impunture+sulla+scollatura%2C+sul+bordo+delle+maniche+e+sulla+base%2C+cuciture+laterali.
&L_PAYMENTREQUEST_0_AMT2=1.59
&L_PAYMENTREQUEST_0_QTY2=1
&ITEMAMT=5.39
&TAXAMT=1.08
&SHIPPINGAMT=0.00
&AMT=6.47
&ALLOWNOTE=1
&USER=XXXXXXXX
&PWD=XXXXXXXX
&SIGNATURE=XXXXXXXX
&METHOD=SetExpressCheckout
&VERSION=53.0

我将用户转发到 here ,这是Paypal根据我的第一次请求回复的令牌。

问题是,尽管设置了所有价格的成功请求,我有一个空的Paypal评论页面,绝对没有价格。

我错过了什么?

3 个答案:

答案 0 :(得分:2)

糟糕的API文档的攻击! Paypal肯定很努力,但他们做不到。我打过这个API赢了! :)

在您已有的内容中更改这些值...如果它能解决问题,请告诉我

&PAYMENTREQUEST_0_PAYMENTACTION=Sale [[ <--- payment action ]]
&PAYMENTREQUEST_0_CURRENCYCODE=EUR [[<-- currency code]]
&PAYMENTREQUEST_0_ITEMAMT=5.39  [[<---- subtotal here]]
&PAYMENTREQUEST_0_TAXAMT=1.08 [[<---- tax here]]
&PAYMENTREQUEST_0_SHIPPINGAMT=0.00 [[<---- shipping here]]
&PAYMENTREQUEST_0_AMT=6.47 [[<---- grand total here]]
&PAYMENTREQUEST_0_ALLOWNOTE=1

答案 1 :(得分:1)

这个问题也困扰了我几天。

使用developer.paypal.com的Java SDK(截至2008年),我终于在https://www.x.com/developers/paypal/documentation-tools/sdk#3

看到了SDK的新版本(2011年11月)

然而,使用新的SDK(特别是更新的paypal_base.jar)还没有解决我的问题。

您必须找出正确的API Version String才能运行它。对于版本“51.0”(如我的一些示例代码中所示),调用失败。与版本“78.0”一样,新的SDK完成了这项工作。

... Cheerio

答案 2 :(得分:0)

除了此处的其他评论之外,在从SetExpressCheckout获取响应后重定向到PayPal时,请务必使用未记录的“useraction”选项:

CMD = _express结账&安培;?的 useraction =提交&安培;标记=所述-返回令牌

(以下链接不再有效)

Here's the PayPal forum reference to this parameter