fix(charge): payverse pg payload

- requestAmount의 값을 BigDecimal로 처리
This commit is contained in:
2025-09-26 16:23:11 +09:00
parent 03149a637d
commit d536a65fb4

View File

@@ -137,10 +137,12 @@ class ChargeService(
false false
} }
} }
PaymentStatus.COMPLETE -> { PaymentStatus.COMPLETE -> {
// 이미 결제가 완료된 경우 성공 처리(idempotent) // 이미 결제가 완료된 경우 성공 처리(idempotent)
true true
} }
else -> { else -> {
// 그 외 상태는 404 // 그 외 상태는 404
false false
@@ -240,7 +242,7 @@ class ChargeService(
"customerId" to customerId, "customerId" to customerId,
"productName" to can.title, "productName" to can.title,
"requestCurrency" to requestCurrency, "requestCurrency" to requestCurrency,
"requestAmount" to amount.toString(), "requestAmount" to amount,
"reqDate" to reqDate, "reqDate" to reqDate,
"billkeyReq" to "N", "billkeyReq" to "N",
"mallReserved" to "", "mallReserved" to "",
@@ -317,6 +319,7 @@ class ChargeService(
throw SodaException("결제정보에 오류가 있습니다.") throw SodaException("결제정보에 오류가 있습니다.")
} }
} }
PaymentStatus.COMPLETE -> { PaymentStatus.COMPLETE -> {
// 이미 결제가 완료된 경우, 동일한 데이터로 즉시 반환 // 이미 결제가 완료된 경우, 동일한 데이터로 즉시 반환
return ChargeCompleteResponse( return ChargeCompleteResponse(
@@ -325,6 +328,7 @@ class ChargeService(
isFirstCharged = chargeRepository.isFirstCharged(memberId) isFirstCharged = chargeRepository.isFirstCharged(memberId)
) )
} }
else -> { else -> {
throw SodaException("결제정보에 오류가 있습니다.") throw SodaException("결제정보에 오류가 있습니다.")
} }
@@ -388,7 +392,7 @@ class ChargeService(
} else { } else {
throw SodaException("결제정보에 오류가 있습니다.") throw SodaException("결제정보에 오류가 있습니다.")
} }
} catch (e: Exception) { } catch (_: Exception) {
throw SodaException("결제정보에 오류가 있습니다.") throw SodaException("결제정보에 오류가 있습니다.")
} }
} else { } else {
@@ -438,7 +442,7 @@ class ChargeService(
} else { } else {
throw SodaException("결제정보에 오류가 있습니다.") throw SodaException("결제정보에 오류가 있습니다.")
} }
} catch (e: Exception) { } catch (_: Exception) {
throw SodaException("결제정보에 오류가 있습니다.") throw SodaException("결제정보에 오류가 있습니다.")
} }
} else { } else {