سؤال

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.

Cheers.

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
)

لا يوجد حل صحيح

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top