결제 전환 목표 아키텍처 정의 (2/2) (iss-bae72bbf49e3)
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
a668e94ed6
commit
4a033cb9a1
1 changed files with 29 additions and 0 deletions
29
docs/architecture/transaction-sequence.md
Normal file
29
docs/architecture/transaction-sequence.md
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
```mermaid
|
||||||
|
sequenceDiagram
|
||||||
|
participant User
|
||||||
|
participant PaymentGateway
|
||||||
|
participant Database
|
||||||
|
opt Successful Transaction
|
||||||
|
User->>PaymentGateway: Initiate Payment
|
||||||
|
PaymentGateway-->>User: Payment Confirmation
|
||||||
|
User->>Database: Update Transaction Record
|
||||||
|
Database-->>User: Transaction Updated
|
||||||
|
User->>User: Payment Succeeded
|
||||||
|
end
|
||||||
|
opt External Failure
|
||||||
|
User->>PaymentGateway: Initiate Payment
|
||||||
|
PaymentGateway-->>User: Payment Error
|
||||||
|
User->>User: Payment Failed
|
||||||
|
end
|
||||||
|
opt DB Failure
|
||||||
|
User->>PaymentGateway: Initiate Payment
|
||||||
|
PaymentGateway-->>User: Payment Confirmation
|
||||||
|
User->>Database: Update Transaction Record
|
||||||
|
Database-->>User: DB Error
|
||||||
|
User->>PaymentGateway: Cancel Transaction
|
||||||
|
PaymentGateway-->>User: Transaction Canceled
|
||||||
|
end
|
||||||
|
%% Commit and Rollback%%
|
||||||
|
Note over User, PaymentGateway: Commit after successful transaction
|
||||||
|
Note over User, Database: Rollback on DB failure
|
||||||
|
```
|
||||||
Loading…
Add table
Add a link
Reference in a new issue