You are viewing the PayPal Community Archives. This content may be old or outdated. Leave the Archive
Chat with our moderator team every Wednesday between 1-2pm PT (4-5pm ET). Learn more in Community Events
I have a website where users are able to have free or premium access to content. I would like to sell 30 day and 90 day premium account upgrade to my customers using paypal. User would click the buy button, pay on paypal site and the account would be updated on my site automatically with IPN. The question is:
* Which paypal service would suite me best?
* Do I need to generate order id every time user sees a buy now button so I have something to pass to paypal? or should I send user id and item id and create order when IPN connects and purchase is made?
I would like to NOT reinvent the wheel...
Great question! I'm going to assume that the 30 or 90 day upgrade would be a one time payment and that there isn't any need for subscriptions or recurring payments.
For the easiest solution to setup, I would recommend using Website Payments Standard (more info can be found at www.paypal.com/standard
You already know about IPN which is also the best way for us to notify your servers about the payment. You are also correct that some sort of unique identifier would need to be generated so that you know which account is being upgraded. Documentation for IPN can be found here: https://www.x.com/docs/DOC-1084
You could use the "custom" or "item_number" variables to pass the unique identifier. That usually involves server side scripting to dynamically add something like <input type="hidden" name="custom" value="UNIQUE_VALUE"> for each customer.
The trickiest part of this entire setup would probably be the IPN listener script. Code examples to get you started can be found here: https://www.x.com/docs/DOC-1523
I hope this helps!