결제 전환 목표 아키텍처 정의 (2/2) (iss-c7e589ce4a08)
All checks were successful
ci / test (pull_request) Successful in 7s
All checks were successful
ci / test (pull_request) Successful in 7s
This commit is contained in:
parent
cc04923977
commit
71ef32ac91
1 changed files with 25 additions and 0 deletions
25
docs/architecture/transaction-sequence.md
Normal file
25
docs/architecture/transaction-sequence.md
Normal file
|
|
@ -0,0 +1,25 @@
|
||||||
|
sequenceDiagram
|
||||||
|
participant User
|
||||||
|
participant Payment Gateway
|
||||||
|
participant Database
|
||||||
|
participant Service
|
||||||
|
|
||||||
|
User->>Service: Initiate Payment
|
||||||
|
Service->>Payment Gateway: Send Payment Request
|
||||||
|
alt Successful Payment
|
||||||
|
Payment Gateway-->>Service: Confirm Payment
|
||||||
|
Service->>Database: Record Payment
|
||||||
|
Database-->>Service: Payment Recorded
|
||||||
|
Service-->>User: Payment Success
|
||||||
|
else External Payment Failed
|
||||||
|
Payment Gateway-->>Service: Payment Failed
|
||||||
|
Service-->>User: Payment Failed
|
||||||
|
else Database Failure
|
||||||
|
Service->>Database: Attempt to Record Payment
|
||||||
|
Database-->>Service: Database Error
|
||||||
|
Service-->>User: Unable to process payment
|
||||||
|
end
|
||||||
|
Service->>Database: Commit
|
||||||
|
alt Rollback Required
|
||||||
|
Database->>Database: Rollback Changes
|
||||||
|
end
|
||||||
Loading…
Add table
Add a link
Reference in a new issue