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

#   Payment gateway Redirect

##

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

Less More

- Posts: 15
- Thank you received: 1
-
-

13 years 10 months ago [\#83716](#83716) by [krisnasim](/forum/user/11879-krisnasim "View krisnasim's Profile")  *[Payment gateway Redirect](/forum/4-how-to/77116-payment-gateway-redirect#83716 "Hi.  Recently I'm trying to develop a custom payment plugin for HikaShop  I run into some walls about payment gateway redirect. I have been able to successfully redirect from checkout page into a dummy page.  The question is, how do I redirect from the dummy page, back to the confirmation order page in joomla! ?  Where do I have to put the code into? (Considering there are a few functions available for the payment API in the developer docs)  Thanks :D")* was created by *[krisnasim](/forum/user/11879-krisnasim "View krisnasim's Profile")*

Hi.

Recently I'm trying to develop a custom payment plugin for HikaShop

I run into some walls about payment gateway redirect. I have been able to successfully redirect from checkout page into a dummy page.

The question is, how do I redirect from the dummy page, back to the confirmation order page in joomla! ?

Where do I have to put the code into? (Considering there are a few functions available for the payment API in the developer docs)

Thanks ![:D](/media/kunena/emoticons/1.png ":D")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc3MTE2LXBheW1lbnQtZ2F0ZXdheS1yZWRpcmVjdD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

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

Less More

- Posts: 15
- Thank you received: 1
-
-

13 years 10 months ago [\#83723](#83723) by [krisnasim](/forum/user/11879-krisnasim "View krisnasim's Profile")  Replied by *[krisnasim](/forum/user/11879-krisnasim "View krisnasim's Profile")* on topic *[Payment gateway Redirect](/forum/4-how-to/77116-payment-gateway-redirect#83723 "Hi.  Recently I'm trying to develop a custom payment plugin for HikaShop  I run into some walls about payment gateway redirect. I have been able to successfully redirect from checkout page into a dummy page.  The question is, how do I redirect from the dummy page, back to the confirmation order page in joomla! ?  Where do I have to put the code into? (Considering there are a few functions available for the payment API in the developer docs)  Thanks :D")*

okay I 've tried to put it on the onAfterOrderConfirm, just like the docs developer suggest.
But, if I redirect the page first, when it came back, the page still have the product on the cart.
The order is created, but the cart isn't cleared. I use site.com/index.php?ctrl=checkout&amp;task=after_end for the return link

Did I do something wrong here?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc3MTE2LXBheW1lbnQtZ2F0ZXdheS1yZWRpcmVjdD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")**
- [![Mohamed Thelji's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar6861.png)](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")
- [ Offline](/forum/user/6861-mohamed-thelji)

Less More

- Posts: 12953
- Thank you received: 1778
-
-
-

13 years 10 months ago -  13 years 10 months ago [\#83863](#83863) by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")  Replied by *[Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile")* on topic *[Payment gateway Redirect](/forum/4-how-to/77116-payment-gateway-redirect#83863 "Hi.  Recently I'm trying to develop a custom payment plugin for HikaShop  I run into some walls about payment gateway redirect. I have been able to successfully redirect from checkout page into a dummy page.  The question is, how do I redirect from the dummy page, back to the confirmation order page in joomla! ?  Where do I have to put the code into? (Considering there are a few functions available for the payment API in the developer docs)  Thanks :D")*

Hi,

For your return URL, my advice would be to do it like this : Code:

global $Itemid; $url_itemid=''; if(!empty($Itemid)){ $url_itemid='&amp;Itemid='.$Itemid; } $return_url = HIKASHOP_LIVE.'index.php?option=com_hikashop&amp;ctrl=checkout&amp;task=after_end&amp;order_id='.$order-&gt;order_id.$url_itemid;

Hope this will help you.

Last edit: 13 years 10 months ago by [Mohamed Thelji](/forum/user/6861-mohamed-thelji "View Mohamed Thelji's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc3MTE2LXBheW1lbnQtZ2F0ZXdheS1yZWRpcmVjdD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

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

Less More

- Posts: 15
- Thank you received: 1
-
-

13 years 9 months ago [\#84231](#84231) by [krisnasim](/forum/user/11879-krisnasim "View krisnasim's Profile")  Replied by *[krisnasim](/forum/user/11879-krisnasim "View krisnasim's Profile")* on topic *[Payment gateway Redirect](/forum/4-how-to/77116-payment-gateway-redirect#84231 "Hi.  Recently I'm trying to develop a custom payment plugin for HikaShop  I run into some walls about payment gateway redirect. I have been able to successfully redirect from checkout page into a dummy page.  The question is, how do I redirect from the dummy page, back to the confirmation order page in joomla! ?  Where do I have to put the code into? (Considering there are a few functions available for the payment API in the developer docs)  Thanks :D")*

to send the return url variable, is it possible to use jrequest inside the afterorderconfirm method?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc3MTE2LXBheW1lbnQtZ2F0ZXdheS1yZWRpcmVjdD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

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

Less More

- Posts: 15
- Thank you received: 1
-
-

13 years 9 months ago [\#84322](#84322) by [krisnasim](/forum/user/11879-krisnasim "View krisnasim's Profile")  Replied by *[krisnasim](/forum/user/11879-krisnasim "View krisnasim's Profile")* on topic *[Payment gateway Redirect](/forum/4-how-to/77116-payment-gateway-redirect#84322 "Hi.  Recently I'm trying to develop a custom payment plugin for HikaShop  I run into some walls about payment gateway redirect. I have been able to successfully redirect from checkout page into a dummy page.  The question is, how do I redirect from the dummy page, back to the confirmation order page in joomla! ?  Where do I have to put the code into? (Considering there are a few functions available for the payment API in the developer docs)  Thanks :D")*

ok, I ran into wall again this time

here is what I'm trying to do
Code:

function onAfterOrderConfirm(&amp;$order,&amp;$methods,$method_id){ global $Itemid; $url_itemid=''; if(!empty($Itemid)){ $url_itemid='&amp;Itemid='.$Itemid; } $return_url = HIKASHOP_LIVE.'index.php?option=com_hikashop&amp;ctrl=checkout&amp;task=after_end&amp;order_id='.$order-&gt;order_id.$url_itemid; $ccek = 'alert(\'$return_url\')'; $docs =&amp; JFactory::getDocument(); $docs-&gt;addScriptDeclaration( $ccek ); $link = 'http://localhost/drivetest/PAYMENT/dum.php'; $app = JFactory::getApplication(); $app-&gt;redirect($link);

I want to alert the link before redirect to another page, but it never show an alert box before redirect
Do I miss something here?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc3MTE2LXBheW1lbnQtZ2F0ZXdheS1yZWRpcmVjdD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

- **[Eliot](/forum/user/1824-eliot "View Eliot's Profile")**
- [![Eliot's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar1824.png)](/forum/user/1824-eliot "View Eliot's Profile")
- [ Offline](/forum/user/1824-eliot)

Less More

- Posts: 2334
- Thank you received: 403
-
-

13 years 9 months ago [\#84582](#84582) by [Eliot](/forum/user/1824-eliot "View Eliot's Profile")  Replied by *[Eliot](/forum/user/1824-eliot "View Eliot's Profile")* on topic *[Payment gateway Redirect](/forum/4-how-to/77116-payment-gateway-redirect#84582 "Hi.  Recently I'm trying to develop a custom payment plugin for HikaShop  I run into some walls about payment gateway redirect. I have been able to successfully redirect from checkout page into a dummy page.  The question is, how do I redirect from the dummy page, back to the confirmation order page in joomla! ?  Where do I have to put the code into? (Considering there are a few functions available for the payment API in the developer docs)  Thanks :D")*

Hi there,

If you wanna see your link before being redirected you can just do something like that: Code:

echo $return_url; exit;

If nothing shows up maybe you are executing this code at the wrong moment.
Look at the other trigger for more possibilities ![;)](/media/kunena/emoticons/24.png ";)")

The following user(s) said Thank You: [krisnasim](/forum/user/11879-krisnasim "View krisnasim's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc3MTE2LXBheW1lbnQtZ2F0ZXdheS1yZWRpcmVjdD90bXBsPW1hcmtkb3du) or [Create an account](/register) to join the conversation.

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

Less More

- Posts: 15
- Thank you received: 1
-
-

13 years 9 months ago [\#84651](#84651) by [krisnasim](/forum/user/11879-krisnasim "View krisnasim's Profile")  Replied by *[krisnasim](/forum/user/11879-krisnasim "View krisnasim's Profile")* on topic *[Payment gateway Redirect](/forum/4-how-to/77116-payment-gateway-redirect#84651 "Hi.  Recently I'm trying to develop a custom payment plugin for HikaShop  I run into some walls about payment gateway redirect. I have been able to successfully redirect from checkout page into a dummy page.  The question is, how do I redirect from the dummy page, back to the confirmation order page in joomla! ?  Where do I have to put the code into? (Considering there are a few functions available for the payment API in the developer docs)  Thanks :D")*

awesome! it work like a miracle
thanks a bunch :laugh:

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc3MTE2LXBheW1lbnQtZ2F0ZXdheS1yZWRpcmVjdD90bXBsPW1hcmtkb3du) 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.077 seconds

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