生成一个仅使用条形码和与零售商打交道?
我有一个问题想问那些在开发面向消费者的应用程序时与零售商打交道的人。
我正在为我奶奶的面包店写一份应用程序。我希望人们在她的网站上写一些评论/消息,如果他们这样做,那么我想生成一个条形码或促销代码或其他任何内容,这样他们就可以在面包店获得 1 个免费纸杯蛋糕。
我现在已经完成了网站设置,可以向登录并发表评论的人发送电子邮件。拥有安全促销代码/条形码以便仅使用一次的最佳方法是什么?基本上,我想生成一些仅供一次性使用的促销代码或条形码,并且它需要是我奶奶的条形码扫描仪可以理解的东西。我想过这样做,这样她就可以在我的网站上查看促销代码,但她商店里的互联网非常不稳定,所以不清楚这是否可行。
这样做的最佳方法是什么?我想这主要是一个安全问题,所以我认为堆栈溢出能够帮助我解决这个问题。
提前致谢!
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!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果没有某种数据库进行检查,条形码就不能被一次性使用。条形码被扫描后具有文字值,但不存储之前使用过的次数。
您需要某种软件来记录条形码的使用情况,并存储该信息,然后根据已用条形码数据库检查扫描的每个新条形码。
这并不意味着她必须有互联网连接。您可以生成条形码,然后通过在本地存储和更新数据库来防止使用它。
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.