-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* feat: 결제 기능 요구사항 반영 * feat: Team 도메인 수정 및 일급 컬렉션화 (#3) * feat: 팀 생성 기능 구현 (#4) * feat: Team 도메인 수정 및 일급 컬렉션화 * feat: 팀 생성 기능 구현
- Loading branch information
1 parent
2c51360
commit a63a709
Showing
12 changed files
with
219 additions
and
127 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 10 additions & 12 deletions
22
src/main/java/com/jangburich/domain/payment/application/PaymentProcessingService.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,25 @@ | ||
package com.jangburich.domain.payment.application; | ||
|
||
import org.springframework.stereotype.Service; | ||
|
||
import com.jangburich.domain.payment.application.strategy.PaymentServiceStrategy; | ||
import com.jangburich.domain.payment.dto.request.PayRequest; | ||
import com.jangburich.domain.payment.dto.response.ApproveResponse; | ||
import com.jangburich.domain.payment.dto.response.ReadyResponse; | ||
|
||
import lombok.RequiredArgsConstructor; | ||
import org.springframework.stereotype.Service; | ||
|
||
@Service | ||
@RequiredArgsConstructor | ||
public class PaymentProcessingService { | ||
|
||
private final PaymentServiceStrategy paymentServiceStrategy; | ||
private final PaymentServiceStrategy paymentServiceStrategy; | ||
|
||
public ReadyResponse processPayment(Long userId, PayRequest payRequest) { | ||
PaymentService paymentService = paymentServiceStrategy.getPaymentService(payRequest.paymentType()); | ||
return paymentService.payReady(userId, payRequest); | ||
} | ||
public ReadyResponse processPayment(String userId, PayRequest payRequest) { | ||
PaymentService paymentService = paymentServiceStrategy.getPaymentService(payRequest.paymentType()); | ||
return paymentService.payReady(userId, payRequest); | ||
} | ||
|
||
public ApproveResponse processSuccess(String pgToken) { | ||
PaymentService paymentService = paymentServiceStrategy.getPaymentService("kakao"); | ||
return paymentService.payApprove(pgToken); | ||
} | ||
public ApproveResponse processSuccess(String userId, String tid, String pgToken) { | ||
PaymentService paymentService = paymentServiceStrategy.getPaymentService("kakao"); | ||
return paymentService.payApprove(userId, tid, pgToken); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.