spring-architecture-referen.../docs/architecture/transaction-sequence.md
forge-bot 77bcc93bc1
All checks were successful
ci / test (pull_request) Successful in 7s
결제 전환 목표 아키텍처 정의 (SPRING-ARC-REFERENCE-1783832425)
2026-07-12 05:01:35 +00:00

35 lines
No EOL
1.2 KiB
Markdown

```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
```