결제 전환 목표 아키텍처 정의 (2/2) (iss-81c03d204ddd)
All checks were successful
ci / test (pull_request) Successful in 8s
All checks were successful
ci / test (pull_request) Successful in 8s
This commit is contained in:
parent
fdaecafe9e
commit
66aafd3f69
1 changed files with 32 additions and 0 deletions
32
docs/architecture/transaction-sequence.md
Normal file
32
docs/architecture/transaction-sequence.md
Normal file
|
|
@ -0,0 +1,32 @@
|
||||||
|
```mermaid
|
||||||
|
sequenceDiagram
|
||||||
|
participant User
|
||||||
|
participant PaymentGateway
|
||||||
|
participant PaymentService
|
||||||
|
participant Database
|
||||||
|
|
||||||
|
User->>+PaymentService: Start Payment
|
||||||
|
PaymentService->>+PaymentGateway: Process Payment
|
||||||
|
PaymentGateway-->>-PaymentService: Payment Success
|
||||||
|
PaymentService->>Database: Record Payment
|
||||||
|
Database-->>-PaymentService: Payment Recorded
|
||||||
|
PaymentService-->>-User: Payment Confirmed
|
||||||
|
|
||||||
|
%% External Failure
|
||||||
|
User->>+PaymentService: Start Payment
|
||||||
|
PaymentService->>+PaymentGateway: Process Payment
|
||||||
|
PaymentGateway-->>-PaymentService: Payment Failed
|
||||||
|
PaymentService-->>-User: Payment Failed
|
||||||
|
|
||||||
|
%% DB Failure
|
||||||
|
User->>+PaymentService: Start Payment
|
||||||
|
PaymentService->>+PaymentGateway: Process Payment
|
||||||
|
PaymentGateway-->>-PaymentService: Payment Success
|
||||||
|
PaymentService->>Database: Record Payment
|
||||||
|
Database-->>-PaymentService: DB Failure
|
||||||
|
PaymentService-->>-User: Payment Processing Error
|
||||||
|
|
||||||
|
%% Commit/Rollback
|
||||||
|
Note over PaymentService: Commit if successful
|
||||||
|
Note over PaymentService: Rollback if there's an error
|
||||||
|
```
|
||||||
Loading…
Add table
Add a link
Reference in a new issue