-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* refactor: Pay 엔티티 필드 수정 * feat: 결제 준비, 결제 완료 DTO 생성
- Loading branch information
Showing
11 changed files
with
131 additions
and
111 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
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
12 changes: 12 additions & 0 deletions
12
src/main/java/saphy/saphy/pay/dto/request/PayCompleteRequest.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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package saphy.saphy.pay.dto.request; | ||
|
||
import java.math.BigDecimal; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
public class PayCompleteRequest { | ||
private String merchantUid; | ||
private Long itemId; | ||
private String impUid; | ||
private BigDecimal amount; | ||
} |
27 changes: 27 additions & 0 deletions
27
src/main/java/saphy/saphy/pay/dto/request/PayPrepareRequest.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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package saphy.saphy.pay.dto.request; | ||
|
||
import java.math.BigDecimal; | ||
import lombok.Getter; | ||
import saphy.saphy.item.domain.Item; | ||
import saphy.saphy.pay.domain.Pay; | ||
import saphy.saphy.pay.domain.PayMethod; | ||
import saphy.saphy.pay.domain.PayStatus; | ||
|
||
@Getter | ||
public class PayPrepareRequest { | ||
private Long itemId; | ||
private int quantity; | ||
private BigDecimal amount; | ||
private PayMethod payMethod; | ||
|
||
public Pay toEntity(Item item, String merchantUid, BigDecimal amount, PayMethod payMethod ){ | ||
return Pay.builder() | ||
.item(item) | ||
.merchantUid(merchantUid) | ||
.amount(amount) | ||
.payMethod(payMethod) | ||
.status(PayStatus.PENDING) | ||
.build(); | ||
} | ||
|
||
} |
This file was deleted.
Oops, something went wrong.
14 changes: 14 additions & 0 deletions
14
src/main/java/saphy/saphy/pay/dto/response/PayCompleteResponse.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 |
---|---|---|
@@ -0,0 +1,14 @@ | ||
package saphy.saphy.pay.dto.response; | ||
|
||
import lombok.Getter; | ||
import saphy.saphy.pay.domain.PayStatus; | ||
|
||
@Getter | ||
public class PayCompleteResponse { | ||
private PayStatus status; | ||
|
||
|
||
public PayCompleteResponse(PayStatus status) { | ||
this.status = status; | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
src/main/java/saphy/saphy/pay/dto/response/PayPrepareResponse.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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package saphy.saphy.pay.dto.response; | ||
|
||
import java.math.BigDecimal; | ||
import lombok.Getter; | ||
|
||
@Getter | ||
public class PayPrepareResponse { | ||
private String merchantUid; | ||
private BigDecimal amount; | ||
|
||
public PayPrepareResponse(String merchantUid, BigDecimal amount) { | ||
this.merchantUid = merchantUid; | ||
this.amount = amount; | ||
} | ||
} |
17 changes: 0 additions & 17 deletions
17
src/main/java/saphy/saphy/pay/dto/response/PayResponse.java
This file was deleted.
Oops, something went wrong.
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