Paypal 商品折扣至免费,运费仍需支付

发布于 2024-12-04 15:54:11 字数 2171 浏览 0 评论 0原文

我目前正在网站上设置 Paypal,作为客户的替代付款方式。总的来说,它运行良好;我可以下订单,它会进入 Paypal 网站,显示正确的信息,一切都很好。当用户对订单应用折扣时,一切仍然正常,无需担心。

当用户对整个订单价值应用折扣时(即订单价格为 20 英镑,他们有 20 英镑折扣的折扣代码),我收到错误“商品总计无效”。从贝宝回来。发送的成本为 0 英镑,发送的运费为 5 英镑。

首先,我发送的字段是否有问题,如果有,问题出在哪里? :) 如果您需要更多信息,请随时询问。

快速结帐字段示例:

Array
(
    [METHOD] => SetExpressCheckout
    [RETURNURL] => /snip/
    [CANCELURL] => /snip/
    [NOTIFYURL] =>
    [AMT] => 5.00
    [DESC] =>
    [CURRENCYCODE] => GBP
    [MAXAMT] =>
    [USERACTION] => commit
    [INVNUM] =>
    [ADDROVERRIDE] => 0
    [SHIPTONAME] =>
    [SHIPTOSTREET] =>
    [SHIPTOSTREET2] =>
    [SHIPTOCITY] =>
    [SHIPTOSTATE] =>
    [SHIPTOZIP] =>
    [SHIPTOCOUNTRYCODE] =>
    [LOCALECODE] => GB
    [PAGESTYLE] =>
    [HDRIMG] =>
    [BUTTONSOURCE] => /snip/
    [L_SHIPPINGOPTIONISDEFAULT0] => true
    [L_SHIPPINGOPTIONNAME0] => Royal Mail Tracked Next Day Ref:/snip (int)/
    [L_SHIPPINGOPTIONLABEL0] =>
    [L_SHIPPINGOPTIONAMOUNT0] => 5.00
    [L_SHIPPINGOPTIONISDEFAULT1] => false
    [L_SHIPPINGOPTIONNAME1] => Interlink Express Next Day Delivery (Ord Ref:/snip (int)/
    [L_SHIPPINGOPTIONLABEL1] =>
    [L_SHIPPINGOPTIONAMOUNT1] => 7.00
    [L_SHIPPINGOPTIONISDEFAULT2] => false
    [L_SHIPPINGOPTIONNAME2] => Collect In Store Ref:/snip (int)/
    [L_SHIPPINGOPTIONLABEL2] =>
    [L_SHIPPINGOPTIONAMOUNT2] => 0.00
    [L_NAME0] => /snip/
    [L_NUMBER0] => /snip (item id)/
    [L_DESC0] =>
    [L_AMT0] => 8.33
    [L_TAXAMT0] => 1.67
    [L_QTY0] => 1
    [L_NAME1] => /snip/
    [L_NUMBER1] => /snip (item id)/
    [L_DESC1] =>
    [L_AMT1] => 8.33
    [L_TAXAMT1] => 1.67
    [L_QTY1] => 1
    [L_AMT2] => -16.66
    [L_TAXAMT2] => -3.34
    [L_NAME2] => /snip/
    [L_DESC2] => /snip/
    [L_QTY2] => 1
    [ALLOWNOTE] => 1
    [BUYEREMAILOPTINENABLE] => 1
    [CALLBACK] => /snip/
    [CALLBACKURL] => /snip/
    [CALLBACKTIMEOUT] => 6
    [REQCONFIRMSHIPPING] => 0
    [SHIPPINGAMT] => 5.00
    [ITEMAMT] => 0.00
    [TAXAMT] => 0.00
)

I'm setting up Paypal on a site at the moment as an alternative payment method for customers. In general, it's working fine; I can put an order through and it goes through to Paypal's site, shows the correct information, and all is fine. When a user applies a discount to the order, things still work fine, no worries at all.

When a user applies a discount for the full order value (ie. order is for £20, they have a discount code for £20 off) I'm getting the error "Item total is invalid." back from Paypal. The cost being sent across is £0, and the shipping being sent across is £5.

First off, is there anything wrong with the fields I'm sending across, and if so, what's wrong? :) If you need any more info, feel free to ask.

Sample express checkout fields:

Array
(
    [METHOD] => SetExpressCheckout
    [RETURNURL] => /snip/
    [CANCELURL] => /snip/
    [NOTIFYURL] =>
    [AMT] => 5.00
    [DESC] =>
    [CURRENCYCODE] => GBP
    [MAXAMT] =>
    [USERACTION] => commit
    [INVNUM] =>
    [ADDROVERRIDE] => 0
    [SHIPTONAME] =>
    [SHIPTOSTREET] =>
    [SHIPTOSTREET2] =>
    [SHIPTOCITY] =>
    [SHIPTOSTATE] =>
    [SHIPTOZIP] =>
    [SHIPTOCOUNTRYCODE] =>
    [LOCALECODE] => GB
    [PAGESTYLE] =>
    [HDRIMG] =>
    [BUTTONSOURCE] => /snip/
    [L_SHIPPINGOPTIONISDEFAULT0] => true
    [L_SHIPPINGOPTIONNAME0] => Royal Mail Tracked Next Day Ref:/snip (int)/
    [L_SHIPPINGOPTIONLABEL0] =>
    [L_SHIPPINGOPTIONAMOUNT0] => 5.00
    [L_SHIPPINGOPTIONISDEFAULT1] => false
    [L_SHIPPINGOPTIONNAME1] => Interlink Express Next Day Delivery (Ord Ref:/snip (int)/
    [L_SHIPPINGOPTIONLABEL1] =>
    [L_SHIPPINGOPTIONAMOUNT1] => 7.00
    [L_SHIPPINGOPTIONISDEFAULT2] => false
    [L_SHIPPINGOPTIONNAME2] => Collect In Store Ref:/snip (int)/
    [L_SHIPPINGOPTIONLABEL2] =>
    [L_SHIPPINGOPTIONAMOUNT2] => 0.00
    [L_NAME0] => /snip/
    [L_NUMBER0] => /snip (item id)/
    [L_DESC0] =>
    [L_AMT0] => 8.33
    [L_TAXAMT0] => 1.67
    [L_QTY0] => 1
    [L_NAME1] => /snip/
    [L_NUMBER1] => /snip (item id)/
    [L_DESC1] =>
    [L_AMT1] => 8.33
    [L_TAXAMT1] => 1.67
    [L_QTY1] => 1
    [L_AMT2] => -16.66
    [L_TAXAMT2] => -3.34
    [L_NAME2] => /snip/
    [L_DESC2] => /snip/
    [L_QTY2] => 1
    [ALLOWNOTE] => 1
    [BUYEREMAILOPTINENABLE] => 1
    [CALLBACK] => /snip/
    [CALLBACKURL] => /snip/
    [CALLBACKTIMEOUT] => 6
    [REQCONFIRMSHIPPING] => 0
    [SHIPPINGAMT] => 5.00
    [ITEMAMT] => 0.00
    [TAXAMT] => 0.00
)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

以酷 2024-12-11 15:54:11

您不能向 PayPal 发送空金额或零金额。 0.01 美元是您可以接受的最低价格。

您可以尝试通过从运费中提取一美分并将其添加到总额中来解决此问题,或者如果商品费用为零,则交换运费和商品费用。

You can't send an empty or zero amount to PayPal. $0.01 is the lowest you can go.

You can try and work around this by taking a cent from the shipping and adding it to the total or swap the shipping and item charges if the item charge is zero.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文