From 09dd3b17b5ec784aad99cb80fa7b985aebff9e86 Mon Sep 17 00:00:00 2001 From: forge-bot Date: Sun, 12 Jul 2026 05:19:16 +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(2/2)=20(iss-5a912ed79baf)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/architecture/transaction-sequence.md | 40 +++++++++++++++++++++++ 1 file changed, 40 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..30625d6 --- /dev/null +++ b/docs/architecture/transaction-sequence.md @@ -0,0 +1,40 @@ +```mermaid +sequenceDiagram + participant User as 유저 + participant PaymentService as 결제 서비스 + participant PaymentGateway as 결제 게이트웨이 + participant Database as 데이터베이스 + + User->>PaymentService: 결제 요청 + PaymentService->>Database: 결제 정보 저장 + activate Database + Database-->>PaymentService: 저장 완료 + deactivate Database + + alt 정상 흐름 + PaymentService->>PaymentGateway: 결제 요청 + activate PaymentGateway + PaymentGateway-->>PaymentService: 결제 성공 + deactivate PaymentGateway + PaymentService->>User: 결제 완료 + + else 외부 실패 + PaymentService->>PaymentGateway: 결제 요청 + activate PaymentGateway + PaymentGateway-->>PaymentService: 결제 실패 + deactivate PaymentGateway + PaymentService->>Database: 롤백 + activate Database + Database-->>PaymentService: 롤백 완료 + deactivate Database + PaymentService->>User: 결제 실패 + end + + else DB 실패 + PaymentService->>Database: 결제 정보 저장 + activate Database + Database-->>PaymentService: 저장 실패 + deactivate Database + PaymentService->>User: 저장 실패 + end +``` \ No newline at end of file