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.