Skip to main content

Possible to Create a Custom Serial Number?

11 years 5 months ago #204194 by MSTACE
I have a software package that I wrote that is downloadable from a website.
I was using a VirtueMart hack to create an md5 Hash that was turned into a Serial # which could then be entered into the program to licence it.

The output looks something like this:
Joe Smith
4E01-D731-2A87-FA89-FA12-D188-0429-B890-00
I have attached a screenshot of the licensing screen that is in the software package so you get the idea.


The PHP code in VirtueMart is similar to:
Code:
$secret = "supersecretvalue"; $demo = "00"; $demo = strtoupper($demo); // make $demo UPPERCASE $h = md5( $this->orderdetails['details']['BT']->cust_name . $secret ); // generate hash $h = strtoupper($h); // make hash UPPERCASE $h = chunk_split($h,4,"-"); // add hyphens after every 4th character $h = $h . $demo; // add demo to end of the license

A version of this is also inside the software package in order to validate the hash.

Would I be able to do something like this in HikaSerial?
I use HikaShop exclusively now and would like to revamp my own site to use HikaShop.

Thank you.

Please Log in or Create an account to join the conversation.

11 years 5 months ago #204211 by Jerome
Hi,

Yes, it is for sure possible because it's one of the main goals of HikaSerial.
By creating a custom plugin for HikaSerial, you will be able to have your own generator that you will be able to use for your packs/products.

As you can see in the developer documentation, when a serial is generated, you have access to the entire HikaShop order so you can use the customer name in your algorithm.
www.hikashop.com/support/documentation/1...tml#generator_plugin

Regards,

Jerome - Obsidev.com
HikaMarket & HikaSerial developer / HikaShop core dev team.

Please Log in or Create an account to join the conversation.

Moderators: Obsidev
Time to create page: 0.047 seconds
Powered by Kunena Forum