-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
59ab5f8
commit 4c542c2
Showing
3 changed files
with
85 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
sequenceDiagram | ||
actor User as User | ||
participant LMS as LMS | ||
participant CC | ||
participant CoCo | ||
participant AWS as AWS EventBridge | ||
participant PSP as Stripe/PayPal | ||
|
||
note over User,LMS: User Unenrolls from Course | ||
User ->> LMS: Click on Gear CTA -> Click "Unenroll" -> Answer Question | ||
LMS ->> LMS: Determines Which System to Hit | ||
LMS ->> LMS: Checks Source System of Enrollment Attributes<br>(COMMERCE_COORDINATOR_REFUND_SOURCE_SYSTEMS) | ||
|
||
critical Create Refund | ||
LMS ->> CC: Hits RefundView() Endpoint | ||
activate CC | ||
CC ->> CoCo: Create ReturnItemDraft | ||
activate CoCo | ||
CoCo ->> CoCo: Creates LineItemReturnItem | ||
CoCo ->> CoCo: Shipment State Transitions to "Returned" | ||
CoCo ->> CoCo: Payment State Transitions to "Initial" | ||
CoCo -->> CC: Response | ||
deactivate CoCo | ||
CC -->> LMS: Response | ||
deactivate CC | ||
end | ||
|
||
CoCo ->> AWS: Emits LineItemReturnItem Subscription Message | ||
AWS ->> CC: Hits OrderReturnedView() Endpoint | ||
CC ->> CC: Receives message from CoCo via AWS EventBridge <br> with details of ReturnItem | ||
CC ->> CC: Triggers fulfill_order_returned_signal<br> worker_task | ||
CC ->> PSP: Issue Credit | ||
activate PSP | ||
PSP -->> CC: Response | ||
deactivate PSP | ||
CC ->> CoCo: Add Refund Transaction to Payment Obj | ||
activate CoCo | ||
CoCo -->> CC: Response | ||
deactivate CoCo | ||
CC ->> CoCo: Update Refund Status | ||
activate CoCo | ||
CoCo -->> CC: Response | ||
deactivate CoCo | ||
note over User,LMS: LMS Unenrolls User | ||
LMS -->> User: Removes Course from Dashboard |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
sequenceDiagram | ||
actor Support | ||
participant CoCo | ||
participant AWS EventBridge | ||
participant Commerce Coordinator | ||
participant PSP as Stripe/PayPal | ||
Support->>CoCo: Create ReturnItem | ||
CoCo->>AWS EventBridge: Emits LineItemReturnItem Subscription Message | ||
AWS EventBridge->>Commerce Coordinator: Hits OrderReturnedView() Endpoint | ||
Commerce Coordinator->>Commerce Coordinator: Receives message from CoCo via AWS EventBridge<br> with details of the ReturnItem | ||
Commerce Coordinator->>Commerce Coordinator: Triggers fulfill_order_returned_signal<br> worker task | ||
Commerce Coordinator->>PSP: Issue Credit | ||
activate PSP | ||
PSP-->>Commerce Coordinator: Response | ||
deactivate PSP | ||
Commerce Coordinator->>CoCo: Add Refund Transaction to Payment Obj | ||
activate CoCo | ||
CoCo-->>Commerce Coordinator: Response | ||
deactivate CoCo | ||
Commerce Coordinator->>CoCo: Update Refund Status | ||
activate CoCo | ||
CoCo-->>Commerce Coordinator: Response | ||
deactivate CoCo |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
sequenceDiagram | ||
actor Support | ||
participant PSP as Stripe/PayPal | ||
participant CC as Commerce Coordinator | ||
participant CoCo | ||
note over Support, PSP: Support Issues Refund<br>from PSP Dashboard | ||
Support ->> PSP: Issue Refund | ||
activate PSP | ||
PSP -->> PSP: Issues Refund to User | ||
PSP -->> PSP: Triggers refund Webhook | ||
PSP ->> CC: Hits WebhookView() Endpoint | ||
deactivate PSP | ||
activate CC | ||
CC -->> CC: Sends payment_refunded_signal<br> signal | ||
CC -->> CC: Triggers refund_from_stripe_task<br> worker task | ||
CC ->> CoCo: Adds Refund Transaction<br> to Payment Obj | ||
deactivate CC |