Creating and activating a license using an ASP.NET script on product purchase?
I'm developing an ASP.NET application that receives data from a webhook when a customer purchases one of our licensed products from our custom storefront, and I'm not entirely clear of the process or flow of how to implement this, based off the API information available here: https://support.soraco.co/hc/en-us/sections/201720373-License-Server-Management-API
If I understand correctly, I should extract the QLMLicenseLib.dll file from QuickLicenseManager, add this to the ASP.NET application, then make a call to QlmLicense.CreateActivationKey (https://support.soraco.co/hc/en-us/articles/207606883-QlmLicense-CreateActivationKey) to generate a license, then make an HTTP call to ActivateKey https://support.soraco.co/hc/en-us/articles/207292176-ActivateKey to make this license active?
Is this approximately correct, or am I missing something?
-
Official comment
Hi Luke
AddUser, AddUserEx and AddUserEx2 are evaluations of our APIS throughout the years. To retain backward compatibility, we always introduce new methods and leave the old ones untouched. You can use any of the 3 methods but I would recommend the latest, i.e. AddUserEx2.
Note that you can pass an empty email address and the license will not be associated to a user but it's obviously better to call AddUserEx2 first and then call CreateActivationKey...
Yes, you can call these methods from the server.
Regards
John
Comment actions -
Hi Luke
I would suggest that you call QlmLicense.CreateActivationKeyWithExpiryDateEx7 to create the Activation Key. The license key creation should ideally be done from your server rather than from the application.
To activate the key, you would call QlmLicense.ActivateLicense from your application.
Regards
John
-
Hi John,
Thank you for the reply! Based on what I can see, it looks like a user is required to exist before the activation key can be created, as it (obviously) needs to be tied to a user. I see there is QlmLicense.AddUser, AddUserEx, & AddUserEx2. What is the difference between these three methods?
Also, these are listed under the License Server Application API. I presume I can call them from our server however?
Regards,
Luke.
-
Thanks for your help so far John.
We're developing this serverside application in ASP.NET Core 2.1, and just running it now, we see that QlmLicenseLib seems to need .NET 4, specifically it's targeting System.Web.Services 4. Is there anyway to make QlmLicenseLib work under an ASP.NET Core environment? It's rather critical we get this running.
Regards,
Luke.
Please sign in to leave a comment.
Comments
5 comments