我正在尝试在我的网站上进行销售,客户可以免费获得商品,他们只需支付运费。
然而,似乎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
任何想法如何解决这个问题?
答案 0 :(得分:5)
不幸的是,你不能拥有零价值物品。
一个解决方案是创建一个名为Free Pink Bare Cub nappy and cream wetbag + Shipping
的项目
并将其值设置为运费金额。并使用这些说明绝对清楚,买家只需支付运费。
另一个选项是为商品指定0.01的值,然后使用PAYMENTREQUEST_0_SHIPDISCAMT
字段
编辑: 虽然我没有根据您的评论亲自测试一个免费项目和一个付费项目,但解决方法很简单。只需拥有您的免费物品,然后创建第二个项目,名为运输和处理
答案 1 :(得分: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.