From b567226ba2201f15cdb16908d0c49f4643d28864 Mon Sep 17 00:00:00 2001 From: pro Date: Fri, 23 Jan 2026 16:16:40 +0900 Subject: [PATCH] =?UTF-8?q?fix:=EC=B9=B4=EB=93=9C=20=EC=82=AC=EC=9A=A9?= =?UTF-8?q?=EB=82=B4=EC=97=AD=20=ED=86=B5=EA=B3=84=20ApprovalType=20?= =?UTF-8?q?=EB=B9=84=EA=B5=90=20=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - ApprovalType을 문자열로 캐스팅하여 비교 - 숫자(1)와 문자열('1') 비교 불일치 문제 해결 - 디버깅용 로그 추가 (첫 번째 로그의 ApprovalType 값 확인) Co-Authored-By: Claude Opus 4.5 --- app/Http/Controllers/Barobill/EcardController.php | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Barobill/EcardController.php b/app/Http/Controllers/Barobill/EcardController.php index 8ae02c8e..73458c8f 100644 --- a/app/Http/Controllers/Barobill/EcardController.php +++ b/app/Http/Controllers/Barobill/EcardController.php @@ -484,8 +484,19 @@ private function parseTransactionLogs($resultData, $savedData = null): array foreach ($rawLogs as $log) { $amount = floatval($log->ApprovalAmount ?? 0); - $approvalType = $log->ApprovalType ?? '1'; + $rawApprovalType = $log->ApprovalType ?? null; + $approvalType = (string)($rawApprovalType ?? '1'); + // 디버깅: ApprovalType 값 확인 (첫 번째 로그만) + if (count($logs) === 0) { + Log::info('[ECard] ApprovalType 샘플', [ + 'raw' => $rawApprovalType, + 'rawType' => gettype($rawApprovalType), + 'casted' => $approvalType, + ]); + } + + // ApprovalType: 1=승인, 2=취소 if ($approvalType === '1') { $totalAmount += $amount; $approvalCount++;