Support » Plugin: PayPal IPN for WordPress » Basic hook content to show response

  • Resolved ionian


    Basically I just want to know what is the simplest bit of code I can add to the hook to show it is being fired.

    I have looked in the IPN logs on Paypal and in my own SSL server logs and it look like things are working.

    Just that the hook doesn’t seem to be firing.

    function jj_paypal(){
    echo “*************** TRANSACTION COMPLETE *********************”;
    add_action( ‘paypal_ipn_for_wordpress_ipn_response_handler’, ‘jj_paypal’);

    Any help would be appreciated.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor angelleye


    These hooks won’t be firing within a browser, so echoing to the screen isn’t going to help. Instead, you should send yourself a basic email. For example, this would send you an email with a dump of the data for every IPN that hits the system.

    function paypal_ipn_for_wordpress_ipn_response_handler($posted)
        $to = '';
        $subject = 'Email from PayPal IPN';
        $message = 'The IPN was hit';
        $message .= "\n" . print_r($posted,true);
        wp_mail( $to, $subject, $message );
    add_action('paypal_ipn_for_wordpress_ipn_response_handler', 'paypal_ipn_for_wordpress_ipn_response_handler', 10, 1);

    Ah right,
    So to get the details printed to the auto return screen I would save them first in a database and then retrieve them to show user. Creating my self a record of the transaction in the process.

    Thank you


    I did notice that your add action section the first an second parts are the same. Will this not cause problems?
    add_action(‘paypal_ipn_for_wordpress_ipn_response_handler’, ‘paypal_ipn_for_wordpress_ipn_response_handler’, 10, 1);

    Hi, I mustn’t be getting sent to data because it looks like the ‘paypal_ipn_for_wordpress_ipn_response_handler’ isn’t being run.

    I ran the email sender in another hook and it worked for that.




    @ionian No, it will not, but If you like to change the function name, you can. Just make sure you handout the function to this hook and everything will work as expected.

    We would love to know what you think of our product and customer support. If you have a moment to [ leave a review ] it would be greatly appreciated.


    My IPN history says that they have been sent but there is nothing in the plugin log (located in the uploads folder.)

    I have checked that the IPN url (taken from plugin page) is correct.

    Out of ideas just now but will go through this again from the beginning.
    Thanks for the comments

    When I look at one of the items in the IPN history it gives notification URL has

    Is this correct?

    I see that the button is set as having
    <input type=”hidden” name=”notify_url” value=””&gt;

    Should this be

    Thank you

    Plugin Contributor angelleye


    Yes, if you are using notify_url in the button you would need to change that to the URL our plugin provides. Alternatively, you could remove that parameter from the button altogether and it would then fall back to the URL you have set in the PayPal account profile.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Basic hook content to show response’ is closed to new replies.