PayPal Payment doesn't navigate to Cancel URL

  • Posts: 52
  • Thank you received: 1
  • Hikashop Business
5 years 10 months ago #320009

-- HikaShop version -- : 4.3.0
-- Joomla version -- : 3.9.18
-- PHP version -- : 7.3.18

Hello,
I have configured the Hikashop PayPal plugin to redirect to a Cancel url ( /cancel-paypal - you may check this at petshop.gr/cancel-paypal ) but it doesn't work.
Instead, it redirects to
petshop.gr/index.php?option=com_hikashop...=mZfZVoap&Itemid=469


where no message is displayed.

However,
Return url ( /return-paypal - you may check this at petshop.gr/return-paypal ) is working and the message is displayed.

Best regards.
Makis

Attachments:

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

  • Posts: 85503
  • Thank you received: 13982
  • MODERATOR
5 years 10 months ago #320088

Hi,

I think that it's linked to the fact that your checkout is in guest mode.
Try changing the code:

if(!$connected && !empty($order->order_user_id))
			return false;
to:
if(!$connected && !empty($order->order_user_id)) {
			$token = hikaInput::get()->getVar('order_token');
			if(empty($token))
				$token = $app->getUserState('com_hikashop.order_token');
			if(empty($order->order_token) || $token != $order->order_token) {
				// invalid token in the URL
				return false;
			}

		}
in the file components/com_hikashop/controllers/order.php
That should hopefully fix the problem and we can include that patch for the next release of HikaShop.

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

  • Posts: 52
  • Thank you received: 1
  • Hikashop Business
5 years 10 months ago #320097

No, it doesn't worked.
Order still marked as Created and it returned to the URL where you will be redirected when the cart is empty
(System -> Configuration -> Main -> Cart -> Field "URL where you will be redirected when the cart is empty").
I attach you the corrected file in case I wrote something wrong.
If it is possible attach me the correct file.
Thank you for your reply.

This message has an attachment file.
Please log in or register to see it.

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

  • Posts: 85503
  • Thank you received: 13982
  • MODERATOR
5 years 10 months ago #320147

Hi,

The file is fine. So there is apparently more to it.
Could you provide a FTP access and precise instructions to reproduce the problem on your website so that I can look deeper into it ?
You can provide that along with a link to this thread via our contact form:
www.hikashop.com/support/contact-us.html

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

Time to create page: 0.180 seconds
Powered by Kunena Forum