- Simplified Chinese
- Traditional Chinese
The Paypal Trial and Subscription script is a PHP Paypal Payment API which allows you to setup a paypal subscription service for an item you have for sale on your website that is “information” based and doesn’t require shipping e.g. tutorial videos, ebooks etc. It is flexible enough to allow you to set a trial price, a trial duration in “months” and a regular selling price and billing cycle thereafter.
The script follows a two stage process.
1. The User submits their details via the paypal_subscription.html page. The details are then processed via the register.php script and written to the “Users” table of the MySQL db. The Paypal form is submitted.
2. The ipn.php script processes the Paypal payment details and, if successful, redirects the user to a thank_you.html page and updates the “Users” table to reflect a successful payment by setting the ‘Paid’ field to 1 and writing the Paypal Transaction ID and registration date.
For the demo you will need a Paypal Sandbox Account. You can sign up for one at
You can then create a test personal account within the Sandbox which can be used to simulate a purchase.
Update (13/01/2011) – Version 1.5
Added login.php file to validate users who have completed a successful subscription transaction.
Added a template (welcome.php) which can be used to display protected content. This content can only be accessed by paid subscribers.
Amended paypal_subscription.html file to properly validate Username, password and email fields. Also renamed the file to paypal_subscription.php.
Update regarding the demo site – 11/04/2012
Please note: The demo site is currently offline. I am moving all my script material to a new domain but as I work full time now and long hours it is not easy to find the time to arrange this so please bear with me and my apologies for the inconvenience but I will get to it as soon as I can.
18 November 10
14 January 11
IE7, IE8, Safari
PHP 5.0 - 5.2, MySQL 5.x
HTML, CSS, PHP, Layered PSD