fix:바로빌 API 응답 구조 수정 (CardEx, BankAccount)

- 카드 조회: CardInfoEx2 → CardEx로 수정 (실제 GetCardEx2 응답 구조)
- 계좌 조회: BankAccountInfoEx → BankAccount/BankAccountEx로 수정 (실제 GetBankAccountEx 응답 구조)
- EcardController, EaccountController의 응답 파싱 로직과 일치시킴

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
김보곤
2026-02-03 20:51:00 +09:00
parent 1d2d7d4bc7
commit 806502768f

View File

@@ -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;
}
}