결제 전환 목표 아키텍처 정의 (2/2) #3
2 changed files with 31 additions and 0 deletions
3
.forge/iss-d65d495e8095-attempt-1.md
Normal file
3
.forge/iss-d65d495e8095-attempt-1.md
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
# iss-d65d495e8095-attempt-1
|
||||||
|
|
||||||
|
Forge 이슈 작업 브랜치 `forge/iss-d65d495e8095-attempt-1`.
|
||||||
28
docs/architecture/transaction-sequence.md
Normal file
28
docs/architecture/transaction-sequence.md
Normal file
|
|
@ -0,0 +1,28 @@
|
||||||
|
sequenceDiagram
|
||||||
|
participant User as User
|
||||||
|
participant PaymentGateway as Payment Gateway
|
||||||
|
participant PaymentService as Payment Service
|
||||||
|
participant Database as Database
|
||||||
|
|
||||||
|
User->>PaymentService: 요청(결제)
|
||||||
|
PaymentService->>PaymentGateway: 결제 요청
|
||||||
|
alt 정상 케이스
|
||||||
|
PaymentGateway-->>PaymentService: 결제 성공
|
||||||
|
PaymentService->>Database: DB에 거래 내역 저장
|
||||||
|
Database-->>PaymentService: 저장 성공
|
||||||
|
PaymentService-->>User: 결제 완료
|
||||||
|
else 외부 실패
|
||||||
|
PaymentGateway-->>PaymentService: 결제 실패
|
||||||
|
PaymentService-->>User: 결제 실패 메시지 전송
|
||||||
|
else DB 실패
|
||||||
|
PaymentGateway-->>PaymentService: 결제 성공
|
||||||
|
PaymentService->>Database: DB에 거래 내역 저장
|
||||||
|
Database-->>PaymentService: 저장 실패
|
||||||
|
PaymentService-->>User: 결제 실패 메시지 전송
|
||||||
|
end
|
||||||
|
|
||||||
|
%% Commit과 Rollback 경계
|
||||||
|
PaymentService->>Database: COMMIT (정상 흐름)
|
||||||
|
Database-->>PaymentService: COMMIT 성공
|
||||||
|
PaymentService->>Database: ROLLBACK (오류 발생 시)
|
||||||
|
Database-->>PaymentService: ROLLBACK 완료
|
||||||
Loading…
Add table
Add a link
Reference in a new issue