acm-uiuc / groot

Infrastructure of ACM@UIUC
Other
12 stars 0 forks source link

User Payment Flow #53

Open bcongdon opened 7 years ago

bcongdon commented 7 years ago

We're going to change the current way I was thinking of doing the user payment flow so it's a bit cleaner.

New Flow (Usability Perspective):

  1. User submits the join form on desktop frontend
  2. User gets an email with a welcome message, and a link to pay via stripe.
  3. User clicks link, gets redirected back to ACM website, and can submit the stripe form to pay.
  4. Upon payment, we play a 10 sec animation to allow for the AD script to run in the background.

New Flow (Service Perspective):

  1. On join form submission, users service generates and stores a unique payment token for the user.
  2. The user service triggers an email to be sent, and the link in the email is formatted with this unique payment token (i.e. acm.illinois.edu/credist/purchasemembership?token=ABC123)
  3. Upon the user going to this URL, the desktop frontend verifies this is a valid token. Then, we display the stripe payment form.
  4. Upon submission of the stripe payment form, desktop frontend tells user service to mark the user as paid.
  5. User service triggers the AD service when it marks the user as paid.