tintinnabulate / registration-webapp Goto Github PK
View Code? Open in Web Editor NEWA registration webapp, written in Go. Takes payments with Stripe.
A registration webapp, written in Go. Takes payments with Stripe.
https://registration-webapp/qr/Stripe_Charge_ID
?)Stripe_Charge_ID
s associated with it? Ideally send 1 email with multiple QR codes to save spamming them/save confusion.https://registration-webapp/qr/Stripe_Charge_ID
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 FailCurrently gorilla/schema returns:
could not encode registration form: schema: error converting value for "Donation_Amount"
Host it all internally.
Similar but more flexible than #22
Can one person do multiple registrations e.g.: {1 x AA, 2 x ALANON, 2 x Alateen} with a combined bill?
https://stripe.com/docs/payments/checkout/server
In September, Stripe will be changing their API to support Strong Customer Authentication (SCA), so we need to update the code for the pre-reg form.
Seems straightforward.
⚠this limits me to developing on my laptop. Google Cloud Console uses go version go1.10 linux/amd64
Required by September 2019.
Seems very easy!
https://cloud.google.com/appengine/docs/standard/go/runtime#go-1.13
Just change app.yaml
field runtime
like so:
runtime: go113
Blocked at the moment, awaiting further info.
Estimated time to complete action: unknown - I first need to know the answer to the above questions. Assuming the answer to Q2 is "Nothing", my estimate is 4 weeks.
/registrations.csv
or so, in app.yaml
with login: required
Ideally we won't be so tightly coupled with Google Appengine's Datastore.
I'd like to be able to easily swap in different databases e.g. sqlite, postgres, etc.
We are collecting/storing email/data.
Do we need to use the github.com/gorilla/sessions
key rotation?
At the moment, we don't have it. Write a test to assess the impact of not having rotation of store and encryption keys, and if it's not a problem, leave it. If it is a problem we may need to add it as per the example on http://www.gorillatoolkit.org/pkg/sessions
var store = sessions.NewCookieStore(
[]byte("new-authentication-key"),
[]byte("new-encryption-key"),
[]byte("old-authentication-key"),
[]byte("old-encryption-key"),
)
What if someone wants a refund? We currently have no way of marking this in the DB.
Possibly a terrible idea.
See this for inspiration:
https://github.com/kainlite/whatismyip-go
Follow-on from #55
Now that #52 has been merged, I can see that there are failing unit tests:
This issue has been created to track fixing the unit tests for the online 2020 version of the code base.
At the moment, the app will create a new Customer object in Stripe even if the same email address already exists in Stripe.
This is silly, and will make checking pre-registration a pain in the future!
The fix will involve checking if the entered email address already exists in the User table. If it does, use that Customer ID for the new payment, otherwise create a new Customer.
Member_Of
option 962654a#diff-783e2c958a66b9f2f8ab5865e21f786eR60
is not relevant to online 2020 donation site. Needs to be removed and replaced with a statement about Tradition 7:
AA is fully self-supporting declining outside contributions. In keeping with Tradition 7, EURYPAA can only accept donations from AA members - please only donate if you are a member of AA.
or something like that
Currently this is bodged here: dbf10ca#diff-4ed45fac7458c5e3ff6bf61665d3d263R11
For this ticket, we need to use the datastore to actually fetch the latest convention from the Convention table.
Test #24
Currently, Stripe payments Description
field just says "SCANCYPAA Registration". We want to improve this, by having:
So that these details can be visible from Stripe.
In a separate payment form, separate to the registration form, add the feature to donate one/two/X registration fees of EUR20.00, where X is a number specified by the donator.
ENGLISH:
"We know many love EURYPAA, but some can't make it (which sucks). If you would like to support the convention, please feel free to donate 1, 2 or more registrations for newcomers and help support the event."
SPANISH:
"Sabemos que son muchos los que les encanta EURYPAA, pero algunos no pueden asistir (qué lástima!). Si deseas apoyar la convención, puedes donar 1, 2 o más inscripciones para recién llegados y ayudar apoyar el evento".
If we can have it in Spanish as well, I guess there might be text in the option box that would need to be translated too. If so, let me know and we can translate this too.
Estimated time to complete: 3 weeks.
Add the following text underneath the existing English text "Bienvenido a EURYPAA! Para empezar, haz clic en el enlace abajo para confirmar tu dirección de correo electrónico".
This issue proposes removing the verification flow entirely, going straight to the /register
endpoint.
Currently the form mails a verification link to each donator's email address so that we KNOW we have a valid email address.
For the Online 2020 convention, we are asking for a donation, NOT a registration fee... so they're very unlikely to request a refund.
Read this: https://blog.trailofbits.com/2019/11/07/attacking-go-vr-ttps/
I suspect there are a lot of tools/techniques in here that I can use to improve the quality of my code.
Mailgun, or Mailjet.
SendGrid seem terrible.
...probably using OAuth2 Google Account and an access control list (ACL).
Use memcached for #24
/eury/signup
and /irey/signup
select which registration form to load?go lint
warnings.Will require stripping A LOT of functionality, so this is not to be merged.
Do not merge.
This is nothing to do with Issue #23
/selfsupporting
that returns true / false
Compare a Convention
db entry with Stripe API query
For rate-limiting, and to stop abuse.
See title
Handle when
Donation_Amount < 1
(i.e. handle Stripe returning error code 400: parameter_invalid_integer)
Donation_Amount > 9999999
(i.e. handle Stripe returning error code 400: amount_too_large
checkErr(err)
is not just lazy, it's bad as it can bring the application down
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.