gpt4 book ai didi

php - Paypal 订单摘要为空

转载 作者:太空宇宙 更新时间:2023-11-03 16:02:29 25 4
gpt4 key购买 nike

我使用 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;

enter image description here

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

这是使用 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] =>
)

最佳答案

请仔细检查您的 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。”

关于php - Paypal 订单摘要为空,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20115870/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com