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

#   Plugin development: change order status

##

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

Less More

- Posts: 9
- Thank you received: 0
-
-

11 years 4 months ago [\#203812](#203812) by [zizi80](/forum/user/36473-zizi80 "View zizi80's Profile")  *[change order status](/forum/35-orders-management/877343-plugin-development-change-order-status#203812 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.41  hi, I created a plugin for payments following the directions of your examples, but I do not understand what I do or what I call function to change the order status in confirmed and sending email notification.  help me please")* was created by *[zizi80](/forum/user/36473-zizi80 "View zizi80's Profile")*

-- HikaShop version -- : 2.4.0
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.4.41

hi,
I created a plugin for payments following the directions of your examples, but I do not understand what I do or what I call function to change the order status in confirmed and sending email notification.

help me please

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

11 years 4 months ago [\#203836](#203836) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[change order status](/forum/35-orders-management/877343-plugin-development-change-order-status#203836 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.41  hi, I created a plugin for payments following the directions of your examples, but I do not understand what I do or what I call function to change the order status in confirmed and sending email notification.  help me please")*

Hi,

See the call of the function "modifyOrder".
[ github.com/HikaShop/sample-payment-plugi...b/master/example.php](https://github.com/HikaShop/sample-payment-plugin/blob/master/example.php)

Regards,

---

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

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

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

Less More

- Posts: 9
- Thank you received: 0
-
-

11 years 4 months ago -  11 years 4 months ago [\#203874](#203874) by [zizi80](/forum/user/36473-zizi80 "View zizi80's Profile")  Replied by *[zizi80](/forum/user/36473-zizi80 "View zizi80's Profile")* on topic *[change order status](/forum/35-orders-management/877343-plugin-development-change-order-status#203874 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.41  hi, I created a plugin for payments following the directions of your examples, but I do not understand what I do or what I call function to change the order status in confirmed and sending email notification.  help me please")*

hello, the system of my bank did not give me the opportunity to use fully the strings of your code I had to change and create a plugin very different from yours; the problem is that at the end of the payment process, it redirects to the website of the page, I return confirmations positive, but I do not understand how to call me back or enable notifications and change was in the order confirmed, if I imposed connettendomi to DB do not start notifications, you help me

this function:
$this-&gt;modifyOrder($order_id, $this-&gt;payment_params-&gt;verified_status, true, true);
It does not work, I would like to recall the page checkout in function after_end ()
because I can get here with the variables that I need payment accepted.

Last edit: 11 years 4 months ago by [zizi80](/forum/user/36473-zizi80 "View zizi80's Profile").

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

11 years 4 months ago [\#203889](#203889) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[change order status](/forum/35-orders-management/877343-plugin-development-change-order-status#203889 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.41  hi, I created a plugin for payments following the directions of your examples, but I do not understand what I do or what I call function to change the order status in confirmed and sending email notification.  help me please")*

Hi,

I can assure you that the modifyOrder function works perfectly when you give it the right parameters.
Without any details about your current implementation it will be more than complicated for us to give you advices or tips.
The sample plugin we published give all requires information to create a plugin ; you can take a look at the other payment plugin provided by the HikaShop package.

Regards,

---

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

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

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

Less More

- Posts: 9
- Thank you received: 0
-
-

11 years 4 months ago [\#204205](#204205) by [zizi80](/forum/user/36473-zizi80 "View zizi80's Profile")  Replied by *[zizi80](/forum/user/36473-zizi80 "View zizi80's Profile")* on topic *[change order status](/forum/35-orders-management/877343-plugin-development-change-order-status#204205 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.41  hi, I created a plugin for payments following the directions of your examples, but I do not understand what I do or what I call function to change the order status in confirmed and sending email notification.  help me please")*

hi,
it's called the variable hikashop expects to validate the payment?
that value must have?
the return page is this:http://mydomain.xxx/index.php?option=com_hikashop&amp;ctrl=checkout&amp;task=after_end&amp;PaymentID=9113862441051600&amp;TransID=9905603451051600&amp;order_id=J2T01&amp;postdate=0609&amp;resultcode=APPROVED&amp;auth=999999&amp;Error=&amp;ErrorText=&amp;cardtype=VISA&amp;payinst=VPAS&amp;liability=Y&amp;responsecode=00

that's what gives me the bank
but the status of the order is always created

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg3NzM0My1wbHVnaW4tZGV2ZWxvcG1lbnQtY2hhbmdlLW9yZGVyLXN0YXR1cz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14268
-
-

11 years 4 months ago [\#204270](#204270) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[change order status](/forum/35-orders-management/877343-plugin-development-change-order-status#204270 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.41  hi, I created a plugin for payments following the directions of your examples, but I do not understand what I do or what I call function to change the order status in confirmed and sending email notification.  help me please")*

Hi,

That's not the link you want to give to your bank for your payment notification.
You want to give it:
[ mydomain.xxx/index.php?option=com\_hikash...tif\_payment='.$this-](http://mydomain.xxx/index.php?option=com_hikashop&ctrl=checkout&task=notify&notif_payment='.$this-)&gt;name.'&amp;tmpl=component
That way, you'll have your payment plugin called in the onPaymentNotification function of your payment plugin, and there, you'll be able to use the modifyOrder function as any other payment plugin. Then, you'll be able to redirect the customer to the normal after_end URL with a redirect call, as explained in the example plugin comments.

From the different bits of information you provided in your message, I don't see why you couldn't use the normal functions of payment plugins.

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

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

Less More

- Posts: 9
- Thank you received: 0
-
-

11 years 4 months ago [\#204317](#204317) by [zizi80](/forum/user/36473-zizi80 "View zizi80's Profile")  Replied by *[zizi80](/forum/user/36473-zizi80 "View zizi80's Profile")* on topic *[change order status](/forum/35-orders-management/877343-plugin-development-change-order-status#204317 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.41  hi, I created a plugin for payments following the directions of your examples, but I do not understand what I do or what I call function to change the order status in confirmed and sending email notification.  help me please")*

hi,
when i open this page: [ mydomain.xxx/index.php?option=com\_hikash...ample&amp;tmpl=component](http://mydomain.xxx/index.php?option=com_hikashop&ctrl=checkout&task=notify&notif_payment=example&tmpl=component)
sending this variables:
&amp;PaymentID=1476668360951610&amp;TransID=1454898370951610&amp;order_id=L2E34&amp;postdate=0610&amp;resultcode=APPROVED&amp;auth=999999&amp;Error=&amp;ErrorText=&amp;cardtype=VISA&amp;payinst=VPAS&amp;liability=Y&amp;responsecode=00
the result page is empty(white)

I attach the pages of the plugin, configured with the parameters of the test bank

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg3NzM0My1wbHVnaW4tZGV2ZWxvcG1lbnQtY2hhbmdlLW9yZGVyLXN0YXR1cz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14268
-
-

11 years 4 months ago [\#204322](#204322) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[change order status](/forum/35-orders-management/877343-plugin-development-change-order-status#204322 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.41  hi, I created a plugin for payments following the directions of your examples, but I do not understand what I do or what I call function to change the order status in confirmed and sending email notification.  help me please")*

Hi,

That's normal.
That's what it does by default.
The example plugin will display a blank page on the notification page as this normally is triggered by the payment gateway server, not the user browser.
But if you read the comments in the example plugin's notification function, you'll find this: Code:

//To redirect the user, if needed. Here the redirection is useless : we are on server side (and not user side, so the redirect won't work), and the cancel url has been set on the payment platform merchant account // $this-&gt;app-&gt;redirect($cancel_url);

and: Code:

// $this-&gt;app-&gt;redirect($return_url);

In your case, you want to uncomment these redirects so that the plugin redirects the user to the thank you page after confirming the order with the parameters of the notification URL.

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

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

Less More

- Posts: 9
- Thank you received: 0
-
-

11 years 4 months ago [\#204466](#204466) by [zizi80](/forum/user/36473-zizi80 "View zizi80's Profile")  Replied by *[zizi80](/forum/user/36473-zizi80 "View zizi80's Profile")* on topic *[change order status](/forum/35-orders-management/877343-plugin-development-change-order-status#204466 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.41  hi, I created a plugin for payments following the directions of your examples, but I do not understand what I do or what I call function to change the order status in confirmed and sending email notification.  help me please")*

hi,
i uncomment this line
// $this-&gt;app-&gt;redirect($cancel_url);
// $this-&gt;app-&gt;redirect($return_url);
but the result is always white page:
[ mydomain.xxx/index.php?option=com\_hikash...ample&amp;tmpl=component](http://mydomain.xxx/index.php?option=com_hikashop&ctrl=checkout&task=notify&notif_payment=example&tmpl=component)
can you test my page please? i need a solution..
thanks

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

11 years 4 months ago [\#204467](#204467) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[change order status](/forum/35-orders-management/877343-plugin-development-change-order-status#204467 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.41  hi, I created a plugin for payments following the directions of your examples, but I do not understand what I do or what I call function to change the order status in confirmed and sending email notification.  help me please")*

Hi,

Yes, it won't work with the url you're using. Code:

$order_id = (int)@$vars['order']; $dbOrder = $this-&gt;getOrder($order_id); // With the order, we can load the payment method, and thus all the payment parameters $this-&gt;loadPaymentParams($dbOrder); if(empty($this-&gt;payment_params)) return false;

If you do not specify an order in the parameters ; you can't load any order and the plugin will return "false".

Regards,

---

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

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

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

Less More

- Posts: 9
- Thank you received: 0
-
-

11 years 4 months ago -  11 years 4 months ago [\#204514](#204514) by [zizi80](/forum/user/36473-zizi80 "View zizi80's Profile")  Replied by *[zizi80](/forum/user/36473-zizi80 "View zizi80's Profile")* on topic *[change order status](/forum/35-orders-management/877343-plugin-development-change-order-status#204514 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.41  hi, I created a plugin for payments following the directions of your examples, but I do not understand what I do or what I call function to change the order status in confirmed and sending email notification.  help me please")*

Forgive me, but I do not understand what I have to change, you can give me an example please

[ mydomain.xxx/index.php?option=com\_hikash...ID=1895301471751620&amp;](http://mydomain.xxx/index.php?option=com_hikashop&ctrl=checkout&task=notify&notif_payment=example&tmpl=component&PaymentID=6474689461751620&TransID=1895301471751620&)**order\_id=256**&amp;postdate=0611&amp;resultcode=APPROVED&amp;auth=999999&amp;Error=&amp;ErrorText=&amp;cardtype=VISA&amp;payinst=VPAS&amp;liability=Y&amp;responsecode=00&amp;clientid=

I tried to set order_id, but the result is the same

Last edit: 11 years 4 months ago by [zizi80](/forum/user/36473-zizi80 "View zizi80's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg3NzM0My1wbHVnaW4tZGV2ZWxvcG1lbnQtY2hhbmdlLW9yZGVyLXN0YXR1cz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14268
-
-

11 years 4 months ago [\#204528](#204528) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[change order status](/forum/35-orders-management/877343-plugin-development-change-order-status#204528 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.41  hi, I created a plugin for payments following the directions of your examples, but I do not understand what I do or what I call function to change the order status in confirmed and sending email notification.  help me please")*

Hi,

As Jerome said, the example plugin expects that the order id is given in a parameter called "order" in the URL of the payment notification.
You used order_id instead of order so the plugin will stop at the load of the order at the beginning of the onPaymentNotification function since it couldn't find any order to load and thus the redirects won't be done as they are placed later in the function.

Remember that in order to confirm the order, the plugin needs to know the order_id for which the payment gateway is sending the payment notification, otherwise, it can't confirm the order.

So either you want to change the "order_id" parameter in the notification URL (but you might not be able to as it is your payment gateway redirecting to the user with these parameters in the URL), or you want to change to line: Code:

$order_id = (int)@$vars['order'];

to: Code:

$order_id = (int)@$vars['order_id'];

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

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

Less More

- Posts: 9
- Thank you received: 0
-
-

11 years 4 months ago -  11 years 4 months ago [\#204570](#204570) by [zizi80](/forum/user/36473-zizi80 "View zizi80's Profile")  Replied by *[zizi80](/forum/user/36473-zizi80 "View zizi80's Profile")* on topic *[change order status](/forum/35-orders-management/877343-plugin-development-change-order-status#204570 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.41  hi, I created a plugin for payments following the directions of your examples, but I do not understand what I do or what I call function to change the order status in confirmed and sending email notification.  help me please")*

I tried to set order_id, but the result is the same ,
the return url is Code:

http://mydomani.xxx/index.php?option=com_hikashop&amp;ctrl=checkout&amp;task=notify&amp;notif_payment=example&amp;tmpl=component&amp;PaymentID=7403553151051630&amp;TransID=4867583161051630&amp;order_id=261&amp;postdate=0612&amp;resultcode=APPROVED&amp;auth=999999&amp;Error=&amp;ErrorText=&amp;cardtype=MC&amp;payinst=VPAS&amp;liability=Y&amp;responsecode=00

i tried this: Code:

foreach($_GET as $key =&gt; $value) //foreach($_REQUEST as $key =&gt; $value) { $key = $filter-&gt;clean($key); $value = JRequest::getString($key); $vars[$key] = $value; }

and Code:

// The load the parameters of the plugin in $this-&gt;payment_params and the order data based on the order_id coming from the payment platform $order_id =$_GET['order_id']; // (int)@$vars['order_id']; $dbOrder = $this-&gt;getOrder($order_id);

but the result is the same, white page
i attach my new example page
some patience please, help me

Last edit: 11 years 4 months ago by [zizi80](/forum/user/36473-zizi80 "View zizi80's Profile").

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg3NzM0My1wbHVnaW4tZGV2ZWxvcG1lbnQtY2hhbmdlLW9yZGVyLXN0YXR1cz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) 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)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86290
- Thank you received: 14268
-
-

11 years 4 months ago [\#204573](#204573) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[change order status](/forum/35-orders-management/877343-plugin-development-change-order-status#204573 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.41  hi, I created a plugin for payments following the directions of your examples, but I do not understand what I do or what I call function to change the order status in confirmed and sending email notification.  help me please")*

Hi,

Please understand that this is just an example plugin. It doesn't means that you need to keep everything as it is in it, or that you shouldn't change some of the code becasue the payment gateway does things a bit differently. With that example plugin, we're just giving you the most common example.
For example, in the onPaymentNotification function, there is a call to the "example_signature" function which generates a hash out of some expected parameters and compare it to the hash given by the payment gateway. That's often done in order to guarantee the authentication of the payment notification. This is also explained in the comments of the plugin.
In your case, there is no hash in the URL and thus nothing to check. So if you keep the hash signature check in that function the check will fail and thus you'll also get a white page as the process will stop before the code which does the redirect in your onPaymentNotification function.

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

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

Less More

- Posts: 9
- Thank you received: 0
-
-

11 years 4 months ago [\#204867](#204867) by [zizi80](/forum/user/36473-zizi80 "View zizi80's Profile")  Replied by *[zizi80](/forum/user/36473-zizi80 "View zizi80's Profile")* on topic *[change order status](/forum/35-orders-management/877343-plugin-development-change-order-status#204867 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.41  hi, I created a plugin for payments following the directions of your examples, but I do not understand what I do or what I call function to change the order status in confirmed and sending email notification.  help me please")*

we are almost there,
accepts the payment and order status changes confirmed, but the page is always blank,does not redirect the user.
this url don't change: Code:

http://mydomain.xxx/index.php?option=com_hikashop&amp;ctrl=checkout&amp;task=notify&amp;notif_payment=example&amp;tmpl=component&amp;PaymentID=6666573151451660&amp;TransID=1759369161451660&amp;order_id=264&amp;postdate=0615&amp;resultcode=APPROVED&amp;auth=999999&amp;Error=&amp;ErrorText=&amp;cardtype=MC&amp;payinst=VPAS&amp;liability=Y&amp;responsecode=00

i attach my example page.
if you look at the page and tell me why does not redirect, thank you very much
*This attachment is hidden for guests.
Please log in or register to see it.*

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzM1LW9yZGVycy1tYW5hZ2VtZW50Lzg3NzM0My1wbHVnaW4tZGV2ZWxvcG1lbnQtY2hhbmdlLW9yZGVyLXN0YXR1cz90bXBsPW1hcmtkb3du) or [Create an account](/component/users/registration?Itemid=101) 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
-
-
-

11 years 4 months ago -  11 years 4 months ago [\#204871](#204871) 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 *[change order status](/forum/35-orders-management/877343-plugin-development-change-order-status#204871 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.41  hi, I created a plugin for payments following the directions of your examples, but I do not understand what I do or what I call function to change the order status in confirmed and sending email notification.  help me please")*

Hello,
You'll have to redirect him yourself regarding the payment status, If the payment was :
- Successful, you'll have to redirect him through a thank you page
- Cancelled, or if an error occurred, you'll have to redirect him through an error page.
I'll also checked your code, and it seems like you're actually redirecting your customers with that code :
$this-&gt;app-&gt;redirect($cancel_url);
Or
$this-&gt;app-&gt;redirect($return);

Your issue is probably coming from the fact the following code isn't executed.

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

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

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

Less More

- Posts: 9
- Thank you received: 0
-
-

11 years 4 months ago [\#204994](#204994) by [zizi80](/forum/user/36473-zizi80 "View zizi80's Profile")  Replied by *[zizi80](/forum/user/36473-zizi80 "View zizi80's Profile")* on topic *[change order status](/forum/35-orders-management/877343-plugin-development-change-order-status#204994 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.41  hi, I created a plugin for payments following the directions of your examples, but I do not understand what I do or what I call function to change the order status in confirmed and sending email notification.  help me please")*

yes redirect function don't work Code:

$this-&gt;app-&gt;redirect($cancel_url); Or $this-&gt;app-&gt;redirect($return);

I tried: Code:

header('"location:'.HIKASHOP_LIVE.'index.php?option=com_hikashop&amp;ctrl=order&amp;task=after_end&amp;order_id='.$order_id . $this-&gt;url_itemid.'"' ); exit;

or Code:

&lt;meta http-equiv="refresh" content="0; url=&lt;?php echo HIKASHOP_LIVE.'index.php?option=com_hikashop&amp;ctrl=order&amp;task=after_end&amp;order_id='.$order_id . $this-&gt;url_itemid; ?&gt;"&gt;

or Code:

&lt;script language="javascript"&gt; top.location.href = "&lt;?php echo HIKASHOP_LIVE.'index.php?option=com_hikashop&amp;ctrl=order&amp;task=after_end&amp;order_id='.$order_id . $this-&gt;url_itemid; ?&gt;"; &lt;/script&gt;

but don't redirect, the page is alway white

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

11 years 4 months ago [\#204996](#204996) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[change order status](/forum/35-orders-management/877343-plugin-development-change-order-status#204996 "-- HikaShop version -- : 2.4.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.4.41  hi, I created a plugin for payments following the directions of your examples, but I do not understand what I do or what I call function to change the order status in confirmed and sending email notification.  help me please")*

Hi,

You might have a PHP fatal error which stop the process of your plugin.
You might have something before in the function which perform a "return false;".
I can assure you that "$this-&gt;app-&gt;redirect()" is working every time when it's called.

So if you have some troubles with development, I'll recommend you to be helped by a developer.

Regards,

---

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

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

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

[](#top)
