결제 전환 목표 아키텍처 정의 (SPRING-ARC-RESILIENT-1783826170)
All checks were successful
ci / test (pull_request) Successful in 6s
All checks were successful
ci / test (pull_request) Successful in 6s
This commit is contained in:
parent
948de94c79
commit
79be1fe507
1 changed files with 37 additions and 0 deletions
37
docs/architecture/transaction-sequence.md
Normal file
37
docs/architecture/transaction-sequence.md
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
sequenceDiagram
|
||||
participant User
|
||||
participant Controller
|
||||
participant Service
|
||||
participant Repository
|
||||
participant Database
|
||||
participant ExternalGateway
|
||||
|
||||
User->>Controller: 결제 요청
|
||||
Controller->>Service: 결제 처리 요청
|
||||
Service->>Repository: 결제 정보 저장 요청
|
||||
Repository->>Database: 결제 정보 저장
|
||||
Database-->>Repository: 저장 성공
|
||||
Repository-->>Service: 저장 성공
|
||||
Service->>ExternalGateway: 외부 결제 처리 요청
|
||||
ExternalGateway-->>Service: 성공 응답
|
||||
Service-->>Controller: 결제 성공 응답
|
||||
Controller-->>User: 결제 완료 응답
|
||||
|
||||
%% DB 실패 흐름
|
||||
alt DB 실패
|
||||
Repository-->>Service: 저장 실패 응답
|
||||
Service-->>Controller: 오류 반환
|
||||
Controller-->>User: 결제 실패 응답
|
||||
end
|
||||
|
||||
%% 외부 실패 흐름
|
||||
alt 외부 서비스 실패
|
||||
Service->>ExternalGateway: 외부 결제 처리 요청
|
||||
ExternalGateway-->>Service: 실패 응답
|
||||
Service-->>Controller: 오류 반환
|
||||
Controller-->>User: 결제 실패 응답
|
||||
end
|
||||
|
||||
%% Commit/Rollback 경계
|
||||
note over Repository: 만약 저장이 성공하면 commit
|
||||
note over Repository: 만약 저장이 실패하면 rollback
|
||||
Loading…
Add table
Add a link
Reference in a new issue