generated from pricelees/issue-pr-template
[#35] 결제 스키마 재정의 & 예약 조회 페이지 개선 #36
@ -9,7 +9,7 @@ import roomescape.payment.exception.PaymentException
|
|||||||
private val log: KLogger = KotlinLogging.logger {}
|
private val log: KLogger = KotlinLogging.logger {}
|
||||||
|
|
||||||
enum class PaymentType(
|
enum class PaymentType(
|
||||||
private val koreanName: String
|
val koreanName: String
|
||||||
) {
|
) {
|
||||||
NORMAL("일반결제"),
|
NORMAL("일반결제"),
|
||||||
BILLING("자동결제"),
|
BILLING("자동결제"),
|
||||||
@ -21,9 +21,9 @@ enum class PaymentType(
|
|||||||
|
|
||||||
@JvmStatic
|
@JvmStatic
|
||||||
@JsonCreator(mode = JsonCreator.Mode.DELEGATING)
|
@JsonCreator(mode = JsonCreator.Mode.DELEGATING)
|
||||||
fun get(code: String): PaymentType {
|
fun get(name: String): PaymentType {
|
||||||
return CACHE[code.uppercase()] ?: run {
|
return CACHE[name.uppercase()] ?: run {
|
||||||
log.warn { "[PaymentTypes.PaymentType] 결제 타입 조회 실패: type=$code" }
|
log.warn { "[PaymentTypes.PaymentType] 결제 타입 조회 실패: type=$name" }
|
||||||
throw PaymentException(PaymentErrorCode.TYPE_NOT_FOUND)
|
throw PaymentException(PaymentErrorCode.TYPE_NOT_FOUND)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -81,7 +81,7 @@ enum class PaymentStatus {
|
|||||||
}
|
}
|
||||||
|
|
||||||
enum class CardType(
|
enum class CardType(
|
||||||
private val koreanName: String
|
val koreanName: String
|
||||||
) {
|
) {
|
||||||
CREDIT("신용"),
|
CREDIT("신용"),
|
||||||
CHECK("체크"),
|
CHECK("체크"),
|
||||||
@ -103,7 +103,7 @@ enum class CardType(
|
|||||||
}
|
}
|
||||||
|
|
||||||
enum class CardOwnerType(
|
enum class CardOwnerType(
|
||||||
private val koreanName: String
|
val koreanName: String
|
||||||
) {
|
) {
|
||||||
PERSONAL("개인"),
|
PERSONAL("개인"),
|
||||||
CORPORATE("법인"),
|
CORPORATE("법인"),
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user