카드 매입 승인 경로 Spring Boot 3 전환 (ACX-E2E-1785394564819)
Some checks are pending
Verify / source-contract (push) Waiting to run
Some checks are pending
Verify / source-contract (push) Waiting to run
This commit is contained in:
parent
33b519a72c
commit
a098d222b2
1 changed files with 84 additions and 0 deletions
84
src/main/java/com/acquirex/dto/Dtos.java
Normal file
84
src/main/java/com/acquirex/dto/Dtos.java
Normal file
|
|
@ -0,0 +1,84 @@
|
||||||
|
package com.acquirex.dto;
|
||||||
|
|
||||||
|
import jakarta.validation.constraints.*;
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
// ===== ApprovalRequestDto =====
|
||||||
|
class ApprovalRequestDto {
|
||||||
|
@NotBlank(message = "카드 번호는 필수입니다")
|
||||||
|
@Size(max = 20)
|
||||||
|
private String cardNumber;
|
||||||
|
|
||||||
|
@NotBlank(message = "카드사 코드는 필수입니다")
|
||||||
|
@Size(max = 10)
|
||||||
|
private String cardCompanyCode;
|
||||||
|
|
||||||
|
@NotBlank(message = "가맹점 번호는 필수입니다")
|
||||||
|
@Size(max = 15)
|
||||||
|
private String merchantNumber;
|
||||||
|
|
||||||
|
@NotNull(message = "거래 금액은 필수입니다")
|
||||||
|
@DecimalMin(value = "0.01")
|
||||||
|
@Digits(integer = 13, fraction = 2)
|
||||||
|
private BigDecimal amount;
|
||||||
|
|
||||||
|
@DecimalMin(value = "0.00")
|
||||||
|
@Digits(integer = 13, fraction = 2)
|
||||||
|
private BigDecimal vat;
|
||||||
|
|
||||||
|
public String getCardNumber() { return cardNumber; }
|
||||||
|
public void setCardNumber(String cardNumber) { this.cardNumber = cardNumber; }
|
||||||
|
public String getCardCompanyCode() { return cardCompanyCode; }
|
||||||
|
public void setCardCompanyCode(String cardCompanyCode) { this.cardCompanyCode = cardCompanyCode; }
|
||||||
|
public String getMerchantNumber() { return merchantNumber; }
|
||||||
|
public void setMerchantNumber(String merchantNumber) { this.merchantNumber = merchantNumber; }
|
||||||
|
public BigDecimal getAmount() { return amount; }
|
||||||
|
public void setAmount(BigDecimal amount) { this.amount = amount; }
|
||||||
|
public BigDecimal getVat() { return vat; }
|
||||||
|
public void setVat(BigDecimal vat) { this.vat = vat; }
|
||||||
|
}
|
||||||
|
|
||||||
|
// ===== ApprovalResponseDto =====
|
||||||
|
class ApprovalResponseDto {
|
||||||
|
private Long approvalId;
|
||||||
|
private String transactionId;
|
||||||
|
private String approvalNumber;
|
||||||
|
private String status;
|
||||||
|
private BigDecimal amount;
|
||||||
|
private BigDecimal vat;
|
||||||
|
private LocalDateTime approvedAt;
|
||||||
|
private String message;
|
||||||
|
|
||||||
|
public ApprovalResponseDto() {}
|
||||||
|
|
||||||
|
public ApprovalResponseDto(Long approvalId, String transactionId, String approvalNumber,
|
||||||
|
String status, BigDecimal amount, BigDecimal vat,
|
||||||
|
LocalDateTime approvedAt, String message) {
|
||||||
|
this.approvalId = approvalId;
|
||||||
|
this.transactionId = transactionId;
|
||||||
|
this.approvalNumber = approvalNumber;
|
||||||
|
this.status = status;
|
||||||
|
this.amount = amount;
|
||||||
|
this.vat = vat;
|
||||||
|
this.approvedAt = approvedAt;
|
||||||
|
this.message = message;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Long getApprovalId() { return approvalId; }
|
||||||
|
public void setApprovalId(Long approvalId) { this.approvalId = approvalId; }
|
||||||
|
public String getTransactionId() { return transactionId; }
|
||||||
|
public void setTransactionId(String transactionId) { this.transactionId = transactionId; }
|
||||||
|
public String getApprovalNumber() { return approvalNumber; }
|
||||||
|
public void setApprovalNumber(String approvalNumber) { this.approvalNumber = approvalNumber; }
|
||||||
|
public String getStatus() { return status; }
|
||||||
|
public void setStatus(String status) { this.status = status; }
|
||||||
|
public BigDecimal getAmount() { return amount; }
|
||||||
|
public void setAmount(BigDecimal amount) { this.amount = amount; }
|
||||||
|
public BigDecimal getVat() { return vat; }
|
||||||
|
public void setVat(BigDecimal vat) { this.vat = vat; }
|
||||||
|
public LocalDateTime getApprovedAt() { return approvedAt; }
|
||||||
|
public void setApprovedAt(LocalDateTime approvedAt) { this.approvedAt = approvedAt; }
|
||||||
|
public String getMessage() { return message; }
|
||||||
|
public void setMessage(String message) { this.message = message; }
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue