payverse 적용 #344

Merged
klaus merged 44 commits from test into main 2025-10-10 07:44:07 +00:00
Showing only changes of commit 8cc9641bbf - Show all commits

View File

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