[Skip to main content](#vessel-content)

#   A Paypal Refusal Message from HikaShop

##

- **[reace](/forum/user/272-reace "View reace's Profile")**
- [![reace's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar272.gif)](/forum/user/272-reace "View reace's Profile") Topic Author
- [ Offline](/forum/user/272-reace)
- Entrepreneur

Less More

- Posts: 93
- Thank you received: 5
-
-
-
-

15 years 10 months ago -  15 years 10 months ago [\#3896](#3896) by [reace](/forum/user/272-reace "View reace's Profile")  *[A Paypal Refusal Message from HikaShop](/forum/3-bug-report/3896-a-paypal-refusal-message-from-hikashop#3896 "howdy  My client recently got this error message whilst a customer was trying to make a sale;  perhaps there needs to be a rounding off somewhere. Also note that Nz has changed its currency in the sense that we no-longer have 1,2 or 5 cent peaces (some entrepreneurs idea of ripping off the public) so now NZ only deals with 10 cents + and the amounts are usually rounded either up or down relative to this minimum amount.  edit: ok I noticed that the amounts are different. perhaps this next section apply's  for example; a sale totaling between $1.01 - $1.05 would be $1.00 and a sale totaling between $1.06 - $1.15 would be rounded to $1.10  not sure if that is the problem but we sure known how to complicate things down here lol.")* was created by *[reace](/forum/user/272-reace "View reace's Profile")*

howdy

My client recently got this error message whilst a customer was trying to make a sale;
Code:

Hello, A Paypal notification was refused because the amount received (155.21NZD) is different from the order amount (155.2NZD)

perhaps there needs to be a rounding off somewhere. Also note that Nz has changed its currency in the sense that we no-longer have 1,2 or 5 cent peaces (some entrepreneurs idea of ripping off the public) so now NZ only deals with 10 cents + and the amounts are usually rounded either up or down relative to this minimum amount.

edit: ok I noticed that the amounts are different. perhaps this next section apply's

for example; a sale totaling between $1.01 - $1.05 would be $1.00
and a sale totaling between $1.06 - $1.15 would be rounded to $1.10

not sure if that is the problem but we sure known how to complicate things down here lol.

---

you Guys are Awesome and have excellent Support! Keep up the great Work!.

Last edit: 15 years 10 months ago by [reace](/forum/user/272-reace "View reace's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC8zODk2LWEtcGF5cGFsLXJlZnVzYWwtbWVzc2FnZS1mcm9tLWhpa2FzaG9wP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86358
- Thank you received: 14293
-
-

15 years 10 months ago [\#3915](#3915) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: A Paypal Refusal Message from HikaShop](/forum/3-bug-report/3896-a-paypal-refusal-message-from-hikashop#3915 "howdy  My client recently got this error message whilst a customer was trying to make a sale;  perhaps there needs to be a rounding off somewhere. Also note that Nz has changed its currency in the sense that we no-longer have 1,2 or 5 cent peaces (some entrepreneurs idea of ripping off the public) so now NZ only deals with 10 cents + and the amounts are usually rounded either up or down relative to this minimum amount.  edit: ok I noticed that the amounts are different. perhaps this next section apply's  for example; a sale totaling between $1.01 - $1.05 would be $1.00 and a sale totaling between $1.06 - $1.15 would be rounded to $1.10  not sure if that is the problem but we sure known how to complicate things down here lol.")*

Hi,

The problem is that we don't give the total of the order to paypal but the price of each item and it is recalculated by paypal automatically. Apparently, Paypal rounds prices somewhat differently. Could you try to add the code Code:

$vars["amount"] = round($order-&gt;cart-&gt;full_total-&gt;prices[0]-&gt;price_value_with_tax,(int)$currency-&gt;currency_locale['int_frac_digits']);

in the file plugins/paypal.php near the line 160, before the line Code:

JHTML::_('behavior.mootools');

and see if that solves the problem ?

If you want to round prices to 1 decimal, you can just edit your currency and change the number of decimals to 1. The drawback is that prices will be displayed as $1.1 and not $1.10 but they will be rounded like you want them. Maybe that's something you already did ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC8zODk2LWEtcGF5cGFsLXJlZnVzYWwtbWVzc2FnZS1mcm9tLWhpa2FzaG9wP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[reace](/forum/user/272-reace "View reace's Profile")**
- [![reace's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar272.gif)](/forum/user/272-reace "View reace's Profile") Topic Author
- [ Offline](/forum/user/272-reace)
- Entrepreneur

Less More

- Posts: 93
- Thank you received: 5
-
-
-
-

15 years 10 months ago [\#3925](#3925) by [reace](/forum/user/272-reace "View reace's Profile")  Replied by *[reace](/forum/user/272-reace "View reace's Profile")* on topic *[Re: A Paypal Refusal Message from HikaShop](/forum/3-bug-report/3896-a-paypal-refusal-message-from-hikashop#3925 "howdy  My client recently got this error message whilst a customer was trying to make a sale;  perhaps there needs to be a rounding off somewhere. Also note that Nz has changed its currency in the sense that we no-longer have 1,2 or 5 cent peaces (some entrepreneurs idea of ripping off the public) so now NZ only deals with 10 cents + and the amounts are usually rounded either up or down relative to this minimum amount.  edit: ok I noticed that the amounts are different. perhaps this next section apply's  for example; a sale totaling between $1.01 - $1.05 would be $1.00 and a sale totaling between $1.06 - $1.15 would be rounded to $1.10  not sure if that is the problem but we sure known how to complicate things down here lol.")*

ill try the fix , and no I haven't touched anything lol. just got the above error when my client emailed me and told me about it.

Great News is that he's had a couple of sales ![:D](/media/kunena/emoticons/1.png ":D")

pitty both had complications , The First one the customer was not aware that she had to sign up for a paypal account and failed to proceed through the entire process (sign up for a paypal account)

I will now append the relevant files and test it .. just thinking what the best way is to do this.. test .

create an item for .62 cents and order 2 of them or something lol.

---

you Guys are Awesome and have excellent Support! Keep up the great Work!.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC8zODk2LWEtcGF5cGFsLXJlZnVzYWwtbWVzc2FnZS1mcm9tLWhpa2FzaG9wP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86358
- Thank you received: 14293
-
-

15 years 10 months ago [\#4266](#4266) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: A Paypal Refusal Message from HikaShop](/forum/3-bug-report/3896-a-paypal-refusal-message-from-hikashop#4266 "howdy  My client recently got this error message whilst a customer was trying to make a sale;  perhaps there needs to be a rounding off somewhere. Also note that Nz has changed its currency in the sense that we no-longer have 1,2 or 5 cent peaces (some entrepreneurs idea of ripping off the public) so now NZ only deals with 10 cents + and the amounts are usually rounded either up or down relative to this minimum amount.  edit: ok I noticed that the amounts are different. perhaps this next section apply's  for example; a sale totaling between $1.01 - $1.05 would be $1.00 and a sale totaling between $1.06 - $1.15 would be rounded to $1.10  not sure if that is the problem but we sure known how to complicate things down here lol.")*

Hi,

Did you had any problems with that change ?
We're thinking of adding it into HikaShop by default for next release and a feed back would be nice to make sure that it works on real cases.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC8zODk2LWEtcGF5cGFsLXJlZnVzYWwtbWVzc2FnZS1mcm9tLWhpa2FzaG9wP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[reace](/forum/user/272-reace "View reace's Profile")**
- [![reace's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar272.gif)](/forum/user/272-reace "View reace's Profile") Topic Author
- [ Offline](/forum/user/272-reace)
- Entrepreneur

Less More

- Posts: 93
- Thank you received: 5
-
-
-
-

15 years 10 months ago -  15 years 10 months ago [\#4311](#4311) by [reace](/forum/user/272-reace "View reace's Profile")  Replied by *[reace](/forum/user/272-reace "View reace's Profile")* on topic *[Re: A Paypal Refusal Message from HikaShop](/forum/3-bug-report/3896-a-paypal-refusal-message-from-hikashop#4311 "howdy  My client recently got this error message whilst a customer was trying to make a sale;  perhaps there needs to be a rounding off somewhere. Also note that Nz has changed its currency in the sense that we no-longer have 1,2 or 5 cent peaces (some entrepreneurs idea of ripping off the public) so now NZ only deals with 10 cents + and the amounts are usually rounded either up or down relative to this minimum amount.  edit: ok I noticed that the amounts are different. perhaps this next section apply's  for example; a sale totaling between $1.01 - $1.05 would be $1.00 and a sale totaling between $1.06 - $1.15 would be rounded to $1.10  not sure if that is the problem but we sure known how to complicate things down here lol.")*

hmm dunno tbh ,

I added it here;
Code:

if(!empty($order-&gt;cart-&gt;coupon)){ $vars["discount_amount_cart"]=round($order-&gt;cart-&gt;coupon-&gt;discount_value,(int)$currency-&gt;currency_locale['int_frac_digits']); } $vars["amount"] = round($order-&gt;cart-&gt;full_total-&gt;prices[0]-&gt;price_value_with_tax,(int)$currency-&gt;currency_locale['int_frac_digits']); JHTML::_('behavior.mootools'); $app =&amp; JFactory::getApplication(); $name = $method-&gt;payment_type.'_end.php'; $path = JPATH_THEMES.DS.$app-&gt;getTemplate().DS.'hikashoppayment'.DS.$name; if(!file_exists($path)){ $path = JPATH_PLUGINS .DS.'hikashoppayment'.DS.$name; if(!file_exists($path)){ return true; }

but am guessing that it needs to go up a line before the closing bracket... "}" . However I will leave it for now.

**/plugins/hikashoppayment/paypal.php**

not sure how to test this one...

---

you Guys are Awesome and have excellent Support! Keep up the great Work!.

Last edit: 15 years 10 months ago by [reace](/forum/user/272-reace "View reace's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC8zODk2LWEtcGF5cGFsLXJlZnVzYWwtbWVzc2FnZS1mcm9tLWhpa2FzaG9wP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[nicolas](/forum/user/63-nicolas "View nicolas's Profile")**
- [![nicolas's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar63.png?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86358
- Thank you received: 14293
-
-

15 years 10 months ago [\#4313](#4313) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: A Paypal Refusal Message from HikaShop](/forum/3-bug-report/3896-a-paypal-refusal-message-from-hikashop#4313 "howdy  My client recently got this error message whilst a customer was trying to make a sale;  perhaps there needs to be a rounding off somewhere. Also note that Nz has changed its currency in the sense that we no-longer have 1,2 or 5 cent peaces (some entrepreneurs idea of ripping off the public) so now NZ only deals with 10 cents + and the amounts are usually rounded either up or down relative to this minimum amount.  edit: ok I noticed that the amounts are different. perhaps this next section apply's  for example; a sale totaling between $1.01 - $1.05 would be $1.00 and a sale totaling between $1.06 - $1.15 would be rounded to $1.10  not sure if that is the problem but we sure known how to complicate things down here lol.")*

You did well. Before the brackets that would only be active for orders with coupons applied.

We looked a bit more online about rounding issues with paypal and it seems that we're not the only one with such problems as I found posts about similar rounding issues on magento, VirtueMart, etc.

One solution I know of is to get the total amount without the details to paypal. This way it doesn't calculate anything. The downside is that the user doesn't have the details of the order on the paypal payment page which is nice. Not sure yet if we can have both or if there is something we can do on our end to avoid rounding issues but I fear that the only solution will be to have an option to toggle the details so that if users have such issues they can fallback on the amount pre calculated by HikaShop without the details on paypal.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC8zODk2LWEtcGF5cGFsLXJlZnVzYWwtbWVzc2FnZS1mcm9tLWhpa2FzaG9wP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

- **[reace](/forum/user/272-reace "View reace's Profile")**
- [![reace's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar272.gif)](/forum/user/272-reace "View reace's Profile") Topic Author
- [ Offline](/forum/user/272-reace)
- Entrepreneur

Less More

- Posts: 93
- Thank you received: 5
-
-
-
-

15 years 10 months ago [\#4337](#4337) by [reace](/forum/user/272-reace "View reace's Profile")  Replied by *[reace](/forum/user/272-reace "View reace's Profile")* on topic *[Re: A Paypal Refusal Message from HikaShop](/forum/3-bug-report/3896-a-paypal-refusal-message-from-hikashop#4337 "howdy  My client recently got this error message whilst a customer was trying to make a sale;  perhaps there needs to be a rounding off somewhere. Also note that Nz has changed its currency in the sense that we no-longer have 1,2 or 5 cent peaces (some entrepreneurs idea of ripping off the public) so now NZ only deals with 10 cents + and the amounts are usually rounded either up or down relative to this minimum amount.  edit: ok I noticed that the amounts are different. perhaps this next section apply's  for example; a sale totaling between $1.01 - $1.05 would be $1.00 and a sale totaling between $1.06 - $1.15 would be rounded to $1.10  not sure if that is the problem but we sure known how to complicate things down here lol.")*

yes it is interesting , can see why not many sales actually get through the ole paypal system.

by sending the products with individual amounts and allowing paypal precidence over the amounts may work. Other issues in the past for myself personally were the Currency was incorrect or something.

looking now at just setting up a CC transaction hopefully theres a few options for this.I think Money Brookers is the one suited to NewZealand Stores.

I on holiday till next week so will see what eventuates then, have incorporated code so client should be ringing if there's any problems.

---

you Guys are Awesome and have excellent Support! Keep up the great Work!.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzMtYnVnLXJlcG9ydC8zODk2LWEtcGF5cGFsLXJlZnVzYWwtbWVzc2FnZS1mcm9tLWhpa2FzaG9wP3RtcGw9bWFya2Rvd24=) or [Create an account](/component/users/registration?Itemid=101) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.061 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
