thephpleague / omnipay-paypal

PayPal driver for the Omnipay PHP payment processing library
MIT License
295 stars 174 forks source link

Discounts in Paypal Rest #236

Closed carstengrimm closed 5 years ago

carstengrimm commented 5 years ago

Started building upon the paypal rest gateway and while most things seem to working i have seen there are quite a few changes with discounts...

previously it was possible to add a line with a negative amount to set as discount, but it seems like it does not want to accept negative values in the setItems array anymore. I've tried several formats and to hardcode it.

Otherwise when using the rest api, and leaving out the setItems method it won't display a total or whatsoever.

Lastly when having an item list without discount, but the amount has it calculated, it'll error out saying item values do not match.

I haven't figured out how i can add the discount value otherwise...

carstengrimm commented 5 years ago

couldn't find this issue at all...

https://github.com/thephpleague/omnipay-paypal/pull/231/commits/0a487beabace3a0bfb3dc388457c5451f4d50f12#diff-fbaf04c5ce7e3a01ceb472835240d16f