PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

What can you do with PayPal IPN

  1. Bulletproof
    Member

    I just noticed you guys have a PayPal Add-On that supports IPN now.

    I was wondering what this does out of the box, what does it allow you to do without digging into code?

    I am looking to add licensing to some software and was considering using WordPress membership site to manage licenses. Would this assist in catching the PayPal IPN and creating an account or doing something to assist in this process?

    Posted 12 years ago on Wednesday November 2, 2011 | Permalink
  2. The PayPal add-on has always supported the IPN. Gravity Forms catches the payment notification sent by PayPal and updates the status of the transaction.

    Here are all the PayPal add-on hooks:
    http://www.gravityhelp.com/documentation/page/PayPal_Add-on_Developer_Docs

    You can use the gform_paypal_post_ipn to run whatever code you want when the IPN is received.

    Posted 12 years ago on Wednesday November 2, 2011 | Permalink
  3. Bulletproof
    Member

    Thanks Chris, I just messed around with it. Very slick, but it does look like you will need to code to do anything useful with it. I suspected that, but just wanted to check. I do like how you can make forms with your products and just have a developer link the actions. Saves a bit of time.

    Posted 12 years ago on Wednesday November 2, 2011 | Permalink
  4. The hooks and actions will all require a little bit of PHP code to implement. They are for more advanced uses, like the scenario you described. If you need help with any of the implementation, please let us know.

    Posted 12 years ago on Wednesday November 2, 2011 | Permalink
  5. markpixion
    Member

    Hi, I'd like to update an external status (in a seperate db table) and call some php functions when the transaction is completed. I've set up everything but it doesn't seem to work...

    I've got PayPal's sandbox mode enabled and after a placed order in the PayPal developer control panel the confirmation e-mails are shown, to I guess the installation is done right.

    The plugin I wrote that is supposed to handle the IPN calls doesnt't do anything. Also when I use the test tools (IPN simulator), no result is shown.

    Here's my code:

    add_action("gform_paypal_post_ipn", "px_DaPayPalComplete", 10, 4);
    function px_DaPayPalComplete($ipn_post, $entry, $config, $cancel){
    
    	mail('mark@domain.nl', 'paypal status', 'PayPal payment status confirmation');
    
    }

    Is there anything I'm doing wrong?

    Posted 12 years ago on Thursday December 15, 2011 | Permalink
  6. Hi Mark,

    Is the payment status of the entry you tested updated in the admin? If it says "Processing..." it has not.

    I'd jump in the core and add your mail test function right before where the "gform_paypal_post_ipn" hook is called in the code. It'd be good to determine if the code is making it to the hook or not.

    Posted 12 years ago on Thursday December 15, 2011 | Permalink
  7. markpixion
    Member

    Strangely enough the IPN is performed when I'm in live mode. When PayPal in Sandbox mode nothing happens, I won't get any mail.
    So after a few tests I'm a few bucks poorer on my personal account and a few (less :-( ) bucks richer on my business account.

    Posted 12 years ago on Friday December 16, 2011 | Permalink
  8. You can always refund the transactions without any fees. However, too many refunds and they'll freeze your account!

    Posted 12 years ago on Monday December 19, 2011 | Permalink