I'm trying to implement coupon discounts.
The problem I run at is, that, although Paypal recognizes that a discount is requested, it ignores it. The interesting part is, that Paypal displays one amount to the buyer, but charges another. How is that possible?
Please check out the screenshots below:
You can clearly observe, that the coupon is being applied, and the amount to be charged is 3,20 GBP.
However, when user proceeds, he is charged 4,00 GBP, the full amount:
Here are the values of the corresponding NVP string (just before curl_exec()
is called) sent to Paypal:
METHOD=SetExpressCheckout
VERSION=76.0
PWD=*something*
USER=e-shop_api1.somesite.com
SIGNATURE=somesignature
ReturnUrl=http%3A%2F%2Fwww.example.com%2Fcheckout.php%3Faction%3Dnotify
CANCELURL=http%3A%2F%2Fwww.example.com%2Fshopping-bag%2F
PAYMENTACTION=Sale
CURRENCYCODE=GBP
PAYMENTREQUEST_0_CURRENCYCODE=GBP
ALLOWNOTE=1
PAYMENTREQUEST_0_SHIPPINGAMT=0.00
PAYMENTREQUEST_0_AMT=3.20
PAYMENTREQUEST_0_ITEMAMT=3.20
// Product
L_PAYMENTREQUEST_0_QTY0=1
L_PAYMENTREQUEST_0_AMT0=4
L_PAYMENTREQUEST_0_NAME0=Some+Item+-+SIZE+%2F+1+size
L_PAYMENTREQUEST_0_NUMBER0=THE+PRODUCT+02355
// Coupon
L_PAYMENTREQUEST_0_QTY1=1
L_PAYMENTREQUEST_0_AMT1=-0.80
L_PAYMENTREQUEST_0_NAME1=Coupon
TL;DR
Why does Paypal display one amount, and charge another, and how to fix this?