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

#   PayPal Payment doesn't navigate to Cancel URL

##

- **[xatzopou](/forum/user/35543-xatzopou "View xatzopou's Profile")**
- [![xatzopou's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/35543-xatzopou "View xatzopou's Profile") Topic Author
- [ Offline](/forum/user/35543-xatzopou)

Less More

- Posts: 52
- Thank you received: 1
-
-

6 years 5 months ago [\#320009](#320009) by [xatzopou](/forum/user/35543-xatzopou "View xatzopou's Profile")  *[PayPal Payment doesn't navigate to Cancel URL](/forum/29-payment-methods/900031-paypal-payment-doesnt-navigate-to-cancel-url#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&#95;hikashop...=mZfZVoap&amp;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")* was created by *[xatzopou](/forum/user/35543-xatzopou "View xatzopou's Profile")*

-- 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](https://petshop.gr/cancel-paypal) ) but it doesn't work.
Instead, it redirects to
[ petshop.gr/index.php?option=com\_hikashop...=mZfZVoap&amp;Itemid=469](https://petshop.gr/index.php?option=com_hikashop&ctrl=order&task=cancel_order&order_id=2642&order_token=mZfZVoap&Itemid=469)
[ ![Paypalsettings.png](/forum/attachment/49561) ](/forum/attachment/49561 "...alsettings.png")

where no message is displayed.

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

Best regards.
Makis

- [ ![Paypalsettings.png](/forum/attachment/49561) ](/forum/attachment/49561 "...alsettings.png") [ ](/forum/attachment/49561?download=1 "...alsettings.png")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy85MDAwMzEtcGF5cGFsLXBheW1lbnQtZG9lc250LW5hdmlnYXRlLXRvLWNhbmNlbC11cmw/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86324
- Thank you received: 14286
-
-

6 years 5 months ago [\#320088](#320088) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[PayPal Payment doesn't navigate to Cancel URL](/forum/29-payment-methods/900031-paypal-payment-doesnt-navigate-to-cancel-url#320088 "-- 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&#95;hikashop...=mZfZVoap&amp;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")*

Hi,

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

if(!$connected &amp;&amp; !empty($order-&gt;order_user_id)) return false;

to: Code:

if(!$connected &amp;&amp; !empty($order-&gt;order_user_id)) { $token = hikaInput::get()-&gt;getVar('order_token'); if(empty($token)) $token = $app-&gt;getUserState('com_hikashop.order_token'); if(empty($order-&gt;order_token) &#124;&#124; $token != $order-&gt;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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy85MDAwMzEtcGF5cGFsLXBheW1lbnQtZG9lc250LW5hdmlnYXRlLXRvLWNhbmNlbC11cmw/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) to join the conversation.

- **[xatzopou](/forum/user/35543-xatzopou "View xatzopou's Profile")**
- [![xatzopou's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/35543-xatzopou "View xatzopou's Profile") Topic Author
- [ Offline](/forum/user/35543-xatzopou)

Less More

- Posts: 52
- Thank you received: 1
-
-

6 years 5 months ago [\#320097](#320097) by [xatzopou](/forum/user/35543-xatzopou "View xatzopou's Profile")  Replied by *[xatzopou](/forum/user/35543-xatzopou "View xatzopou's Profile")* on topic *[PayPal Payment doesn't navigate to Cancel URL](/forum/29-payment-methods/900031-paypal-payment-doesnt-navigate-to-cancel-url#320097 "-- 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&#95;hikashop...=mZfZVoap&amp;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")*

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 -&gt; Configuration -&gt; Main -&gt; Cart -&gt; 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.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy85MDAwMzEtcGF5cGFsLXBheW1lbnQtZG9lc250LW5hdmlnYXRlLXRvLWNhbmNlbC11cmw/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86324
- Thank you received: 14286
-
-

6 years 5 months ago [\#320147](#320147) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[PayPal Payment doesn't navigate to Cancel URL](/forum/29-payment-methods/900031-paypal-payment-doesnt-navigate-to-cancel-url#320147 "-- 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&#95;hikashop...=mZfZVoap&amp;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")*

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](https://www.hikashop.com/support/contact-us.html)

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI5LXBheW1lbnQtbWV0aG9kcy85MDAwMzEtcGF5cGFsLXBheW1lbnQtZG9lc250LW5hdmlnYXRlLXRvLWNhbmNlbC11cmw/dG1wbD1tYXJrZG93bg==) or [Create an account](/register) 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.081 seconds

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