Hi,
We're having a problem integrating Paypal Express on our shop, when we use a coupon code on our shop and try to use the paypal express checkout we're getting this error:
Short Error Message: Transaction refused because of an invalid argument. See additional error messages for details. Detailed Error Message: The totals of the cart item amounts do not match order amounts. Error Code: 10413 Please contact our Customer service and mention this error code to get this issue resolved.
I've been searching a lot how to fix this error, i tried to re-install our plugin, use the code that other members here offered but still i have no luck to fix this issue. I also tried to contact PayPal technical support and this is the reply from PayPal representative:
In the prestashop platform, it is not passing the discount fee to Paypal to proceed the payment.(Missing the field like PAYMENTREQUEST_n_SHIPDISCAMT=22) That’s why Paypal will return the invalid argument error. Below is flow log extracted from Paypal and we can see the fields that were passed from Prestashop. And it seems a bug in Prestashop when you are using the discounts so far.
SetExpressCheckoutRequest
returnurl "http://URL/module/paypalusa/expresscheckout?pp_exp_checkout=1"
cancelurl "http://URL/order"
method "SetExpressCheckout"
version "98"
buttonsource "PrestashopUS_Cart"
paymentrequest_0_currencycode "USD"
paymentrequest_0_amt "213"
paymentrequest_0_itemamt "220"
paymentrequest_0_shippingamt "15"
paymentrequest_0_paymentaction "Sale"
paymentrequest_0_name "MR3148-KR3511" "Coupon"
paymentrequest_0_number "1094"
paymentrequest_0_qty "1" "1"
This is the prestashop and Paypal module version that we're using:
Prestashop v 1.6.0.1
PayPal USA, Canada 1.3.9
Thanks.