From d536a65fb4e9b25bfa6f976c451bd005621b765d Mon Sep 17 00:00:00 2001 From: Klaus Date: Fri, 26 Sep 2025 16:23:11 +0900 Subject: [PATCH] =?UTF-8?q?fix(charge):=20payverse=20pg=20payload=20-=20re?= =?UTF-8?q?questAmount=EC=9D=98=20=EA=B0=92=EC=9D=84=20BigDecimal=EB=A1=9C?= =?UTF-8?q?=20=EC=B2=98=EB=A6=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../co/vividnext/sodalive/can/charge/ChargeService.kt | 10 +++++++--- 1 file changed, 7 insertions(+), 3 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 cdfe200..ad79c1e 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 @@ -137,10 +137,12 @@ class ChargeService( false } } + PaymentStatus.COMPLETE -> { // 이미 결제가 완료된 경우 성공 처리(idempotent) true } + else -> { // 그 외 상태는 404 false @@ -240,7 +242,7 @@ class ChargeService( "customerId" to customerId, "productName" to can.title, "requestCurrency" to requestCurrency, - "requestAmount" to amount.toString(), + "requestAmount" to amount, "reqDate" to reqDate, "billkeyReq" to "N", "mallReserved" to "", @@ -317,6 +319,7 @@ class ChargeService( throw SodaException("결제정보에 오류가 있습니다.") } } + PaymentStatus.COMPLETE -> { // 이미 결제가 완료된 경우, 동일한 데이터로 즉시 반환 return ChargeCompleteResponse( @@ -325,6 +328,7 @@ class ChargeService( isFirstCharged = chargeRepository.isFirstCharged(memberId) ) } + else -> { throw SodaException("결제정보에 오류가 있습니다.") } @@ -388,7 +392,7 @@ class ChargeService( } else { throw SodaException("결제정보에 오류가 있습니다.") } - } catch (e: Exception) { + } catch (_: Exception) { throw SodaException("결제정보에 오류가 있습니다.") } } else { @@ -438,7 +442,7 @@ class ChargeService( } else { throw SodaException("결제정보에 오류가 있습니다.") } - } catch (e: Exception) { + } catch (_: Exception) { throw SodaException("결제정보에 오류가 있습니다.") } } else {