After a successful purchase the key code is extracted from the database.
First, the number of key codes is calculated and checked against the lower limit. If the number of key codes has reached the lower limit, then an email is sent to the site administrator. The top key code is extracted and the remainder saved to the database.
The functionality is provided by three functions which could be modified if there is a requirement to extract the key codes from a different location or to provide a key code calculated from other details.
It could be possible to create a pin based on the purchaser's name for example.
The three functions are :
The files /keycodes/keycodes_paypal.php provide the above functionality.
The number of key codes that are sent out with each purchase is set to 1. This can be changed in /ipncommon/com_ipnfunctions.php at around line 422. Change the number of key codes to retrieved to what you require.