[resolved] Need help with creating verifiable coupons (4 posts)

  1. Dharma
    Posted 1 year ago #

    I have a client that has a group buying site (like Groupon and LivingSocial) and he wants to each coupon purchased to have some sort of unique identifier (auto gen number, bar code, or QR code) that can then be read by the merchant via a smartphone and validated via the database.

    He wants to make sure that people can't duplicate the coupons they buy.

    Event Espresso has something similar to this for events, but not for just coupons on non-event type items.

    Any suggestions on either a plugin that would handle this or how I can program in PHP or JS to generate a QR Code for each coupon sold and then validate it via a QR code reader?

  2. Dharma
    Posted 1 year ago #

    I think I figured out a solution.

    I downloaded a simple QR code WP plugin and figured out how to generate a QR code via Google.

    So when a coupon is purchased, I can have the site create a unique number in a DB table that also stores the customer's email address and whether or not the coupon has been used. The QR code will store a URL with the unique number in a $_GET variable.

    Then when the coupon is presented, it can be check with a smartphone that goes to the page that tells whether the coupon has already been presented and also updates the entry.

    I haven't tested it, but it sounds plausible. What do y'all think?

  3. bcworkz
    Posted 1 year ago #

    That sounds fine. Let's abstract the process to remove details that do not matter.

    1. Create a unique token of of any sort. Doesn't matter what form as long as there is no other one like it and it is uniquely identifiable. A serial number is adequate.
    2. Distribute the token and record the identifier in the database. Any further details are unimportant.
    3. When the token is presented, invalidate the identifier in the database so the token can never be used again.

    As long as this process is followed, any details of how it happens are unimportant as far as security is concerned. Other factors like ease of use and user experience are important, but not for security.

  4. Dan Cameron
    Posted 1 year ago #

    Have you checked out groupbuyingsite.com?

Topic Closed

This topic has been closed to new replies.

About this Topic