diff --git a/.forge/iss-5a912ed79baf-attempt-1.md b/.forge/iss-5a912ed79baf-attempt-1.md new file mode 100644 index 0000000..c1faa7e --- /dev/null +++ b/.forge/iss-5a912ed79baf-attempt-1.md @@ -0,0 +1,3 @@ +# iss-5a912ed79baf-attempt-1 + +Forge 이슈 작업 브랜치 `forge/iss-5a912ed79baf-attempt-1`. diff --git a/.forge/iss-5a912ed79baf-attempt-3.md b/.forge/iss-5a912ed79baf-attempt-3.md deleted file mode 100644 index f95f3fb..0000000 --- a/.forge/iss-5a912ed79baf-attempt-3.md +++ /dev/null @@ -1,3 +0,0 @@ -# iss-5a912ed79baf-attempt-3 - -Forge 이슈 작업 브랜치 `forge/iss-5a912ed79baf-attempt-3`. diff --git a/.forge/iss-87190c9836ac-attempt-1.md b/.forge/iss-87190c9836ac-attempt-1.md deleted file mode 100644 index af8e790..0000000 --- a/.forge/iss-87190c9836ac-attempt-1.md +++ /dev/null @@ -1,3 +0,0 @@ -# iss-87190c9836ac-attempt-1 - -Forge 이슈 작업 브랜치 `forge/iss-87190c9836ac-attempt-1`. diff --git a/docs/architecture/package-map.md b/docs/architecture/package-map.md deleted file mode 100644 index c8762cf..0000000 --- a/docs/architecture/package-map.md +++ /dev/null @@ -1,9 +0,0 @@ -# Package Responsibility Map - -| Package | Responsibility | Forbidden Dependencies | -|----------------|------------------------------------------------|------------------------| -| controller | Handles user input and orchestrates payment | domain | -| service | Contains business logic for payment processing | integration | -| repository | Data access layer for payment records | service | -| domain | Defines the core domain models and business rules| controller | -| integration | Communicates with external payment gateways | domain, service | \ No newline at end of file diff --git a/docs/architecture/transaction-sequence.md b/docs/architecture/transaction-sequence.md index 4d3460a..30625d6 100644 --- a/docs/architecture/transaction-sequence.md +++ b/docs/architecture/transaction-sequence.md @@ -1,38 +1,40 @@ ```mermaid sequenceDiagram - participant User - participant PaymentService - participant PaymentGateway - participant Database + participant User as 유저 + participant PaymentService as 결제 서비스 + participant PaymentGateway as 결제 게이트웨이 + participant Database as 데이터베이스 - %% Normal Flow - User->>PaymentService: Initiate Payment - PaymentService->>Database: Store Transaction - Database-->>PaymentService: Transaction Stored - PaymentService->>PaymentGateway: Process Payment - PaymentGateway-->>PaymentService: Payment Success - PaymentService->>Database: Update Transaction Status - Database-->>PaymentService: Transaction Updated - PaymentService-->>User: Payment Success + User->>PaymentService: 결제 요청 + PaymentService->>Database: 결제 정보 저장 + activate Database + Database-->>PaymentService: 저장 완료 + deactivate Database - %% External Failure Flow - User->>PaymentService: Initiate Payment - PaymentService->>Database: Store Transaction - Database-->>PaymentService: Transaction Stored - PaymentService->>PaymentGateway: Process Payment - PaymentGateway-->>PaymentService: Payment Failure - PaymentService->>Database: Rollback Transaction - Database-->>PaymentService: Transaction Rolled Back - PaymentService-->>User: Payment Failure + alt 정상 흐름 + PaymentService->>PaymentGateway: 결제 요청 + activate PaymentGateway + PaymentGateway-->>PaymentService: 결제 성공 + deactivate PaymentGateway + PaymentService->>User: 결제 완료 - %% DB Failure Flow - User->>PaymentService: Initiate Payment - PaymentService->>Database: Store Transaction - Database-->>PaymentService: Transaction Store Failure - PaymentService-->>User: Payment Failure + else 외부 실패 + PaymentService->>PaymentGateway: 결제 요청 + activate PaymentGateway + PaymentGateway-->>PaymentService: 결제 실패 + deactivate PaymentGateway + PaymentService->>Database: 롤백 + activate Database + Database-->>PaymentService: 롤백 완료 + deactivate Database + PaymentService->>User: 결제 실패 + end - %% Commit & Rollback - Note over User, PaymentService: - commit --> PaymentService - rollback --> PaymentService + else DB 실패 + PaymentService->>Database: 결제 정보 저장 + activate Database + Database-->>PaymentService: 저장 실패 + deactivate Database + PaymentService->>User: 저장 실패 + end ``` \ No newline at end of file