Jump to content

PayPal charges different amount than the order value


Jacek Es

Recommended Posts

haylau did you checked if in the order there was some kind of discont?

 

I also have different sites, in one of them the problem appear when ther is a cart discont with a percentage % amount. fixed amount discounts are fine (probably because no extra rounding is involved)No disc

No discount on this particular order

 

We get two types of errors, both on the same site

 

Error 1) Paypal value is different to Prestashop value so order created with a "payment error" notice

Error 2) PayPal does not confirm the order with the website. So customer gets charged and we do not know there is an order

 

Both very frustrating. I think I am going to try a paid solution

Link to comment
Share on other sites

More investigations

 

I thought the problem was with the module so I purchased another (Agile) and that had the same problems. but narrowed it down. I think it is to do with rounding settings in prestashop. When the module sends details of the order to PayPal, PayPal does it's own calculatons based on rounding per item - it ignores the settings in Prestashop

 

I have tried different settings and I think it makes a difference. We need rounding per line though.

 

When I explained this to the Agile devs they made a fix to their module that does not send details of the order to PayPal and instead just sends the total. So far this has worked and we have no payment errors today. Will need to spend more time testing to be certain though

 

Agile say they will add a  feature to their module soon to allow this. In the meantime, if you get their module they will do a manual fix for you

 

Down side is that the PayPal email just says "My Cart" > £27.50 instead of the actaul products bought. But I am fine with that

 

So if you  can, change your rounding to per item. if you can;t consider getting the Agile Module - at least their devs are responsive!

Link to comment
Share on other sites

More investigations

...cut...

 

When I explained this to the Agile devs they made a fix to their module that does not send details of the order to PayPal and instead just sends the total. So far this has worked and we have no payment errors today. Will need to spend more time testing to be certain though

 

Agile say they will add a  feature to their module soon to allow this. In the meantime, if you get their module they will do a manual fix for you

 

Down side is that the PayPal email just says "My Cart" > £27.50 instead of the actaul products bought. But I am fine with that

 

So if you  can, change your rounding to per item. if you can;t consider getting the Agile Module - at least their devs are responsive!

 

Well, actually if you are happy showing just the total of your order, there should be no need to purchase a paid module as the modification to the free paypal one I posted a couple of weeks ago should do the trick - I have had it on prduction server for a while now and everything worked fine since then.

... Althoug the obvious advantage of buying a module is that you can receive support from the developer and you have some sort of warranty, so it might be worth paying for a bit of "peace of mind". ;)

Link to comment
Share on other sites

Hello everyone,
Sorry for my bad English, I'm French!
I also have rounding problems with the Paypal module version 3.11.3 and a PS 1.6.1.11. I wrote to dev 202commerce, but no response (www.202-ecommerce.com/).
Are you using the same module?
I have rounded the rounded round to infinity and rounded to the line on the bill. What is strange is that sometimes it works and sometimes not, and I fail to highlight common things between errors.
Thank you for your feedback!

Link to comment
Share on other sites

  • 1 month later...

Hi @Nixnix,

building on the solution posted by @savan, I too have managed to solve the issue... although I had to give up displaying the detailed product list on the PayPal page.

The main difference between my file and the solution posted by @savan is that, instead of reading directly from the cart only the total for the products, I do the same also for all dicounts and vauchers, the wrapping and the shipping. Furthermore I work with prices without VAT and add a "total taxes" at the end, therefore I removed all roundings but the very last for the "grand total".

 

I attached my modified version of "/modules/paypal/express_checkout/process.php" to this post; feel free to use it, if you want (you will have to modify lines 328, 357, 379 to match your language or preferences). I put that file onto my production server last week; since then I had a few PayPal transactions, all succesful.

 

For what concerns my store settings, we use the recommended "round up away from zero..." as round mode and "round on each line" as round type. 

 

 

[ENG]

Hi Saverio, you asked me for my feedback and here it is.

 

With the changes made by you I have no problems with the PayPal order total, everything seems correct on the total order, but with each order the customer receives a payment error and many customers call me saying PayPal has taken the money but the site gets me an payment error and deletes my order etc etc...

 

Now I just uploaded the process.php file posted by you on 02/22/2017 and the order total is correct.

 

Let's see if it works well on these days or if the payment error still occurs.

 

Thank you so much

 

 

 

