LogoBricksmith

Payment 브릭

결제 기능 — 결제 처리, 결제 수단 관리, 거래 내역

Payment 브릭#

결제/결제 관리 기능을 제공하는 vertical slice 브릭입니다.

기본 정보#

항목
브릭명feature-payment
기본 feature_namepayment
Primary EntityPaymentTransaction
Secondary EntityPaymentMethod

주요 기능#

  • 결제 요청/처리
  • 결제 수단 등록/관리
  • 거래 내역 조회
  • 환불 처리
  • PG사 연동

생성 구조#

Frontend#

feature/application/payment/
├── lib/src/
│   ├── data/           # Repository 구현, PG 연동
│   ├── domain/         # PaymentTransaction, PaymentMethod Entity
│   ├── presentation/   # BLoC, 결제 Page, 내역 Widget
│   ├── route/          # GoRouter TypedRoute
│   └── di/             # Dependency Injection
└── test/

Backend#

backend/{project}_server/lib/src/feature/payment/
├── endpoint/       # 결제/환불 엔드포인트
├── service/        # 결제 처리 서비스
├── model/
│   ├── entities/   # PaymentTransaction, PaymentMethod (.spy.yaml)
│   └── enum/       # PaymentStatus, PaymentType 등
├── exception/
├── validation/
└── test/

사용 예시#

bricksmith apply --feature payment

# Entity 커스터마이징
bricksmith apply --feature payment \
  --primary-entity Order \
  --secondary-entity BillingInfo

변수#

VariableDefaultDescription
feature_namepaymentFeature 모듈명
primary_entity PaymentTransaction 주요 Entity (결제 거래)
secondary_entityPaymentMethod보조 Entity (결제 수단)