Compare commits

...

2 Commits

Author SHA1 Message Date
c5bc610e2f webhook 호출 IP 확인을 위해 print 추가 2025-10-03 01:48:19 +09:00
a86a24ca34 사용하지 않는 print 제거 2025-10-03 01:46:52 +09:00
2 changed files with 3 additions and 3 deletions

View File

@@ -66,6 +66,9 @@ class ChargeController(
header.split(",")[0].trim() // 첫 번째 값이 클라이언트 IP
}
println(remoteIp)
println(payverseInboundIp)
if (remoteIp != payverseInboundIp) {
throw ResponseStatusException(HttpStatus.NOT_FOUND)
}

View File

@@ -343,9 +343,7 @@ class ChargeService(
}
val body = response.body?.string() ?: throw SodaException("결제정보에 오류가 있습니다.")
println(body)
val verifyResponse = objectMapper.readValue(body, PayverseVerifyResponse::class.java)
println(verifyResponse)
val customerId = "${serverEnv}_user_${member.id!!}"
val isSuccess = verifyResponse.resultStatus == "SUCCESS" &&
@@ -354,7 +352,6 @@ class ChargeService(
verifyResponse.productName == charge.title &&
verifyResponse.customerId == customerId &&
verifyResponse.requestAmount.compareTo(charge.can!!.price) == 0
println(isSuccess)
if (isSuccess) {
// verify 함수의 232~248 라인과 동일 처리