[iTA]

Ciao Saverio, hai chiesto un mio feedback ed eccolo.

Con le modifiche fatte da te non ho più problemi sul totale di PayPal, tutto sembra corretto sul totale ordine,

ma ad ogni ordine il cliente riceve un errore di pagamento e in molti mi chiamano dicendomi PayPal ha preso i soldi ma il sito mi da un errore di pagamento e mi annulla l'ordine.

 

Ora ho appena caricato il file process.php che hai postato il 22/02/2017 ed il totale coincide con il totale dell'ordine.

 

Vediamo come va in questi giorni se ancora si verifica l'errore di pagamento.

 

Grazie mille

Link to comment
Share on other sites

  • 3 weeks later...

Same here with Paypal 3.11.4 and PS 1.6.1.12
The issue occurs when we have % discounts on our products or % discount on whole cart and price get decimals. Customers get payment error and try to make payment again (with the same error) which results in that we have to chargeback Paypal payments and loosing transaction fees on the double payments (Paypal only return a part of trans. cost) and it’s annoying for customers since they think their order is not OK + extra work for us.

So anyone got a permanent and solid solution for this?

Link to comment
Share on other sites

Same here with Paypal 3.11.4 and PS 1.6.1.12

The issue occurs when we have % discounts on our products or % discount on whole cart and price get decimals. Customers get payment error and try to make payment again (with the same error) which results in that we have to chargeback Paypal payments and loosing transaction fees on the double payments (Paypal only return a part of trans. cost) and it’s annoying for customers since they think their order is not OK + extra work for us.

 

So anyone got a permanent and solid solution for this?

 

 

This was my exact issue.  I finally managed to get support from the module developer and they made some alterations to paypal/express_checkout/process.php which seems to have fixed the issue!  However, despite me telling them this was an issue experienced by others they said it will not be added to any updates and that I need to modify any updates myself too!  Anyway, whether or not the modifications are specific to my set up, I have attached the modified file for anyone else with this issue to try out.

 

This seems to rectify the issue with module version 3.11.3 on PS 1.6.1.1.  

 

I hope it helps someone else and I really, really hope the module developer gets their act together and stops ignoring issues like this - not once have the commented on this thread!!

process.php

Link to comment
Share on other sites

The developer does not want to fix the bug. You have to do it by hand. This fault has been detected for two years. They have made many versions, many have contacted them, but have done nothing. And they will still do nothing ...

Link to comment
Share on other sites

 

 

This was my exact issue.  I finally managed to get support from the module developer and they made some alterations to paypal/express_checkout/process.php which seems to have fixed the issue!  However, despite me telling them this was an issue experienced by others they said it will not be added to any updates and that I need to modify any updates myself too!  Anyway, whether or not the modifications are specific to my set up, I have attached the modified file for anyone else with this issue to try out.

 

This seems to rectify the issue with module version 3.11.3 on PS 1.6.1.1.  

 

I hope it helps someone else and I really, really hope the module developer gets their act together and stops ignoring issues like this - not once have the commented on this thread!!

 

Thank you, I will check and see if it still works on our versions too.

Link to comment
Share on other sites

The developer does not want to fix the bug. You have to do it by hand. This fault has been detected for two years. They have made many versions, many have contacted them, but have done nothing. And they will still do nothing ...

The "developer" is Paypal right? It should be in Paypals interest to get the issue resolved too. Did anyone contact Paypal and see what they have to say about this?

Link to comment
Share on other sites

 

 

This was my exact issue.  I finally managed to get support from the module developer and they made some alterations to paypal/express_checkout/process.php which seems to have fixed the issue!  However, despite me telling them this was an issue experienced by others they said it will not be added to any updates and that I need to modify any updates myself too!  Anyway, whether or not the modifications are specific to my set up, I have attached the modified file for anyone else with this issue to try out.

 

This seems to rectify the issue with module version 3.11.3 on PS 1.6.1.1.  

 

I hope it helps someone else and I really, really hope the module developer gets their act together and stops ignoring issues like this - not once have the commented on this thread!!

 

 

Thank you so much for taking the time to upload the developers modified process.php file.

 

Replacing the current process.php file with this one and changing Preferences > General settings to "Round up away from zero" and "Round on each item" seems to have sorted out the issues.

 

