January 30th, 2007

How to integrate PayPal subscriptions with PHP

With my link checking tool I just created, people can use it for free, but they have a limited number of links that they can track. Paid users have more options, and can track more links. So, I needed to be able to use PayPal subscriptions, and I didn't want to have to manually initiate and track them. PayPal publishes their APIs, but I also didn't want to spend days building a PHP class to interface with those APIs! So I did a quick Google search, and was able to find an open source PayPal IPN class. The class was perfect, it allowed me to create and handle subscription info passed from PayPal. Now I can track when users sign up, when the pay, and even when they cancel!

Share

7 Responses to ' How to integrate PayPal subscriptions with PHP '

Subscribe to comments with RSS or TrackBack to ' How to integrate PayPal subscriptions with PHP '.

  1. Oleg said,

    on September 2nd, 2007 at 10:10 am

    Fantastic. Just what I was looking for. Thanks

  2. Sudhir Bastakoti said,

    on September 3rd, 2007 at 9:28 pm

    the PayPalIPN class does not provide any code for subscription. So would you please help me with the subscription code.

  3. Justin Cook said,

    on September 4th, 2007 at 9:24 am

    Yes it does. You just need to use the proper form elements.

  4. azzam said,

    on October 4th, 2007 at 4:34 am

    It would be nice if it was explained how to use this in conjunction with the URL that is created using your paypal subscription link creator. Would you be able to give us a basis guideline.

  5. Justin Cook said,

    on October 4th, 2007 at 6:26 pm

    It's not used with the link. The link creator tool I made is purely for use with Paypal directly. This class is used to interface your app with paypal, to do transactions from your webapp.

  6. Ralf Strehle said,

    on August 2nd, 2009 at 3:24 am

    The class is very good, but you still need to look up the right paypal parameters and IPN codes in the paypal docs to use it.
    If you need to separate trail period payments from regular payments, handle cancellations and end-of-term IPN correctly, you will need to extend the class considerably. But it is the best starting point for this I can think of.

  7. Jhon said,

    on July 31st, 2011 at 4:52 am

    Cook Rocks

Leave a reply

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word