Ability to work with license keys

2 replies [Last post]
Dean
User offline. Last seen 33 weeks 2 days ago. Offline
Joined: 01/16/2010

 An example would be that the store owner has .exe files zipped up and in order for the customer to  install the product they need to purchase a license key.

Example, customer pruchases a product, once payment is received the system will send out an email and also store the license key in the current orders.

when ever a payment is received the system will automatically assign a user a license key which cannot be re-used. all new orders throughout your still will be assigned to a new license key and so forth.

The admin would have the ability to upload lists of license keys and assign them to a product.

Suggestions ?

wildkatana
User is online Online
Joined: 06/03/2009
Dean, I think this would be

Dean,
I think this would be better served as a separate module from File Downloads Suite. My modules provide hooks that you could use to send the license key to the user from a list that you have created. It would be simple to make. Here is an example:


// Implementation of hook_process_ipn()
function yourmodule_process_ipn($type, $ipn, $customVars) {
if ($type == 'paypal file') {
if ($customVars['uid']) {
$account = user_load($customVars['uid']);
}
else {
$account = user_load(array('mail' => $customVars['mail']));
}
// Retrieve your code from your database,
// or however you have it stored, and send it in an email
// Then mark that license key as being used
}
}

That is the hook function you would need. Now you would just need to make a database table to store your license keys, and a page where you can enter new keys, and you are done!

Good Luck!

Sincerely,
Leighton Whiting

pablogy
User offline. Last seen 5 days 16 hours ago. Offline
Joined: 02/01/2010
Adding feature to MS

Is it possible to impliment this feature in MS modules for those of us who are not able to do this.

I like the idea of sending a key for product sold.