tintinnabulate / registration-webapp

A registration webapp, written in Go. Takes payments with Stripe.
2 stars 0 forks source link

Support QR code checking #28

Open tintinnabulate opened 5 years ago

tintinnabulate commented 5 years ago
  1. Generate QR code image from some unique registration ID (https://registration-webapp/qr/Stripe_Charge_ID?)
  2. Email QR code image to registrant using their email address
    1. What happens if one email address has multiple Stripe_Charge_IDs associated with it? Ideally send 1 email with multiple QR codes to save spamming them/save confusion.
  3. At the convention, registration committee member scans QR code from registrant using a QR code scanner
  4. QR code scanner decodes QR code, launches web browser, which visits https://registration-webapp/qr/Stripe_Charge_ID
  5. Handler in registration webapp func getStripeChargeID(ctx context.Context, r *http.Request, w http.ResponseWriter) does a database lookup to see if that Stripe_Charge_ID is NOT in the Scanned table. If it is, Fail, If it's not, then check its in the User table. If it is, then Succeed, if it's not then Fail
tintinnabulate commented 5 years ago

Just use Stripe_Customer_ID. In the first version of the app I wasn't populating the DB with Stripe_Charge_ID and I'm too lazy to back-populate them.

tintinnabulate commented 5 years ago

https://github.com/skip2/go-qrcode

import qrcode "github.com/skip2/go-qrcode"

var png []byte
png, err := qrcode.Encode("https://example.org", qrcode.Medium, 256)
tintinnabulate commented 5 years ago

Use SendGrid to send the emails:

https://cloud.google.com/appengine/docs/standard/go/mail/sendgrid?authuser=1

tintinnabulate commented 5 years ago

It would be nice if the User table had two additional fields: Is_QR_Sent : Boolean := False and Is_QR_Validated : Boolean := False.

This way, it's easy to see the status from the same registrations.csv (See #24) that the Registrations Chair is used to.

tintinnabulate commented 5 years ago

Now that we're on Go 1.12, I'll need to rebase from branch master and port over changes piece-meal from branch qr_code