결제 전환 목표 아키텍처 정의 (2/2) #2
1 changed files with 34 additions and 0 deletions
34
docs/architecture/transaction-sequence.md
Normal file
34
docs/architecture/transaction-sequence.md
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
sequenceDiagram
|
||||||
|
participant User
|
||||||
|
participant Payment Service
|
||||||
|
participant DB
|
||||||
|
participant External Gateway
|
||||||
|
|
||||||
|
User->>Payment Service: Initiate Payment
|
||||||
|
activate Payment Service
|
||||||
|
Payment Service->>DB: Begin Transaction
|
||||||
|
activate DB
|
||||||
|
DB-->>Payment Service: Transaction Started
|
||||||
|
deactivate DB
|
||||||
|
Payment Service->>External Gateway: Request Payment Authorization
|
||||||
|
activate External Gateway
|
||||||
|
|
||||||
|
alt Successful Authorization
|
||||||
|
External Gateway-->>Payment Service: Authorization Success
|
||||||
|
Payment Service->>DB: Commit Transaction
|
||||||
|
activate DB
|
||||||
|
DB-->>Payment Service: Transaction Committed
|
||||||
|
deactivate DB
|
||||||
|
Payment Service-->>User: Payment Successful
|
||||||
|
else Authorization Failed
|
||||||
|
External Gateway-->>Payment Service: Authorization Failure
|
||||||
|
Payment Service->>DB: Rollback Transaction
|
||||||
|
activate DB
|
||||||
|
DB-->>Payment Service: Transaction Rolled Back
|
||||||
|
deactivate DB
|
||||||
|
Payment Service-->>User: Payment Failed
|
||||||
|
end
|
||||||
|
|
||||||
|
autonumber
|
||||||
|
|
||||||
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue