Question

I have a question for those of you who have dealt with retailers in developing consumer facing apps.

I am writing an application for my grandma's bakery. I want people to write some comments/messages on her website and if they do so, then I want to generate a barcode or promo code or whatever so they can get 1 free cupcake at the bakery.

I have the site setup now to the point where I can send an email to people who logged in and wrote a comment. What is the best way to have a secure promo code/barcode so that it will only be used once? Basically, I want to generate some promo code or barcode that is one use only and it needs to be something that can either be understood by my grandma's barcode scanner. I thought about making it so she can check the promo code on my website, but internet is very spotty in her store and so it is not clear if that will work.

What is the best way to go about doing this? I guess this is mainly a security question, so I figured stack overflow would be able to help me out.

Thanks in advance!

Was it helpful?

Solution

A barcode cannot be one use without some kind of database to check up against. A barcode is scanned and it has a literal value, it does not store how many times it has been used previously.

You need some kind of software in place to log the use of a barcode, and store that information and then check each new barcode scanned against your database of used barcodes.

This does not mean she has to have an internet connection. You can generate the barcode and then prevent it's use by storing and updating the database locally.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top