fix:카드 사용내역 에러 코드 수정 (-25xxx → -24xxx)
- 레거시와 동일한 에러 코드 사용 - -24005: 조회 데이터 없음 - -24001: 등록된 카드 없음 Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -250,7 +250,7 @@ public function transactions(Request $request): JsonResponse
|
||||
|
||||
// 에러 코드 체크
|
||||
$errorCode = $this->checkErrorCode($resultData);
|
||||
if ($errorCode && !in_array($errorCode, [-25005, -25001])) {
|
||||
if ($errorCode && !in_array($errorCode, [-24005, -24001])) {
|
||||
return response()->json([
|
||||
'success' => false,
|
||||
'error' => $this->getErrorMessage($errorCode),
|
||||
@@ -259,7 +259,7 @@ public function transactions(Request $request): JsonResponse
|
||||
}
|
||||
|
||||
// 데이터가 없는 경우
|
||||
if ($errorCode && in_array($errorCode, [-25005, -25001])) {
|
||||
if ($errorCode && in_array($errorCode, [-24005, -24001])) {
|
||||
return response()->json([
|
||||
'success' => true,
|
||||
'data' => [
|
||||
@@ -341,7 +341,7 @@ private function getAllCardsTransactions(string $userId, string $startDate, stri
|
||||
$cardData = $cardResult['data'];
|
||||
$errorCode = $this->checkErrorCode($cardData);
|
||||
|
||||
if (!$errorCode || in_array($errorCode, [-25005, -25001])) {
|
||||
if (!$errorCode || in_array($errorCode, [-24005, -24001])) {
|
||||
$parsed = $this->parseTransactionLogs($cardData, $savedData);
|
||||
foreach ($parsed['logs'] as $log) {
|
||||
$log['cardBrand'] = $this->getCardCompanyName($card->CardCompany ?? '');
|
||||
@@ -507,8 +507,8 @@ private function getErrorMessage(int $errorCode): string
|
||||
$messages = [
|
||||
-10002 => '인증 실패 (-10002). CERTKEY가 올바르지 않거나 만료되었습니다.',
|
||||
-24005 => '사용자 정보 불일치 (-24005). 사업자번호를 확인해주세요.',
|
||||
-25001 => '등록된 카드가 없습니다 (-25001).',
|
||||
-25005 => '조회된 데이터가 없습니다 (-25005).',
|
||||
-24001 => '등록된 카드가 없습니다 (-24001).',
|
||||
-24005 => '조회된 데이터가 없습니다 (-24005).',
|
||||
-25006 => '카드번호가 잘못되었습니다 (-25006).',
|
||||
-25007 => '조회 기간이 잘못되었습니다 (-25007).',
|
||||
];
|
||||
|
||||
Reference in New Issue
Block a user