Compare commits
2 commits
main
...
forge/iss-
| Author | SHA1 | Date | |
|---|---|---|---|
| 09dd3b17b5 | |||
| c850d3851c |
5 changed files with 36 additions and 46 deletions
3
.forge/iss-5a912ed79baf-attempt-1.md
Normal file
3
.forge/iss-5a912ed79baf-attempt-1.md
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
# iss-5a912ed79baf-attempt-1
|
||||||
|
|
||||||
|
Forge 이슈 작업 브랜치 `forge/iss-5a912ed79baf-attempt-1`.
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
# iss-5a912ed79baf-attempt-3
|
|
||||||
|
|
||||||
Forge 이슈 작업 브랜치 `forge/iss-5a912ed79baf-attempt-3`.
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
# iss-87190c9836ac-attempt-1
|
|
||||||
|
|
||||||
Forge 이슈 작업 브랜치 `forge/iss-87190c9836ac-attempt-1`.
|
|
||||||
|
|
@ -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 |
|
|
||||||
|
|
@ -1,38 +1,40 @@
|
||||||
```mermaid
|
```mermaid
|
||||||
sequenceDiagram
|
sequenceDiagram
|
||||||
participant User
|
participant User as 유저
|
||||||
participant PaymentService
|
participant PaymentService as 결제 서비스
|
||||||
participant PaymentGateway
|
participant PaymentGateway as 결제 게이트웨이
|
||||||
participant Database
|
participant Database as 데이터베이스
|
||||||
|
|
||||||
%% Normal Flow
|
User->>PaymentService: 결제 요청
|
||||||
User->>PaymentService: Initiate Payment
|
PaymentService->>Database: 결제 정보 저장
|
||||||
PaymentService->>Database: Store Transaction
|
activate Database
|
||||||
Database-->>PaymentService: Transaction Stored
|
Database-->>PaymentService: 저장 완료
|
||||||
PaymentService->>PaymentGateway: Process Payment
|
deactivate Database
|
||||||
PaymentGateway-->>PaymentService: Payment Success
|
|
||||||
PaymentService->>Database: Update Transaction Status
|
|
||||||
Database-->>PaymentService: Transaction Updated
|
|
||||||
PaymentService-->>User: Payment Success
|
|
||||||
|
|
||||||
%% External Failure Flow
|
alt 정상 흐름
|
||||||
User->>PaymentService: Initiate Payment
|
PaymentService->>PaymentGateway: 결제 요청
|
||||||
PaymentService->>Database: Store Transaction
|
activate PaymentGateway
|
||||||
Database-->>PaymentService: Transaction Stored
|
PaymentGateway-->>PaymentService: 결제 성공
|
||||||
PaymentService->>PaymentGateway: Process Payment
|
deactivate PaymentGateway
|
||||||
PaymentGateway-->>PaymentService: Payment Failure
|
PaymentService->>User: 결제 완료
|
||||||
PaymentService->>Database: Rollback Transaction
|
|
||||||
Database-->>PaymentService: Transaction Rolled Back
|
|
||||||
PaymentService-->>User: Payment Failure
|
|
||||||
|
|
||||||
%% DB Failure Flow
|
else 외부 실패
|
||||||
User->>PaymentService: Initiate Payment
|
PaymentService->>PaymentGateway: 결제 요청
|
||||||
PaymentService->>Database: Store Transaction
|
activate PaymentGateway
|
||||||
Database-->>PaymentService: Transaction Store Failure
|
PaymentGateway-->>PaymentService: 결제 실패
|
||||||
PaymentService-->>User: Payment Failure
|
deactivate PaymentGateway
|
||||||
|
PaymentService->>Database: 롤백
|
||||||
|
activate Database
|
||||||
|
Database-->>PaymentService: 롤백 완료
|
||||||
|
deactivate Database
|
||||||
|
PaymentService->>User: 결제 실패
|
||||||
|
end
|
||||||
|
|
||||||
%% Commit & Rollback
|
else DB 실패
|
||||||
Note over User, PaymentService:
|
PaymentService->>Database: 결제 정보 저장
|
||||||
commit --> PaymentService
|
activate Database
|
||||||
rollback --> PaymentService
|
Database-->>PaymentService: 저장 실패
|
||||||
|
deactivate Database
|
||||||
|
PaymentService->>User: 저장 실패
|
||||||
|
end
|
||||||
```
|
```
|
||||||
Loading…
Add table
Add a link
Reference in a new issue