결제 전환 목표 아키텍처 정의 (SPRING-ARC-REFERENCE-1783832425)
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
9d1e2b253e
commit
77bcc93bc1
1 changed files with 35 additions and 0 deletions
35
docs/architecture/transaction-sequence.md
Normal file
35
docs/architecture/transaction-sequence.md
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
```mermaid
|
||||
sequenceDiagram
|
||||
participant User
|
||||
participant PaymentService
|
||||
participant PaymentGateway
|
||||
participant Database
|
||||
|
||||
%% 정상 흐름
|
||||
User->>PaymentService: 결제 요청
|
||||
PaymentService->>PaymentGateway: 결제 요청
|
||||
PaymentGateway-->>PaymentService: 결제 결과
|
||||
PaymentService->>Database: 거래 정보 저장
|
||||
Database-->>PaymentService: 저장 확인
|
||||
|
||||
%% 외부 실패 흐름
|
||||
User->>PaymentService: 결제 요청
|
||||
PaymentService->>PaymentGateway: 결제 요청
|
||||
PaymentGateway-->>PaymentService: 결제 실패
|
||||
PaymentService->>User: 오류 메시지 전송
|
||||
|
||||
%% DB 실패 흐름
|
||||
User->>PaymentService: 결제 요청
|
||||
PaymentService->>PaymentGateway: 결제 요청
|
||||
PaymentGateway-->>PaymentService: 결제 결과
|
||||
PaymentService->>Database: 거래 정보 저장
|
||||
Database-->>PaymentService: 저장 오류
|
||||
PaymentService->>User: 오류 메시지 전송
|
||||
|
||||
%% commit과 rollback 경계
|
||||
PaymentService->>Database: 거래 정보 커밋
|
||||
PaymentGateway-->>PaymentService: 결제 완료
|
||||
activate PaymentService
|
||||
PaymentService-->>Database: 롤백 요청
|
||||
deactivate PaymentService
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue