Search code examples
paypalexpress-checkoutdiscount

Paypal Express Checkout provide full items discount


I'm using Express Checkout in Paypal and trying to pass discount as a separate item (according to manual this is supported).

I pass the following part (full discount on the item, but require to pay shipping):

&NOSHIPPING=0
&PAYMENTREQUEST_0_SHIPPINGAMT=2.00
&PAYMENTREQUEST_0_SHIPDISCAMT=0.00
&L_PAYMENTREQUEST_0_NAME0=Item1
&L_PAYMENTREQUEST_0_QTY0=1
&L_PAYMENTREQUEST_0_AMT0=25.90
&L_PAYMENTREQUEST_0_NAME1=Discount
&L_PAYMENTREQUEST_0_QTY1=1
&L_PAYMENTREQUEST_0_AMT1=-25.90
&PAYMENTREQUEST_0_ITEMAMT=0.00
&PAYMENTREQUEST_0_AMT=2.00

But I get "The totals of the cart item amounts do not match order amounts." I checked many cases and it seems that all other issues people had are already addressed in my example, but it still doesn't work.

Any hints? Thanks!


Solution

  • As far as I know the "ITEMAMT" should not be zero . It must be greater than zero . So , if you use like this, it should work :

    &NOSHIPPING=0
    
    &PAYMENTREQUEST_0_SHIPPINGAMT=2.00
    
    &PAYMENTREQUEST_0_SHIPDISCAMT=0.00
    
    &L_PAYMENTREQUEST_0_NAME0=Item1
    
    &L_PAYMENTREQUEST_0_QTY0=1
    
    &L_PAYMENTREQUEST_0_AMT0=25.91
    
    &L_PAYMENTREQUEST_0_NAME1=Discount
    
    &L_PAYMENTREQUEST_0_QTY1=1
    
    &L_PAYMENTREQUEST_0_AMT1=-25.90
    
    &PAYMENTREQUEST_0_ITEMAMT=0.01
    
    &PAYMENTREQUEST_0_AMT=2.01