Skip to content

Instantly share code, notes, and snippets.

@chrisoverstreet
Last active January 7, 2022 21:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save chrisoverstreet/2e8e0509bc389379ad4323a2f2503c63 to your computer and use it in GitHub Desktop.
Save chrisoverstreet/2e8e0509bc389379ad4323a2f2503c63 to your computer and use it in GitHub Desktop.
Payments v1

V1 - Support charging final payments + showing payment in-app

Goal of V1 is to support adding line items to an order, auto-charging final payment (including notification to organizers).

To reduce risk, we will have a flag per order to turn auto-charging on or off. This can be used to show or hide the payments tab as well.

Steps

  1. BE - Add an autocharge_balance flag to orders. There won't be a way to toggle this in admin for now. We will update it manually if needed. Defaults to false. Set to true when:
    • all the others steps here are finished
    • event is outside of lead time (i.e. final changes date is in the future)
    • other criteria tbd (a single event template at first; non-shipping events?)
  2. BE - Add service fee line item whenever order is created. Update service fee line item whenever other line items are added, deleted, or edited.
  3. BE - Add a way for ops to add (not edit or delete for v1) line items.
  4. BE - Cron job to email payer 24 hours before order due date that they will be auto-charged balance
  5. BE - Cron job to auto-charge balance on order due date. Also need to send confirmation email.
  6. BE - Create a query that exposes payment data. Probably order.payments. Also needs to include autocharge_balance flag.
  7. FE - Show payments tab on the "Manage Event" page. Populate using query from #7. Hide if autocharge_balance flag on order is false.

V2

Beyond

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment