diff --git a/adm/shop_admin/configformupdate.php b/adm/shop_admin/configformupdate.php index 099689da2..738c48947 100644 --- a/adm/shop_admin/configformupdate.php +++ b/adm/shop_admin/configformupdate.php @@ -21,6 +21,12 @@ if ($_FILES['mobile_logo_img2']['name']) upload_file($_FILES['mobile_logo_img2'] $de_kcp_mid = substr($_POST['de_kcp_mid'],0,3); +// kcp 전자결제를 사용할 때 site key 입력체크 +if($de_pg_service == 'kcp' && ($de_iche_use || $de_vbank_use || $de_hp_use || $de_card_use)) { + if(trim($de_kcp_site_key) == '') + alert('KCP SITE KEY를 입력해 주십시오.'); +} + // // 영카트 default // diff --git a/mobile/shop/settle_kcp.inc.php b/mobile/shop/settle_kcp.inc.php index 579d43841..148eb229e 100644 --- a/mobile/shop/settle_kcp.inc.php +++ b/mobile/shop/settle_kcp.inc.php @@ -36,4 +36,16 @@ else { $g_conf_site_cd = $default['de_kcp_mid']; $g_conf_site_key = $default['de_kcp_site_key']; + +if(!(preg_match("/^T000/", $g_conf_site_cd) || $default['de_card_test'])) { + if (!preg_match("/^SR/", $g_conf_site_cd)) { + alert("SR 로 시작하지 않는 KCP SITE CODE 는 지원하지 않습니다."); + } +} + +// KCP SITE KEY 입력 체크 +if($default['de_iche_use'] || $default['de_vbank_use'] || $default['de_hp_use'] || $default['de_card_use']) { + if(trim($default['de_kcp_site_key']) == '') + alert('KCP SITE KEY를 입력해 주십시오.'); +} ?> diff --git a/shop/kcp/escrow.register.php b/shop/kcp/escrow.register.php index 195d2a52c..a33209b22 100644 --- a/shop/kcp/escrow.register.php +++ b/shop/kcp/escrow.register.php @@ -4,33 +4,11 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 if($od['od_pg'] != 'kcp') return; include_once(G5_SHOP_PATH.'/settle_kcp.inc.php'); +include_once(G5_SHOP_PATH.'/kcp/pp_ax_hub_lib.php'); // locale ko_KR.euc-kr 로 설정 setlocale(LC_CTYPE, 'ko_KR.euc-kr'); -$g_conf_site_cd = $default['de_kcp_mid']; -$g_conf_site_key = $default['de_kcp_site_key']; -$g_conf_home_dir = G5_SHOP_PATH.'/kcp'; -$g_conf_key_dir = ''; -$g_conf_log_dir = ''; -if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') -{ - $g_conf_key_dir = G5_SHOP_PATH.'/kcp/bin/pub.key'; - $g_conf_log_dir = G5_SHOP_PATH.'/kcp/log'; -} - -if (preg_match("/^T000/", $g_conf_site_cd) || $default['de_card_test']) { - $g_conf_gw_url = "testpaygw.kcp.co.kr"; -} -else { - $g_conf_gw_url = "paygw.kcp.co.kr"; - if (!preg_match("/^SR/", $g_conf_site_cd)) { - alert("SR 로 시작하지 않는 KCP SITE CODE 는 지원하지 않습니다."); - } -} - -include_once(G5_SHOP_PATH.'/kcp/pp_ax_hub_lib.php'); - $req_tx = 'mod_escrow'; $mod_type = 'STE1'; $mod_desc = '에스크로 배송시작 등록'; diff --git a/shop/kcp/pp_ax_hub.php b/shop/kcp/pp_ax_hub.php index 8a891eb8d..5a6d8397c 100644 --- a/shop/kcp/pp_ax_hub.php +++ b/shop/kcp/pp_ax_hub.php @@ -15,29 +15,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 /* = 환경 설정 = */ /* = -------------------------------------------------------------------------- = */ - $g_conf_home_dir = G5_SHOP_PATH.'/kcp'; - $g_conf_key_dir = ''; - if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') - { - $g_conf_log_dir = G5_SHOP_PATH.'/kcp/log'; - $g_conf_key_dir = G5_SHOP_PATH.'/kcp/bin/pub.key'; - } - - $g_conf_site_cd = $_POST['site_cd']; - - if (preg_match("/^T000/", $g_conf_site_cd) || $default['de_card_test']) { - $g_conf_gw_url = "testpaygw.kcp.co.kr"; // real url : paygw.kcp.co.kr , test url : testpaygw.kcp.co.kr - } - else { - $g_conf_gw_url = "paygw.kcp.co.kr"; - if (!preg_match("/^SR/", $g_conf_site_cd)) { - alert("SR 로 시작하지 않는 KCP SITE CODE 는 지원하지 않습니다."); - } - } - - $g_conf_log_level = "3"; // 변경불가 - $g_conf_gw_port = "8090"; // 포트번호(변경불가) - + include G5_SHOP_PATH.'/settle_kcp.inc.php'; require "pp_ax_hub_lib.php"; // library [수정불가] /* = -------------------------------------------------------------------------- = */ diff --git a/shop/kcp/pp_cli_hub.php b/shop/kcp/pp_cli_hub.php index 8a439f24c..0a286d850 100644 --- a/shop/kcp/pp_cli_hub.php +++ b/shop/kcp/pp_cli_hub.php @@ -27,30 +27,12 @@ setlocale(LC_CTYPE, 'ko_KR.euc-kr'); /* ============================================================================== */ /* = 라이브러리 및 사이트 정보 include = */ /* = -------------------------------------------------------------------------- = */ + include G5_SHOP_PATH.'/settle_kcp.inc.php'; require G5_SHOP_PATH.'/kcp/pp_cli_hub_lib.php'; /* ============================================================================== */ /* = 01. KCP 지불 서버 정보 설정 = */ /* = -------------------------------------------------------------------------- = */ - $g_conf_home_dir = G5_SHOP_PATH.'/kcp'; // ※ 쇼핑몰 모듈 설치 절대 경로 bin전까지 - $g_conf_key_dir = ''; - if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') - { - $g_conf_log_dir = G5_SHOP_PATH.'/kcp/log'; - $g_conf_key_dir = G5_SHOP_PATH.'/kcp/bin/pub.key'; - } - $g_conf_log_level = "3"; - - if ($default['de_card_test']) { - if($default['de_escrow_use'] == 1) { - $default['de_kcp_mid'] = 'T0007'; - $default['de_kcp_site_key'] = '4Ho4YsuOZlLXUZUdOxM1Q7X__'; - } else { - $default['de_kcp_mid'] = 'T0000'; - $default['de_kcp_site_key'] = '3grptw1.zW0GSo4PQdaGvsF__'; - } - } - if ($default['de_card_test']) { $g_conf_pa_url = "testpaygw.kcp.co.kr"; // ※ 테스트: testpaygw.kcp.co.kr, 리얼: paygw.kcp.co.kr $g_conf_pa_port = "8090"; // ※ 테스트: 8090, 리얼: 8090 diff --git a/shop/kcp/pp_cli_result.php b/shop/kcp/pp_cli_result.php index dfd083818..86534cb46 100644 --- a/shop/kcp/pp_cli_result.php +++ b/shop/kcp/pp_cli_result.php @@ -12,19 +12,6 @@ require G5_SHOP_PATH.'/settle_kcp.inc.php'; /* ============================================================================== */ /* = 01. KCP 지불 서버 정보 설정 = */ /* = -------------------------------------------------------------------------- = */ - $g_conf_home_dir = G5_SHOP_PATH.'/kcp'; // ※ 쇼핑몰 모듈 설치 절대 경로 bin전까지 - $g_conf_log_level = "3"; - - if ($default['de_card_test']) { - if($default['de_escrow_use'] == 1) { - $default['de_kcp_mid'] = 'T0007'; - $default['de_kcp_site_key'] = '4Ho4YsuOZlLXUZUdOxM1Q7X__'; - } else { - $default['de_kcp_mid'] = 'T0000'; - $default['de_kcp_site_key'] = '3grptw1.zW0GSo4PQdaGvsF__'; - } - } - if ($default['de_card_test']) { $g_conf_pa_url = "testpaygw.kcp.co.kr"; // ※ 테스트: testpaygw.kcp.co.kr, 리얼: paygw.kcp.co.kr $g_conf_pa_port = "8090"; // ※ 테스트: 8090, 리얼: 8090 diff --git a/shop/settle_kcp.inc.php b/shop/settle_kcp.inc.php index cfadad111..883bc972a 100644 --- a/shop/settle_kcp.inc.php +++ b/shop/settle_kcp.inc.php @@ -21,8 +21,33 @@ else { $default['de_kcp_mid'] = "SR".$default['de_kcp_mid']; } +$g_conf_home_dir = G5_SHOP_PATH.'/kcp'; +$g_conf_key_dir = ''; +if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') +{ + $g_conf_log_dir = G5_SHOP_PATH.'/kcp/log'; + $g_conf_key_dir = G5_SHOP_PATH.'/kcp/bin/pub.key'; +} + +$g_conf_site_cd = $default['de_kcp_mid']; $g_conf_site_key = $default['de_kcp_site_key']; +if (preg_match("/^T000/", $g_conf_site_cd) || $default['de_card_test']) { + $g_conf_gw_url = "testpaygw.kcp.co.kr"; // real url : paygw.kcp.co.kr , test url : testpaygw.kcp.co.kr +} +else { + $g_conf_gw_url = "paygw.kcp.co.kr"; + if (!preg_match("/^SR/", $g_conf_site_cd)) { + alert("SR 로 시작하지 않는 KCP SITE CODE 는 지원하지 않습니다."); + } +} + +// KCP SITE KEY 입력 체크 +if($default['de_iche_use'] || $default['de_vbank_use'] || $default['de_hp_use'] || $default['de_card_use']) { + if(trim($default['de_kcp_site_key']) == '') + alert('KCP SITE KEY를 입력해 주십시오.'); +} + $g_conf_js_url = "https://pay.kcp.co.kr/plugin/payplus{$test}_un.js"; $g_conf_log_level = "3"; // 변경불가