결제 트랜잭션 시퀀스 계약 정의 (SPRING-ARC-SEQUENCE)
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
dab81cfd48
commit
53530ee7dd
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 as User
|
||||||
|
participant Controller as Controller
|
||||||
|
participant PaymentService as PaymentService
|
||||||
|
participant Gateway as PaymentGateway
|
||||||
|
participant DB as Database
|
||||||
|
|
||||||
|
User ->> Controller: Initiate Payment
|
||||||
|
Controller ->> PaymentService: Process Payment
|
||||||
|
PaymentService ->> Gateway: Call Payment Gateway
|
||||||
|
alt Successful Payment
|
||||||
|
Gateway -->> PaymentService: Payment Success
|
||||||
|
PaymentService ->> DB: Save Transaction
|
||||||
|
DB -->> PaymentService: Transaction Saved
|
||||||
|
PaymentService -->> Controller: Payment Processed
|
||||||
|
Controller -->> User: Payment Successful
|
||||||
|
else External Gateway Failure
|
||||||
|
Gateway -->> PaymentService: Payment Failed
|
||||||
|
PaymentService -->> Controller: Payment Failed
|
||||||
|
Controller -->> User: Payment Failed
|
||||||
|
else DB Failure
|
||||||
|
Gateway -->> PaymentService: Payment Success
|
||||||
|
PaymentService ->> DB: Save Transaction
|
||||||
|
DB -->> PaymentService: DB Error
|
||||||
|
PaymentService ->> Controller: Rollback Transaction
|
||||||
|
Controller -->> User: Payment Failed
|
||||||
|
end
|
||||||
|
```
|
||||||
Loading…
Add table
Add a link
Reference in a new issue