Compare commits

..

6 commits

6 changed files with 46 additions and 18 deletions

View file

@ -1,3 +0,0 @@
# SPRING-ARC-RUN-1783834407-attempt-1-run-d553410e34bd
Forge 이슈 작업 브랜치 `forge/SPRING-ARC-RUN-1783834407-attempt-1-run-d553410e34bd`.

View file

@ -0,0 +1,3 @@
# iss-478981daa4be-attempt-1-run-c0b7e9d69a7a
Forge 이슈 작업 브랜치 `forge/iss-478981daa4be-attempt-1-run-c0b7e9d69a7a`.

View file

@ -0,0 +1,3 @@
# iss-e2325889b406-attempt-1-run-0207d2e91028
Forge 이슈 작업 브랜치 `forge/iss-e2325889b406-attempt-1-run-0207d2e91028`.

View file

@ -1,15 +0,0 @@
# Context
The payment processing architecture defines how various components interact to facilitate payment transactions. Establishing boundaries is critical to ensure that the integration of payment gateways is seamless and maintains the integrity of domain logic.
# Decision
To implement a clean architecture where the domain layer is isolated from the external payment gateway. Payment gateways will be accessed indirectly through a defined port (interface) in the infrastructure layer, allowing for easy replacements and modifications in the future.
# Alternatives
1. **Tightly Coupling the Domain with Payment Gateways**: This approach allows for direct interaction but will hinder the flexibility and testability of the domain logic.
2. **Utilizing an Orchestrator Service**: An additional layer that coordinates between the domain and the payment service, which may introduce unnecessary complexity.
# Consequences
- **Pros**: Increased testability and maintainability of the domain layer, reduced complexity in domain logic, and easier replacement of payment gateways.
- **Cons**: Slightly increased complexity in terms of setting up the interface and adapters, potential initial overhead in development.

View file

@ -0,0 +1,9 @@
# Package Map
| Package | Responsibility | Forbidden Dependencies |
|----------------|---------------------------------------------------------|-----------------------|
| controller | Handle incoming requests, validate input | service |
| service | Business logic, coordination between layers | repository |
| repository | Data access and persistence | domain |
| domain | Core business models and logic | integration |
| integration | Interact with external systems, including payment gateways | domain |

View file

@ -0,0 +1,31 @@
```mermaid
sequenceDiagram
participant User
participant PaymentGateway
participant Database
%% 정상 흐름 %%
User->>PaymentGateway: 결제 요청
PaymentGateway->>User: 결제 승인
User->>Database: 거래 기록 저장
Database-->>User: 거래 성공
%% 커밋 %%
User->>Database: 커밋
Database-->>User: 커밋 완료
%% 외부 실패 %%
User->>PaymentGateway: 결제 요청
PaymentGateway-->>User: 결제 실패
%% 롤백 %%
User->>Database: 롤백
Database-->>User: 롤백 완료
%% DB 실패 %%
User->>PaymentGateway: 결제 요청
PaymentGateway->>User: 결제 승인
User->>Database: 거래 기록 저장
Database-->>User: DB 오류
%% 롤백 %%
User->>Database: 롤백
Database-->>User: 롤백 완료
```