PayPal 订单摘要为空

Posted

技术标签:

【中文标题】PayPal 订单摘要为空【英文标题】:PayPal Order Summary is empty 【发布时间】:2013-12-05 14:55:45 【问题描述】:

我使用 Express Checkout API(名称-值对)进行 PayPal 结账。问题是登录屏幕不显示订单摘要。我尝试设置以下参数,例如this post,但它仍然显示空信息。

$options["PAYMENTREQUEST_0_DESC"] = "hieutot";
$options["PAYMENTREQUEST_0_ITEMAMT"] = "123";
$options["PAYMENTREQUEST_0_AMT"] = 300;
$options["PAYMENTREQUEST_0_PAYMENTACTION"] = "Sale";

$options["L_PAYMENTREQUEST_0_NAME0"] = "zzz";
$options["L_PAYMENTREQUEST_0_QTY0"] = 1;
$options["L_PAYMENTREQUEST_0_AMT0"] = 1000.00;

$options["L_PAYMENTREQUEST_0_NAME1"] = "test";
$options["L_PAYMENTREQUEST_0_QTY1"] = 1;
$options["L_PAYMENTREQUEST_0_AMT1"] = 200.00;

但是当我尝试生成 10486 事务错误时。订单摘要出现!多么奇怪的问题!如何解决?会不会是 PayPal API 错误?我正在使用 Zend Cart 1.3.8。

这是使用 cURL 的请求和响应

REQUEST
Array
(
    [ITEMAMT] => 0.00
    [LOCALECODE] => US
    [PAYMENTACTION] => Sale
    [EMAIL] => sorryICannotShowThis@gmail.com
    [PHONENUM] => xxxxxxxx
    [SOLUTIONTYPE] => SOLE
    [PAYMENTREQUEST_0_DESC] => hieutot
    [PAYMENTREQUEST_0_ITEMAMT] => 123
    [PAYMENTREQUEST_0_AMT] => 300
    [PAYMENTREQUEST_0_PAYMENTACTION] => Sale
    [L_PAYMENTREQUEST_0_NAME0] => zzz
    [L_PAYMENTREQUEST_0_QTY0] => 1
    [L_PAYMENTREQUEST_0_AMT0] => 1000
    [L_PAYMENTREQUEST_0_NAME1] => test
    [L_PAYMENTREQUEST_0_QTY1] => 1
    [L_PAYMENTREQUEST_0_AMT1] => 200
    [AMT] => 3,700.00
    [RETURNURL] => https%3A%2F%2Flocalhost%2Fipn_main_handler.php%3Ftype%3Dec
    [CANCELURL] => https%3A%2F%2Flocalhost%2Findex.php%3Fmain_page%3Dshopping_cart%26amp%3Bec_cancel%3D1
    [PAGESTYLE] => Primary
    [METHOD] => SetExpressCheckout
    [CURRENCYCODE] => JPY
)

RESPONSE
Array
(
    [TOKEN] => sorryICannotShowThis
    [TIMESTAMP] => 2013%2d11%2d21T08%3a37%3a09Z
    [CORRELATIONID] => 35adcd4bd76d5
    [ACK] => Success
    [VERSION] => 3%2e2
    [BUILD] => 8549850
    [CURL_ERRORS] => 
)

【问题讨论】:

【参考方案1】:

请仔细检查您的 API 请求中使用的 VERSION:

[版本] => 3%2e2

我建议使用 63.0 以上的任何版本(可以支持 Line item)

见:https://developer.paypal.com/webapps/developer/docs/classic/api/merchant/SetExpressCheckout_API_Operation_NVP/

“此字段在 53.0 版中引入。L_NAMEn 自 63.0 版起已弃用。请改用 L_PAYMENTREQUEST_0_NAMEm。”

【讨论】:

以上是关于PayPal 订单摘要为空的主要内容,如果未能解决你的问题,请参考以下文章

PayPal REST API 订单摘要 自定义描述

Paypal 和 Java:不显示订单摘要和确认失败

自定义 sandbox.paypal “订单汇总”

如何在magento中将订单详细信息传递给paypal express checkout?

如何将订单详细信息传递到 magento 中的 paypal-express-checkout?

PayPal:是不是可以仅通过订单 ID/详细信息为订单付款