Skip to content

Instantly share code, notes, and snippets.

@BurningDog
Last active December 8, 2020 12:39
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 BurningDog/cfac12343a2f34fade1032fd8b712cdd to your computer and use it in GitHub Desktop.
Save BurningDog/cfac12343a2f34fade1032fd8b712cdd to your computer and use it in GitHub Desktop.
Initial
Initial
Cruise has space -> Booking
Cruise does not have space -> Delete booking
Booking
Proceed to Checkout -> Checkout
Checkout
Proceed to Payment -> Payment
Checkout timeout -> Cart timeout
Payment
PayGate Payment
Success -> Transaction successful
Failed -> Failed or no transaction
No action after 30 minutes -> Failed or no transaction
Transaction successful
Pay full amount -> Payment
Full amount paid -> Fully paid
Failed or no transaction
Try again -> Payment
Cart timeout
When did booking start?
Less than 30 minutes -> Can proceed
More than 30 minutes -> Abandon cart
Can proceed
Click Proceed to Checkout -> Checkout
Abandon cart
Click on email link -> Checkout
No action after 12 hours -> Cart expired
Delete booking
TODO remove cruise from flat file database
Cart expired
Note - Can get here from any state
Fully paid
function render(model){
let current_state_name = model.active_states[0].name;
return $("h1",
{style: {color: "darkBlue"}},
`The current state is: ${current_state_name}`);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment