Easy Digital Downloads API VB.net Class

Easy Digital Downloads Logo

Easy Digital Downloads Logo

I have just started using the Easy Digital Downloads Software Licensing WordPress Plugin to secure and distribute my .NET applications, as the system was primarily developed for WordPress plugins – I decided I would put together a .NET ‘wrapper’ to make it easier to implement into my projects. You can find the class and usage instructions below.

As always – if you have a suggestion on how to improve this, please leave your comments in the section below

For ease of use, and because I prefer it to the built-in functionality I have used the Json.NET component.

1. Download and add to your project Json.NET

2. Create a new class, insert the following: (Click here for an easy to copy/paste version of the code)

3. Then on your form/where you want to check/activate from:

Notes

If you get any unusual responses, make sure you check the URL in a browser – http:///?edd_action=activate_license&item_name=&license=

To do 

  • Replace the message boxes with the code you wish to process depending on the outcome.
  • It may be worth storing the entered serial number in a user setting, so you can periodically check it’s still valid

Improvements
Given the opportunity I plan on doing the following tasks, until then – the module is working..

  • Replace the first for loop with a direct access of the license value – during testing I was unable to work around an error “Cannot access child value on Newtonsoft.Json.Linq.JValue” until I have resolved this I have chosen to use a select case 
  • Implement the ‘get_version’ functionality of EDD

Mike Hudson

Mike Hudson is a Infrastructure Analyst living and working in Kingston Upon Hull. With extensive experience in Microsoft and Apple technologies, ranging from desktop OS’s to Server OS’s and hardware. By day working as part of an infrastructure team, and by night ridding the world of IT issues through blog posts..

%d bloggers like this: