2

我正在尝试在我的网站上进行销售,客户可以免费收到商品,他们只需要支付运费。

但是,PayPal 似乎无法解决这个问题:我收到了错误10413: The totals of the cart item amounts do not match order amounts.

我发送给 PayPal 的请求是:

L_PAYMENTREQUEST_0_AMT0: "0.00"
L_PAYMENTREQUEST_0_DESC0: "Pink+Bare+Cub+nappy+and+cream+wetbag"
L_PAYMENTREQUEST_0_NAME0: "Facebook+Nappy+Giveaway"
L_PAYMENTREQUEST_0_QTY0: "1"
METHOD: "SetExpressCheckout"
PAYMENTREQUEST_0_AMT: "7.50"
PAYMENTREQUEST_0_CURRENCYCODE: "AUD"
PAYMENTREQUEST_0_CUSTOM: "agtzfmJhYnktYmFyZXISCxILY2FydEludm9pY2UYq1EM"
PAYMENTREQUEST_0_ITEMAMT: "0.00"
PAYMENTREQUEST_0_PAYMENTACTION: "Sale"
PAYMENTREQUEST_0_SHIPPINGAMT: "7.50"
VERSION: "63.0"

(一些字段被编辑为简单)

我收到的回复:

ACK: "Failure"
BUILD: "3242673"
CORRELATIONID: "c8b284c8a04fa"
L_ERRORCODE0: "10413"
L_LONGMESSAGE0: "The%20totals%20of%20the%20cart%20item%20amounts%20do%20not%20match%20order%20amounts%2e"
L_SEVERITYCODE0: "Error"
L_SHORTMESSAGE0: "Transaction%20refused%20because%20of%20an%20invalid%20argument%2e%20See%20additional%20error%20messages%20for%20details%2e"
TIMESTAMP: "2012%2d07%2d09T02%3a03%3a48Z"
VERSION: "63%2e0

知道如何解决这个问题吗?

4

2 回答 2

5

不幸的是,您不能拥有零价值的物品。

一种解决方案是调用一个项目Free Pink Bare Cub nappy and cream wetbag + Shipping 并将其值设置为运费。并使用备注明确买家只需支付运费。

另一种选择是为商品指定 0.01 的值,然后使用该PAYMENTREQUEST_0_SHIPDISCAMT字段为买家提供 0.01 的运费折扣以抵消这一点

编辑:虽然我没有亲自测试过一件免费商品和一件付费商品,但根据您的评论,解决方法很简单。只需拥有您的免费项目,然后创建第二个项目,称为运输和处理

于 2012-07-09T03:46:21.770 回答
0

在计算最终总金额时,您应该包括以下值。

PAYMENTREQUEST_0_ITEMAMT - this is order total without sipping, tax etc.
PAYMENTREQUEST_0_TAXAMT
PAYMENTREQUEST_0_SHIPPINGAMT
PAYMENTREQUEST_0_INSURANCEAMT
PAYMENTREQUEST_0_HANDLINGAMT
PAYMENTREQUEST_0_AMT - this is order total + tax, shipping etc.
于 2012-07-12T11:48:27.667 回答