Title: IPN
Last modified: January 2, 2020

---

# IPN

 *  Resolved [chinjohn](https://wordpress.org/support/users/chinjohn/)
 * (@chinjohn)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/ipn-3/)
 * I can’t seem to get the IPN response sent to the address I specified on my paypal
   account. Instead I can only see the IPN on the “orders” section of the “wp-paypal”
   plugin.
 * I want the ipn sent to the address I specified on m paypal account because I 
   want to log the transaction on my database and give content access only to people
   who I have their details on my database.
 * Is there a way I can do this?
 * Thank You.
 * The page I need help with: _[[log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Fipn-3%2F%3Foutput_format%3Dmd&locale=en_US)
   to see the link]_

Viewing 6 replies - 1 through 6 (of 6 total)

 *  Plugin Author [Noor Alam](https://wordpress.org/support/users/naa986/)
 * (@naa986)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/ipn-3/#post-12293417)
 * [@chinjohn](https://wordpress.org/support/users/chinjohn/), The plugin overrides
   the default IPN URL so it can process the order. You can use the action hook 
   that it triggers after processing the order. For example:
 *     ```
       function my_callback_function($ipn_response) {
           // do stuff
   
       }
       add_action('wp_paypal_ipn_processed', 'my_callback_function');
       ```
   
 *  Thread Starter [chinjohn](https://wordpress.org/support/users/chinjohn/)
 * (@chinjohn)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/ipn-3/#post-12293750)
 * Ok Thank You for your response. I already tried something else and it worked 
   fine.
 * I edited your ipn file(between line 149 and 150) like this:
 *     ```
       wp_paypal_debug_log("Order information updated", true);
       // do stuff
       do_action('wp_paypal_order_processed', $post_id);
       ```
   
 * It worked and the debug log still reached the last line “IPN processing completed”.
   Hope its still cool I did it like that right?
 * Thank You.
 *  Plugin Author [Noor Alam](https://wordpress.org/support/users/naa986/)
 * (@naa986)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/ipn-3/#post-12293777)
 * [@chinjohn](https://wordpress.org/support/users/chinjohn/), This should work 
   but the code will get overriden every time you update the plugin. It’s better
   to have a separate file where you listen to the hook and run additional tasks(
   as shown in my example).
 *  Thread Starter [chinjohn](https://wordpress.org/support/users/chinjohn/)
 * (@chinjohn)
 * [6 years, 4 months ago](https://wordpress.org/support/topic/ipn-3/#post-12293821)
 * Ok. Thank You I’ll see how I can handle this.
 *  [sdevine](https://wordpress.org/support/users/sdevine/)
 * (@sdevine)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/ipn-3/#post-12412145)
 * I am trying to call a function using your example but it isn’t working.
    I have
   the following line in paypal-ipn.php (line 142) : add_action(‘wp_paypal_ipn_processed’,‘
   my_callback’);
 * Then in a separate file I have this (for testing)
    function my_callback() { $
   now=date(“Y-m-d H:i:s”); $fp = fopen(‘feedback.txt’, ‘a’); fwrite($fp, ‘Function
   triggered.’); fwrite($fp, “\n”); fwrite($fp, “$now”); fwrite($fp, “\n”); fclose(
   $fp); }
 * —————
    I have a include line at the top of paypal-ipn.php for the file I created.
   No Luck – any ideas would be appreciated.
 *  [sdevine](https://wordpress.org/support/users/sdevine/)
 * (@sdevine)
 * [6 years, 3 months ago](https://wordpress.org/support/topic/ipn-3/#post-12413842)
 * Update:
    I think I got it. I have created a plugin with the code and it seems
   to be working. This way my code should be untouched when the wp-paypal plugin
   is updated.

Viewing 6 replies - 1 through 6 (of 6 total)

The topic ‘IPN’ is closed to new replies.

 * ![](https://ps.w.org/wp-paypal/assets/icon-128x128.png?rev=2722398)
 * [Payment Button for PayPal](https://wordpress.org/plugins/wp-paypal/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wp-paypal/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wp-paypal/)
 * [Active Topics](https://wordpress.org/support/plugin/wp-paypal/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wp-paypal/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wp-paypal/reviews/)

 * 6 replies
 * 3 participants
 * Last reply from: [sdevine](https://wordpress.org/support/users/sdevine/)
 * Last activity: [6 years, 3 months ago](https://wordpress.org/support/topic/ipn-3/#post-12413842)
 * Status: resolved