결제 전환 목표 아키텍처 정의 (SPRING-ARC-FINAL-1783825413)
All checks were successful
ci / test (pull_request) Successful in 9s
All checks were successful
ci / test (pull_request) Successful in 9s
This commit is contained in:
parent
e27e71d957
commit
e597e38d27
1 changed files with 28 additions and 0 deletions
28
docs/architecture/transaction-sequence.md
Normal file
28
docs/architecture/transaction-sequence.md
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
```mermaid
|
||||
sequenceDiagram
|
||||
participant User
|
||||
participant Controller
|
||||
participant Service
|
||||
participant Repository
|
||||
participant Gateway
|
||||
|
||||
User->>Controller: 결제 요청
|
||||
Controller->>Service: 결제 처리 요청
|
||||
Service->>Repository: 트랜잭션 시작
|
||||
alt 정상 흐름
|
||||
Repository-->>Service: 트랜잭션 ID 반환
|
||||
Service->>Gateway: 결제 요청
|
||||
Gateway-->>Service: 결제 성공
|
||||
Service->>Repository: 트랜잭션 커밋
|
||||
Repository-->>Service: 커밋 성공
|
||||
else 외부 실패
|
||||
Gateway-->>Service: 결제 실패
|
||||
Service->>Repository: 트랜잭션 롤백
|
||||
Repository-->>Service: 롤백 성공
|
||||
else DB 실패
|
||||
Service->>Repository: 트랜잭션 롤백
|
||||
Repository-->>Service: 롤백 실패
|
||||
end
|
||||
Service-->>Controller: 결제 결과 반환
|
||||
Controller-->>User: 결제 결과 응답
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue