cancel
Showing results for 
Search instead for 
Did you mean: 

Express checkout discount error

Express checkout discount error

Hi all,

We have a reward points scheme on our store which gives discounts on future orders. These discounts appear to work ok all the way through the Paypal express checkout process, including on the paypal pages. It shows the discount and the correct total. You then get returned to our store to confirm the order, again with the correct amounts displaying. However the amount actually then submitted to Paypal for payment does not include the discount. 

 

I've done all the usual Googling and can't find any help for this problem anywhere. Weirdly we have a development version of the site tied in to Paypal sandbox and that works correctly. I contacted Paypal and they forwarded me the data from one of the test transactions I did which shows that the initial submission was for the correct amount, but the final data sent to execute the payment was incorrect. Something in our live Magento setup must be preventing it from including the discount in that final submission but I'm at a loss as to what it might be.

 

If anyone can at least point me in the right direction that would be great!

 

Thanks, Paypal data below...

 

1. Firstly, call SetExpressCheckout API.

method "SetExpressCheckout"
version "72.0"
shiptocountrycode "GB"
currencycode "GBP"
amt "9.99"
itemamt "1.67"
shippingamt "5.99"
taxamt "2.33"
invnum "100019658"
buttonsource "Varien_Cart_EC_UK"
name "Energy Saving B22/BC 28W Halogen GLS Bulb (05208) x10" "Discount"
number "BEL-05208" "Reward points(1000)"
qty "1" "1"

SetExpressCheckoutResponse
token "EC-04G08969PW436934A"
correlationid "d374a9b4c2688"
ack "Success"

After this call, buyer will open PayPal checkout page to login, so you can see total of £9.99 at first. it's correct.

2. Call DoExpressCheckoutPayment API to execute the payment finally

method "DoExpressCheckoutPayment"
version "72.0"
currencycode "GBP"
amt "19.99"
itemamt "11.67"
shippingamt "5.99"
taxamt "2.33"
buttonsource "Varien_Cart_EC_UK"
notifyurl "http://www.myserver.co.uk/paypal/ipn/"
name "Energy Saving B22/BC 28W Halogen GLS Bulb (05208) x10"
number "BEL-05208"
qty "1"
shiptocountrycode "GB"

DoExpressCheckoutPaymentResponse
token "EC-04G08969PW436934A"
ack "Success"