Couponed item not discounted when paying Paypal

  • Posts: 27
  • Thank you received: 1
8 years 3 months ago #246965

-- HikaShop version -- : 2.6.3
-- Joomla version -- : 3.6.0
-- PHP version -- : 5.4.45
-- Browser(s) name and version -- : Chrome

We are testing our new site and created a coupon for £249.99 for a £250.00 product so we could test purchasing, from start to finish. With the coupon applied within hikashop the item says it will cost £0.01 but when we are redirected to paypal the price jumps to the original £250.00.
Is there a problem between hikashop and paypal with providing the new discounted price?
Is paypal displaying the price wrong and will only charge £0.01
Is there a setting we have wrong on our site?
Thanks mike

Please Log in or Create an account to join the conversation.

  • Posts: 82864
  • Thank you received: 13372
  • MODERATOR
8 years 3 months ago #246967

Hi,

First, I don't think that you can pay below 1£ with PayPal.
Also, you can refund the payment when you do your tests and it will refund the fees as well, so it won't cost anything.
Finally, I don't see why it wouldn't take into account the coupon. Check that the "send order details" setting of the PayPal payment method is turned off. That way, the PayPal plugin only sends the total of the order and there is no way that the coupon would be left out if in the order. If it still doesn't work, it means that the problem is with the coupon missing in the order itself. So check on the order in your backend.

Please Log in or Create an account to join the conversation.

  • Posts: 51
  • Thank you received: 2
  • Hikashop Business
8 years 3 months ago #247223

Hi Nicolas,

I work with Mike (who raised the original case) and we've been testing this today.

We had previously been using the "send order details" set to ON, so that the customer had information about their order in PayPal and it definitely used to work (on Joomla 2.5.11). Now that we've moved to Joomla 3.6.2 it doesn't apply the coupons. I'm not saying the difference is because of the Joomla version - I expect it has more to do with the migration, though that has gone very smoothly in all other areas.

As you say, if we set the "send order details" to OFF, the correct value is presented to PayPal, but we'd really like a solution that keeps the order data intact - can you think of anything that might be causing the difference? Is there any way we can capture the PayPal request for you so you could see why PayPal are picking up the wrong value?

Thanks,
Oliver

Please Log in or Create an account to join the conversation.

  • Posts: 82864
  • Thank you received: 13372
  • MODERATOR
8 years 3 months ago #247226

Hi,

I've checked the code on our end and I don't see why that would happen.

Could you provide a screenshot of an order, and when you place that order, when you see the page with the button to click on if you're not redirected, stop your browser (with the stop button) and look at the hidden input fields next to that button thanks to the developer inspect tool of your browser:
thewc.co/articles/view/web-inspector-tutorial

Please Log in or Create an account to join the conversation.

  • Posts: 27
  • Thank you received: 1
8 years 3 months ago #247322

I have created a percentage coupon which takes the price of a £50.00 product down to £0,50. On the Paypal redirect page I stopped the load and checked the input "amount_1" which read 50 not 0.50 which it should be. there are three pictures to explain,

Three pictures attached
Percentage-order on site - shows the product on our site with the discount included.
Percentage-Redirect page - shows the Paypal redirect page with the hidden files.
Percentage-Paypal - shows the amount Paypal asks for on their end.

If you need any further info, please let me know.

Thanks for the help Mike

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
8 years 3 months ago #247337

Hello,

I just try to reproduce your issue but with no success can I see your coupon configuration screenshot please ?
Other point, do you have some checkout override view ( check in Main Configuation => Display dropdown => Views) ?

Awaiting news from you.

Regards

Last edit: 8 years 3 months ago by Philip.

Please Log in or Create an account to join the conversation.

  • Posts: 27
  • Thank you received: 1
8 years 3 months ago #247415

Hi thanks for the quick reply

Attached is the screen shot of the option setting for the coupon.

I do have edits to the views but nothing major - Changes as follows

Checkout - Status - Removed <br>
Checkout - Shipping - Changed <legend> tag to <h3> and added <br>
Checkout - Payment - Changed <legend> tag to <h3> and added <br>
Checkout - Address - Changed <legend> tag to <h3> and added <br>
Checkout - Cart - Added a <h3><?php echo JText::_("SHOPPING CART"); ?></h3>
Checkout - Coupon - Added <br> and added <div> surround span

I tried removing all of these and went back to the original but the problem still occurred with Hikashop's original code.

