never seen this problem before on any other website but when we try to checkout via paypal express when trying to use a discount code we get an error

Transaction refused because of an invalid argument. See additional error messages for details.(10413)

I enabled paypal logging but the long message just says:

The totals of the cart item amounts do not match order amounts.

I have checked the magento configuration but I can't see anywhere I can remove this check like I can with other payment providers, any advice?

Theres an option to transfer cart line items over to paypal but that's set to "no"

please help.

  • Change that product price for testing and check again. – Nikunj Vadariya Jun 7 '18 at 13:13
  • tried all sorts of products it's not product specific, im thinking it could be something to do with tax? I know there's a really old issue with magento calculations with tax vs paypal calculation? – Danielle Jun 7 '18 at 13:15
  • Try my solution and check again – Nikunj Vadariya Jun 7 '18 at 13:19
  • Have you tried? – Nikunj Vadariya Jun 7 '18 at 13:36
  • Have you got any solution? – Nikunj Vadariya Jun 8 '18 at 4:55

You will have to create a custom module

Create an observer


Here is the function to add to the observer:

  public function addDiscountToPayPal($observer) {

        $paypalCart = $observer->getPaypalCart();

        if ($paypalCart) {
            $order = $paypalCart->getSalesEntity();
            $discountAmount = $order->getDiscountAmount();
            $paypalCart->updateTotal(Mage_Paypal_Model_Cart::TOTAL_DISCOUNT, $discountAmount);


  • Thanks for the advice, will try this and see if it works for us. – Danielle Jun 8 '18 at 8:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.