fix(core,board,ecommerce,plugins): API 문서 미채움 마커 전수 채움 + 미해석 lang 키 정정 + IDV 조회 시도횟수 비노출
이슈 본연: API 레퍼런스의 미채움 마커 5종(실측 제외/TODO/필드 없음/대표 에러 없음)
1,194건을 코드에서 읽어 전수 채우고(0건), api:docgen 재생성이 사람이 채운 내용을
손실·열화시키던 멱등성 결함 4종(CRLF, 표 파이프 이스케이프, 에러 서술 보존, 중복
라우트명 키)을 근본 수정. --check 를 실측 제외와 드리프트가 구분되도록 재정의.
ParameterDescriber/ResourceFieldDescriber 에 leaf 폴백·SEO 스코프·공통 사전 확장.
파생 결함(문서 실측 중 발견): ResponseHelper 기본 메시지 키 6종이 존재하지 않는
messages.* 를 가리켜 응답 message 가 번역문 대신 키 문자열로 노출되던 문제를 common.*
으로 정정하고, 코어 7 + gdpr/marketing/pay_kginicis/verification/ecommerce 확장의
호출부와 누락 lang 키(게시판 10키 + 이커머스 category_images 4키 포함)를 ko/en/ja
전수 정정. 중복 그룹 키 2건은 기존 키로 호출부 통합.
보안: GET /api/identity/challenges/{id} 는 권한 가드 없는 공개 폴링 엔드포인트인데
Service::getStatus 가 attempts/max_attempts 를 응답에 담아 남은 시도 횟수를 추론할 수
있었다. 두 필드를 제거하고, 챌린지 화면(admin_basic/basic)의 서버 attempts 참조를
제거(남은 횟수 UI 는 query fallback + verify 실패 시 로컬 증가로 유지).
부수 정리(변경셋에 들어온 board 컨트롤러의 audit 사전 결함): FormRequest 4개 신설로
base Request 주입 제거, CommentController 의 Board 직접 호출을 BoardService 위임으로
전환, PHPDoc @return 보강. board 스위트에서 발견한 stale test 3건(seed SSoT 불일치,
admin 계정 user 역할 누락)도 같은 세션에서 정정.
버전 정렬(공개 release 기준): 코어 7.0.3→7.0.4, sirsoft-board 1.0.1→1.0.2,
verification_kginicis 1.0.0→1.0.1, admin_basic 1.0.1→1.0.4.
This commit is contained in:
1 parent
b07d6c8953
commit
6c8381f164
155 files changed
+17192
-1829
No files matched your search
+1
-1
@@ -35,7 +35,7 @@ class AdminCbtCvsOperationsController extends AdminBaseController
|
||||
);
|
||||
}
|
||||
|
||||
return ResponseHelper::success('messages.success', $summary);
|
||||
return ResponseHelper::success('common.success', $summary);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -28,7 +28,7 @@ class AdminCbtReconciliationController extends AdminBaseController
|
||||
*/
|
||||
public function show(string $orderNumber): JsonResponse
|
||||
{
|
||||
return ResponseHelper::success('messages.success', $this->reconciliationService->get($orderNumber));
|
||||
return ResponseHelper::success('common.success', $this->reconciliationService->get($orderNumber));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+21
-21
@@ -34,7 +34,7 @@ class AdminCbtTestProductController extends AdminBaseController
|
||||
{
|
||||
try {
|
||||
$timestamp = now()->format('YmdHis');
|
||||
$productCode = 'CBT-TEST-' . $timestamp;
|
||||
$productCode = 'CBT-TEST-'.$timestamp;
|
||||
|
||||
// ProductService 가 currency_code 를 모듈 default_currency 로 자동 설정.
|
||||
// 운영 환경의 default_currency 가 JPY 이면 selling_price 가 JPY 로 해석됨.
|
||||
@@ -42,45 +42,45 @@ class AdminCbtTestProductController extends AdminBaseController
|
||||
// options 배열은 옵션 없는 상품도 default 1행 필수 — CartService 가 default option 을
|
||||
// 못 찾으면 "존재하지 않는 옵션입니다" 예외를 던져 장바구니 담기가 실패한다.
|
||||
$product = $this->productService->create([
|
||||
'name' => [
|
||||
'name' => [
|
||||
'ko' => '[테스트] CBT 일본 결제',
|
||||
'en' => '[Test] CBT Japan Payment',
|
||||
'ja' => '[テスト] CBT 日本決済',
|
||||
],
|
||||
'product_code' => $productCode,
|
||||
'sku' => 'KGINICIS-' . $productCode,
|
||||
'selling_price' => 100, // 100엔 — CBT 테스트 최소 단위
|
||||
'list_price' => 100,
|
||||
'product_code' => $productCode,
|
||||
'sku' => 'KGINICIS-'.$productCode,
|
||||
'selling_price' => 100, // 100엔 — CBT 테스트 최소 단위
|
||||
'list_price' => 100,
|
||||
'stock_quantity' => 9999,
|
||||
'description' => [
|
||||
'description' => [
|
||||
'ko' => 'KG 이니시스 일본 결제(CBT, JPPG) 테스트 전용 상품입니다.',
|
||||
'en' => 'KG Inicis Japan Payment (CBT, JPPG) test product.',
|
||||
'ja' => 'KG イニシス 日本決済 (CBT, JPPG) テスト用商品です。',
|
||||
],
|
||||
'sales_status' => 'on_sale',
|
||||
'sales_status' => 'on_sale',
|
||||
'display_status' => 'visible',
|
||||
'options' => [
|
||||
'options' => [
|
||||
[
|
||||
'option_code' => 'default',
|
||||
'option_values' => [],
|
||||
'option_name' => ['ko' => '기본', 'en' => 'Default', 'ja' => 'デフォルト'],
|
||||
'stock_quantity' => 9999,
|
||||
'is_default' => true,
|
||||
'is_active' => true,
|
||||
'option_code' => 'default',
|
||||
'option_values' => [],
|
||||
'option_name' => ['ko' => '기본', 'en' => 'Default', 'ja' => 'デフォルト'],
|
||||
'stock_quantity' => 9999,
|
||||
'is_default' => true,
|
||||
'is_active' => true,
|
||||
],
|
||||
],
|
||||
]);
|
||||
|
||||
Log::info('KG Inicis CBT: test product created', [
|
||||
'product_id' => $product->id,
|
||||
'product_id' => $product->id,
|
||||
'product_code' => $product->product_code,
|
||||
]);
|
||||
|
||||
return ResponseHelper::success('messages.success', [
|
||||
'product_id' => $product->id,
|
||||
return ResponseHelper::success('common.success', [
|
||||
'product_id' => $product->id,
|
||||
'product_code' => $product->product_code,
|
||||
'admin_url' => '/admin/ecommerce/products/' . $product->id . '/edit',
|
||||
'shop_url' => '/shop/products/' . $product->id . '?locale=ja',
|
||||
'admin_url' => '/admin/ecommerce/products/'.$product->id.'/edit',
|
||||
'shop_url' => '/shop/products/'.$product->id.'?locale=ja',
|
||||
]);
|
||||
} catch (\Throwable $e) {
|
||||
Log::error('KG Inicis CBT: test product creation failed', [
|
||||
@@ -88,7 +88,7 @@ class AdminCbtTestProductController extends AdminBaseController
|
||||
'trace' => $e->getTraceAsString(),
|
||||
]);
|
||||
|
||||
return ResponseHelper::error('messages.failed', 500, ['detail' => $e->getMessage()]);
|
||||
return ResponseHelper::error('common.failed', 500, ['detail' => $e->getMessage()]);
|
||||
}
|
||||
}
|
||||
}
|
||||
+8
-8
@@ -72,7 +72,7 @@ class AdminEscrowDeliveryController extends AdminBaseController
|
||||
$payment = $this->findEscrowPayment($orderNumber);
|
||||
|
||||
if (! $payment) {
|
||||
return ResponseHelper::success('messages.success', null);
|
||||
return ResponseHelper::success('common.success', null);
|
||||
}
|
||||
|
||||
$address = DB::table('ecommerce_order_addresses as a')
|
||||
@@ -94,7 +94,7 @@ class AdminEscrowDeliveryController extends AdminBaseController
|
||||
$escrowConfirm = $meta['escrow_confirm'] ?? null;
|
||||
$denyConfirmed = isset($meta['escrow_deny_confirm']);
|
||||
|
||||
return ResponseHelper::success('messages.success', [
|
||||
return ResponseHelper::success('common.success', [
|
||||
'has_escrow_payment' => true,
|
||||
'tid' => $payment->transaction_id,
|
||||
'price' => (int) round((float) $payment->paid_amount_local),
|
||||
@@ -124,17 +124,17 @@ class AdminEscrowDeliveryController extends AdminBaseController
|
||||
$exCode = trim((string) $request->input('ex_code', ''));
|
||||
|
||||
if ($invoice === '') {
|
||||
return ResponseHelper::error('messages.failed', 422, ['invoice' => ['운송장번호를 입력해주세요.']]);
|
||||
return ResponseHelper::error('common.failed', 422, ['invoice' => ['운송장번호를 입력해주세요.']]);
|
||||
}
|
||||
|
||||
if ($exCode === '' || ! array_key_exists($exCode, self::COURIER_CODES)) {
|
||||
return ResponseHelper::error('messages.failed', 422, ['ex_code' => ['택배사를 선택해주세요.']]);
|
||||
return ResponseHelper::error('common.failed', 422, ['ex_code' => ['택배사를 선택해주세요.']]);
|
||||
}
|
||||
|
||||
$payment = $this->findEscrowPayment($orderNumber);
|
||||
|
||||
if (! $payment) {
|
||||
return ResponseHelper::error('messages.failed', 404, null);
|
||||
return ResponseHelper::error('common.failed', 404, null);
|
||||
}
|
||||
|
||||
$report = in_array($request->input('report'), ['I', 'U'], true) ? $request->input('report') : 'I';
|
||||
@@ -206,7 +206,7 @@ class AdminEscrowDeliveryController extends AdminBaseController
|
||||
'pg_response' => $sanitizedPgResponse,
|
||||
]);
|
||||
|
||||
return ResponseHelper::error('messages.failed', 502, [
|
||||
return ResponseHelper::error('common.failed', 502, [
|
||||
'message' => [$pgResponse['resultMsg'] ?? '배송등록에 실패했습니다.'],
|
||||
]);
|
||||
}
|
||||
@@ -240,7 +240,7 @@ class AdminEscrowDeliveryController extends AdminBaseController
|
||||
'ex_name' => $exName,
|
||||
]);
|
||||
|
||||
return ResponseHelper::success('messages.success', [
|
||||
return ResponseHelper::success('common.success', [
|
||||
'result_code' => $resultCode,
|
||||
'result_msg' => $pgResponse['resultMsg'] ?? 'OK',
|
||||
'invoice' => $invoice,
|
||||
@@ -253,7 +253,7 @@ class AdminEscrowDeliveryController extends AdminBaseController
|
||||
'error' => $e->getMessage(),
|
||||
]);
|
||||
|
||||
return ResponseHelper::error('messages.failed', 500, [
|
||||
return ResponseHelper::error('common.failed', 500, [
|
||||
'message' => [$e->getMessage()],
|
||||
]);
|
||||
}
|
||||
|
||||
+5
-5
@@ -53,14 +53,14 @@ class AdminEscrowDenyConfirmController extends AdminBaseController
|
||||
$payment = $this->findEscrowPayment($orderNumber);
|
||||
|
||||
if (! $payment) {
|
||||
return ResponseHelper::error('messages.failed', 404, null);
|
||||
return ResponseHelper::error('common.failed', 404, null);
|
||||
}
|
||||
|
||||
$meta = $payment->payment_meta ? json_decode($payment->payment_meta, true) : [];
|
||||
|
||||
// 이미 구매거절확인 완료된 경우
|
||||
if (isset($meta['escrow_deny_confirm'])) {
|
||||
return ResponseHelper::error('messages.failed', 422, [
|
||||
return ResponseHelper::error('common.failed', 422, [
|
||||
'message' => ['이미 구매거절확인이 완료되었습니다.'],
|
||||
]);
|
||||
}
|
||||
@@ -91,7 +91,7 @@ class AdminEscrowDenyConfirmController extends AdminBaseController
|
||||
'pg_response' => $sanitizedPgResponse,
|
||||
]);
|
||||
|
||||
return ResponseHelper::error('messages.failed', 502, [
|
||||
return ResponseHelper::error('common.failed', 502, [
|
||||
'message' => [$pgResponse['resultMsg'] ?? '구매거절확인에 실패했습니다.'],
|
||||
]);
|
||||
}
|
||||
@@ -116,7 +116,7 @@ class AdminEscrowDenyConfirmController extends AdminBaseController
|
||||
'tid' => $payment->transaction_id,
|
||||
]);
|
||||
|
||||
return ResponseHelper::success('messages.success', [
|
||||
return ResponseHelper::success('common.success', [
|
||||
'result_code' => $resultCode,
|
||||
'result_msg' => $pgResponse['resultMsg'] ?? 'OK',
|
||||
]);
|
||||
@@ -127,7 +127,7 @@ class AdminEscrowDenyConfirmController extends AdminBaseController
|
||||
'error' => $e->getMessage(),
|
||||
]);
|
||||
|
||||
return ResponseHelper::error('messages.failed', 500, [
|
||||
return ResponseHelper::error('common.failed', 500, [
|
||||
'message' => [$e->getMessage()],
|
||||
]);
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ class AdminOrderListController extends AdminBaseController
|
||||
}
|
||||
}
|
||||
|
||||
return ResponseHelper::success('messages.success', $map);
|
||||
return ResponseHelper::success('common.success', $map);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
+1
-1
@@ -21,7 +21,7 @@ class AdminSettingsStatusController
|
||||
*/
|
||||
public function testMode(): JsonResponse
|
||||
{
|
||||
return ResponseHelper::success('messages.success', [
|
||||
return ResponseHelper::success('common.success', [
|
||||
'is_test_mode' => (bool) $this->settingsService->get(self::PLUGIN_IDENTIFIER, 'is_test_mode', true),
|
||||
]);
|
||||
}
|
||||
|
||||
+5
-5
@@ -31,7 +31,7 @@ class AdminTransactionController extends AdminBaseController
|
||||
$tid = trim((string) $request->input('tid', ''));
|
||||
|
||||
if ($tid === '') {
|
||||
return ResponseHelper::error('messages.failed', 422, ['tid' => ['TID를 입력하세요.']]);
|
||||
return ResponseHelper::error('common.failed', 422, ['tid' => ['TID를 입력하세요.']]);
|
||||
}
|
||||
|
||||
return $this->queryByTid($tid);
|
||||
@@ -55,7 +55,7 @@ class AdminTransactionController extends AdminBaseController
|
||||
->first();
|
||||
|
||||
if (! $payment) {
|
||||
return ResponseHelper::success('messages.success', null);
|
||||
return ResponseHelper::success('common.success', null);
|
||||
}
|
||||
|
||||
return $this->queryByTid($payment->transaction_id);
|
||||
@@ -117,7 +117,7 @@ class AdminTransactionController extends AdminBaseController
|
||||
is_string($embeddedPgProvider) ? $embeddedPgProvider : null,
|
||||
);
|
||||
|
||||
return ResponseHelper::success('messages.success', $result);
|
||||
return ResponseHelper::success('common.success', $result);
|
||||
}
|
||||
|
||||
// 결제 시점 모드(payment_meta.is_test_mode) 가 있으면 그 모드의 inapi 자격증명으로 조회.
|
||||
@@ -140,14 +140,14 @@ class AdminTransactionController extends AdminBaseController
|
||||
is_string($embeddedPgProvider) ? $embeddedPgProvider : null,
|
||||
);
|
||||
|
||||
return ResponseHelper::success('messages.success', $result);
|
||||
return ResponseHelper::success('common.success', $result);
|
||||
} catch (\Exception $e) {
|
||||
Log::error('KG Inicis queryTransaction failed', [
|
||||
'tid' => $tid,
|
||||
'error' => $e->getMessage(),
|
||||
]);
|
||||
|
||||
return ResponseHelper::error('messages.failed', 502, null);
|
||||
return ResponseHelper::error('common.failed', 502, null);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+10
-10
@@ -43,7 +43,7 @@ class PaymentCloseReportController
|
||||
|
||||
$rateLimitKey = $this->rateLimitKey($request, $oid);
|
||||
if (RateLimiter::tooManyAttempts($rateLimitKey, 20)) {
|
||||
return ResponseHelper::error('messages.failed', 429, [
|
||||
return ResponseHelper::error('common.failed', 429, [
|
||||
'message' => ['Too many KG Inicis payment close reports. Please try again later.'],
|
||||
]);
|
||||
}
|
||||
@@ -58,13 +58,13 @@ class PaymentCloseReportController
|
||||
|
||||
$order = $this->orderService->findByOrderNumber($oid);
|
||||
if (! $order) {
|
||||
return ResponseHelper::error('messages.failed', 404, [
|
||||
return ResponseHelper::error('common.failed', 404, [
|
||||
'message' => ['Order not found.'],
|
||||
]);
|
||||
}
|
||||
|
||||
if (! $order->order_status->isBeforePayment()) {
|
||||
return ResponseHelper::success('messages.success', [
|
||||
return ResponseHelper::success('common.success', [
|
||||
'status' => 'ignored',
|
||||
'reason' => 'order_not_payable',
|
||||
]);
|
||||
@@ -76,20 +76,20 @@ class PaymentCloseReportController
|
||||
// 어긋나는 race 차단). failPayment 자체에도 동일 가드가 있으나, 여기서 차단해 불필요한
|
||||
// 마일리지 복원 시도·결제취소 이력 기록까지 미연에 방지한다.
|
||||
if ($order->payment?->isPaid()) {
|
||||
return ResponseHelper::success('messages.success', [
|
||||
return ResponseHelper::success('common.success', [
|
||||
'status' => 'ignored',
|
||||
'reason' => 'payment_already_paid',
|
||||
]);
|
||||
}
|
||||
|
||||
if (strtoupper((string) $order->currency) !== 'KRW') {
|
||||
return ResponseHelper::error('messages.failed', 422, [
|
||||
return ResponseHelper::error('common.failed', 422, [
|
||||
'message' => ['Standard KG Inicis close report is only available for KRW orders.'],
|
||||
]);
|
||||
}
|
||||
|
||||
if (! $this->requestMatchesOrderBuyer($request, $order)) {
|
||||
return ResponseHelper::error('messages.failed', 403, [
|
||||
return ResponseHelper::error('common.failed', 403, [
|
||||
'message' => ['Order buyer verification failed.'],
|
||||
]);
|
||||
}
|
||||
@@ -98,13 +98,13 @@ class PaymentCloseReportController
|
||||
'received_amount' => $price,
|
||||
]);
|
||||
if ($expectedPrice === null) {
|
||||
return ResponseHelper::error('messages.failed', 422, [
|
||||
return ResponseHelper::error('common.failed', 422, [
|
||||
'message' => ['Payment currency is not chargeable.'],
|
||||
]);
|
||||
}
|
||||
|
||||
if ($price !== $expectedPrice) {
|
||||
return ResponseHelper::error('messages.failed', 422, [
|
||||
return ResponseHelper::error('common.failed', 422, [
|
||||
'message' => ['Payment amount does not match the order amount.'],
|
||||
]);
|
||||
}
|
||||
@@ -129,11 +129,11 @@ class PaymentCloseReportController
|
||||
$closeReason !== '' ? $closeReason : self::FAILURE_MESSAGE,
|
||||
);
|
||||
|
||||
return ResponseHelper::success('messages.success', [
|
||||
return ResponseHelper::success('common.success', [
|
||||
'status' => 'recorded',
|
||||
]);
|
||||
} catch (LockTimeoutException) {
|
||||
return ResponseHelper::success('messages.success', [
|
||||
return ResponseHelper::success('common.success', [
|
||||
'status' => 'ignored',
|
||||
'reason' => 'callback_in_progress',
|
||||
]);
|
||||
|
||||
Reference in new issue
Block a user