Jump to content

Paypal can't through when free shipping applied


Peter Li

Recommended Posts

I got a issue with paypal payment. I set free shiping when order over $75.00. If the order under $75.00 and the payment via paypal very easy. But when the order over $75.00, when checkout, the page should below,

Error in Paypal

Should equal sum of (unit_amount * quantity) across all items for a given purchase_unit

I checked the moudle of Paypal and got a log recorded as below,

 

Error code: 0;Short message: Should equal sum of (unit_amount * quantity) across all items for a given purchase_unit;

 

Anyone can help me for that? Thanks!

 

 

Link to comment
Share on other sites

Yes, I contact with the module developer and he replayed as below,

“This problem is related to an override of Cart.php. This is an override of the getOrderTotal method, which we use to calculate the Cart Total to then send it to Prestashop. This override is done by a another module installed in your prestashop, once I deactivate this module, everything is fine and we have no errors.”

I checked Cart.php but I don’t know where is wrong.

Link to comment
Share on other sites

  • 5 months later...
hace 19 horas, [email protected] dijo:

This is a pure paypal bug, when sending amount_breakdown as defined here

https://developer.paypal.com/docs/api/orders/v2/#definition-amount_breakdown

the error is thrown.

The solution is to set all field to 0 except: `item_total` which should equal `amount`

But this should be fixed by the module developers 🤷‍♂️

Edited by joseantgv (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...