From 806502768f4d813210b225efeb586dfdecae94e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B3=A4?= Date: Tue, 3 Feb 2026 20:51:00 +0900 Subject: [PATCH] =?UTF-8?q?fix:=EB=B0=94=EB=A1=9C=EB=B9=8C=20API=20?= =?UTF-8?q?=EC=9D=91=EB=8B=B5=20=EA=B5=AC=EC=A1=B0=20=EC=88=98=EC=A0=95=20?= =?UTF-8?q?(CardEx,=20BankAccount)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 카드 조회: CardInfoEx2 → CardEx로 수정 (실제 GetCardEx2 응답 구조) - 계좌 조회: BankAccountInfoEx → BankAccount/BankAccountEx로 수정 (실제 GetBankAccountEx 응답 구조) - EcardController, EaccountController의 응답 파싱 로직과 일치시킴 Co-Authored-By: Claude Opus 4.5 --- app/Services/Barobill/BarobillUsageService.php | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/app/Services/Barobill/BarobillUsageService.php b/app/Services/Barobill/BarobillUsageService.php index 3ac55fd8..8bcc2534 100644 --- a/app/Services/Barobill/BarobillUsageService.php +++ b/app/Services/Barobill/BarobillUsageService.php @@ -194,9 +194,13 @@ protected function getBankAccountCount(BarobillMember $member, string $startDate } // 객체에 계좌 목록이 있으면 if (is_object($result['data'])) { - // BankAccountInfoEx 배열이 있는 경우 - if (isset($result['data']->BankAccountInfoEx)) { - $accounts = $result['data']->BankAccountInfoEx; + // GetBankAccountEx 응답: BankAccount 또는 BankAccountEx 배열 + if (isset($result['data']->BankAccount)) { + $accounts = $result['data']->BankAccount; + return is_array($accounts) ? count($accounts) : 1; + } + if (isset($result['data']->BankAccountEx)) { + $accounts = $result['data']->BankAccountEx; return is_array($accounts) ? count($accounts) : 1; } } @@ -237,9 +241,9 @@ protected function getCardCount(BarobillMember $member, string $startDate, strin } // 객체에 카드 목록이 있으면 if (is_object($result['data'])) { - // CardInfoEx2 배열이 있는 경우 - if (isset($result['data']->CardInfoEx2)) { - $cards = $result['data']->CardInfoEx2; + // GetCardEx2 응답: CardEx 배열 + if (isset($result['data']->CardEx)) { + $cards = $result['data']->CardEx; return is_array($cards) ? count($cards) : 1; } }