Any more ideas - If you need access to our site or any more info, let me know.

Thanks
Mike

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
8 years 3 months ago #247434

Hello,

Yes, please provide some backend and customer access in order to process some tests.
Use our Contact Us form and don't forget to add in your message a link to this topic.

Awaiting news from you.

Regards

Last edit: 8 years 3 months ago by Philip.

Please Log in or Create an account to join the conversation.

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
8 years 3 months ago #247510

Hello,

I'm not sure that will works because I can't process it by myself (you forget to provide Home Sharing Apple Id & Apple TV Name)
but you can maybe try this code in your YOURSITE\plugins\hikashoppayment\paypal\paypal.php around line 180 :
instead of :

...
if(!isset($vars['discount_amount_cart'])) $vars['discount_amount_cart'] = 0;
					$vars['discount_amount_cart'] += round($product->order_product_price*-1, (int)$this->currency->currency_locale['int_frac_digits']);
				}
...
Replace it by :
...
if(!isset($vars['discount_amount_cart'])) $vars['discount_amount_cart'] = 0;
					$vars['discount_amount_cart'] += round( ($product->order_product_price*-1) + $tax, (int)$this->currency->currency_locale['int_frac_digits']);
...
Keep in mind that I try to give you a solution without view on how Paypal will works with this, and so if this don't work... I can only tell you what Nicolas told you with the needs to switch off your Send details of the order option.
We already know that this option in some case can leads to issue...

Awaiting news from you.

Regards

Last edit: 8 years 3 months ago by Philip.

Please Log in or Create an account to join the conversation.

  • Posts: 27
  • Thank you received: 1
8 years 3 months ago #247753

Sorry I didn't even think about the Custom Fields, the Home Sharing Apple ID, just needs to be in the form of a e-mail address "This email address is being protected from spambots. You need JavaScript enabled to view it." will work and Apple TV Name just needs to be a word "example" will work in that field. I have also changed the coupon to any product which means you can purchase a different item if this makes it easier.

We tied your new code but his did not work, images attached show redirect page chrome inspect and Paypal page.

Let me know if you need anything else to test

Again thanks for the help

Mike

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 51
  • Thank you received: 2
  • Hikashop Business
8 years 3 months ago #247791

:angry:
Philip - when you were testing our Paypal set-up you appear to have left the "Allow payment notifications from PayPal" setting to OFF.

This meant that subsequent orders have not been moved into "confirmed" and serial numbers have not been issued - which is a pain.

I've changed it back to ON.

Please Log in or Create an account to join the conversation.

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
8 years 3 months ago #247773

Hello,

:angry:
Philip - when you were testing our Paypal set-up you appear to have left the "Allow payment notifications from PayPal" setting to OFF.

This meant that subsequent orders have not been moved into "confirmed" and serial numbers have not been issued - which is a pain.

I've changed it back to ON.


Really ? Sorry, I don't want to do this and I don't even think to touch your configuration because I create a copy to process my tests...
And so, in my mind, I just have a look on the configuration, probably mishandling...
Sorry for this...

Else, I have something news !
I process some tests on your website, I reproduce your configuration BUT this time I use my own Paypal vendor references to process the test and succeed to have this :



I see only one conclusion, the plugin works correctly, and the root issue is from your Paypal vendor settings...
In this case, maybe you have to modify some parameters, in order to manage detailed cart OR maybe contact Paypal to swicth change your vendor groups (I'm not sure of this last idea or word, just aguess...).

Hope this will help to go forward.

Regards

Attachments:
Last edit: 8 years 3 months ago by Philip.

Please Log in or Create an account to join the conversation.

  • Posts: 51
  • Thank you received: 2
  • Hikashop Business
8 years 3 months ago #247916

Thanks Philip,

It's odd - we've not changed our paypal settings since starting up the shop (>2 years) and it was only when we migrated the Joomla 3.x that the plugin started doing things differently.

Thanks for the help.
Oliver

Please Log in or Create an account to join the conversation.

  • Posts: 4747
  • Thank you received: 644
  • MODERATOR
8 years 3 months ago #247917

Hello,

I don't even think that you change your Paypal settings, I had in mind that Paypal have change something.
Paypal change lots things and very often maybe something in process had changed and that modify the way your vendor account is set, but it's just a guess.

Regards

Please Log in or Create an account to join the conversation.

Time to create page: 0.104 seconds
Powered by Kunena Forum