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

#   IPN Listener

##

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

Less More

- Posts: 16
- Thank you received: 0
-
-

15 years 9 months ago [\#7986](#7986) by [iconoclast](/forum/user/1108-iconoclast "View iconoclast's Profile")  *[IPN Listener](/forum/4-how-to/7986-ipn-listener#7986 "Hi there. I am a newbie here and would like to add my PHP script, In the listener file of the component where after the successful payment of PAYPAL, the component turns the order status to confirmed. I want to find that file and that part of code so, I can add more of my custom code there.  Will you please give me the location of the file that handles the information sent fron IPN system of PAYPAL?  By the way this component ROCKS! :lol:  Thank you very much")* was created by *[iconoclast](/forum/user/1108-iconoclast "View iconoclast's Profile")*

Hi there.
I am a newbie here and would like to add my PHP script, In the listener file of the component where after the successful payment of PAYPAL, the component turns the order status to confirmed. I want to find that file and that part of code so, I can add more of my custom code there.

Will you please give me the location of the file that handles the information sent fron IPN system of PAYPAL?

By the way this component ROCKS! :lol:

Thank you very much

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc5ODYtaXBuLWxpc3RlbmVyP3RtcGw9bWFya2Rvd24=) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86574
- Thank you received: 14317
-
-

15 years 9 months ago [\#7988](#7988) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: IPN Listener](/forum/4-how-to/7986-ipn-listener#7988 "Hi there. I am a newbie here and would like to add my PHP script, In the listener file of the component where after the successful payment of PAYPAL, the component turns the order status to confirmed. I want to find that file and that part of code so, I can add more of my custom code there.  Will you please give me the location of the file that handles the information sent fron IPN system of PAYPAL?  By the way this component ROCKS! :lol:  Thank you very much")*

Hi,

You don't need to hack hikashop for that (it's better not to, otherwise, you will have to reapply your changes each time). You can create a plugin and define the method onAfterOrderUpdate(&amp;$order,&amp;$send_email) following our developer documentation:
[ www.hikashop.com/en/support/documentatio...r-documentation.html](http://www.hikashop.com/en/support/documentation/62-hikashop-developer-documentation.html)

That way, in that method, you can just do like this:

if(@$order-&gt;order_status=='confirmed'){
// my custom code
}

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

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

Less More

- Posts: 16
- Thank you received: 0
-
-

15 years 9 months ago [\#7990](#7990) by [iconoclast](/forum/user/1108-iconoclast "View iconoclast's Profile")  Replied by *[iconoclast](/forum/user/1108-iconoclast "View iconoclast's Profile")* on topic *[Re: IPN Listener](/forum/4-how-to/7986-ipn-listener#7990 "Hi there. I am a newbie here and would like to add my PHP script, In the listener file of the component where after the successful payment of PAYPAL, the component turns the order status to confirmed. I want to find that file and that part of code so, I can add more of my custom code there.  Will you please give me the location of the file that handles the information sent fron IPN system of PAYPAL?  By the way this component ROCKS! :lol:  Thank you very much")*

I am just surprised how fast a moderator can reply to a forum! I really appreciate your quick response.
Thank you very much..

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

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

Less More

- Posts: 16
- Thank you received: 0
-
-

15 years 9 months ago [\#8000](#8000) by [iconoclast](/forum/user/1108-iconoclast "View iconoclast's Profile")  Replied by *[iconoclast](/forum/user/1108-iconoclast "View iconoclast's Profile")* on topic *[Re: IPN Listener](/forum/4-how-to/7986-ipn-listener#8000 "Hi there. I am a newbie here and would like to add my PHP script, In the listener file of the component where after the successful payment of PAYPAL, the component turns the order status to confirmed. I want to find that file and that part of code so, I can add more of my custom code there.  Will you please give me the location of the file that handles the information sent fron IPN system of PAYPAL?  By the way this component ROCKS! :lol:  Thank you very much")*

Thank you very much for your reply. I created the plugin for usage. Now I would like to know which information the order object can give me? Is there a list for options that I can check? (Mainly I want to use my customer email address in my custom code.)

And maybe it is irrelevant question but is there a way I can use the paypal sandbox system for testing purposes?
I saw a link given to paypal that can be changed, but I'm not sure which url I should use instead of default one.

Thank you very much.

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc5ODYtaXBuLWxpc3RlbmVyP3RtcGw9bWFya2Rvd24=) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86574
- Thank you received: 14317
-
-

15 years 9 months ago [\#8001](#8001) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: IPN Listener](/forum/4-how-to/7986-ipn-listener#8001 "Hi there. I am a newbie here and would like to add my PHP script, In the listener file of the component where after the successful payment of PAYPAL, the component turns the order status to confirmed. I want to find that file and that part of code so, I can add more of my custom code there.  Will you please give me the location of the file that handles the information sent fron IPN system of PAYPAL?  By the way this component ROCKS! :lol:  Thank you very much")*

The $order object doesn't contain much data.
If you want to load the email address of the user, you can use the code:
//first, I need to load the data of the order as it might not contain the user id
$orderClass = hikashop::get('class.order');
$orderInfos = $orderClass-&gt;get($order_id);
//then, I load the user data
$userClass = hikashop::get('class.user');
$customer = $userClass-&gt;get($orderInfos-&gt;order_user_id);
echo $customer-&gt;user_email;

The paypal sandbox URL is: [ www.sandbox.paypal.com/cgi-bin/webscr](https://www.sandbox.paypal.com/cgi-bin/webscr)

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

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

Less More

- Posts: 16
- Thank you received: 0
-
-

15 years 9 months ago [\#8002](#8002) by [iconoclast](/forum/user/1108-iconoclast "View iconoclast's Profile")  Replied by *[iconoclast](/forum/user/1108-iconoclast "View iconoclast's Profile")* on topic *[Re: IPN Listener](/forum/4-how-to/7986-ipn-listener#8002 "Hi there. I am a newbie here and would like to add my PHP script, In the listener file of the component where after the successful payment of PAYPAL, the component turns the order status to confirmed. I want to find that file and that part of code so, I can add more of my custom code there.  Will you please give me the location of the file that handles the information sent fron IPN system of PAYPAL?  By the way this component ROCKS! :lol:  Thank you very much")*

Thank you again...

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

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

Less More

- Posts: 16
- Thank you received: 0
-
-

15 years 9 months ago [\#8356](#8356) by [iconoclast](/forum/user/1108-iconoclast "View iconoclast's Profile")  Replied by *[iconoclast](/forum/user/1108-iconoclast "View iconoclast's Profile")* on topic *[Re: IPN Listener](/forum/4-how-to/7986-ipn-listener#8356 "Hi there. I am a newbie here and would like to add my PHP script, In the listener file of the component where after the successful payment of PAYPAL, the component turns the order status to confirmed. I want to find that file and that part of code so, I can add more of my custom code there.  Will you please give me the location of the file that handles the information sent fron IPN system of PAYPAL?  By the way this component ROCKS! :lol:  Thank you very much")*

Hi there, I encountered to some problems again.
This is my case scenario:
I have two PDF files that I want to sell.
During the shopping I don't collect any information from the costumer.
After the successful payment I want to send an email to the buyer.
The email will be the same email of payer from the paypal that is get back to me through IPN system (You told me what to do for getting the email address but I couldn't manage to make it work.)
Then I will need the code number of products the buyer purchased to know which product link I should send to customer.
(If the customer buys both of PDFs I should send him/her two links, so maybe there are more than one product code needed to handle).
Also I should get the payment ID from paypal to show on my Thank you page. I don't know what code I should use in my thank you page for showing the payment ID.

Will you please help me on this matter?

Thank you very much.

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

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

Less More

- Posts: 16
- Thank you received: 0
-
-

15 years 9 months ago [\#8372](#8372) by [iconoclast](/forum/user/1108-iconoclast "View iconoclast's Profile")  Replied by *[iconoclast](/forum/user/1108-iconoclast "View iconoclast's Profile")* on topic *[Re: IPN Listener](/forum/4-how-to/7986-ipn-listener#8372 "Hi there. I am a newbie here and would like to add my PHP script, In the listener file of the component where after the successful payment of PAYPAL, the component turns the order status to confirmed. I want to find that file and that part of code so, I can add more of my custom code there.  Will you please give me the location of the file that handles the information sent fron IPN system of PAYPAL?  By the way this component ROCKS! :lol:  Thank you very much")*

Hi there, I encountered to some problems again.
This is my case scenario:
I have two PDF files that I want to sell.
During the shopping I don't collect any information from the costumer.
After the successful payment I want to send an email to the buyer.
The email will be the same email of payer from the paypal that is get back to me through IPN system (You told me what to do for getting the email address but I couldn't manage to make it work.)
Then I will need the code number of products the buyer purchased to know which product link I should send to customer.
(If the customer buys both of PDFs I should send him/her two links, so maybe there are more than one product code needed to handle).
Also I should get the payment ID from paypal to show on my Thank you page. I don't know what code I should use in my thank you page for showing the payment ID.

Will you please help me on this matter?

Thank you very much.

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

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

Less More

- Posts: 16
- Thank you received: 0
-
-

15 years 9 months ago [\#8381](#8381) by [iconoclast](/forum/user/1108-iconoclast "View iconoclast's Profile")  Replied by *[iconoclast](/forum/user/1108-iconoclast "View iconoclast's Profile")* on topic *[Re: IPN Listener](/forum/4-how-to/7986-ipn-listener#8381 "Hi there. I am a newbie here and would like to add my PHP script, In the listener file of the component where after the successful payment of PAYPAL, the component turns the order status to confirmed. I want to find that file and that part of code so, I can add more of my custom code there.  Will you please give me the location of the file that handles the information sent fron IPN system of PAYPAL?  By the way this component ROCKS! :lol:  Thank you very much")*

Hi there. I have found the ipn post variables.
I want to know how can I get the given information of the ipn for next usage.
I tested the IPN with my settings and got some information.
Now I want to access that information like:
item_number1= (the product ID)
item_number1= (the product ID)
payer_email= (this is so important for me cuz I dont have any othe contact information from my customer except this)

As you said I can make a plugin to handle but how can I access the information above in my plugin?

Thank you very much and waiting for your reply

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc5ODYtaXBuLWxpc3RlbmVyP3RtcGw9bWFya2Rvd24=) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86574
- Thank you received: 14317
-
-

15 years 9 months ago [\#8382](#8382) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: IPN Listener](/forum/4-how-to/7986-ipn-listener#8382 "Hi there. I am a newbie here and would like to add my PHP script, In the listener file of the component where after the successful payment of PAYPAL, the component turns the order status to confirmed. I want to find that file and that part of code so, I can add more of my custom code there.  Will you please give me the location of the file that handles the information sent fron IPN system of PAYPAL?  By the way this component ROCKS! :lol:  Thank you very much")*

Hi,

On the thank you page the payment might not be validated by PayPal so it doesn't return any information to HikaShop which would enable you to display the payment ID. That information is sent with IPN to HikaShop on a different communication channel later on and securily. And it's at that point that the onAfterOrderUpdate function is triggered by HikaShop. You say that you couldn't make work the code I gave you. Maybe it's because you thought that it would display something on the thank you page where in fact it's not called at that point ?

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

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

Less More

- Posts: 16
- Thank you received: 0
-
-

15 years 9 months ago [\#8383](#8383) by [iconoclast](/forum/user/1108-iconoclast "View iconoclast's Profile")  Replied by *[iconoclast](/forum/user/1108-iconoclast "View iconoclast's Profile")* on topic *[Re: IPN Listener](/forum/4-how-to/7986-ipn-listener#8383 "Hi there. I am a newbie here and would like to add my PHP script, In the listener file of the component where after the successful payment of PAYPAL, the component turns the order status to confirmed. I want to find that file and that part of code so, I can add more of my custom code there.  Will you please give me the location of the file that handles the information sent fron IPN system of PAYPAL?  By the way this component ROCKS! :lol:  Thank you very much")*

yea I made a mistake about the thank you page.
I want the information of the IPN available for me at onAfterOrderUpdate in my plugin.
information such as payer_email , mc_gross , ....
How can I access them on my plugin?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc5ODYtaXBuLWxpc3RlbmVyP3RtcGw9bWFya2Rvd24=) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86574
- Thank you received: 14317
-
-

15 years 9 months ago [\#8384](#8384) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: IPN Listener](/forum/4-how-to/7986-ipn-listener#8384 "Hi there. I am a newbie here and would like to add my PHP script, In the listener file of the component where after the successful payment of PAYPAL, the component turns the order status to confirmed. I want to find that file and that part of code so, I can add more of my custom code there.  Will you please give me the location of the file that handles the information sent fron IPN system of PAYPAL?  By the way this component ROCKS! :lol:  Thank you very much")*

You should be able to read it directly in the $_REQUEST variable.
Like this: $price = $_REQUEST;

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

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

Less More

- Posts: 16
- Thank you received: 0
-
-

15 years 9 months ago [\#8386](#8386) by [iconoclast](/forum/user/1108-iconoclast "View iconoclast's Profile")  Replied by *[iconoclast](/forum/user/1108-iconoclast "View iconoclast's Profile")* on topic *[Re: IPN Listener](/forum/4-how-to/7986-ipn-listener#8386 "Hi there. I am a newbie here and would like to add my PHP script, In the listener file of the component where after the successful payment of PAYPAL, the component turns the order status to confirmed. I want to find that file and that part of code so, I can add more of my custom code there.  Will you please give me the location of the file that handles the information sent fron IPN system of PAYPAL?  By the way this component ROCKS! :lol:  Thank you very much")*

THATS THE POINT! THAAAAAAAAAAAAAAAAAAAAAANK YOU! I think most of developers would want this. I am ready to help documenting the procedure to be added at documentation section. are there any interests? I am really getting into Hikashop and really want to do something to benefit this system, It saved a huge amount of time for me!

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc5ODYtaXBuLWxpc3RlbmVyP3RtcGw9bWFya2Rvd24=) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86574
- Thank you received: 14317
-
-

15 years 9 months ago [\#8389](#8389) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: IPN Listener](/forum/4-how-to/7986-ipn-listener#8389 "Hi there. I am a newbie here and would like to add my PHP script, In the listener file of the component where after the successful payment of PAYPAL, the component turns the order status to confirmed. I want to find that file and that part of code so, I can add more of my custom code there.  Will you please give me the location of the file that handles the information sent fron IPN system of PAYPAL?  By the way this component ROCKS! :lol:  Thank you very much")*

If you write the procedure, we can of course add it to our documentation. I'm sure that Other developers would benefit from it.

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

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

Less More

- Posts: 16
- Thank you received: 0
-
-

15 years 9 months ago [\#8452](#8452) by [iconoclast](/forum/user/1108-iconoclast "View iconoclast's Profile")  Replied by *[iconoclast](/forum/user/1108-iconoclast "View iconoclast's Profile")* on topic *[Re: IPN Listener](/forum/4-how-to/7986-ipn-listener#8452 "Hi there. I am a newbie here and would like to add my PHP script, In the listener file of the component where after the successful payment of PAYPAL, the component turns the order status to confirmed. I want to find that file and that part of code so, I can add more of my custom code there.  Will you please give me the location of the file that handles the information sent fron IPN system of PAYPAL?  By the way this component ROCKS! :lol:  Thank you very much")*

Thank you for your guidance.
I am getting closer to achieve the results.
I coded the plugin. and now my code should work after the order is confirmed.
I post the code I wrote using your help. Unfortunately the event does not trigger on confirmed order.
Will you please check where did I mistake?

&lt;?php
defined('_JEXEC') or die('Restricted access');
?&gt;

&lt;?php
class plgChristopher extends JPlugin
{
function plgChristopher(&amp;$subject, $config){
parent::__construct($subject, $config);
if(!isset($this-&gt;params)){
$plugin =&amp; JPluginHelper::getPlugin('hikashop', 'christopher');
jimport('joomla.html.parameter');
$this-&gt;params = new JParameter( $plugin-&gt;params );
}
}
function onAfterOrderUpdate(&amp;$order,&amp;$send_email){
if(@$order-&gt;order_status=='confirmed'){
$customerEmail = $_REQUEST;
$to = $customerEmail;
$from = "christopher.amirian@gmail.com";
$subject = "Your payment has been verified";
$message = "This is a test";
mail($to, $subject, $message);
}
}
}
?&gt;

As you see I used the same coding rules of the history plugin. The plugin installed ok.
I want to send a simple email after the payment, using the email address I get from the IPN answer.
I followed your instructions and still have problem.
The event does not trigger.

Would be thankful to help me in this matter.

Thank you very much

?&gt;

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc5ODYtaXBuLWxpc3RlbmVyP3RtcGw9bWFya2Rvd24=) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86574
- Thank you received: 14317
-
-

15 years 9 months ago [\#8459](#8459) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: IPN Listener](/forum/4-how-to/7986-ipn-listener#8459 "Hi there. I am a newbie here and would like to add my PHP script, In the listener file of the component where after the successful payment of PAYPAL, the component turns the order status to confirmed. I want to find that file and that part of code so, I can add more of my custom code there.  Will you please give me the location of the file that handles the information sent fron IPN system of PAYPAL?  By the way this component ROCKS! :lol:  Thank you very much")*

How do you know that the event does not work ? ![:)](/media/kunena/emoticons/3.png ":)")
Because the email is not sent ? In that case, you should try to use the joomla emailing functions and not the php mail function. That way, the system will use the standard joomla mail sending configuration :

$mailer =&amp; JFactory::getMailer();
$config =&amp; hikashop::config();
$sender = array(
$config-&gt;get('from_email'),
$config-&gt;get('from_name') );
$mailer-&gt;setSender($sender);
$mailer-&gt;addRecipient(array($customerEmail));
$mailer-&gt;setSubject("Your payment has been verified");
$mailer-&gt;setBody("This is a test");
$mailer-&gt;Send();

Also, you need to have your plugin published in the joomla plugin manager. Is that the case ?

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

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

Less More

- Posts: 16
- Thank you received: 0
-
-

15 years 9 months ago [\#8464](#8464) by [iconoclast](/forum/user/1108-iconoclast "View iconoclast's Profile")  Replied by *[iconoclast](/forum/user/1108-iconoclast "View iconoclast's Profile")* on topic *[Re: IPN Listener](/forum/4-how-to/7986-ipn-listener#8464 "Hi there. I am a newbie here and would like to add my PHP script, In the listener file of the component where after the successful payment of PAYPAL, the component turns the order status to confirmed. I want to find that file and that part of code so, I can add more of my custom code there.  Will you please give me the location of the file that handles the information sent fron IPN system of PAYPAL?  By the way this component ROCKS! :lol:  Thank you very much")*

First of all thank you for your reply.
Yes I always publish the plugin before I use.
I tested the code and it works when I code it directly to joomla article using Jumi.
But it does not send email when it is coded in plugin.(I used the same code)

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

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

Less More

- Posts: 16
- Thank you received: 0
-
-

15 years 9 months ago [\#8467](#8467) by [iconoclast](/forum/user/1108-iconoclast "View iconoclast's Profile")  Replied by *[iconoclast](/forum/user/1108-iconoclast "View iconoclast's Profile")* on topic *[Re: IPN Listener](/forum/4-how-to/7986-ipn-listener#8467 "Hi there. I am a newbie here and would like to add my PHP script, In the listener file of the component where after the successful payment of PAYPAL, the component turns the order status to confirmed. I want to find that file and that part of code so, I can add more of my custom code there.  Will you please give me the location of the file that handles the information sent fron IPN system of PAYPAL?  By the way this component ROCKS! :lol:  Thank you very much")*

How can I test that the event is triggering? Is there any way ?

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzQtaG93LXRvLzc5ODYtaXBuLWxpc3RlbmVyP3RtcGw9bWFya2Rvd24=) 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")
- [ Offline](/forum/user/63-nicolas)

Less More

- Posts: 86574
- Thank you received: 14317
-
-

15 years 9 months ago [\#8475](#8475) by [nicolas](/forum/user/63-nicolas "View nicolas's Profile")  Replied by *[nicolas](/forum/user/63-nicolas "View nicolas's Profile")* on topic *[Re: IPN Listener](/forum/4-how-to/7986-ipn-listener#8475 "Hi there. I am a newbie here and would like to add my PHP script, In the listener file of the component where after the successful payment of PAYPAL, the component turns the order status to confirmed. I want to find that file and that part of code so, I can add more of my custom code there.  Will you please give me the location of the file that handles the information sent fron IPN system of PAYPAL?  By the way this component ROCKS! :lol:  Thank you very much")*

You should try to write in a file:
jimport('joomla.filesystem.file');
JFile::write(HKASHOP_ROOT.'mylogfile.txt','event is triggered');

Then, you will be able to access that log file in your website's root folder via FTP. Also, make sure that this file is writable.

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

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

Less More

- Posts: 16
- Thank you received: 0
-
-

15 years 9 months ago [\#8487](#8487) by [iconoclast](/forum/user/1108-iconoclast "View iconoclast's Profile")  Replied by *[iconoclast](/forum/user/1108-iconoclast "View iconoclast's Profile")* on topic *[Re: IPN Listener](/forum/4-how-to/7986-ipn-listener#8487 "Hi there. I am a newbie here and would like to add my PHP script, In the listener file of the component where after the successful payment of PAYPAL, the component turns the order status to confirmed. I want to find that file and that part of code so, I can add more of my custom code there.  Will you please give me the location of the file that handles the information sent fron IPN system of PAYPAL?  By the way this component ROCKS! :lol:  Thank you very much")*

Oh I see. a great trick for loggin' so if I go and change one order status manually from the administrator section it should trigger the event I think.

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

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