결제 전환 목표 아키텍처 정의 (2/2) #4
1 changed files with 23 additions and 0 deletions
23
docs/architecture/transaction-sequence.md
Normal file
23
docs/architecture/transaction-sequence.md
Normal file
|
|
@ -0,0 +1,23 @@
|
||||||
|
```mermaid
|
||||||
|
sequenceDiagram
|
||||||
|
participant User
|
||||||
|
participant PaymentGateway
|
||||||
|
participant Database
|
||||||
|
|
||||||
|
User->>PaymentGateway: Initiate payment
|
||||||
|
PaymentGateway->>User: Payment status (success)
|
||||||
|
User->>Database: Save transaction
|
||||||
|
Database-->>User: Transaction saved
|
||||||
|
|
||||||
|
%% External failure scenario
|
||||||
|
User->>PaymentGateway: Initiate payment
|
||||||
|
PaymentGateway-->>User: Payment status (failure)
|
||||||
|
User->>Database: Log failure reason
|
||||||
|
|
||||||
|
%% Database failure scenario
|
||||||
|
User->>PaymentGateway: Initiate payment
|
||||||
|
PaymentGateway->>User: Payment status (success)
|
||||||
|
User->>Database: Save transaction
|
||||||
|
Database-->>User: Transaction failed (DB error)
|
||||||
|
Note right of User: Rollback transaction
|
||||||
|
```
|
||||||
Loading…
Add table
Add a link
Reference in a new issue