Page 4 of 4

Re: Paypal and OC total amount diffrence problem

Posted: Wed Oct 28, 2015 2:19 am
by alber99
Same problem here. How can this be fixed in Opencart 2.x ?

Re: Paypal and OC total amount diffrence problem

Posted: Tue Nov 24, 2015 3:40 am
by mRC
Well I too had this error today but the odd thing is the price is correct, error below

PP_STANDARD :: TOTAL PAID MISMATCH! 37.99

the only thing I can see is that the customers order in OC had no price or delivery price or item descriptions but the paypal order had all the details present.

very odd.

Re: Paypal and OC total amount diffrence problem

Posted: Tue Nov 24, 2015 11:01 pm
by ADD Creative
For OpenCart 2.x try making the changes at the link below. I have not tested this so please test in the PayPal Sandbox first.

https://github.com/ADDCreative/opencart ... 6ecba8ccc4

Re: Paypal and OC total amount diffrence problem

Posted: Thu Feb 04, 2016 4:06 pm
by conaito
Has someone test this changes on a OC2 ? Does it work?

Re: Paypal and OC total amount diffrence problem

Posted: Fri Mar 25, 2016 11:49 am
by liewzy
I'm having this problem in oc2.1.0.2 too.

Re: Paypal and OC total amount diffrence problem

Posted: Sat Apr 23, 2016 6:52 am
by geotnt
OpenCart Addons wrote:Hey Univest,

This problem only seems to occur when using a coupon in my shop. I believe it has to do with the rounding of the coupon discount calculation.

In catalog / model / total / coupon.php
Find:

Code: Select all

$total_data[] = array(
					'code'       => 'coupon',
        			'title'      => sprintf($this->language->get('text_coupon'), $this->session->data['coupon']),
	    			'text'       => $this->currency->format(-$discount_total),
        			'value'      => -$discount_total,
					'sort_order' => $this->config->get('coupon_sort_order')
      			);
Add Before:

Code: Select all

$discount_total = round($discount_total, $this->currency->getDecimalPlace());
This should now round to the proper decimal points both before it gets displayed, added to the total, and before it gets sent to PayPal.

Regards,
Joel.
When you say "Add Before", do you mean to place the new line of code before the existing lines of code?

Re: Paypal and OC total amount diffrence problem

Posted: Wed Oct 05, 2016 6:17 pm
by ADD Creative
This is how I got around the problem in 1.4.x. Works for any amount of difference.

https://github.com/opencart-ce/opencart ... 694afa122c

Re: Paypal and OC total amount diffrence problem

Posted: Wed Jan 11, 2017 2:50 am
by bodd
ADD Creative wrote:For OpenCart 2.x try making the changes at the link below. I have not tested this so please test in the PayPal Sandbox first.

https://github.com/ADDCreative/opencart ... 6ecba8ccc4
I have a fresh installation of version 2.3.0.2 as test environment, where I tried the code suggested but it didn't fix the issue. In fact, I found other two different codes from you (different timing), all addressing this total amount mismatch and tested them with no positive results. The checkout page shows an error after clicking the 'Continue' button and won't allow to move forward to step 6. This modified code is not present in the core of 2.3.0.2 files either as catalog/controller/extension/payment/pp_standard.php ignores these changes.

I also tried the option by "thomash2" in this thread but it didn't work either.

As many other users, we intend to sell small value items which bought per unit won't get affected. However, when buying more than one, we'll start to lose some cents per item because of the 2 decimals rounding effect. The original setting in OC was 2 decimals but we needed to adjust it to 4 decimals in order to match the sales price for higher quantities. This change was made when we realized our 2 decimals settings wasn't working correctly in OC storefront but we didn't know about the issue with Paypal Standard.

Any ideas as how can we make Paypal take the exact same total amount to pay as shown in Opencart? Or how to send a whole per unit VAT inclusive price?

Any help is highly appreciated. Thanks!

Re: Paypal and OC total amount diffrence problem

Posted: Tue Jan 17, 2017 1:23 am
by ADD Creative
What error messages to you get in the error log?

There are some examples of just sending the total to PayPal at the link below. Again these will be for older version so will need modifying. viewtopic.php?f=113&t=36916

Re: Paypal and OC total amount diffrence problem

Posted: Mon Mar 20, 2017 5:12 pm
by dedoboss
Hello everybody!
I'm experiencing the same problem with OC 2.0.3.1
can someone help me out?

anybody fixed this?

thanks
ciao

Re: Paypal and OC total amount diffrence problem

Posted: Tue Mar 21, 2017 11:27 pm
by ADD Creative
For OpenCart 2.x try making the changes at the link below. I have not tested this so please test in the PayPal Sandbox first.

https://github.com/ADDCreative/opencart ... 6ecba8ccc4

Re: Paypal and OC total amount diffrence problem

Posted: Fri Mar 24, 2017 7:31 pm
by dedoboss
ADD Creative wrote:
Tue Mar 21, 2017 11:27 pm
For OpenCart 2.x try making the changes at the link below. I have not tested this so please test in the PayPal Sandbox first.

https://github.com/ADDCreative/opencart ... 6ecba8ccc4
THIS IS PERFECT!
I only had to change the address of my .tpl file
it's working, in the live website too

thank you very much you guys are the best
ciao
Dedoboss