Project: PHP download file script using PayPal IPN
Technologies: PHP, mySQL Database, PayPal IPN
Cost: $49 USD
Selling products online has become super easy thanks to PayPal. It seems everyone has a PayPal account nowadays because we all shop on eBay or buy products online. You too can take advantage of PayPal for selling your own online products – such as e-books, zip file packages and other downloads.
I created a download script using PHP to allow customers to click a link or Buy Now button and get directed to PayPal to collect their payment information. There’s a number of ways to use this system – it’s all about sending the right information to PayPal. Information such as:
- Product Name
- Product Price
- Item Qty
- PayPal IPN URL
- Custom Value
I’ll explain the magic that’s going on behind the scenes. PayPal has a tool called Instant Payment Notification (IPN). The way IPN works, is once a customer successfully pays for an item thru PayPal – PayPal’s IPN sends a signal to your website telling it that the customer has paid.
Once your website knows the customer has paid, the PHP download script will send an email to your customer with a special time sensitive link to download the product they just purchased. This download link is encrypted with some special information, and each time it’s clicked – your website will allow the customer to download the file. The link is only valid for 3 days, then no more downloads will be allowed from the link. Also, each time the link is clicked, it will be tracked in the database.
I find using PayPal’s IPN technology extremely easy to use. I’ll gladly set up this download script for $25 if you buy one – otherwise I have included instructions for you to set it up on your own. If you have questions about customizing this PHP download script, please contact me.


August 16th, 2009
Custom-Coding
Posted in 










