IPN Forwarding

Issue #2 closed
Drew Angell repo owner created an issue

Need to build in the option to setup IPN forwarders so that the IPN data can be sent to additional IPN listeners.

I wrote an article about this years ago (http://go.developer.ebay.com/content/daisy-chaining-ipns) if you need a review of what this is.

These guys have done a pretty good job of it in their plugin: http://www.sonicipn.com/ We'll basically be adding this same functionality into our plugin.

Comments (24)

  1. jignesh kaila

    Okay Andrew, I will start working on IPN forwarding ticket. I will research on it and let you know if any.

  2. Drew Angell reporter

    You probably don't need to read that article I mentioned. Just review that Sonic IPN plugin. That is exactly what we'll be doing here, except we're just doing it with PayPal.

  3. Drew Angell reporter

    Actually, I just watched that Sonic IPN video again myself, and that's more advanced than what I'm looking for here.

    All we need to do here is allow people to create forwarders for the IPN data. If I'm using this plugin, I would set my PayPal IPN settings to use this primary IPN URL, but then if I also want to have that data sent to http://www.some-other-domain.com/ipn.php I could set that up in the plugin and it would simply POST the same IPN data that PayPal sent here to that other URL.

    Users could setup any number of IPN forwarders and enable/disable them individually. When the IPN data hits our plugin it would POST the data to each of the other URL's that are setup as forwarders.

    We don't need to get any more complicated than that at this point. Sorry for the confusion.

  4. jignesh kaila

    I have few clarification from your end: - I will create new setting interface from admin side so user can set the forwarding URL is it fine? - I have reviewed SonicIPN plugin as you have suggested There plugin three IPNs forwarding method (Click Bank, Paypal and JVZoo) In our plugin will implement only for Paypal is it right? - Also SonicIpn plugin provide product name, number wise IPN forwarding Do you need it?

    if you need any specification related to IPN forwarding functionality (Do you need to set IPN forwarding based on txt_type or payment_status?) please let me know OR Can I start create same interface as SonicIpn plugin have?

    Please let me know your thoughts or suggestions for the same.

  5. jignesh kaila

    Today I have added "PayPal IPN settings" sub menu under the settings tab from admin side. Also I have continue working on admin interface finalization for IPN forwarding functionality. And I have reviewed your template code so based on that will start develop the IPN forwarding script.

    I have created new branch for "issue-2" and pull from development branch from our local server.

  6. Drew Angell reporter

    Sounds good. So again, for now we can just keep this very simple and allow people to enter URL's for IPN data to be forwarded to. In the future we may go ahead and allow them to setup forwarders based on txn_type or things like that, but for now just a general forward to any URL's they have setup as forwarders.

  7. jignesh kaila

    I am working on this ticket and it almost 50% done, Once I am done with this ticket let you know for your review.

  8. jignesh kaila

    I am done with this ticket and push to Issue-2 branch for you review. please review it and let me know if any.

  9. Drew Angell reporter

    One thing I just noticed here is that the IPN that gets forwarded is not verifying correctly with PayPal's server so it's coming out as Invalid. I think this must have to do with the order of the fields. Did you make sure that the forwarding URL's get the same exact string that the primary URL gets, in the same order and everything?

    If you look at the sample script on my daisy chain tutorial you'll see I'm generating just the IPN string in $req (prior to adding the cmd parameter) and that's what gets forwarded to the other URL's. I never had any issues with invalid IPN's at the forwarding URL's following that process. I'm curious if maybe what you're forwarding is already including the cmd parameter..??

  10. Drew Angell reporter

    Something else is odd here, too. I didn't notice it at first, but when I'm running from the development branch on my server I have everything we've done up to this point, as expected.

    So then I do "git checkout -b Issue-2" to create my local issue 2 branch. Then I run "git merge origin/Issue-2" and I'm seeing lots of changes to files that didn't have anything to do with this issue. For example, the activator and deactivator classes now have duplicate comments at the top...

    /**
     * Fired during plugin activation
     *
     * @link       http://example.com
     * @since      1.0.0
     *
     * @package    paypal-ipn-for-wordpress
     * @subpackage paypal-ipn-for-wordpress/includes
     */
    
    /**
     * Fired during plugin activation.
     *
     * This class defines all code necessary to run during the plugin's activation.
     *
     * @since      1.0.0
     * @package    paypal-ipn-for-wordpress
     * @subpackage paypal-ipn-for-wordpress/includes
     * @author     Jignesh Kaila <jignesh@multidots.in>
     */
    

    Also, after merging and running this new branch from my server, I'm losing the read only stuff we did in #13.

  11. Drew Angell reporter

    I also tried a basic "git checkout Issue-2" to pull the branch directly instead of merging, but I'm getting the same result.

  12. jignesh kaila

    Please check my inline below comments:

    IPN that gets forwarded is not verifying correctly with PayPal's server so it's coming out as Invalid. [OK, I will check and resolve this issue.]

    The activator and deactivator classes now have duplicate comments at the top. [Actually it is my mistake during first "initial plugin setup" commit . https://bitbucket.org/angelleye/paypal-ipn-for-wordpress/src/5e793a4e3b1f/includes/class-paypal-ipn-for-wordpress-activator.php I will make sure for the all the class file ]

    Also I want to let you know one more thing, before few day ago I was used different editor so "Trailing spaces issue" are there in our development branch. so I have remove trailing spaces in "Issue-2" branch that why you get no. of file changes.

  13. Drew Angell reporter

    I just sent an IPN Simulator to one of my other IPN listeners that are already setup. It actually came back invalid there directly, so we may not have an issue with that after all. All my live IPN's are validating just fine, so I may need to make an adjustment in my own stuff that I wasn't aware of for the sandbox. If you can go ahead and confirm (if you didn't already) that your forwarded IPN's are validating that should be enough for now, thanks.

  14. Drew Angell reporter

    What you mentioned about trailing spaces and that being the reason I'm seeing so many file changes makes sense, however, I want to make sure that we don't end up with duplicate comments like we seem to have now.

    Also, still curious why I'm losing our #13 changes in this branch, even when merging into my local development branch which does include those changes. This merge seems to revert back to before we did that.

  15. jignesh kaila

    I am also curious to see issue-13 branch code is not available in issue-2 branch. I get pull from development before start worked on issue-2 but some how it not merged. but now i get pull from development branch to issue-2 and push latest code. now everything is fine for me please check it and let me know for the same.

  16. Drew Angell reporter

    Now everything is looking good except that I'm still seeing duplicate comments at the top of lots of these files now. Looks like it's pretty much all of the original class files that came with the plugin template. Not sure if you did some sort of a find/replace or what happened there..??

    Not a big deal technically, of course, but not as clean as I'd like. Looks like maybe you did something to add the @author tag to each of the classes, but it wound up replicating that entire section instead of replacing it..??

    All of the classes in the /includes have it except for the ones you created yourself (helper and ipn-forwarder).

  17. Log in to comment