gpt4 book ai didi

php - PayPal SetExpressCheckout 错误

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

我在使用 PayPal 的 SetExpressCheckout 时遇到一些问题。我正在尝试为一件值(value) 11.96 欧元(含 21% 的增值税)的商品设置新的快速结账。但是,PayPal 表示购物车中的金额与订单不符。这是请求:

[PAYMENTREQUEST_0_CURRENCYCODE] => EUR
[SOLUTIONTYPE] => Mark
[PAYMENTREQUEST_0_AMT] => 11.96
[PAYMENTREQUEST_0_ITEMAMT] => 9.88
[PAYMENTREQUEST_0_TAXAMT] => 2.08
[L_BILLINGTYPE0] => MerchantInitiatedBillingSingleAgreement
[BILLINGTYPE] => MerchantInitiatedBillingSingleAgreement
[L_BILLINGAGREEMENTDESCRIPTION0] => Some description here
[L_PAYMENTREQUEST_0_ITEMAMT0] => 9.88
[L_PAYMENTREQUEST_0_NAME0] => 011213
[L_PAYMENTREQUEST_0_DESC0] => Description here
[L_PAYMENTREQUEST_0_NUMBER0] => 1
[L_PAYMENTREQUEST_0_QTY0] => 1
[L_PAYMENTREQUEST_0_TAXAMT0] => 2.08
[L_PAYMENTTYPE0] => ANY

下面是 PayPal 的回复:

[ACK] => Failure
[VERSION] => 72.0
[L_ERRORCODE0] => 10413
[L_SHORTMESSAGE0] => Transaction refused because of an invalid argument. See additional error messages for details.
[L_LONGMESSAGE0] => The totals of the cart item amounts do not match order amounts.
[L_SEVERITYCODE0] => Error

我在这里遗漏了什么吗?我会感谢你的帮助。

谢谢!

最佳答案

我已经通过以下请求解决了我的问题:

[METHOD] => SetExpressCheckout
[NOSHIPPING] => 1
[ALLOWNOTE] => 1
[LOCALECODE] => IT
[PAYMENTACTION] => Sale
[CHANNELTYPE] => Merchant
[REQCONFIRMSHIPPING] => 0
[CALLBACKVERSION] => 72.0
[PAYMENTREQUEST_0_CURRENCYCODE] => EUR
[SOLUTIONTYPE] => Sole
[PAYMENTREQUEST_0_AMT] => 14.33
[PAYMENTREQUEST_0_ITEMAMT] => 11.84
[PAYMENTREQUEST_0_TAXAMT] => 2.49
[L_BILLINGTYPE0] => MerchantInitiatedBillingSingleAgreement
[BILLINGTYPE] => MerchantInitiatedBillingSingleAgreement
[L_BILLINGAGREEMENTDESCRIPTION0] => Billing agreement description
[L_PAYMENTREQUEST_0_AMT0] => 11.84
[L_PAYMENTREQUEST_0_NAME0] => Item name
[L_PAYMENTREQUEST_0_DESC0] => Item description
[L_PAYMENTREQUEST_0_NUMBER0] => 1
[L_PAYMENTREQUEST_0_QTY0] => 1
[L_PAYMENTREQUEST_0_TAXAMT0] => 2.49
[L_PAYMENTTYPE0] => ANY

价格是不同的,因为我实际上改变了它们(虽然它们不影响最终结果)。基本上我在发送 [L_PAYMENTREQUEST_0_ITEMAMT0] 时遗漏了一些字段(例如 [L_PAYMENTREQUEST_0_AMT0],这不应该是这种情况。

关于php - PayPal SetExpressCheckout 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17014909/

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