From 77bcc93bc11c8b87deac529f7be88f8c472f5e64 Mon Sep 17 00:00:00 2001 From: forge-bot Date: Sun, 12 Jul 2026 05:01:35 +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-REFERENCE-1783832425)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/architecture/transaction-sequence.md | 35 +++++++++++++++++++++++ 1 file changed, 35 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..9707983 --- /dev/null +++ b/docs/architecture/transaction-sequence.md @@ -0,0 +1,35 @@ +```mermaid +sequenceDiagram + participant User + participant PaymentService + participant PaymentGateway + participant Database + + %% 정상 흐름 + User->>PaymentService: 결제 요청 + PaymentService->>PaymentGateway: 결제 요청 + PaymentGateway-->>PaymentService: 결제 결과 + PaymentService->>Database: 거래 정보 저장 + Database-->>PaymentService: 저장 확인 + + %% 외부 실패 흐름 + User->>PaymentService: 결제 요청 + PaymentService->>PaymentGateway: 결제 요청 + PaymentGateway-->>PaymentService: 결제 실패 + PaymentService->>User: 오류 메시지 전송 + + %% DB 실패 흐름 + User->>PaymentService: 결제 요청 + PaymentService->>PaymentGateway: 결제 요청 + PaymentGateway-->>PaymentService: 결제 결과 + PaymentService->>Database: 거래 정보 저장 + Database-->>PaymentService: 저장 오류 + PaymentService->>User: 오류 메시지 전송 + + %% commit과 rollback 경계 + PaymentService->>Database: 거래 정보 커밋 + PaymentGateway-->>PaymentService: 결제 완료 + activate PaymentService + PaymentService-->>Database: 롤백 요청 + deactivate PaymentService +``` \ No newline at end of file