결제 전환 목표 아키텍처 정의 #2

Open
forge-bot wants to merge 4 commits from forge/SPRING-ARC-RESILIENT-1783826170-attempt-3 into main
Showing only changes of commit 79be1fe507 - Show all commits

View 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