fix(core,board,page,ecommerce,basic,pay): FULLTEXT 게이트·검색 실패 표면화와 페이지네이션/접두사 결함 정비
- 공개 : MATCH 는 커버 인덱스가 있을 때만 조립 — 부재 시 LIKE 폴백 + 1회 경고, 카테고리 검색 예외를 categories_failed/search_failed 로 표면화하고 basic 템플릿이 오류 안내 렌더 - 공개 동근원: paginate page 명시 전달 (언어팩 check-updates, 상품 문의 목록) - 공개 동근원: raw SQL 접두사/별칭 하드코딩 정리 (board 시더, 7.0.6 업그레이드 스텝, 결제 3플러그인 컨트롤러 51지점 모델 파생 전환) - audit 룰 3종 신설 + repository-raw-hardcoded-table 컨트롤러 확대, 확장 TestCase 오토로더 중복 선언 가드 16지점, ja 언어팩 동기
This commit is contained in:
1 parent
3ccfb24417
commit
7f457a05b3
77 files changed
+2578
-526
No files matched your search
+42
-35
@@ -4,6 +4,8 @@ declare(strict_types=1);
|
||||
|
||||
namespace Plugins\Sirsoft\PayKginicis\Controllers;
|
||||
|
||||
// audit:allow api-doc-coverage 요청 파라미터·응답 구조 무변경 — 테이블명 리터럴을 모델 파생으로 정리한 내부 리팩토링 (#571)
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
use Illuminate\Http\Request;
|
||||
@@ -11,6 +13,8 @@ use Illuminate\Http\Response;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use Illuminate\Support\Facades\DB;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Modules\Sirsoft\Ecommerce\Models\Order;
|
||||
use Modules\Sirsoft\Ecommerce\Models\OrderPayment;
|
||||
use Plugins\Sirsoft\PayKginicis\Services\KgInicisApiService;
|
||||
|
||||
/**
|
||||
@@ -21,9 +25,11 @@ use Plugins\Sirsoft\PayKginicis\Services\KgInicisApiService;
|
||||
*/
|
||||
class UserEscrowConfirmController extends Controller
|
||||
{
|
||||
private const PC_JS_URL_TEST = 'https://stgstdpay.inicis.com/stdjs/INIStdPay_escrow_conf.js';
|
||||
private const PC_JS_URL_LIVE = 'https://stdpay.inicis.com/stdjs/INIStdPay_escrow_conf.js';
|
||||
private const MOBILE_PAY_URL = 'https://mobile.inicis.com/smart/payment/';
|
||||
private const PC_JS_URL_TEST = 'https://stgstdpay.inicis.com/stdjs/INIStdPay_escrow_conf.js';
|
||||
|
||||
private const PC_JS_URL_LIVE = 'https://stdpay.inicis.com/stdjs/INIStdPay_escrow_conf.js';
|
||||
|
||||
private const MOBILE_PAY_URL = 'https://mobile.inicis.com/smart/payment/';
|
||||
|
||||
public function __construct(
|
||||
private readonly KgInicisApiService $apiService,
|
||||
@@ -62,21 +68,21 @@ class UserEscrowConfirmController extends Controller
|
||||
public function pcReturn(Request $request): Response
|
||||
{
|
||||
$resultCode = (string) $request->input('ResultCode', '');
|
||||
$tid = (string) $request->input('tid', '');
|
||||
$tid = (string) $request->input('tid', '');
|
||||
|
||||
Log::info('KG Inicis: escrow PC confirm return', [
|
||||
'result_code' => $resultCode,
|
||||
'tid' => $tid,
|
||||
'tid' => $tid,
|
||||
]);
|
||||
|
||||
$this->saveConfirmResult($tid, [
|
||||
'type' => $resultCode === '00' ? 'confirm' : 'deny',
|
||||
'type' => $resultCode === '00' ? 'confirm' : 'deny',
|
||||
'result_code' => $resultCode,
|
||||
'cnf_date' => (string) $request->input('CNF_Date', ''),
|
||||
'cnf_time' => (string) $request->input('CNF_Time', ''),
|
||||
'dny_date' => (string) $request->input('DNY_Date', ''),
|
||||
'dny_time' => (string) $request->input('DNY_Time', ''),
|
||||
'dny_msg' => (string) $request->input('DNY_DenyMsg', ''),
|
||||
'cnf_date' => (string) $request->input('CNF_Date', ''),
|
||||
'cnf_time' => (string) $request->input('CNF_Time', ''),
|
||||
'dny_date' => (string) $request->input('DNY_Date', ''),
|
||||
'dny_time' => (string) $request->input('DNY_Time', ''),
|
||||
'dny_msg' => (string) $request->input('DNY_DenyMsg', ''),
|
||||
]);
|
||||
|
||||
// 팝업 닫기 + 부모 창 새로고침
|
||||
@@ -103,38 +109,38 @@ class UserEscrowConfirmController extends Controller
|
||||
*/
|
||||
public function mobileReturn(Request $request): RedirectResponse
|
||||
{
|
||||
$status = (string) $request->input('P_STATUS', '');
|
||||
$tid = (string) $request->input('P_ESCROW_TID', '');
|
||||
$status = (string) $request->input('P_STATUS', '');
|
||||
$tid = (string) $request->input('P_ESCROW_TID', '');
|
||||
$clStatus = (string) $request->input('P_CL_STATUS', '');
|
||||
$rmesg = (string) $request->input('P_RMESG1', '');
|
||||
$rmesg = (string) $request->input('P_RMESG1', '');
|
||||
|
||||
Log::info('KG Inicis: escrow mobile confirm return', [
|
||||
'status' => $status,
|
||||
'tid' => $tid,
|
||||
'status' => $status,
|
||||
'tid' => $tid,
|
||||
'cl_status' => $clStatus,
|
||||
]);
|
||||
|
||||
$orderNumber = $this->saveConfirmResult($tid, [
|
||||
'type' => $status === '00' ? 'confirm' : 'deny',
|
||||
'type' => $status === '00' ? 'confirm' : 'deny',
|
||||
'result_code' => $status,
|
||||
'cl_status' => $clStatus,
|
||||
'result_msg' => $rmesg,
|
||||
'cl_status' => $clStatus,
|
||||
'result_msg' => $rmesg,
|
||||
]);
|
||||
|
||||
return redirect($orderNumber ? '/mypage/orders/' . $orderNumber : '/mypage/orders');
|
||||
return redirect($orderNumber ? '/mypage/orders/'.$orderNumber : '/mypage/orders');
|
||||
}
|
||||
|
||||
// ──────────────────────────── Private ────────────────────────────
|
||||
|
||||
private function pcConfirmPage(string $tid): Response
|
||||
{
|
||||
$isTest = $this->apiService->isTestMode();
|
||||
$mid = $this->apiService->getMid();
|
||||
$mKey = $this->apiService->getEscrowConfirmMKey();
|
||||
$isTest = $this->apiService->isTestMode();
|
||||
$mid = $this->apiService->getMid();
|
||||
$mKey = $this->apiService->getEscrowConfirmMKey();
|
||||
$timestamp = (string) round(microtime(true) * 1000);
|
||||
$jsUrl = $isTest ? self::PC_JS_URL_TEST : self::PC_JS_URL_LIVE;
|
||||
$jsUrl = $isTest ? self::PC_JS_URL_TEST : self::PC_JS_URL_LIVE;
|
||||
$returnUrl = url('/plugins/sirsoft-pay_kginicis/payment/escrow-confirm/pc/return');
|
||||
$closeUrl = url('/plugins/sirsoft-pay_kginicis/payment/escrow-confirm/close');
|
||||
$closeUrl = url('/plugins/sirsoft-pay_kginicis/payment/escrow-confirm/close');
|
||||
|
||||
$html = <<<HTML
|
||||
<!DOCTYPE html>
|
||||
@@ -173,9 +179,9 @@ class UserEscrowConfirmController extends Controller
|
||||
|
||||
private function mobileConfirmPage(string $tid): Response
|
||||
{
|
||||
$mid = $this->apiService->getMid();
|
||||
$mid = $this->apiService->getMid();
|
||||
$nextUrl = url('/plugins/sirsoft-pay_kginicis/payment/escrow-confirm/mobile/return');
|
||||
$payUrl = self::MOBILE_PAY_URL;
|
||||
$payUrl = self::MOBILE_PAY_URL;
|
||||
|
||||
$html = <<<HTML
|
||||
<!DOCTYPE html>
|
||||
@@ -222,8 +228,8 @@ class UserEscrowConfirmController extends Controller
|
||||
return null;
|
||||
}
|
||||
|
||||
$row = DB::table('ecommerce_order_payments as p')
|
||||
->join('ecommerce_orders as o', 'o.id', '=', 'p.order_id')
|
||||
$row = DB::table((new OrderPayment)->getTable().' as p')
|
||||
->join((new Order)->getTable().' as o', 'o.id', '=', 'p.order_id')
|
||||
->where('p.transaction_id', $tid)
|
||||
->where('p.pg_provider', 'kginicis')
|
||||
->where('p.is_escrow', true)
|
||||
@@ -232,6 +238,7 @@ class UserEscrowConfirmController extends Controller
|
||||
|
||||
if (! $row) {
|
||||
Log::warning('KG Inicis: escrow confirm — payment not found', ['tid' => $tid]);
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -241,17 +248,17 @@ class UserEscrowConfirmController extends Controller
|
||||
$data,
|
||||
);
|
||||
|
||||
DB::table('ecommerce_order_payments')
|
||||
DB::table((new OrderPayment)->getTable())
|
||||
->where('id', $row->id)
|
||||
->update([
|
||||
'payment_meta' => json_encode($meta, JSON_UNESCAPED_UNICODE),
|
||||
'updated_at' => now(),
|
||||
'updated_at' => now(),
|
||||
]);
|
||||
|
||||
Log::info('KG Inicis: escrow confirm saved', [
|
||||
'order_number' => $row->order_number,
|
||||
'tid' => $tid,
|
||||
'type' => $data['type'] ?? '',
|
||||
'tid' => $tid,
|
||||
'type' => $data['type'] ?? '',
|
||||
]);
|
||||
|
||||
return $row->order_number;
|
||||
@@ -259,8 +266,8 @@ class UserEscrowConfirmController extends Controller
|
||||
|
||||
private function findEscrowPayment(string $orderNumber, int $userId): ?object
|
||||
{
|
||||
return DB::table('ecommerce_order_payments as p')
|
||||
->join('ecommerce_orders as o', 'o.id', '=', 'p.order_id')
|
||||
return DB::table((new OrderPayment)->getTable().' as p')
|
||||
->join((new Order)->getTable().' as o', 'o.id', '=', 'p.order_id')
|
||||
->where('o.order_number', $orderNumber)
|
||||
->where('o.user_id', $userId)
|
||||
->where('p.pg_provider', 'kginicis')
|
||||
|
||||
Reference in new issue
Block a user