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

#   Question regarding new payment plugin

##

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

Less More

- Posts: 1
- Thank you received: 0
-
-

12 years 3 weeks ago [\#174050](#174050) by [perla](/forum/user/34374-perla "View perla's Profile")  *[Question regarding new payment plugin](/forum/29-payment-methods/872039-question-regarding-new-payment-plugin#174050 "-- HikaShop version -- : 2.3.3 -- Joomla version -- : 3.3.6  Hello, I am developing a payment plugin for a bank's payment gateway from the example one offered in the Hikashop site. The problem comes at the moment of receiving the gateway's notification of the payment. The bank requests a &quot;response to a notification&quot; as &quot;a URL-coded document which only contains one text line (no HTML tags, etc.) in the format parameter=value&quot;. This parameter is the url for the user to be redirected.  If I kill the application right after echoing such line, the redirection works out fine:  If I use the &quot;return true&quot; (as other plugins do), I get an error from the payment gateway. Which makes me think that using &quot;return&quot; leads to other functions that write something else to that response. So my question is: is it wrong to use &quot;exit&quot; there? The order status changes and the user is notified that the order is confirmed. So what am I preventing Hikashop of doing? I checked the notify function in the checkout.php, but it's not clear to me what exactly is it doing. Thank you in advance!")* was created by *[perla](/forum/user/34374-perla "View perla's Profile")*

-- HikaShop version -- : 2.3.3
-- Joomla version -- : 3.3.6

Hello,
I am developing a payment plugin for a bank's payment gateway from the example one offered in the Hikashop site.
The problem comes at the moment of receiving the gateway's notification of the payment. The bank requests a "response to a notification" as "a URL-coded document which only contains one text line (no HTML tags, etc.) in the format parameter=value". This parameter is the url for the user to be redirected.

If I kill the application right after echoing such line, the redirection works out fine:
Code:

function onPaymentNotification(&amp;$statuses) { ... else //If everything's OK, order is validated -&gt; success { $this-&gt;modifyOrder($order_id, 'confirmed', true, true); $requestURL = "rurls=".HIKASHOP_LIVE."index.php?option=com_hikashop&amp;ctrl=checkout&amp;task=after_end"; // successful transaction echo $requestURL; exit; // return true; }; }

If I use the "return true" (as other plugins do), I get an error from the payment gateway. Which makes me think that using "return" leads to other functions that write something else to that response.
So my question is: is it wrong to use "exit" there? The order status changes and the user is notified that the order is confirmed. So what am I preventing Hikashop of doing? I checked the **notify** function in the **checkout.php**, but it's not clear to me what exactly is it doing.
Thank you in advance!

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

- **[Jerome](/forum/user/80-jerome "View Jerome's Profile")**
- [![Jerome's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar80.png)](/forum/user/80-jerome "View Jerome's Profile")
- [ Offline](/forum/user/80-jerome)
- HikaShop core developer

Less More

- Posts: 26394
- Thank you received: 4078
-
- [](http://obsi.dev)
-

12 years 3 weeks ago [\#174068](#174068) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Question regarding new payment plugin](/forum/29-payment-methods/872039-question-regarding-new-payment-plugin#174068 "-- HikaShop version -- : 2.3.3 -- Joomla version -- : 3.3.6  Hello, I am developing a payment plugin for a bank's payment gateway from the example one offered in the Hikashop site. The problem comes at the moment of receiving the gateway's notification of the payment. The bank requests a &quot;response to a notification&quot; as &quot;a URL-coded document which only contains one text line (no HTML tags, etc.) in the format parameter=value&quot;. This parameter is the url for the user to be redirected.  If I kill the application right after echoing such line, the redirection works out fine:  If I use the &quot;return true&quot; (as other plugins do), I get an error from the payment gateway. Which makes me think that using &quot;return&quot; leads to other functions that write something else to that response. So my question is: is it wrong to use &quot;exit&quot; there? The order status changes and the user is notified that the order is confirmed. So what am I preventing Hikashop of doing? I checked the notify function in the checkout.php, but it's not clear to me what exactly is it doing. Thank you in advance!")*

Hi,

If you just need to send content without HTML, the best is to use the method you use (do an exit).
By doing a return, you let Joomla continue his process and it will display your content in a HTML page (using the "component.php" file from your template).
So if you want to have the control on the output content, you have to use an exit. There is nothing wrong, don't worry.

Regards,

---

Jerome - Obsidev.com
HikaMarket &amp; HikaSerial developer / HikaShop core dev team.

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

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

[](#top)
