【发布时间】:2014-04-09 16:59:00
【问题描述】:
我目前正在我网站的灯箱中集成 PayPal 自适应付款(快速结账)。一切正常 -> 用户可以付款,但每当有人使用快速结账支付某件商品时,响应如下:
API 响应:
TIMESTAMP = 2014-03-06T20:10:30Z
CORRELATIONID = 505b77f3bea1
ACK = Failure
VERSION = 97.0
BUILD = 9917844
L_ERRORCODE0 = 10400
L_ERRORCODE1 = 10406
L_SHORTMESSAGE0 = Transaction refused because of an invalid argument. See additional error messages for details.
L_SHORTMESSAGE1 = Transaction refused because of an invalid argument. See additional error messages for details.
L_LONGMESSAGE0 = Order total is missing.
L_LONGMESSAGE1 = The PayerID value is invalid.
L_SEVERITYCODE0 = Error
L_SEVERITYCODE1 = Error
这是脚本:
$nvps = array();
$nvps["VERSION"] = "97.0";
// Single-item purchase
$nvps["METHOD"] = "SetExpressCheckout";
$nvps["RETURNURL"] = "http://www.zerogravityprogramming.com/PayPal/Articles/DigitalGoodsExpressCheckout/App/success.php"; // server
$nvps["CANCELURL"] = "http://www.zerogravityprogramming.com/PayPal/Articles/DigitalGoodsExpressCheckout/App/fail.html"; // server
$nvps["PAYMENTREQUEST_0_PAYMENTACTION"] = "Sale";
$nvps["PAYMENTREQUEST_0_NOTIFYURL"] = "http://www.yourdomain.com/PayPal/YourPayPalListener.php";
$nvps["PAYMENTREQUEST_0_AMT"] = "$Price";
$nvps["PAYMENTREQUEST_0_CURRENCYCODE"] = "USD";
$nvps["PAYMENTREQUEST_0_ITEMAMT"] = "$Price";
$nvps["L_PAYMENTREQUEST_0_NAME0"] = "$Desc";
$nvps["L_PAYMENTREQUEST_0_NUMBER0"] = "$Item";
$nvps["L_PAYMENTREQUEST_0_AMT0"] = "$Price";
$nvps["L_PAYMENTREQUEST_0_QTY0"] = "1";
$nvps["L_PAYMENTREQUEST_0_ITEMCATEGORY0"] = "Digital"; // specific to Digital Goods
// Since it's a digital good (and not physical), we don't need a shipping address.
$nvps["REQCONFIRMSHIPPING"] = "0";
$nvps["NOSHIPPING"] = "1";
$Price、$Desc 和 $Item 变量都有一个值 - 所以这不是问题。
有人能猜出来吗?
提前致谢:)
【问题讨论】:
标签: php paypal-adaptive-payments paypal