Very annoying that they're ignoring this to the wider community on the Addons Marketplace, this is a huge bug and will mess up a lot of PS stores.

Link to comment
Share on other sites

The "developer" is Paypal right? It should be in Paypals interest to get the issue resolved too. Did anyone contact Paypal and see what they have to say about this?

 

Sadly no and that is really a shame !

 

Paypal took a lot of fees from Prestahop merchants but they don't care to give us a well developed module.

 

The developer is 202ecommerce and doesn't care at all bout us, they do a lot of huge mistakes in the Paypal midule all year long :(

  • Like 2
Link to comment
Share on other sites

To put things into perspective, my client has been constantly suggesting moving from Prestashop to Shopify...with all the ongoing issues with Prestashop and the backlash of 1.7 it's hard to keep defending PS. Especially when Major bugs like this are ignored.

Link to comment
Share on other sites

Hi!

Someone tested PayPal v3.11.4 ?

 

Yes that is what we are running. Not working.

https://addons.prestashop.com/en/payment-card-wallet/1748-paypal-official.html here the version says 4.0.1 but perhaps that is only for PS1.7

For all I know 3.11.4 is the latest for PS 1.6?

 

I have Prestashop 1.6.1.7 and Paypal 3.11.4, with the rounding to the rise and rounding in the total and with this solution (https://prestamarketing.com/blog/bug-arreglado-pedidos-pagados-paypal-dan-error-pedido-prestashop/) works for me perfectly.

Saverio.Cannilla put a similar solution that I did not work, but you have a little higher to try.

Basically both solutions give to paypal the amounts of the carts instead of that is paypal the one that picks them and rounds up as he wants. In my store I have many discounts that give me 3 and 4 decimals and that's why it did not work for me.

The rounding I have so because my billing program (external to prestashop) does so, and also I think it is the most correct, since rounding by line or article, in my case or charged more or charged less.

Regards

Edited by savan (see edit history)
Link to comment
Share on other sites

I contacted Paypal themselves when there was no luck with the developer (202 ecommerce). Paypal confirmed it was the module sending the wrong totals, not their system.

 

If you want support from 202 ecommerce, open an issue on forge then contact them via their support portal with the forge issue number. They say they will not answer your question unless you open a forge issue first - which is pointless as they don't reply to your forge issue! Maybe they ate hoping someone else will fix it for them!

 

Anyway maybe if we all inundate them with support tickets they will finally sort it out!

 

I will post the link to their support pages shortly....

Link to comment
Share on other sites

The "developer" is Paypal right? It should be in Paypals interest to get the issue resolved too. Did anyone contact Paypal and see what they have to say about this?

Hi, I did, here:

<< Thanks for having contacted PayPal and my sincere apologies for not being able to answer earlier.

We are quite invaded by the amount of requests and I personally took the responsibility to take all the requests we did not have been able to respond in a timely manner.

We in MTS understand the disadvantage of not being properly supported.

Solution:

Thanks for the information, we are familiar with the problem. Unfortunately, it does not depend on PayPal, we occasionally receive similar errors with multiple users.

There is a problem with calculating the amount on Prestashop, it is better to make all the first calculations on the net and apply the fees only at the end of the rounds.

https://www.presta-addons.net/it/content/7-problemi-nel-calcolo-arrotondamenti-e-applicazione-tasse-in-prestashop-161

Once again, the apologies for the delay and the discomfort

Sorry for the inconvenience, I cordially greet you.

Thank you,

Gabrielle

PayPal - MTS Team >>

the link she wrote me is about paid Italian Module

 

my configuration

PS 1.6.1.11

aypal module 3.11.4

Link to comment
Share on other sites

Hi, I did, here:

<< Thanks for having contacted PayPal and my sincere apologies for not being able to answer earlier.

We are quite invaded by the amount of requests and I personally took the responsibility to take all the requests we did not have been able to respond in a timely manner.

We in MTS understand the disadvantage of not being properly supported.

Solution:

Thanks for the information, we are familiar with the problem. Unfortunately, it does not depend on PayPal, we occasionally receive similar errors with multiple users.

There is a problem with calculating the amount on Prestashop, it is better to make all the first calculations on the net and apply the fees only at the end of the rounds.

https://www.presta-addons.net/it/content/7-problemi-nel-calcolo-arrotondamenti-e-applicazione-tasse-in-prestashop-161

Once again, the apologies for the delay and the discomfort

Sorry for the inconvenience, I cordially greet you.

Thank you,

Gabrielle

PayPal - MTS Team >>

the link she wrote me is about paid Italian Module

 

my configuration

PS 1.6.1.11

aypal module 3.11.4

 

That indicates the problem IS with PayPal. They only consider rounding done in a specific way - their way. 

 

So 

 

Prestashop allows different rounding methods

PayPal module (202 commerce) seems to adhere to the prestahop method and also does the rounding how we define in prestashop

payPal themselves will NOT allow different rounding methods

 

So this is why we are all having issues. Nobody is actaully wrong. if you use prestashop settings as PayPal suggest then everything works. The main problem therefore is that Prestashop offer the different rounding methods because we as users demand those different methods to suit our specific needs, but PayPal will only adhere to their method.

 

So, we stop fighting really. Either use the rounding method that PayPal accepts, or dont use PayPal is the way I see it

Link to comment
Share on other sites

I generated a ticket a long time ago with 202ecommerce, they asked me for access to my backoffice and after two weeks they had not done anything ... And I did not know more about them.

They do not want to or do not know how to fix the problem. And here have already been exposed two solutions that could use. I'm sure they read this forum.
Regards

Link to comment
Share on other sites

I generated a ticket a long time ago with 202ecommerce, they asked me for access to my backoffice and after two weeks they had not done anything ... And I did not know more about them.

They do not want to or do not know how to fix the problem. And here have already been exposed two solutions that could use. I'm sure they read this forum.

Regards

They responded very quickly:

 

Hi, 
 
Can you try this configuration on your Prestashop and perform a payment test with the same type of order, ie a product with several quantities.
 
=> Go to preferences => General
=> Rounding rule: Round to infinity when the value is halfway (recommended)
=> Rounding Type: Rounding for each item
 
The problem is that PayPal and PrestaShop do not calculate rounding in the same way, but normally by setting up your PrestaShop like this the problem should be fix.

 

Actually it worked, I received an identical order to the previous one which had a mistake.

Link to comment
Share on other sites

Thank you Ballashop.

My problem is solved as I indicated earlier with this https://prestamarketing.com/blog/bug-arreglado-pedidos-pagados-paypal-dan-error-pedido-prestashop/.

The rounding in each item does not seem good to use because sometimes you lose money and others you earn more. And my billing program rounds out the total.

Saverio.Canilla indicated another very valid solution also a few more.
Regards

Link to comment
Share on other sites

Thank you Ballashop.

My problem is solved as I indicated earlier with this https://prestamarketing.com/blog/bug-arreglado-pedidos-pagados-paypal-dan-error-pedido-prestashop/.

The rounding in each item does not seem good to use because sometimes you lose money and others you earn more. And my billing program rounds out the total.

Saverio.Canilla indicated another very valid solution also a few more.

Regards

Ok, good news,

What About the name of the product does not appear? How did you fix this?

Thanks

Link to comment
Share on other sites

Ok, good news,

What About the name of the product does not appear? How did you fix this?

Thanks

 

Hello ballashop

The product name where? When paying in paypal? I do not see it as necessary. Many pages when paying by card only indicate the amount to pay.

I monitor my website with smartlook, and I lost sales because the amount of prestashop and paypal were different. After making the changes, without showing the list of articles in paypal, I have not lost any. The customer who has arrived at paypal, has completed the purchase.

However, the Saverio.Cannilla solution was the same but indicated the items purchased. This solution did not work for me, but I do not know why. The modified Saverio.Cannilla file has it here.

Https://www.prestashop.com/forums/topic/461977-paypal-charges-different-amount-than-the-order-value/?p=2510323

Link to comment
Share on other sites

I got a solution for the rounding problems in Prestashop 1.5/16.

If anyone is interested I make a short tutorial.

It helped my customers (and me) a lot. Using it on each webshop I make.

I would be highly interested in a tutorial for 1.6 so please post.

Link to comment
Share on other sites

  • 3 weeks later...

Hi everybody

 

I would like to UP this topic because is very important. Several solutions were offered, I tried all of them but only 1 partially solved my issue. This type of rounding has not been discussed here yet.

 

Prestashop : 1.6.1.9

Paypal : 3.11.1

 

Describing my problem 

 

Default currency : EUR

Use decimals : YES

Decimals number : 2 (setting for shop, not for currency)

 

all Paypal paymets are ok. No need for any changes since  beginning of using Paypal module.

 

New currency added : CZK 

Use decimals : NO

Decimals number : 2 (setting for shop, not for currency)

 

For partiall solution I have chosen saverio.cannilla which is the only one that is not giving me "payment error" statuse. But have other problem. Please read.

 

Example

 

Product A :

 

EUR price : 3,24 excl. Tax (already rounded by round up to zero - recommended)

TAX : 20%

 

Currency rate : 26,80

CZK price = 3,24 x 26,80 (86,832) + TAX (17,366) = 104,1984 CZK

 

Displayed website price : 104 CZK (based on NOT to use decimals for CZK currency and my roundings)

Paypal transaction

 

-put product to cart

- choose Paypal transaction

- redirecting to Paypal  website

- Paypal website is showing to pay 104,20 CZK (real CZK price based on currency and EUr price) AND NOT price in shopping cart 104 CZK.

 

Do you have any advice for my case ?

 

Please think that solution must ocver two or more currencies with different decimals settings such as mine case.

 

Thank you for any ideas.

 

BR

 

Milan

Edited by MilanSVK (see edit history)
Link to comment
Share on other sites

Prestashop: 1.6.1.5

Paypal: v3.11.1

 

I tried several configuration, but I don't understand how set prestashop to work with paypal module.

 

Settings > General:

- Rounding rule: Round to infinity when the value is halfway (recommended)

- Rounding Type: Rounding for each item

 

Localization > Currency

- Decimals: YES

- Spaces: NO

- Active: YES

 

There are other settings to do?

I tried all patch but nothing works

 

Thanks

Edited by sebastiano.riva (see edit history)
Link to comment
Share on other sites

  • 4 weeks later...
Finnally I modified this file:

/modules/paypal/express_checkout/process.php

 

Line 320, find:

$fields['L_PAYMENTREQUEST_0_AMT'.$index] = Tools::ps_round($product['price_wt'], $this->decimals);

 

and replace with:

 

$fields['L_PAYMENTREQUEST_0_AMT'.$index] = sprintf('%.2f', $product['price_wt']);

 

My problem was that this field was print with 6 decimals.

It seems to work, I put live and I check if OK

Link to comment
Share on other sites

 

Finnally I modified this file:
/modules/paypal/express_checkout/process.php
 
Line 320, find:
$fields['L_PAYMENTREQUEST_0_AMT'.$index] = Tools::ps_round($product['price_wt'], $this->decimals);
 
and replace with:
 
$fields['L_PAYMENTREQUEST_0_AMT'.$index] = sprintf('%.2f', $product['price_wt']);
 
My problem was that this field was print with 6 decimals.
It seems to work, I put live and I check if OK

 

Serious thumbs up it this works. Please keep us posted when you have some live results. 

Link to comment
Share on other sites

  • 1 month later...
I tested my last solution, the change it's not clean and generated an error when the client return from PayPal site to prestashop.

My very dirty solution is been to eliminate the security check on express_checkout/payment.php

 

Substitued at line 304:

$amount_match = $ppec->rightPaymentProcess();

 

With:

$amount_match = true;

 

As I said very dirty and absolutely not good but I can't find other solution for now

Link to comment
Share on other sites

  • 11 months later...
On 9/5/2017 at 7:56 PM, sebastiano.riva said:
I tested my last solution, the change it's not clean and generated an error when the client return from PayPal site to prestashop.

 

My very dirty solution is been to eliminate the security check on express_checkout/payment.php

 

 

 

 

 

Substitued at line 304:

 

 

$amount_match = $ppec->rightPaymentProcess();

 

 

 

 

 

With:

 

 

$amount_match = true;

 

 

 

 

 

As I said very dirty and absolutely not good but I can't find other solution for now

 

Thank you my friend its indeed a dirty one but what can you expect when even the latest version is creating same issue they don't care to fix a bug which is annoying for all users i even tried to send exactly same amount that cart have but it still fails somewhere your above tip did trick for us for now.

Link to comment
Share on other sites

  • 4 weeks later...
  • 9 months later...
  • 4 months later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...