결제 전환 목표 아키텍처 정의 (SPRING-ARC-QUALITY-1783831207)
All checks were successful
ci / test (pull_request) Successful in 8s
All checks were successful
ci / test (pull_request) Successful in 8s
This commit is contained in:
parent
22bba62e1b
commit
ac71eb4983
1 changed files with 38 additions and 0 deletions
38
docs/architecture/transaction-sequence.md
Normal file
38
docs/architecture/transaction-sequence.md
Normal file
|
|
@ -0,0 +1,38 @@
|
||||||
|
```mermaid
|
||||||
|
sequenceDiagram
|
||||||
|
participant User
|
||||||
|
participant Controller
|
||||||
|
participant Service
|
||||||
|
participant Gateway
|
||||||
|
participant Database
|
||||||
|
|
||||||
|
User->>Controller: 결제 요청
|
||||||
|
Controller->>Service: 결제 처리 요청
|
||||||
|
Service->>Gateway: 결제 요청 전달
|
||||||
|
Gateway-->>Service: 결제 성공
|
||||||
|
Service->>Database: 결제 정보 저장
|
||||||
|
Database-->>Service: 저장 완료
|
||||||
|
Service-->>Controller: 결제 성공 응답
|
||||||
|
Controller-->>User: 결제 성공 메시지
|
||||||
|
|
||||||
|
alt External Failure
|
||||||
|
Service->>Gateway: 결제 요청 전달
|
||||||
|
Gateway-->>Service: 결제 실패
|
||||||
|
Service-->>Controller: 결제 실패 응답
|
||||||
|
Controller-->>User: 결제 실패 메시지
|
||||||
|
end
|
||||||
|
|
||||||
|
alt DB Failure
|
||||||
|
Service->>Gateway: 결제 요청 전달
|
||||||
|
Gateway-->>Service: 결제 성공
|
||||||
|
Service->>Database: 결제 정보 저장
|
||||||
|
Database-->>Service: 저장 실패
|
||||||
|
Service-->>Controller: 결제 처리 실패 응답
|
||||||
|
Controller-->>User: 결제 처리 실패 메시지
|
||||||
|
end
|
||||||
|
|
||||||
|
Service->>Database: Transaction Commit
|
||||||
|
note right of Database: 저장 완료
|
||||||
|
Service->>Database: Transaction Rollback
|
||||||
|
note right of Database: 오류 발생 시 롤백
|
||||||
|
```
|
||||||
Loading…
Add table
Add a link
Reference in a new issue