From ac71eb4983d80c7fafd0bed9cd28518e69799acf Mon Sep 17 00:00:00 2001 From: forge-bot Date: Sun, 12 Jul 2026 04:40:27 +0000 Subject: [PATCH] =?UTF-8?q?=EA=B2=B0=EC=A0=9C=20=EC=A0=84=ED=99=98=20?= =?UTF-8?q?=EB=AA=A9=ED=91=9C=20=EC=95=84=ED=82=A4=ED=85=8D=EC=B2=98=20?= =?UTF-8?q?=EC=A0=95=EC=9D=98=20(SPRING-ARC-QUALITY-1783831207)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/architecture/transaction-sequence.md | 38 +++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 docs/architecture/transaction-sequence.md diff --git a/docs/architecture/transaction-sequence.md b/docs/architecture/transaction-sequence.md new file mode 100644 index 0000000..3e65da5 --- /dev/null +++ b/docs/architecture/transaction-sequence.md @@ -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: 오류 발생 시 롤백 +``` \ No newline at end of file