Skip to content

Commit

Permalink
Docs: add system use case with retry as alternate flow (#1798)
Browse files Browse the repository at this point in the history
  • Loading branch information
angela-tran authored Dec 14, 2023
2 parents 27ccef2 + 1f3d8c3 commit 0e252b2
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
4 changes: 2 additions & 2 deletions benefits/enrollment/templates/enrollment/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ <h1 class="pb-lg-8 pb-4">
},
onTokenize: function (response) {
/* This function executes when the
/* card/address verification returns
/* card verification returns
/* successfully with a token from enrollment server */
amplitude.getInstance().logEvent(closedEvent, {status: "success"});

Expand All @@ -67,7 +67,7 @@ <h1 class="pb-lg-8 pb-4">
},
onVerificationFailure: function (response) {
/* This function executes when the
/* card/address verification fails and server
/* card verification fails and server
/* return verification failure message */
amplitude.getInstance().logEvent(closedEvent, {status: "fail"});

Expand Down
31 changes: 31 additions & 0 deletions docs/use-cases/system-use-cases.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
The use cases documented on this page focus on how the system is supposed to work from the perspective of the end user.

### Use case: Enroll contactless card to receive transit benefit

**Primary Actor**: Transit rider

**Systems**: Benefits app, payment processor

**Preconditions**:

- Transit rider has confirmed their eligibility with the Benefits app
- Transit rider has their contactless card information available
- Benefits app is able to contact the payment processor

**Trigger**: Transit rider initiates the enrollment phase

**Basic flow**:

1. Transit rider enters their contactless card information
2. Benefits app passes that information to the payment processor to enroll the card
3. Payment processor successfully enrolls card

**Alternate flows**:

- 3a. Payment processor returns with one of the following errors: card verification failed, token is invalid, or general server error
- 3a1. Transit rider chooses to retry, starting back at initiating the enrollment phase
- 3b1. Transit rider leaves the Benefits app

**Postconditions**:

- Transit rider's contactless card is enrolled to receive the transit benefit

0 comments on commit 0e252b2

Please sign in to comment.