PayPal Error :: Transaction refused bc of invalid argument
Posted: 16 Feb 2017, 14:47
Hi
I'm testing buying with PayPal. I created a sandbox account for that. When I click on "Buy" I get an error (from the log):
PayPal Express: method = Aimeos\MShop\Service\Provider\Payment\PayPalExpress::process, order ID = 17, response = Array
(
[TIMESTAMP] => 2017-02-16T13:28:36Z
[CORRELATIONID] => b7e229de22fca
[ACK] => Failure
[VERSION] => 87.0
[BUILD] => 30029726
[L_ERRORCODE0] => 10413
[L_SHORTMESSAGE0] => Transaction refused because of an invalid argument. See additional error messages for details.
[L_LONGMESSAGE0] => The totals of the cart item amounts do not match order amounts.
[L_SEVERITYCODE0] => Error
)
In the basket is 1 product with a quantity of 1.
I added a debug statement here: https://github.com/aimeos/aimeos-core/b ... rl.php#L32
Output (I replaced some information with "XXX"):
"VERSION=87.0&SIGNATURE=XXX&USER=XXX&PWD=XXX&L_PAYMENTREQUEST_0_NUMBER0=17&L_PAYMENTREQUEST_0_NAME0=XXX&L_PAYMENTREQUEST_0_QTY0=1&L_PAYMENTREQUEST_0_AMT0=47.12&L_SHIPPINGOPTIONAMOUNT0=5.46&L_SHIPPINGOPTIONLABEL0=Standard&L_SHIPPINGOPTIONNAME0=default&L_SHIPPINGOPTIONISDEFAULT0=true&MAXAMT=53.63&PAYMENTREQUEST_0_AMT=53.62&PAYMENTREQUEST_0_ITEMAMT=48.16&PAYMENTREQUEST_0_SHIPPINGAMT=5.46&PAYMENTREQUEST_0_INSURANCEAMT=0.00&PAYMENTREQUEST_0_INSURANCEOPTIONOFFERED=false&PAYMENTREQUEST_0_SHIPDISCAMT=0.00&PAYMENTREQUEST_0_CURRENCYCODE=EUR&PAYMENTREQUEST_0_PAYMENTACTION=sale&METHOD=SetExpressCheckout&PAYMENTREQUEST_0_INVNUM=16&RETURNURL=XXX&CANCELURL=XXX"
I use the demo service provider for PayPal with the following configuration:
paypalexpress.AccountEmail -> XXX
paypalexpress.ApiUsername -> XXX
paypalexpress.ApiPassword -> XXX
paypalexpress.ApiSignature -> XXX
paypalexpress.PaypalUrl -> https://www.sandbox.paypal.com/webscr&c ... token=%1$s
paypalexpress.ApiEndpoint -> https://api-3t.sandbox.paypal.com/nvp
What could be the problem?
Setup: Typo3 7.6.11, Aimeos 16.10.3 (I tried updating to 17.1.0 and 17.2.0, but got an error)
I'm testing buying with PayPal. I created a sandbox account for that. When I click on "Buy" I get an error (from the log):
PayPal Express: method = Aimeos\MShop\Service\Provider\Payment\PayPalExpress::process, order ID = 17, response = Array
(
[TIMESTAMP] => 2017-02-16T13:28:36Z
[CORRELATIONID] => b7e229de22fca
[ACK] => Failure
[VERSION] => 87.0
[BUILD] => 30029726
[L_ERRORCODE0] => 10413
[L_SHORTMESSAGE0] => Transaction refused because of an invalid argument. See additional error messages for details.
[L_LONGMESSAGE0] => The totals of the cart item amounts do not match order amounts.
[L_SEVERITYCODE0] => Error
)
In the basket is 1 product with a quantity of 1.
I added a debug statement here: https://github.com/aimeos/aimeos-core/b ... rl.php#L32
Output (I replaced some information with "XXX"):
"VERSION=87.0&SIGNATURE=XXX&USER=XXX&PWD=XXX&L_PAYMENTREQUEST_0_NUMBER0=17&L_PAYMENTREQUEST_0_NAME0=XXX&L_PAYMENTREQUEST_0_QTY0=1&L_PAYMENTREQUEST_0_AMT0=47.12&L_SHIPPINGOPTIONAMOUNT0=5.46&L_SHIPPINGOPTIONLABEL0=Standard&L_SHIPPINGOPTIONNAME0=default&L_SHIPPINGOPTIONISDEFAULT0=true&MAXAMT=53.63&PAYMENTREQUEST_0_AMT=53.62&PAYMENTREQUEST_0_ITEMAMT=48.16&PAYMENTREQUEST_0_SHIPPINGAMT=5.46&PAYMENTREQUEST_0_INSURANCEAMT=0.00&PAYMENTREQUEST_0_INSURANCEOPTIONOFFERED=false&PAYMENTREQUEST_0_SHIPDISCAMT=0.00&PAYMENTREQUEST_0_CURRENCYCODE=EUR&PAYMENTREQUEST_0_PAYMENTACTION=sale&METHOD=SetExpressCheckout&PAYMENTREQUEST_0_INVNUM=16&RETURNURL=XXX&CANCELURL=XXX"
I use the demo service provider for PayPal with the following configuration:
paypalexpress.AccountEmail -> XXX
paypalexpress.ApiUsername -> XXX
paypalexpress.ApiPassword -> XXX
paypalexpress.ApiSignature -> XXX
paypalexpress.PaypalUrl -> https://www.sandbox.paypal.com/webscr&c ... token=%1$s
paypalexpress.ApiEndpoint -> https://api-3t.sandbox.paypal.com/nvp
What could be the problem?
Setup: Typo3 7.6.11, Aimeos 16.10.3 (I tried updating to 17.1.0 and 17.2.0, but got an error)