diff --git a/src/main/kotlin/kr/co/vividnext/sodalive/can/charge/ChargeService.kt b/src/main/kotlin/kr/co/vividnext/sodalive/can/charge/ChargeService.kt index f6dbb69..d0dd85e 100644 --- a/src/main/kotlin/kr/co/vividnext/sodalive/can/charge/ChargeService.kt +++ b/src/main/kotlin/kr/co/vividnext/sodalive/can/charge/ChargeService.kt @@ -342,15 +342,15 @@ class ChargeService( } val body = response.body?.string() ?: throw SodaException("결제정보에 오류가 있습니다.") - println(body) val verifyResponse = objectMapper.readValue(body, PayverseVerifyResponse::class.java) println(verifyResponse) val isSuccess = verifyResponse.resultStatus == "SUCCESS" && verifyResponse.transactionStatus == "SUCCESS" && verifyResponse.orderId.toLongOrNull() == charge.id && - verifyResponse.processingAmount.compareTo(BigDecimal.valueOf(charge.can!!.price.toLong())) == 0 + verifyResponse.processingAmount.compareTo(charge.can!!.price) == 0 + println(isSuccess) if (isSuccess) { // verify 함수의 232~248 라인과 동일 처리 charge.payment?.receiptId = verifyResponse.tid @@ -381,9 +381,7 @@ class ChargeService( } else { throw SodaException("결제정보에 오류가 있습니다.") } - } catch (e: Exception) { - print(e.localizedMessage) - print(e.message) + } catch (_: Exception) { throw SodaException("결제정보에 오류가 있습니다.") } }