Administration ....
Administration of the application, such as creating product items and testing the IPN system, is all performed via a set of password protected web pages.
The following sections describe the main features of each page.
Site details page
This page is used to set up all the global settings for the application.
Your PayPal Email Address : This address must match the PayPal address that you use to login to PayPal. It is your registered PayPal address. It must be the PRIMARY PayPal email address, that is, if you have multiple email address registered on PayPal, you must use the one defined as primary.
Full URL of installation folder : Enter in the complete
url of the folder you installed the script in. Normally this will be a folder
called 'phpkeycodes' at the root of the web site, so the url will be http://www.yourservername.com/phpkeycodes/
Remember that Unix or Linux operating systems are case sensitive and you must enter the full URL.
Notify URL : This is displayed for information only, and is the url which PayPal IPN uses to post its data to.
Currency : Choose the currency for your products. All products will have the same currency.
Email subject : When an item is purchased, this line is the subject of the email.
Email text : When a key code is purchased, this line is the body text of the email.
The email has to send the key code details to the purchaser. To include these items in the email you should include something like the following :
Your key code is <key_codes>
The variable <key_codes> defined by < and > characters will be replaced with the information when the email is sent out and should be left as they are.
Your site admin email : This is an address which is used
as the 'from' address when an email is sent. You should enter a valid email
address. If you leave it blank, then the 'from' address of all emails sent out will
be the same as your PayPal Email Address.
The admin email address MUST have the same domain name as the domain that your site is
hosted on otherwise the customer may not receive their email.
Copy Email : A tick box which is used to identify if you wish the emails to be copied to yourself. This is useful for testing so that when an item is purchased you can see that everything is OK. The emails will also include the key codes which may be useful to have if a user is having problems.
Cancel URL : The full url address of a web page which the user will see if they cancel their attempt to purchase the item. If this is blank, then a standard page on the PayPal site will be displayed. It is an optional entry, but gives a better impression to a customer and would say something like 'You have cancelled your purchase'.
Note : we have found that the web page should be of .php and not .htm or .html
Return URL : The full url address of a web page which the user will see after they have completed their purchase. If this is blank, then a standard page on the PayPal site will be displayed. It is an optional entry, but gives a better impression to a customer and might say something like 'Thank your for your purchase, you will receive an email in a few minutes. If you do not, then contact us at ...'
Note : we have found that the web page should be of .php and not .htm or .html
Notify URL Sandbox : This is displayed for information only, and is the url of the script which the sandbox testing server will post to. Sandbox testing is described in the associated page testing.
Sandbox seller email address (optional) : The PayPal developer system has a Sandbox testing facility. Sandbox testing is described in the associated page testing. By entering an email address that you have created in the Sandbox, you can test purchases via the Sandbox rather than via the live PayPal system.
Graphic buttons
Choose a graphic button : Select which graphic button you wish to be displayed for all the items. Or you may enter the full url of another graphic image.
Product item page
PayPal Product item number : Enter in a suitable item code such as 'product01'
PayPal Product item name : A short description of the item.
PayPal Payment Gross : Value to two decimal places
Item title : Provides a title for the product.
Key codes / pins / licence keys / registration keys : Enter each code one line at a time.
Lower Limit : This defines the lower limit for the number of codes. When the lower limit is reached and email is sent to the administrator.
Transactions page
Lists all the completed transactions, those from PayPal and from the test facilities.
You may delete transactions from this list and that will remove the values from the sales totals page and also from the sales graph showing sales / month. This is use full if you are testing and have test transactions appearing in your sales totals.
IPN test page
There are two ipn tests which may be performed on a product item : local test and Sandbox test. See testing page.
-
Use my local test IPN page
To perform a local test go to the IPN test page and select the product you wish to test. This will take you to another page which displays all the input fields which must be filled out to run this test. Most of them are filled out automatically for you from the product information list. The only one entry that you have to enter in yourself is the payer email address. This should be a valid email address which acts as the purchaser.
The test by-passes the IPN system but does test all other elements of the application.
You may wish to test what happens when you change other entries on the page, such as the gross payment.
-
Use my test via the Sandbox.
Refer to the associated page testing for more information.
To perform a test using PayPal's developer system rather than the live PayPal system, go to the IPN test page and select the product you wish to test. This will take you to another page where there will be a buy now button for this product.
You need to login to the developer network before you actually do the test.
Pressing this button will take you to the PayPal developer site where you then continue as though it were a live sell.
In this system, the sandbox test only checks single item purchases and not cart purchases.
To use this test you must have set up an account at the PayPal developer site - http://developer.paypal.com
Email to all purchasers with a newsletter
Select email format as either HTML or plain text.
Enter in the subject line for the email.
Enter in the body text for the email.
Pressing Submit will send an email to each of the purchasers you have in the table saleshistory.
Email purchasers of a product with a newsletter
Choose the product from the list.
Select email format as either HTML or plain text.
Enter in the subject line for the email.
Enter in the body text for the email.
Pressing Submit will send an email to each of the purchasers of the selected product who are in the table saleshistory.
Send an order without a purchase
This display enables you to create a complementary sell, that is to sell an item to a customer but where the customer does not actually pay for the item.
Filling in the details will send an email to the given email address. The email will contain a key code as for normally purchased items.
Backup / restore
Backup and restore is easy.
Go to the backup page and press the start backup button. This will create a file that you can save to your local computer. This file consists of sql statements of the data. Note that it does not contain the sql statements representing the table structure.
To restore, go to the restore page and click on the import button to load the previously saved backup file. You must have already set up the tables using the install.php file because the restore process does not change the table structure. When you click on import, and all the data will be restored. Note that all data will be deleted from the existing tables, before the new data is restored.
Both processes may take a little time, so don't move away from the page until complete.
Display sales by date
The sales display enables selection of to / from dates to display the totals sales for the defined period. It calculates totals, but at the moment the total does not differentiate between currencies. If this proves to be a problem, I should be able to fix it, but I believe most users will only sell with one currency.
Administrator password
Change your admin user password and username.
You may want to add in user names and passwords directly into the database if you have the ability to do that.
However, remember that the password is stored in MD5 encrypted format within the database.
Passwords must only have characters a - z and 0 - 9 and must not be greater than 10 characters.
Usernames are restricted to a-z, 0-9, @ and full stop characters.

