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

#   Plugin onAfterOrderConfirm triggers not being called.

##

- **[icomex](/forum/user/4967-icomex "View icomex's Profile")**
- [![icomex's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4967.png)](/forum/user/4967-icomex "View icomex's Profile") Topic Author
- [ Offline](/forum/user/4967-icomex)

Less More

- Posts: 149
- Thank you received: 6
-
-

11 years 4 months ago [\#205469](#205469) by [icomex](/forum/user/4967-icomex "View icomex's Profile")  *[Plugin onAfterOrderConfirm triggers not being called.](/forum/27-checkout/877661-plugin-onafterorderconfirm-triggers-not-being-called#205469 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.3.28  We're working on a checkout process using the basic PayPal payment plugin in combination with a Hikashop plugin of our own creation which creates a reservation db record when an order containing certain items is created - and activating that reservation when the payment is confirmed by PayPal.  The custom plugin uses &quot;onAfterUserCreate()&quot; to assign the new user to a specific group. It also uses &quot;onAfterOrderCreate()&quot; to build the reservation db entry. These work fine and correctly.  The problem is that the plugin never receives either the &quot;onAfterOrderUpdate()&quot; or the &quot;onAfterOrderConfirm()&quot; triggers, which we need in order to finish the process.  The PayPal plugin IS working properly (although &quot;debug&quot; mode does not automatically write output to the Payment Log file - I manually inserted hika's log-writing triggers inside it to follow its progress from beginning to end to check it, and that does work. ) It process the Notification from PayPal and it properly changes the Hikashop order's status, as well as emailing the change notification to us.  But our own plugin never receives that final trigger which will activate the reservation. (The methods currently contain various commands which would make it very visible if they were processed. Users are transmitted normally to Hika's &quot;Thank You&quot; output without them being triggering.)  How can we tell if these triggers are being sent? Could they be like &quot;onPaymentNotification()&quot;, which is sent only to the payment plugin in use? Could I locate where the triggers are being activated/sent? Do you have suggestions for some other way I can troubleshoot this?  Thank you for your help.")* was created by *[icomex](/forum/user/4967-icomex "View icomex's Profile")*

-- HikaShop version -- : 2.5.0
-- Joomla version -- : 3.4.1
-- PHP version -- : 5.3.28

We're working on a checkout process using the basic **PayPal payment plugin** in combination with **a Hikashop plugin of our own creation** which creates a reservation db record when an order containing certain items is created - and activating that reservation when the payment is confirmed by PayPal.

The custom plugin uses "**onAfterUserCreate()**" to assign the new user to a specific group. It also uses "**onAfterOrderCreate()**" to build the reservation db entry. These work fine and correctly.

The problem is that the plugin never receives either the "**onAfterOrderUpdate()**" or the "**onAfterOrderConfirm()**" triggers, which we need in order to finish the process.

The **PayPal plugin** IS working properly (although "debug" mode does not automatically write output to the Payment Log file - I manually inserted hika's log-writing triggers inside it to follow its progress from beginning to end to check it, and that does work. ) It process the Notification from PayPal and it properly changes the Hikashop order's status, as well as emailing the change notification to us.

But **our own plugin** never receives that final trigger which will activate the reservation. (The methods currently contain various commands which would make it very visible if they were processed. Users are transmitted normally to Hika's "**Thank You**" output without them being triggering.)

How can we tell if these triggers are being sent? Could they be like "**onPaymentNotification()**", which is sent only to the payment plugin in use? Could I locate where the triggers are being activated/sent? Do you have suggestions for some other way I can troubleshoot this?

Thank you for your help.

[ ![debug&#95;2015-06-19&#95;01.jpg](/forum/attachment/25007) ](/forum/attachment/25007 "...5-06-19&#95;01.jpg")

- [ ![debug&#95;2015-06-19&#95;01.jpg](/forum/attachment/25007) ](/forum/attachment/25007 "...5-06-19&#95;01.jpg") [ ](/forum/attachment/25007?download=1 "...5-06-19&#95;01.jpg")

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

- **[icomex](/forum/user/4967-icomex "View icomex's Profile")**
- [![icomex's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4967.png)](/forum/user/4967-icomex "View icomex's Profile") Topic Author
- [ Offline](/forum/user/4967-icomex)

Less More

- Posts: 149
- Thank you received: 6
-
-

11 years 4 months ago -  11 years 4 months ago [\#205470](#205470) by [icomex](/forum/user/4967-icomex "View icomex's Profile")  Replied by *[icomex](/forum/user/4967-icomex "View icomex's Profile")* on topic *[Plugin onAfterOrderConfirm triggers not being called.](/forum/27-checkout/877661-plugin-onafterorderconfirm-triggers-not-being-called#205470 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.3.28  We're working on a checkout process using the basic PayPal payment plugin in combination with a Hikashop plugin of our own creation which creates a reservation db record when an order containing certain items is created - and activating that reservation when the payment is confirmed by PayPal.  The custom plugin uses &quot;onAfterUserCreate()&quot; to assign the new user to a specific group. It also uses &quot;onAfterOrderCreate()&quot; to build the reservation db entry. These work fine and correctly.  The problem is that the plugin never receives either the &quot;onAfterOrderUpdate()&quot; or the &quot;onAfterOrderConfirm()&quot; triggers, which we need in order to finish the process.  The PayPal plugin IS working properly (although &quot;debug&quot; mode does not automatically write output to the Payment Log file - I manually inserted hika's log-writing triggers inside it to follow its progress from beginning to end to check it, and that does work. ) It process the Notification from PayPal and it properly changes the Hikashop order's status, as well as emailing the change notification to us.  But our own plugin never receives that final trigger which will activate the reservation. (The methods currently contain various commands which would make it very visible if they were processed. Users are transmitted normally to Hika's &quot;Thank You&quot; output without them being triggering.)  How can we tell if these triggers are being sent? Could they be like &quot;onPaymentNotification()&quot;, which is sent only to the payment plugin in use? Could I locate where the triggers are being activated/sent? Do you have suggestions for some other way I can troubleshoot this?  Thank you for your help.")*

BTW, Paypal is being automatically redirected after purchase to the url
Code:

index.php?option=com_hikashop&amp;ctrl=checkout&amp;task=notify&amp;notif_payment=paypal

and the data it receives appears to match Paypal's specs. The plugin's notification routines seem to be behaving normally. I really don't think PayPal itself is involved. This problem appears to happen after the PayPal plugin does everything it needs to do.

Last edit: 11 years 4 months ago by [icomex](/forum/user/4967-icomex "View icomex's Profile"). Reason: URL was butchered by editor

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg3NzY2MS1wbHVnaW4tb25hZnRlcm9yZGVyY29uZmlybS10cmlnZ2Vycy1ub3QtYmVpbmctY2FsbGVkP3RtcGw9bWFya2Rvd24=) 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: 26400
- Thank you received: 4080
-
- [](http://obsi.dev)
-

11 years 4 months ago [\#205475](#205475) by [Jerome](/forum/user/80-jerome "View Jerome's Profile")  Replied by *[Jerome](/forum/user/80-jerome "View Jerome's Profile")* on topic *[Plugin onAfterOrderConfirm triggers not being called.](/forum/27-checkout/877661-plugin-onafterorderconfirm-triggers-not-being-called#205475 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.3.28  We're working on a checkout process using the basic PayPal payment plugin in combination with a Hikashop plugin of our own creation which creates a reservation db record when an order containing certain items is created - and activating that reservation when the payment is confirmed by PayPal.  The custom plugin uses &quot;onAfterUserCreate()&quot; to assign the new user to a specific group. It also uses &quot;onAfterOrderCreate()&quot; to build the reservation db entry. These work fine and correctly.  The problem is that the plugin never receives either the &quot;onAfterOrderUpdate()&quot; or the &quot;onAfterOrderConfirm()&quot; triggers, which we need in order to finish the process.  The PayPal plugin IS working properly (although &quot;debug&quot; mode does not automatically write output to the Payment Log file - I manually inserted hika's log-writing triggers inside it to follow its progress from beginning to end to check it, and that does work. ) It process the Notification from PayPal and it properly changes the Hikashop order's status, as well as emailing the change notification to us.  But our own plugin never receives that final trigger which will activate the reservation. (The methods currently contain various commands which would make it very visible if they were processed. Users are transmitted normally to Hika's &quot;Thank You&quot; output without them being triggering.)  How can we tell if these triggers are being sent? Could they be like &quot;onPaymentNotification()&quot;, which is sent only to the payment plugin in use? Could I locate where the triggers are being activated/sent? Do you have suggestions for some other way I can troubleshoot this?  Thank you for your help.")*

Hi,

Only the selected payment plugin will be triggered for the event "onAfterOrderConfirm".
You can be triggered with an another kind of plugin (or if your payment plugin is not used for the order).

Regards,

---

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

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

- **[icomex](/forum/user/4967-icomex "View icomex's Profile")**
- [![icomex's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4967.png)](/forum/user/4967-icomex "View icomex's Profile") Topic Author
- [ Offline](/forum/user/4967-icomex)

Less More

- Posts: 149
- Thank you received: 6
-
-

11 years 4 months ago [\#205554](#205554) by [icomex](/forum/user/4967-icomex "View icomex's Profile")  Replied by *[icomex](/forum/user/4967-icomex "View icomex's Profile")* on topic *[Plugin onAfterOrderConfirm triggers not being called.](/forum/27-checkout/877661-plugin-onafterorderconfirm-triggers-not-being-called#205554 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.3.28  We're working on a checkout process using the basic PayPal payment plugin in combination with a Hikashop plugin of our own creation which creates a reservation db record when an order containing certain items is created - and activating that reservation when the payment is confirmed by PayPal.  The custom plugin uses &quot;onAfterUserCreate()&quot; to assign the new user to a specific group. It also uses &quot;onAfterOrderCreate()&quot; to build the reservation db entry. These work fine and correctly.  The problem is that the plugin never receives either the &quot;onAfterOrderUpdate()&quot; or the &quot;onAfterOrderConfirm()&quot; triggers, which we need in order to finish the process.  The PayPal plugin IS working properly (although &quot;debug&quot; mode does not automatically write output to the Payment Log file - I manually inserted hika's log-writing triggers inside it to follow its progress from beginning to end to check it, and that does work. ) It process the Notification from PayPal and it properly changes the Hikashop order's status, as well as emailing the change notification to us.  But our own plugin never receives that final trigger which will activate the reservation. (The methods currently contain various commands which would make it very visible if they were processed. Users are transmitted normally to Hika's &quot;Thank You&quot; output without them being triggering.)  How can we tell if these triggers are being sent? Could they be like &quot;onPaymentNotification()&quot;, which is sent only to the payment plugin in use? Could I locate where the triggers are being activated/sent? Do you have suggestions for some other way I can troubleshoot this?  Thank you for your help.")*

Thank you, Jerome.

So the PayPal confirmation triggers BOTH **onAfterOrderConfirm** AND **onAfterOrderUpdate** **ONLY** to the payment plugin that is in use? There are several forum threads (including [ #140727](http://www.hikashop.com/forum/development/860707-onafterorderconfirm-not-triggering.html#140727) ) which indicate that onAfterOrderUpdate should be called after the Payment plugin has modified the Hikashop order ...

It would appear that the only way to trigger an alteration to the newly created order after payment confirmation is to override or replace the Payment plugin, which would mean manually checking and updating this new plugin every time HikaShop is updated. Is that correct?

Since the "Order" in the **onAfterOrderXXX** triggers refers to the Hikashop order, not to the payment request, why should these triggers be sent solely to the Payment Plugin, especially while the Payment plugin is already receiving the **onPaymentConfirm** trigger from the Payment API? It would seem that **onAfterOrderXXX** triggers should be sent to all Hika Plugins just as **onBeforeOrderCreate** are.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg3NzY2MS1wbHVnaW4tb25hZnRlcm9yZGVyY29uZmlybS10cmlnZ2Vycy1ub3QtYmVpbmctY2FsbGVkP3RtcGw9bWFya2Rvd24=) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86562
- Thank you received: 14307
-
-

11 years 4 months ago [\#205567](#205567) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Plugin onAfterOrderConfirm triggers not being called.](/forum/27-checkout/877661-plugin-onafterorderconfirm-triggers-not-being-called#205567 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.3.28  We're working on a checkout process using the basic PayPal payment plugin in combination with a Hikashop plugin of our own creation which creates a reservation db record when an order containing certain items is created - and activating that reservation when the payment is confirmed by PayPal.  The custom plugin uses &quot;onAfterUserCreate()&quot; to assign the new user to a specific group. It also uses &quot;onAfterOrderCreate()&quot; to build the reservation db entry. These work fine and correctly.  The problem is that the plugin never receives either the &quot;onAfterOrderUpdate()&quot; or the &quot;onAfterOrderConfirm()&quot; triggers, which we need in order to finish the process.  The PayPal plugin IS working properly (although &quot;debug&quot; mode does not automatically write output to the Payment Log file - I manually inserted hika's log-writing triggers inside it to follow its progress from beginning to end to check it, and that does work. ) It process the Notification from PayPal and it properly changes the Hikashop order's status, as well as emailing the change notification to us.  But our own plugin never receives that final trigger which will activate the reservation. (The methods currently contain various commands which would make it very visible if they were processed. Users are transmitted normally to Hika's &quot;Thank You&quot; output without them being triggering.)  How can we tell if these triggers are being sent? Could they be like &quot;onPaymentNotification()&quot;, which is sent only to the payment plugin in use? Could I locate where the triggers are being activated/sent? Do you have suggestions for some other way I can troubleshoot this?  Thank you for your help.")*

Hi,

The trigger onAfterOrderUpdate is called for all the plugins of the groups system, hikashop, hikashoppayment, hikashopshipping and system after an order is modified.
It's only the trigger onAfterOrderConfirm which is called only for the plugin selected for the order as it's a specific trigger which purpose is to provide the HTML to add to the page at the end of the checkout (when the order creation is confirmed by the user) for the redirection to the payment gateway.
It's the same with the onPaymentConfiguration and onPaymentConfigurationSave triggers which are called when the payment method setting page is displayed/saved and thus where only the plugin relative to the payment method being displayed/saved is called.

So no, you can of course have your own plugins triggered when an order is confirmed, or modified in another way thanks to the onAfterOrderUpdate trigger. We actually already use that a lot even by default in HikaShop. For example, the history plugin of HikaShop is triggered when an order is modified and it then logs a new history entry for the order at that point.

I guess that your issue is that you though that the onAfterOrderConfirm trigger was to get triggered when an order is confirmed, which is not the case, as explained in the developer documentation:
[ www.hikashop.com/support/support/documen...r-documentation.html](http://www.hikashop.com/support/support/documentation/62-hikashop-developer-documentation.html)

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

- **[icomex](/forum/user/4967-icomex "View icomex's Profile")**
- [![icomex's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4967.png)](/forum/user/4967-icomex "View icomex's Profile") Topic Author
- [ Offline](/forum/user/4967-icomex)

Less More

- Posts: 149
- Thank you received: 6
-
-

11 years 4 months ago [\#205666](#205666) by [icomex](/forum/user/4967-icomex "View icomex's Profile")  Replied by *[icomex](/forum/user/4967-icomex "View icomex's Profile")* on topic *[Plugin onAfterOrderConfirm triggers not being called.](/forum/27-checkout/877661-plugin-onafterorderconfirm-triggers-not-being-called#205666 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.3.28  We're working on a checkout process using the basic PayPal payment plugin in combination with a Hikashop plugin of our own creation which creates a reservation db record when an order containing certain items is created - and activating that reservation when the payment is confirmed by PayPal.  The custom plugin uses &quot;onAfterUserCreate()&quot; to assign the new user to a specific group. It also uses &quot;onAfterOrderCreate()&quot; to build the reservation db entry. These work fine and correctly.  The problem is that the plugin never receives either the &quot;onAfterOrderUpdate()&quot; or the &quot;onAfterOrderConfirm()&quot; triggers, which we need in order to finish the process.  The PayPal plugin IS working properly (although &quot;debug&quot; mode does not automatically write output to the Payment Log file - I manually inserted hika's log-writing triggers inside it to follow its progress from beginning to end to check it, and that does work. ) It process the Notification from PayPal and it properly changes the Hikashop order's status, as well as emailing the change notification to us.  But our own plugin never receives that final trigger which will activate the reservation. (The methods currently contain various commands which would make it very visible if they were processed. Users are transmitted normally to Hika's &quot;Thank You&quot; output without them being triggering.)  How can we tell if these triggers are being sent? Could they be like &quot;onPaymentNotification()&quot;, which is sent only to the payment plugin in use? Could I locate where the triggers are being activated/sent? Do you have suggestions for some other way I can troubleshoot this?  Thank you for your help.")*

I appreciate the explanation, which is precisely what I expected and hoped for, but my issue (if you examine the code included in the first post) is that I have a method set up for **onAfterOrderUpdate** that it is NOT being activated. I don't understand why.

Here is the first method, expanded ( the old-style _construct method ).
Code:

function plgHikashopBrainstyles( &amp;$subject, $config ) { parent::__construct( $subject, $config ); $this-&gt;user = JFactory::getUser(); $this-&gt;user-&gt;demographics = JUserHelper::getProfile( $this-&gt;user-&gt;id ); if( !isset( $this-&gt;params ) ) { $plugin = JPluginHelper::getPlugin( 'hikashop', 'brainstyles' ); $this-&gt;params = new JRegistry( $plugin-&gt;params ); } }

Is there something incorrect here or something else I need to do to receive that post-payment trigger? Remember, I DO receive the **onAfterOrderCreate** trigger call correctly. I just don't receive the calls which occur after the Payment.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg3NzY2MS1wbHVnaW4tb25hZnRlcm9yZGVyY29uZmlybS10cmlnZ2Vycy1ub3QtYmVpbmctY2FsbGVkP3RtcGw9bWFya2Rvd24=) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86562
- Thank you received: 14307
-
-

11 years 4 months ago [\#205699](#205699) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Plugin onAfterOrderConfirm triggers not being called.](/forum/27-checkout/877661-plugin-onafterorderconfirm-triggers-not-being-called#205699 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.3.28  We're working on a checkout process using the basic PayPal payment plugin in combination with a Hikashop plugin of our own creation which creates a reservation db record when an order containing certain items is created - and activating that reservation when the payment is confirmed by PayPal.  The custom plugin uses &quot;onAfterUserCreate()&quot; to assign the new user to a specific group. It also uses &quot;onAfterOrderCreate()&quot; to build the reservation db entry. These work fine and correctly.  The problem is that the plugin never receives either the &quot;onAfterOrderUpdate()&quot; or the &quot;onAfterOrderConfirm()&quot; triggers, which we need in order to finish the process.  The PayPal plugin IS working properly (although &quot;debug&quot; mode does not automatically write output to the Payment Log file - I manually inserted hika's log-writing triggers inside it to follow its progress from beginning to end to check it, and that does work. ) It process the Notification from PayPal and it properly changes the Hikashop order's status, as well as emailing the change notification to us.  But our own plugin never receives that final trigger which will activate the reservation. (The methods currently contain various commands which would make it very visible if they were processed. Users are transmitted normally to Hika's &quot;Thank You&quot; output without them being triggering.)  How can we tell if these triggers are being sent? Could they be like &quot;onPaymentNotification()&quot;, which is sent only to the payment plugin in use? Could I locate where the triggers are being activated/sent? Do you have suggestions for some other way I can troubleshoot this?  Thank you for your help.")*

Hi,

If onAfterOrderCreate is triggered in your plugin, then onAfterOrderUpdate will be triggered too.
There is no way it is not.

Your issue is probably in your assumptions.
I see that what you do in the onAfterOrderUpdate code is only displaying text.
And you're saying that you're testing with the PayPal plugin confirmation of orders.
This process is triggered directly by a PayPal server and thus, what is displayed by the website in that process is sent back to the PayPal server which contacted the website for the payment notification.
So it's normal that you don't see anything as the customer.
If you don't add the die at the end of the function, during payment notifications, HikaShop will automatically log what you output in your plugin to the payment log file that you can see in the Files section of the HikaShop configuration.
With the die, the text is sent back directly to PayPal by your server so there is no point displaying any text as PayPal doesn't care and you won't see it anywhere.

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

- **[icomex](/forum/user/4967-icomex "View icomex's Profile")**
- [![icomex's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4967.png)](/forum/user/4967-icomex "View icomex's Profile") Topic Author
- [ Offline](/forum/user/4967-icomex)

Less More

- Posts: 149
- Thank you received: 6
-
-

11 years 4 months ago [\#205788](#205788) by [icomex](/forum/user/4967-icomex "View icomex's Profile")  Replied by *[icomex](/forum/user/4967-icomex "View icomex's Profile")* on topic *[Plugin onAfterOrderConfirm triggers not being called.](/forum/27-checkout/877661-plugin-onafterorderconfirm-triggers-not-being-called#205788 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.3.28  We're working on a checkout process using the basic PayPal payment plugin in combination with a Hikashop plugin of our own creation which creates a reservation db record when an order containing certain items is created - and activating that reservation when the payment is confirmed by PayPal.  The custom plugin uses &quot;onAfterUserCreate()&quot; to assign the new user to a specific group. It also uses &quot;onAfterOrderCreate()&quot; to build the reservation db entry. These work fine and correctly.  The problem is that the plugin never receives either the &quot;onAfterOrderUpdate()&quot; or the &quot;onAfterOrderConfirm()&quot; triggers, which we need in order to finish the process.  The PayPal plugin IS working properly (although &quot;debug&quot; mode does not automatically write output to the Payment Log file - I manually inserted hika's log-writing triggers inside it to follow its progress from beginning to end to check it, and that does work. ) It process the Notification from PayPal and it properly changes the Hikashop order's status, as well as emailing the change notification to us.  But our own plugin never receives that final trigger which will activate the reservation. (The methods currently contain various commands which would make it very visible if they were processed. Users are transmitted normally to Hika's &quot;Thank You&quot; output without them being triggering.)  How can we tell if these triggers are being sent? Could they be like &quot;onPaymentNotification()&quot;, which is sent only to the payment plugin in use? Could I locate where the triggers are being activated/sent? Do you have suggestions for some other way I can troubleshoot this?  Thank you for your help.")*

THAT's the missing piece!

I had assumed that the **onAfterOrderUpdate** trigger was sent when PayPal redirects back to the original website, instead of paypal sending both a notification transaction AND a redirect request separately.

A minor confusion: when the **onAfterOrderUpdate** method receives the Order object as input, its new status is marked as "cancelled" instead of 'confirmed'. At the same time, there is a history object included which logs the 'payment', which is the change I will look for to verify that the payment has been received. Is the 'cancelled' status normal or is it an artifact of the timing of PayPal's transaction?

Thank you very much for your help. I would never have figured this out without your assistance.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzI3LWNoZWNrb3V0Lzg3NzY2MS1wbHVnaW4tb25hZnRlcm9yZGVyY29uZmlybS10cmlnZ2Vycy1ub3QtYmVpbmctY2FsbGVkP3RtcGw9bWFya2Rvd24=) 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?1793428657)](/forum/user/63-nicolas "View nicolas's Profile")
- [ Away](/forum/user/63-nicolas)

Less More

- Posts: 86562
- Thank you received: 14307
-
-

11 years 4 months ago [\#205810](#205810) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Plugin onAfterOrderConfirm triggers not being called.](/forum/27-checkout/877661-plugin-onafterorderconfirm-triggers-not-being-called#205810 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.3.28  We're working on a checkout process using the basic PayPal payment plugin in combination with a Hikashop plugin of our own creation which creates a reservation db record when an order containing certain items is created - and activating that reservation when the payment is confirmed by PayPal.  The custom plugin uses &quot;onAfterUserCreate()&quot; to assign the new user to a specific group. It also uses &quot;onAfterOrderCreate()&quot; to build the reservation db entry. These work fine and correctly.  The problem is that the plugin never receives either the &quot;onAfterOrderUpdate()&quot; or the &quot;onAfterOrderConfirm()&quot; triggers, which we need in order to finish the process.  The PayPal plugin IS working properly (although &quot;debug&quot; mode does not automatically write output to the Payment Log file - I manually inserted hika's log-writing triggers inside it to follow its progress from beginning to end to check it, and that does work. ) It process the Notification from PayPal and it properly changes the Hikashop order's status, as well as emailing the change notification to us.  But our own plugin never receives that final trigger which will activate the reservation. (The methods currently contain various commands which would make it very visible if they were processed. Users are transmitted normally to Hika's &quot;Thank You&quot; output without them being triggering.)  How can we tell if these triggers are being sent? Could they be like &quot;onPaymentNotification()&quot;, which is sent only to the payment plugin in use? Could I locate where the triggers are being activated/sent? Do you have suggestions for some other way I can troubleshoot this?  Thank you for your help.")*

Hi,

In your PayPal payment method, you can configure the status you want when the payment is successful, invalid, etc.

By default, "cancelled" is only set when the payment notification received is invalid.
This will happen in two cases:
- the amount paid and the order amount are different
- the email of the receiver is different than the merchant email set in the settings of the PayPal payment method

If you turn on the "debug" setting of your PayPal payment method, you'll get data in the logs giving you the necessary information on the matter. You should also receive a payment notification email with some information on the issue in such case.

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

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

- **[icomex](/forum/user/4967-icomex "View icomex's Profile")**
- [![icomex's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4967.png)](/forum/user/4967-icomex "View icomex's Profile") Topic Author
- [ Offline](/forum/user/4967-icomex)

Less More

- Posts: 149
- Thank you received: 6
-
-

11 years 4 months ago [\#206274](#206274) by [icomex](/forum/user/4967-icomex "View icomex's Profile")  Replied by *[icomex](/forum/user/4967-icomex "View icomex's Profile")* on topic *[Plugin onAfterOrderConfirm triggers not being called.](/forum/27-checkout/877661-plugin-onafterorderconfirm-triggers-not-being-called#206274 "-- HikaShop version -- : 2.5.0 -- Joomla version -- : 3.4.1 -- PHP version -- : 5.3.28  We're working on a checkout process using the basic PayPal payment plugin in combination with a Hikashop plugin of our own creation which creates a reservation db record when an order containing certain items is created - and activating that reservation when the payment is confirmed by PayPal.  The custom plugin uses &quot;onAfterUserCreate()&quot; to assign the new user to a specific group. It also uses &quot;onAfterOrderCreate()&quot; to build the reservation db entry. These work fine and correctly.  The problem is that the plugin never receives either the &quot;onAfterOrderUpdate()&quot; or the &quot;onAfterOrderConfirm()&quot; triggers, which we need in order to finish the process.  The PayPal plugin IS working properly (although &quot;debug&quot; mode does not automatically write output to the Payment Log file - I manually inserted hika's log-writing triggers inside it to follow its progress from beginning to end to check it, and that does work. ) It process the Notification from PayPal and it properly changes the Hikashop order's status, as well as emailing the change notification to us.  But our own plugin never receives that final trigger which will activate the reservation. (The methods currently contain various commands which would make it very visible if they were processed. Users are transmitted normally to Hika's &quot;Thank You&quot; output without them being triggering.)  How can we tell if these triggers are being sent? Could they be like &quot;onPaymentNotification()&quot;, which is sent only to the payment plugin in use? Could I locate where the triggers are being activated/sent? Do you have suggestions for some other way I can troubleshoot this?  Thank you for your help.")*

Your suggestions appear to have resolved the 'cancelled' issue, and your earlier message did resolve the original issue.

Thank you for your time and effort!

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

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