Skip to content

Instantly share code, notes, and snippets.

Last active June 23, 2020 17:00
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save anentropic/84151dadfaaf9190836cf1ea0dfcc5f7 to your computer and use it in GitHub Desktop.
View bag*
checkout -> Checkout summary
Checkout summary
buy -> Reserve stock
Reserve stock
Lock product*
locked -> Insert purchase record
failed -> Error
Insert purchase record
inserted -> Unlock product
failed -> Unlock product with Error
Create shipping mandate
not needed -> Unlock product
created -> Unlock product
failed -> Rollback
done -> Unlock product
Unlock product
unlocked -> User approve payment
Unlock product with Error
unlocked -> Error
User approve payment
approved -> Attempt to complete payment
not approved -> Cancel checkout
error -> Cancel checkout with Error
Attempt to complete payment
completed -> Checkout succeeded
indeterminate -> Attempt to complete payment
retryable error -> Attempt to complete payment
fatal error -> Cancel checkout with Error
Checkout succeeded
Broadcast event
Cancel checkout
cancelled -> View bag
Cancel checkout with Error
cancelled -> Error
function render(model){
let current_state_name = model.active_states[0].name;
return $("h1",
{style: {color: "darkBlue"}},
`The current state is: ${current_state_name}`);
Copy link

from this tool:

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