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!
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
I received an answer from official support of Paypal:
PAYMENTREQUEST_0_ITEMAMT - cannot be zero.
Two options: Either reduce discount in main items section by 0.01 making the total value of goods ITEMAMT 0.01 and then additionally make a shipping discount of 0.01 (balancing the final sum).
PAYMENTREQUEST_0_PAYMENTACTION=Sale
<!-- Item 1-->
L_PAYMENTREQUEST_0_NAME0=Item1
L_PAYMENTREQUEST_0_QTY0=1
L_PAYMENTREQUEST_0_AMT0=25.90
<!-- Iteam 2-->
L_PAYMENTREQUEST_0_NAME1=Discount
L_PAYMENTREQUEST_0_QTY1=1
L_PAYMENTREQUEST_0_AMT1=-25.89
<!--Total of items amount-->
PAYMENTREQUEST_0_ITEMAMT=0.01
<!-- Shipping/tax/handling etc-->
PAYMENTREQUEST_0_SHIPPINGAMT=2.00
PAYMENTREQUEST_0_SHIPDISCAMT= -0.01
<!-- Total amount -->
PAYMENTREQUEST_0_AMT=2.00
Another option is to move shipping costs into items section:
L_PAYMENTREQUEST_0_NAME0=Item1
L_PAYMENTREQUEST_0_QTY0=1
L_PAYMENTREQUEST_0_AMT0=0.00
<!-- Iteam 2-->
L_PAYMENTREQUEST_0_NAME1=shipping cost
L_PAYMENTREQUEST_0_QTY1=1
L_PAYMENTREQUEST_0_AMT1=2.00
<!--Total of items amount-->
PAYMENTREQUEST_0_ITEMAMT=2.00
PAYMENTREQUEST_0_AMT=2.00
For my question - why don't they implement it properly, I've got no response.
So we are left to use one of this crazy workarounds ((
来源:https://stackoverflow.com/questions/26937861/paypal-express-checkout-provide-full-items-discount