Last active
June 23, 2020 17:00
-
-
Save anentropic/84151dadfaaf9190836cf1ea0dfcc5f7 to your computer and use it in GitHub Desktop.
CHECKOUT FLOW
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CHECKOUT FLOW | |
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 | |
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 | |
Error |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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
from this tool: https://sketch.systems/