Questions around the TYPO3 integration and plugins as well as Flow and NeosCMS
Forum rules: Always add your TYPO3/Flow, Aimeos and PHP version as well as your environment (Linux/Mac/Win)
#3918 by Nils
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.

In the basket is 1 product with a quantity of 1.

I added a debug statement here: ... rl.php#L32

Output (I replaced some information with "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 -> ... mit&token=%1$s
paypalexpress.ApiEndpoint ->

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)
#3919 by aimeos
16 Feb 2017, 22:04
There is a difference in the sum between the single line and the total value:

The sum is 52.58 but the total amount is:

So there's a difference of 1.04. Do you use costs per product or something special?
#3924 by Nils
20 Feb 2017, 09:55
Yes, I use deliberately costs per product. And I have one manual delivery service that adds nothing to the amount.

In the PayPal service I have :

Price: 0.00
Rebate: 0.00
Costs: 0.00
Tax Rate: 20.00

I forgot to say that it is a b2b shop (sorry), so I set taxflag to 0.

The basket shows:

sub total 39.60 €
delivery 5.46 €
+ 19.00% MwSt. 8.56 €
total 53.62 €
quantity 1 Artikel

I just see, the difference of 1.04 you talk about seems to result from applying the tax rate to the delivery costs:
5.46 * 0.19 = 1.0374

What I noticed in the debug output I posted earlier:


Supposed the two parameters refer to the same thing, there is a difference of 1 cent. If that's the case, could it be some sort of rounding error like rounding 1.0374 to 1.03 instead of 1.04?
#3925 by aimeos
20 Feb 2017, 14:26
The 1 cent different between MAXAMT and PAYMENTREQUEST_0_AMT is intended because PayPal can't round correctly ;-)

The problem is the tax for the shipping costs. Did you set the tax rate of the price item for the delivery service to 19%?
#3926 by Nils
20 Feb 2017, 15:09
The delivery service doesn't cause any additional costs, it's just a dummy (my understanding is that I need at least one delivery service).

Price, rebate, costs and tax rate of the price item for the delivery service are all set to 0.00.
#3929 by aimeos
20 Feb 2017, 17:13
The problem was that the Aimeos PayPal service provider mixed up values with different tax rates (5.46/19 and 0.00/0.00). This resulted in a wrong value that's handed over to PayPal and when PayPal sums up the values, they didn't match.

Can you try this test release?

You've said you tried to update to 17.2.0 before. Please remove the mshop_stock and mshop_stock_type tables if they exist before updating.