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 75c604d..d26e2df 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 @@ -265,7 +265,12 @@ class ChargeService( val savedCharge = chargeRepository.save(charge) val chargeId = savedCharge.id!! - val amount = savedCharge.payment!!.price.setScale(4, RoundingMode.HALF_UP).stripTrailingZeros() + val amount = BigDecimal( + savedCharge.payment!!.price + .setScale(4, RoundingMode.HALF_UP) + .stripTrailingZeros() + .toPlainString() + ) val reqDate = savedCharge.createdAt!!.format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss")) val sign = DigestUtils.sha512Hex( String.format( @@ -374,7 +379,8 @@ class ChargeService( } else { throw SodaException("결제정보에 오류가 있습니다.") } - } catch (_: Exception) { + } catch (e: Exception) { + e.printStackTrace() throw SodaException("결제정보에 오류가 있습니다.") } }