From 0709816c4063691f5c33fed8632034f0ff29c052 Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 26 Sep 2014 14:19:09 +0900 Subject: [PATCH 1/5] =?UTF-8?q?kcp=20=EC=82=AC=EC=9D=B4=ED=8A=B8=ED=82=A4?= =?UTF-8?q?=20=EC=9E=85=EB=A0=A5=20=EA=B4=80=EB=A0=A8=20=EC=BD=94=EB=93=9C?= =?UTF-8?q?=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/shop_admin/configformupdate.php | 6 ++++++ mobile/shop/settle_kcp.inc.php | 12 ++++++++++++ shop/kcp/escrow.register.php | 24 +----------------------- shop/kcp/pp_ax_hub.php | 24 +----------------------- shop/kcp/pp_cli_hub.php | 20 +------------------- shop/kcp/pp_cli_result.php | 13 ------------- shop/settle_kcp.inc.php | 25 +++++++++++++++++++++++++ 7 files changed, 46 insertions(+), 78 deletions(-) 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"; // 변경불가 From cb8c4ae16ec0eed9f22fa9c63694b4372210270a Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 26 Sep 2014 14:43:18 +0900 Subject: [PATCH 2/5] =?UTF-8?q?=EA=B4=80=EB=A6=AC=EC=9E=90=EB=8A=94=20?= =?UTF-8?q?=EB=AC=B4=EC=A1=B0=EA=B1=B4=20=ED=98=84=EA=B8=88=EC=98=81?= =?UTF-8?q?=EC=88=98=EC=A6=9D=20=EB=B0=9C=EA=B8=89=ED=95=98=EB=8F=84?= =?UTF-8?q?=EB=A1=9D=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/shop_admin/orderform.php | 4 +--- adm/shop_admin/personalpayform.php | 22 ++++++++++------------ 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/adm/shop_admin/orderform.php b/adm/shop_admin/orderform.php index 840a4c2c7..547dc5c28 100644 --- a/adm/shop_admin/orderform.php +++ b/adm/shop_admin/orderform.php @@ -531,8 +531,7 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js 현금영수증 @@ -568,7 +567,6 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js diff --git a/adm/shop_admin/personalpayform.php b/adm/shop_admin/personalpayform.php index 574b5401a..e14fa7d01 100644 --- a/adm/shop_admin/personalpayform.php +++ b/adm/shop_admin/personalpayform.php @@ -174,20 +174,19 @@ if(!sql_query(" select pp_cash from {$g5['g5_shop_personalpay_table']} limit 1 " 0) - $is_cash_receipt = false; - } + if($row['cnt'] > 0) + $is_cash_receipt = false; + } - if ($is_cash_receipt && ($pp['pp_price'] - $pp['pp_receipt_price']) == 0) { - if ($pp['pp_receipt_price'] && ($pp['pp_settle_case'] == '무통장' || $pp['pp_settle_case'] == '가상계좌' || $pp['pp_settle_case'] == '계좌이체')) { + if ($is_cash_receipt && ($pp['pp_price'] - $pp['pp_receipt_price']) == 0) { + if ($pp['pp_receipt_price'] && ($pp['pp_settle_case'] == '무통장' || $pp['pp_settle_case'] == '가상계좌' || $pp['pp_settle_case'] == '계좌이체')) { ?> 현금영수증 @@ -223,7 +222,6 @@ if(!sql_query(" select pp_cash from {$g5['g5_shop_personalpay_table']} limit 1 " From f6a1fa94d362b9bbe5fcc0852363480738eedf00 Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 26 Sep 2014 15:32:56 +0900 Subject: [PATCH 3/5] =?UTF-8?q?=ED=9A=8C=EC=9B=90=20=EC=82=AD=EC=A0=9C=20?= =?UTF-8?q?=EB=95=8C=20=ED=9A=8C=EC=9B=90=EC=9E=90=EB=A3=8C=20=EC=82=AD?= =?UTF-8?q?=EC=A0=9C=ED=95=98=EB=8F=84=EB=A1=9D=20member=5Fdelete=20?= =?UTF-8?q?=ED=95=A8=EC=88=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/common.lib.php | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/lib/common.lib.php b/lib/common.lib.php index ab77afef8..a53b23898 100644 --- a/lib/common.lib.php +++ b/lib/common.lib.php @@ -2756,6 +2756,30 @@ function member_delete($mb_id) // 회원자료는 정보만 없앤 후 아이디는 보관하여 다른 사람이 사용하지 못하도록 함 : 061025 $sql = " update {$g5['member_table']} set mb_password = '', mb_level = 1, mb_email = '', mb_homepage = '', mb_tel = '', mb_hp = '', mb_zip1 = '', mb_zip2 = '', mb_addr1 = '', mb_addr2 = '', mb_birth = '', mb_sex = '', mb_signature = '', mb_memo = '".date('Ymd', G5_SERVER_TIME)." 삭제함\n{$mb['mb_memo']}', mb_leave_date = '".date('Ymd', G5_SERVER_TIME)."' where mb_id = '{$mb_id}' "; sql_query($sql); + + // 포인트 테이블에서 삭제 + sql_query(" delete from {$g5['point_table']} where mb_id = '$mb_id' "); + + // 그룹접근가능 삭제 + sql_query(" delete from {$g5['group_member_table']} where mb_id = '$mb_id' "); + + // 쪽지 삭제 + sql_query(" delete from {$g5['memo_table']} where me_recv_mb_id = '$mb_id' or me_send_mb_id = '$mb_id' "); + + // 스크랩 삭제 + sql_query(" delete from {$g5['scrap_table']} where mb_id = '$mb_id' "); + + // 관리권한 삭제 + sql_query(" delete from {$g5['auth_table']} where mb_id = '$mb_id' "); + + // 그룹관리자인 경우 그룹관리자를 공백으로 + sql_query(" update {$g5['group_table']} set gr_admin = '' where gr_admin = '$mb_id' "); + + // 게시판관리자인 경우 게시판관리자를 공백으로 + sql_query(" update {$g5['board_table']} set bo_admin = '' where bo_admin = '$mb_id' "); + + // 아이콘 삭제 + @unlink(G5_DATA_PATH.'/member/'.substr($mb_id,0,2).'/'.$mb_id.'.gif'); } // 이메일 주소 추출 From d738b3616c7cb28c910c6408e6cc26a3d119c8cb Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 26 Sep 2014 16:39:32 +0900 Subject: [PATCH 4/5] =?UTF-8?q?PG=20=EA=B2=B0=EC=A0=9C=EA=B8=88=EC=95=A1?= =?UTF-8?q?=20=EB=B9=84=EA=B5=90=EC=8B=9C=20=EC=A3=BC=EB=AC=B8=EA=B8=88?= =?UTF-8?q?=EC=95=A1=20=EA=B3=84=EC=82=B0=EC=BD=94=EB=93=9C=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mobile/shop/orderformupdate.php | 3 ++- shop/orderformupdate.php | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/mobile/shop/orderformupdate.php b/mobile/shop/orderformupdate.php index ade2cdf51..79434732c 100644 --- a/mobile/shop/orderformupdate.php +++ b/mobile/shop/orderformupdate.php @@ -266,6 +266,7 @@ if ($od_temp_point) } $i_price = $i_price + $i_send_cost + $i_send_cost2 - $i_temp_point - $i_send_coupon; +$order_price = $tot_od_price + $send_cost + $send_cost2 - $tot_sc_cp_price - $od_temp_point; $od_status = '주문'; if ($od_settle_case == "무통장") @@ -374,7 +375,7 @@ else // 주문금액과 결제금액이 일치하는지 체크 if($tno) { - if((int)$i_price !== (int)$pg_price) { + if((int)$order_price !== (int)$pg_price) { $cancel_msg = '결제금액 불일치'; switch($default['de_pg_service']) { case 'lg': diff --git a/shop/orderformupdate.php b/shop/orderformupdate.php index fe044c8a6..d10a8ed46 100644 --- a/shop/orderformupdate.php +++ b/shop/orderformupdate.php @@ -260,6 +260,7 @@ if ($od_temp_point) } $i_price = $i_price + $i_send_cost + $i_send_cost2 - $i_temp_point - $i_send_coupon; +$order_price = $tot_od_price + $send_cost + $send_cost2 - $tot_sc_cp_price - $od_temp_point; $od_status = '주문'; if ($od_settle_case == "무통장") @@ -368,7 +369,7 @@ else // 주문금액과 결제금액이 일치하는지 체크 if($tno) { - if((int)$i_price !== (int)$pg_price) { + if((int)$order_price !== (int)$pg_price) { $cancel_msg = '결제금액 불일치'; switch($default['de_pg_service']) { case 'lg': From a74369e796a62359d7244601cc1e9d5798dc4b26 Mon Sep 17 00:00:00 2001 From: chicpro Date: Mon, 29 Sep 2014 10:57:32 +0900 Subject: [PATCH 5/5] =?UTF-8?q?=EB=AA=A8=EB=B0=94=EC=9D=BC=20=ED=8F=AC?= =?UTF-8?q?=EC=9D=B8=ED=8A=B8=20=EA=B2=B0=EC=A0=9C=20=EA=B8=88=EC=95=A1=20?= =?UTF-8?q?=EC=98=A4=EB=A5=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mobile/shop/orderform.php | 1 - 1 file changed, 1 deletion(-) diff --git a/mobile/shop/orderform.php b/mobile/shop/orderform.php index fd0a6c83c..e801a646d 100644 --- a/mobile/shop/orderform.php +++ b/mobile/shop/orderform.php @@ -1303,7 +1303,6 @@ function orderfield_check(f) // 결제체크 function payment_check(f) { - var temp_point = 0; var max_point = 0; var od_price = parseInt(f.od_price.value); var send_cost = parseInt(f.od_send_cost.value);