-
Notifications
You must be signed in to change notification settings - Fork 7
Payment Flow
- Fill in order form and submit
- Check for and apply valid coupons
- Collect attendee data ( optional - happens here or after payment is processed )
- Collect payment info and submit to payment gateway
- Process payment
- Complete checkout
User visits order form, chooses a package, optional adds a coupon and submits order
- Shortcode displays available tickets
- Coupons are "applied" via JavaScript. DOES NOT subtract total from actual payment. UI feature only
Create draft payment and draft attendees
If user has submitted a value for a coupon ensure it exists and is valid for this event/package
- Is coupon valid?
- Change order total
- DO NOT subtract coupon from pool yet! Done after payment is complete
New status: pending
This is optional, kind of. This step either happens as step 3 OR after step 5
- Show the form listing fields for all attendees
- Save data in the draft attendee CPT
New status: pending or publish ( depends on which step it follows )
Gateway is in control
- Show payment for from gateway
- Submit for processing
New status: processing
Gateway is in control. This step allows the gateway to handle interacting with the payment system.
- Allow the gateway to do what it wants
New status: publish
Note: If attendee data has not yet been collected the status will change to coll_att_data_post and the payment page refreshed to collect attendee data.
At this point the system assumes that the gateway has completed the payment to a satisfactory conclusion.
- Subtract tickets from available pool of tickets
- Publish attendees
- Subtract coupon from pool
- Email payment receipt + link to payment to payee
- Email attendee links to purchaser
- If attendees emails have been provided send attendee a link to their ticket
- draft
- pending
- processing
- published
- coll_att_data_pre
- coll_att_data_post
The last two kind of suck. Probably they can be updated into one with a check on the option of when to collect attendee data.