Hi guys,

We've been using the module on a site for a little over a month now and all great so far.....

Today we had some suspected fraudulent behaviour on the site and this has raised some questions.


Revoke

We would like to remove license from a users account, i ticket on 'revoke' and clicked update licenses, but the license still appears in the user account.So.
- How do i remove licenses from a users account?
- The del? Column in the users account is greyed out/missing button?
- Is revoke the way to do this? Or is revoke designed as a flag that would be used if we were using this license data and using our site as a license server as well?
- We are just selling licenses, so I need some way to disassociate/remove license keys from user accounts.


Act

- what does 'Act' do???

Thanks again for the hard work, would love to find out regarding the about, I'm sure Freixas will be along soon :-)

Comments

hixster’s picture

Er , I see that 'Enc' is Encrypt, and i'm guessing 'Act' is activate?

freixas’s picture

Assigned: Unassigned » freixas

Hi,

You are correct about "Act". I'd have to look at the code to be sure, but I think it's the number of activations associated with this license.

The uc_product_licenses module is an interface to licensing code. It does not activate anything—it provides a way for activation code to store data in the Activation field. Same for Revoke. Revoking a license just sets a flag. It's up to you to write some Drupal code to do something with this flag. If your software only activates during installation, then revoking the software can only prevent the software from being re-installed with that product key. If your software calls home every so often, revoking could disable the program on the next check. If it doesn't do any of this, you are out of luck.

You don't need to do any of this with uc_product_keys. If you use some commercial licensing tool that provides a server for activation and has some way of getting a license revoked, then you can integrate it with uc_product_keys (if the licensing tool allows this—if activation is hard-wired to their servers, there's not much you can do) or use their scheme. The activate/revoke features of uc_product_keys don't serve any useful purpose if they are not integrated.

Hope this is clear.

hixster’s picture

Thanks Freixas, that clears things up.

Just one thing then, how can we de-associate a license from a user account?
For example if their payment fails (at a much later stage)
We obviously have to resolve the license issue with our 3rd party license provider (and authenticator), as the license has already been sent via email - but I need a way to put the license back into the license pool in drupal and remove it from the user account.

If I delete a user does the license get released back into the pool?
What if a user buys 3 separate licenses as seperate orders,and we have a payment failure on one. I'd like to be able to remove the license associated with the failed order.

Many thanks

freixas’s picture

You don't ever disassociate the product key from the user account. Why not? Once the user has the product key, it's over. You are never going to get than genie back in the bottle. The user can write down the product key on a piece of paper. Or they can refer to the email they receive when the product key is issued. I can't see any way of un-issuing a product key.

If you delete the user, the product key will not be "freed". If you delete the order, the product key will not be "freed". If you try to upload the product key, you should get an error.

This is all by design. I don't see how the 3rd party license provider could help you out. If you find a way, please let me know.

You can invalidate a key (with the right programming), but that won't get you the key back. That key will have to stay invalid.

As for the example for when the payment fails: you should only issue the license when you are certain you have been paid. uc_product_keys ensures that the license is issued only if the order is marked "Completed". You shouldn't mark the order Completed until you are paid. There are all sorts of funny payment system modules, so there's a hook you can use if the algorithm for determining when the payment is made is more complicated. There's a sub-module for PayPal you can view as an example (plus check the documentation).

hixster’s picture

So, a situation has arisen where we need to remove a key. Our client completed a sale manually as the customers card failed. He then manually emailed the key to the customer. I now need to remove the key from the license pool so that it cannot be sold to another customer.

How would I got about doing this? Could I delete the record for the key in the UC_Product_keys table?
Would there be any disastrous consequences when doing this?

I tried checking 'Del?' in the admin interface and then updating keys, but this didn't do anything.

freixas’s picture

I'm not sure what the problem is. I just tried deleting an uploaded key and it worked fine. I received a delete confirmation and said OK and the key was deleted.

Please try this again. If you still cannot delete the key, file a new bug report. Provide as much detail as you can. Perhaps the key was assigned to the user but never issued because of the payment failure? If so, the Del? checkbox shouldn't be there and there should be an order for this customer.

hixster’s picture

o.k. I've started a new issue queue here: http://drupal.org/node/1116892

freixas’s picture

Status: Active » Closed (won't fix)

Closed due to no activity in over 2 weeks.