# Community Forums

## Subtotal Open Cart and PayPal differ

Support for Payment extensions

### Subtotal Open Cart and PayPal differ

Hi,

I've noticed a difference in the way OC and PayPal calculates the subtotal amount. As as result, the invoice-amount in OC differs from the PayPal checkout amount. In this example:
Open Cart: € 207,00 versus
PayPal: € 206,99

I discussed this issue earlier this week with I2Paq in topic http://forum.opencart.com/viewtopic.php?f=106&t=36687. He advised me to report it as a bug. Before doing so, I reinstalled OC 1.5.1 and went through the whole process of configuring OC again, to exclude any mistakes (by breaking up some code for example)
Happily that's not the case. Even in a fresh install of Open Cart, the differences between Open Cart and PayPal are still there.

Since I'm not sure if it's a bug, i prefer to discuss this issue in this general part of the forum.

I'll try to make it more clear with an example including 2 screenshots.

The price of one of my products (Karper Digitaal Standaard) is:
€ 69,00 inc 19% VAT
€ 57.9832 ex 19% VAT

Price of 3 product should be: 3 x 69,00 = € 207,00. inc VAT

Please take a look at the subtotal amount in Open Cart and PayPal.

Open Cart calculates: € 173,95 (3x 57.9832 = 173.9496)
But PayPal calculates: € 173,94 (3x 57.98 !!)

It's pretty clear to me that these differences in cents are being caused by the 4 decimals of the productprice in Open Cart. Changing the productprice in Open Cart from 4 tot 2 decimals is not a proper solution.
(3x 69,- is € 207,00 and not 206,99!)

Does anyone know how it can be solved? Any help is welcome.

Screenshots:
Open Cart

PayPal
Last edited by markman-b on Fri Feb 17, 2012 4:54 am, edited 3 times in total.
OC version 1.5.4.1
markman-b

Posts: 225
Joined: Wed Aug 24, 2011 6:13 am

### Re: Subtotal Open Cart and PayPal differ

Hier hetzelfde probleem, ik draai nog 1.4.9.5 en ook bij mij verschillen de prijzen.
Met als resultaat vele mails met titel: "ATTN: Paypal Order XXX needs manual verification".

Mijn decimalen staan bij de Valuta instellingen op 2, dus dat zou goed moeten zijn.
Ik blijf het in de gaten houden
Deguru

Posts: 17
Joined: Tue May 31, 2011 2:14 pm

### Re: Subtotal Open Cart and PayPal differ

OC version 1.5.4.1
markman-b

Posts: 225
Joined: Wed Aug 24, 2011 6:13 am

### Re: Subtotal Open Cart and PayPal differ

markman-b wrote:Hi,

I've noticed a difference in the way OC and PayPal calculates the subtotal amount. As as result, the invoice-amount in OC differs from the PayPal checkout amount. In this example:
Open Cart: € 207,00 versus
PayPal: € 206,99

I discussed this issue earlier this week with I2Paq in topic http://forum.opencart.com/viewtopic.php?f=106&t=36687. He advised me to report it as a bug. Before doing so, I reinstalled OC 1.5.1 and went through the whole process of configuring OC again, to exclude any mistakes (by breaking up some code for example)
Happily that's not the case. Even in a fresh install of Open Cart, the differences between Open Cart and PayPal are still there.

Since I'm not sure if it's a bug, i prefer to discuss this issue in this general part of the forum.

I'll try to make it more clear with an example including 2 screenshots.

The price of one of my products (Karper Digitaal Standaard) is:
€ 69,00 inc 19% VAT
€ 57.9832 ex 19% VAT

Price of 3 product should be: 3 x 69,00 = € 207,00. inc VAT

Please take a look at the subtotal amount in Open Cart and PayPal.

Open Cart calculates: € 173,95 (3x 57.9832 = 173.9496)
But PayPal calculates: € 173,94 (3x 57.98 !!)

It's pretty clear to me that these differences in cents are being caused by the 4 decimals of the productprice in Open Cart. Changing the productprice in Open Cart from 4 tot 2 decimals is not a proper solution.
(3x 69,- is € 207,00 and not 206,99!)

Does anyone know how it can be solved? Any help is welcome.

Screenshots:
Open Cart

PayPal

I think the problem can be solved by forcing OC to do internal math with 2 decimal places instead of 4. Have you found out any solution to the problem?
pristinenote

Posts: 16
Joined: Fri Jul 13, 2012 6:33 am
Location: Mumbai, India

### Re: Subtotal Open Cart and PayPal differ

No I haven't. A solution should come from the developers of OC.
OC version 1.5.4.1
markman-b

Posts: 225
Joined: Wed Aug 24, 2011 6:13 am