Thanks for the module. Working great for me. I have not implemented a product activation service as I do not even know where to start. I know I have to implement some web code of my own. I was hoping you have some suggestions for how to get started or some other reference sites.
Comments
Comment #1
cmcintosh commentedI would bet on doing it using the services api, you could build a custom services call that would be able to handle authorization of keys. Not sure why this is not a part of the module already.
Comment #2
freixas commented@ggaar - It's hard to help you without more details about your licensing solution. Are you using a commercial licensing product or are you creating your own product keys? Have you looked at the sample package uc_product_key_sample?
@cmcintosh - I suppose a services API call would work, but I don't see the benefit.
If you want/need to write your own activation code, you can write it however you want. The sample module simply adds a path for activation. The software makes a HTTP POST request to this path, passing whatever data it needs to pass for product activation. This is usually not the product key, but a special value formed from the product key and perhaps some hardware info. The server activation codes reads the POST value, does whatever it needs to do to validate it and returns either some activation value or an error message. The software reads the HTTP response and either stores the activation value somewhere or tells the user that the product key he entered is not valid.
It appears to me that the services API would just add complexity and another module to slow down your Drupal system. All the software needs to do is to implement a single HTTP request. All the server needs to do is to add a path to hook_menu() to handle the HTTP call.
Comment #3
freixas commentedI should follow up on my comment about the services API.
uc_product_keys allows you to integrate your licensing scheme into Ubercart. It does not generate product keys (although it provides a hook to give you the chance to generate them) nor does it activate them (although it provides an API that lets you set an activation flag and a revoke flag, for convenience—it does not do anything with these values except store them in the database and display them).
Consider a store that sells two (or three or n) different kinds of product keys. If you want Drupal to act as the activation server, you might want to use a different path for each kind of product key. Or maybe the activation code is the same for all products, but you want each type of product to activate using a different path because it makes it easier to track. Or whatever.
uc_product_keys does not presume to understand your licensing/activation needs. It just provides code that helps you sell your product keys using Ubercart.
Comment #4
cmcintosh commentedRight you would need to write a custom Services API callback function for your activation needs was what I was getting at, the other benefit of using services api for the activation server would mean that you could use any of the existing Servers (XML, AMFPHP, JSON, etc) to handle activations from within programs. Something like a lot of places like adobe offer.
Comment #5
freixas commentedClosed due to no activity in over 2 weeks.