Sell software licence codes with PayPal ....
Use this application on a web site that supports PHP / mySQL to sell software licence codes, key codes or pin numbers using the PayPal IPN system with single purchase buy now buttons.
PHP-KeyCodes provides the checking of the completed transaction from PayPal before the codes are sent out to the purchaser by email.
After successful purchase, the top key code is extracted and automatically sent to the customer by email with out any intervention by yourself.
The application does not create the pin numbers themselves although there are a set of php functions which can be modified to do your own custom processing, for example, create a pin code based on the customer name.
The customer does not have to have a PayPal account to purchase an item but can use any Credit Card supported by PayPal. PayPal then becomes just a payment gateway for the credit card.
Main features
- Interacts with PayPal's IPN system to monitor when a payment is complete.
- Automatically generates an email with the keycodes.
- Codes are stored in a table in the database for each product and are extracted when purchased.
- Used codes are removed from the database and when a minimum number is reached an email is sent to the site administrator.
- The buy now button code is displayed in the admin section for copying onto your web site.
- Includes a test page to check the basic operation of the scripts.
- Incorporates testing via the PayPal Sandbox test environment so that the complete system, including IPN can be tested.
- Includes a facility to send a complementary sell to a customer.
- Written in PHP and requires mySQL.
- All credit card transactions are handled by PayPal.
Paypal security
There are a number of checks in the script to ensure that the data received from PayPal has not been modified.
- The script checks the PayPal transaction id in the database to make sure that it has not been previously used.
- The cost/currency of the item is checked against the database to make sure that it has not been changed.
- The receiver email address is checked to make sure that it is your primary PayPal receiver email address.
Email customers via newsletter
The email functions can be used to send out newsletters to all or specific customers.
- Email all customers who have purchased any item.
- Email all customers who have purchased a particular item.
Installation and requirements
- PHP version PHP 4.1.0 or higher (including PHP5)
- Apache web server
- mySQL database version 3.23 or higher
- Recommended Linux or FreeBSD operating system but will work on Windows operating system
- A Paypal Business or Premium account - sign up here.
- Email functionality on the web server so that the PHP scripts can send out emails to customers.
- If you are looking for a suitable host for you site, I would recommend the basic web hosting plan from LunarPages which has all the required features for this application.
It uses only 'standard' php, does not require any extra php modules, it should not need any changes to the .ini file and it requires only minor modifications to file folder permissions.

