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

    (@angelleye)

    In your WordPress admin panel you will find PayPal IPNs on the left. Click into that to see the list of all the IPNs that have hit your site.

    Click into an individual IPN record and you will see two sections: PayPal IPN Fields and Hook Function Snippet.

    Click to view the Hook Function Snippet and that is where you will find the PHP code template you can use to hook into that particular IPN type.

    I’m going to close this ticket, but let me know if you’re still unable to find it.

    Thread Starter Gone Fishin

    (@terryg-1)

    In PayPal IPN, there are no IPNs that have hit my site: “No PayPal IPN found”

    This is a fresh install. Why would I have IPNs hitting my site before I have the back-end set up to properly handle them?

    Plugin Contributor angelleye

    (@angelleye)

    Ok, well, you wouldn’t. You’ll need to configure IPN in the PayPal account to send IPNs to the URL the plugin provides. Then the data would get saved and you would see the IPN hook template in there.

    Our developer guide covers the basic format of the IPN hook template, so you could look at that and just build it based on that if you want to. The difference would be the code snippet provided in each IPN you get would have all of the params for that individual IPN type ready to go.

    You could just make a single hook template that prepares every single IPN param that could possibly be sent regardless of the type and then use that for every hook you build.

    Thread Starter Gone Fishin

    (@terryg-1)

    So, the Hook Template isn’t available until there are IPNs that have already been handled. Okay.

    Would it be possible in future versions to just also simply provide a Catch-All Hook Template in a text file with the sources? Or, perhaps a text-based version in the documentation that allows for copy/paste?

    That would be really handy.

    Thank you.

    Plugin Contributor angelleye

    (@angelleye)

    Yes, I agree. I’ll make the snippet shown in the docs a text version instead of a screenshot.

    Keep in mind you can use the IPN Simulator that PayPal provides to send sample IPNs to your system so that you could then grab the hook template specific to that IPN type. The Simulator doesn’t provide IPNs for all types, unfortunately, but you could even run transactions in the sandbox to generate those IPNs so you could see them, too.

    Again, though, I will definitely get the documentation updated to included a text snippet so you can copy/paste from there.

    If you have a specific IPN type you’d like the hook template for right now I could probably pull it out of my test server, which has loads of IPN types in it.

    Plugin Contributor angelleye

    (@angelleye)

    I updated the documentation so it now has a text sample of the hook template for a cart IPN type, which wouldn’t cover every single param for all IPN types, but it covers most.

    Thread Starter Gone Fishin

    (@terryg-1)

    That’s great, Andrew.

    Thank you!

    And, thanks for that handy tip about the PayPal IPN Simulator.

    Plugin Contributor angelleye

    (@angelleye)

    Happy to help! ??

    If you have a moment to leave a review for the plugin that would be greatly appreciated.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Where is the Hook Function Template?’ is closed to new replies.