• Resolved Rick Hellewell

    (@rhellewellgmailcom)


    I need to run some code (to store payment data in a table) after the payment is completed at PayPal. This code is unique to the site; I have other-site PayPal buttons on my PayPal account.

    On payment completion or cancel, user should be returned to the ‘payment complete’ or ‘order cancelled’ page on my site. That ‘post’ should include all payment details – my own customized ‘paypal-listener’ page. I need to see all of the $_POST variables that is returned from the PayPal page.

    Note that I have PayPal buttons for other sites, so need to specify the paypal-listener page for this site, so specifying a ‘return URL’ on the PayPal account won’t work.

    Thanks…Rick…

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author Scott Paterson

    (@scottpaterson)

    Hi Rick,

    I would recommend using a PayPal IPN listener. If the code is on the page directly, and it is triggered only be the user returning to your site that can cause problems as the user may close the window after payment or go to another site before the redirect happens.

    With an IPN listener your code can run on the back end without the user needing to be on certain page. The free version of the plugin does not contain an IPN listener, so you would need to completely code that yourself. The pro version of this plugin does contain an IPN listener. The pro version could easily be modified to collect all POST variables and run your custom code.

    Thanks,
    Scott

    @scottpaterson, is this functionality documented for free version?

    Thread Starter Rick Hellewell

    (@rhellewellgmailcom)

    Just a reply to Scott’s answer to my question (from several months ago)….using IPN Listener is the way to go to ensure that you get complete order info. A bit complex to set up, but the advantage is that you can design anything you want to happen, including sending customized order confirmation emails.

    So, IMHO, worth the effort to develop your own IPN listener.

    Plugin Author Scott Paterson

    (@scottpaterson)

    Hi @piotreba

    The free version does not have IPN code built in.

    Thanks,
    Scott

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Run Code after PayPal return’ is closed to new replies.