diff --git a/src/main/java/roomescape/common/exception/ErrorType.kt b/src/main/java/roomescape/common/exception/ErrorType.kt index abc8e03d..8d19efe4 100644 --- a/src/main/java/roomescape/common/exception/ErrorType.kt +++ b/src/main/java/roomescape/common/exception/ErrorType.kt @@ -32,7 +32,7 @@ enum class ErrorType( RESERVATION_NOT_FOUND("예약(Reservation) 정보가 존재하지 않습니다."), RESERVATION_TIME_NOT_FOUND("예약 시간(ReservationTime) 정보가 존재하지 않습니다."), THEME_NOT_FOUND("테마(Theme) 정보가 존재하지 않습니다."), - PAYMENT_NOT_POUND("결제(Payment) 정보가 존재하지 않습니다."), + PAYMENT_NOT_FOUND("결제(Payment) 정보가 존재하지 않습니다."), // 405 Method Not Allowed METHOD_NOT_ALLOWED("지원하지 않는 HTTP Method 입니다."), @@ -52,7 +52,8 @@ enum class ErrorType( // Payment Error PAYMENT_ERROR("결제(취소)에 실패했습니다. 결제(취소) 정보를 확인해주세요."), - PAYMENT_SERVER_ERROR("결제 서버에서 에러가 발생하였습니다. 잠시 후 다시 시도해주세요."); + PAYMENT_SERVER_ERROR("결제 서버에서 에러가 발생하였습니다. 잠시 후 다시 시도해주세요.") + ; companion object { @JvmStatic diff --git a/src/main/java/roomescape/payment/business/PaymentService.kt b/src/main/java/roomescape/payment/business/PaymentService.kt index 02f2d06b..1b4e6deb 100644 --- a/src/main/java/roomescape/payment/business/PaymentService.kt +++ b/src/main/java/roomescape/payment/business/PaymentService.kt @@ -58,7 +58,7 @@ class PaymentService( fun cancelPaymentByAdmin(reservationId: Long): PaymentCancel.Request { val paymentKey: String = paymentRepository.findPaymentKeyByReservationId(reservationId) ?: throw RoomescapeException( - ErrorType.PAYMENT_NOT_POUND, + ErrorType.PAYMENT_NOT_FOUND, "[reservationId: $reservationId]", HttpStatus.NOT_FOUND ) @@ -76,7 +76,7 @@ class PaymentService( val paymentEntity: PaymentEntity = paymentRepository.findByPaymentKey(paymentKey) ?.also { paymentRepository.delete(it) } ?: throw RoomescapeException( - ErrorType.PAYMENT_NOT_POUND, + ErrorType.PAYMENT_NOT_FOUND, "[paymentKey: $paymentKey]", HttpStatus.NOT_FOUND ) @@ -100,7 +100,7 @@ class PaymentService( canceledPaymentRepository.findByPaymentKey(paymentKey)?.let { it.canceledAt = canceledAt } ?: throw RoomescapeException( - ErrorType.PAYMENT_NOT_POUND, + ErrorType.PAYMENT_NOT_FOUND, "[paymentKey: $paymentKey]", HttpStatus.NOT_FOUND )