From 4b13265737f0704d072668612bb3397f6438b9a9 Mon Sep 17 00:00:00 2001 From: Klaus Date: Thu, 2 Oct 2025 22:23:06 +0900 Subject: [PATCH] =?UTF-8?q?fix(charge):=20payverseVerify=20=EA=B2=B0?= =?UTF-8?q?=EC=A0=9C=EA=B8=88=EC=95=A1=20=EB=B9=84=EA=B5=90=EB=A1=9C?= =?UTF-8?q?=EC=A7=81=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - BigDecimal끼리 비교하는데 casting 로직이 추가되어 문제가 생기던 버그 수정 --- .../kr/co/vividnext/sodalive/can/charge/ChargeService.kt | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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("결제정보에 오류가 있습니다.") } }