Friday 19 September 2008

Automatic Serial Number Generation and Order Fulfillment

So, I'm having emails arrive from Kagi notifying me that somebody has bought one of my products. At that point I fire-up my Serial Number generator software that I wrote, input the users name and click the button for the product they have purchased. This generates a serial number and email to the customer.

Their serial number is an encryption of their user name using a 16 digit key that is unique to each product. Encryption duties are handled by AES128.

So far so good. However if I take a few hours to respond this can be seen as less than ideal. The user has paid their money and they want their serial number - NOW. At least I would in their shoes. During the hours of sleep with the best will in the world I cannot get a serial to the user until morning, my morning, bearing in mind that my users are mainly from the states and in a different time zone.

I need to look at some kind of automated service. A web service to take a user name and respond with a serial number is the easy part, the difficulty is how do I restrict this to users who have actually purchased something ? Do I setup something with Kagi that gives the user a password that allows them a (one time only) access to the serial number web service, with a different password depending on the product they have purchased ? Do I capture the Kagi emails, scrape them for details and pass that through the serial number generator and send a response back that way ?

It's tricky but has obviously been solved many times before. What do you guys do ?

www.artenscience.co.uk
Honest Expert Independent Technology Advice for Business

3 comments:

Anonymous said...

I use my own home-grown service which is currently at the back end of Software-Monitor (no front end service available yet) to do this.

Basically the eCommerce provider makes the notification post in order to return the serial key generated by our web service.

I'm thinking about opening this up but I'm not keen on hosting third party keygens on my server unless I can sandbox them.

I assume you've got a PHP/Linux/MySQL host? Could you not code a PHP key generator or compile a C++ keygen and ask your host to host it? (You might have the same problem as I do re: sandboxing).

Steve Cholerton said...

Cheers Mike, I think the key is getting Kagi to send some sort of notification that I can parse and automatically respond to. Another job to do :-)

Anonymous said...

No probs Steve,

I've just taken a look at the Kagi website and it appears that order notifications aren't supported - or if they are, they're not advertised at all.

I know FastSpring, Plimus and iPortis can all be configured with order notifications.

I'm not sure this helps; but if you get the order notifications sent to an email address you can parse that for your order notifications. I've got a half-finished app to do that, but as I mentioned earlier - a lot of vendors now support POST'ing you the order.

Might be worth contacting the head honcho @ Kagi to see if this is something that they can do too.

Best,

Mike