diff --git a/adm/shop_admin/admin.shop.lib.php b/adm/shop_admin/admin.shop.lib.php index 1685b0b7c..7130530aa 100644 --- a/adm/shop_admin/admin.shop.lib.php +++ b/adm/shop_admin/admin.shop.lib.php @@ -136,6 +136,14 @@ function pg_setting_check($is_print=false){ } } + if( function_exists('is_use_easypay') && is_use_easypay('global_nhnkcp') ){ + if(!extension_loaded('soap') || !class_exists('SOAPClient')) { + $msg .= ''.PHP_EOL; + } + } + if( $pg_msg ){ $pg_test_conf_link = G5_ADMIN_URL.'/shop_admin/configform.php#de_card_test1'; $msg .= '
(주의!) '.$pg_msg.' 결제의 결제 설정이 현재 테스트결제 로 되어 있습니다.
테스트결제시 실제 결제가 되지 않으므로, 쇼핑몰 운영중이면 반드시 실결제로 설정하여 운영하셔야 합니다.
아래 링크를 클릭하여 실결제로 설정하여 운영해 주세요.
'.$pg_test_conf_link.'
'; diff --git a/adm/shop_admin/configform.php b/adm/shop_admin/configform.php index 431c7b5be..c1aa55ee2 100644 --- a/adm/shop_admin/configform.php +++ b/adm/shop_admin/configform.php @@ -193,8 +193,15 @@ if( ! isset($config['cf_icode_token_key']) ){ sql_query($sql, false); } +// PG 간편결제 추가 ( NHN_KCP 네이버페이, 카카오페이 ) +if( ! isset($default['de_easy_pay_services']) ){ + $sql = "ALTER TABLE `{$g5['g5_shop_default_table']}` + ADD COLUMN `de_easy_pay_services` VARCHAR(255) NOT NULL DEFAULT '' AFTER `de_easy_pay_use`; "; + sql_query($sql, false); +} + if( function_exists('pg_setting_check') ){ - pg_setting_check(true); + pg_setting_check(true); } if(!$default['de_kakaopay_cancelpwd']){ @@ -669,26 +676,26 @@ if(!$default['de_kakaopay_cancelpwd']){ - + if (strstr($default['de_taxsave_types'], 'account')) { + $account_checked = 'checked="checked"'; + } + if (strstr($default['de_taxsave_types'], 'vbank')) { + $vbank_checked = 'checked="checked"'; + } + if (strstr($default['de_taxsave_types'], 'transfer')) { + $transfer_checked = 'checked="checked"'; + } + ?> 현금영수증
적용수단 현금 영수증 발급은 무통장입금, 가상계좌, 실시간계좌에만 적용됩니다.
아래 체크된 수단에 한해서 회원이 직접 주문 보기 페이지에서 현금영수증을 발급 받을수 있습니다.
!!! 만약 PG사 상점관리자에서 가상계좌 또는 실시간계좌이체가 자동으로 현금영수증이 발급되는 경우이면, 아래 가상계좌와 실시간계좌이체 체크박스를 해제하여 사용해 주세요.( 중복으로 발급되는 것을 막기 위함입니다. )", 50); ?> >
- >
- > + >
+ > @@ -769,6 +776,22 @@ if(!$default['de_kakaopay_cancelpwd']){ + + + + 네이버페이, 카카오페이는 테스트결제가 되지 않습니다."); ?> + >
+ >
+ > + + + + + + + >
+ +
@@ -1672,67 +1695,73 @@ function fconfig_check(f) - - var msg = "", - pg_msg = ""; + + var msg = "", + pg_msg = ""; - if( f.de_pg_service.value == "kcp" ){ - if( f.de_kcp_mid.value && f.de_kcp_site_key.value && parseInt(f.de_card_test.value) > 0 ){ - pg_msg = "NHN KCP"; - } - } else if ( f.de_pg_service.value == "lg" ) { - if( f.cf_lg_mid.value && f.cf_lg_mert_key.value && parseInt(f.de_card_test.value) > 0 ){ - pg_msg = "토스페이먼츠"; - } - } else if ( f.de_pg_service.value == "inicis" ) { - if( f.de_inicis_mid.value && f.de_inicis_sign_key.value && parseInt(f.de_card_test.value) > 0 ){ - pg_msg = "KG이니시스"; - } - } + if( f.de_pg_service.value == "kcp" ){ + if( f.de_kcp_mid.value && f.de_kcp_site_key.value && parseInt(f.de_card_test.value) > 0 ){ + pg_msg = "NHN KCP"; + } + } else if ( f.de_pg_service.value == "lg" ) { + if( f.cf_lg_mid.value && f.cf_lg_mert_key.value && parseInt(f.de_card_test.value) > 0 ){ + pg_msg = "토스페이먼츠"; + } + } else if ( f.de_pg_service.value == "inicis" ) { + if( f.de_inicis_mid.value && f.de_inicis_sign_key.value && parseInt(f.de_card_test.value) > 0 ){ + pg_msg = "KG이니시스"; + } + } - if( pg_msg ){ - msg += "(주의!) "+pg_msg+" 결제의 결제 설정이 현재 테스트결제 로 되어 있습니다.\n쇼핑몰 운영중이면 반드시 실결제로 설정하여 운영하셔야 합니다.\n실결제로 변경하려면 결제설정 탭 -> 결제 테스트에서 실결제를 선택해 주세요.\n정말로 테스트결제로 설정하시겠습니까?"; - } + if( pg_msg ){ + msg += "(주의!) "+pg_msg+" 결제의 결제 설정이 현재 테스트결제 로 되어 있습니다.\n쇼핑몰 운영중이면 반드시 실결제로 설정하여 운영하셔야 합니다.\n실결제로 변경하려면 결제설정 탭 -> 결제 테스트에서 실결제를 선택해 주세요.\n정말로 테스트결제로 설정하시겠습니까?"; + } - if( msg ){ - if (confirm(msg)){ - return true; - } else { - return false; - } - } else { - return true; - } + if( msg ){ + if (confirm(msg)){ + return true; + } else { + return false; + } + } else { + return true; + } } $(function() { - $(document).ready(function () { + $(document).ready(function () { + + $("#de_global_nhnkcp_naverpay").on("click", function(e){ + if ( $(this).prop('checked') ) { + $("#de_easy_nhnkcp_naverpay").prop('checked', true); + } + }); - function hash_goto_scroll(hash=""){ - var $elem = hash ? $("#"+hash) : $('#' + window.location.hash.replace('#', '')); - if($elem.length) { + function hash_goto_scroll(hash=""){ + var $elem = hash ? $("#"+hash) : $('#' + window.location.hash.replace('#', '')); + if($elem.length) { - var admin_head_height = $("#hd_top").height() + $("#container_title").height() + 30; + var admin_head_height = $("#hd_top").height() + $("#container_title").height() + 30; - $('html, body').animate({ - scrollTop: ($elem.offset().top - admin_head_height) + 'px' - }, 500, 'swing'); - } - } + $('html, body').animate({ + scrollTop: ($elem.offset().top - admin_head_height) + 'px' + }, 500, 'swing'); + } + } - hash_goto_scroll(); - - $(document).on("click", ".pg_test_conf_link", function(e){ - e.preventDefault(); + hash_goto_scroll(); + + $(document).on("click", ".pg_test_conf_link", function(e){ + e.preventDefault(); - var str_hash = this.href.split("#")[1]; + var str_hash = this.href.split("#")[1]; - if( str_hash ){ - hash_goto_scroll(str_hash); - } - }); - }); + if( str_hash ){ + hash_goto_scroll(str_hash); + } + }); + }); //$(".pg_info_fld").hide(); $(".pg_vbank_url").hide(); @@ -1853,19 +1882,19 @@ $(function() { }); }); - $(document).on("change", "#de_taxsave_use", function(e){ - var $val = $(this).val(); - - if( parseInt($val) > 0 ){ - $("#de_taxsave_types").show(); - } else { - $("#de_taxsave_types").hide(); - } - }); - - // 현금영수증 발급수단 중 무통장입금은 무조건 체크처리 - document.getElementById("de_taxsave_types_account").checked = true; - document.getElementById("de_taxsave_types_account").disabled = true; + $(document).on("change", "#de_taxsave_use", function(e){ + var $val = $(this).val(); + + if( parseInt($val) > 0 ){ + $("#de_taxsave_types").show(); + } else { + $("#de_taxsave_types").hide(); + } + }); + + // 현금영수증 발급수단 중 무통장입금은 무조건 체크처리 + document.getElementById("de_taxsave_types_account").checked = true; + document.getElementById("de_taxsave_types_account").disabled = true; }); diff --git a/adm/shop_admin/configformupdate.php b/adm/shop_admin/configformupdate.php index 86cc93a42..e271a247d 100644 --- a/adm/shop_admin/configformupdate.php +++ b/adm/shop_admin/configformupdate.php @@ -82,6 +82,16 @@ if(isset($_POST['de_taxsave_types_transfer']) && $_POST['de_taxsave_types_transf $de_taxsave_types .= ',transfer'; } +// NHN_KCP 간편결제 체크 +$de_easy_pay_services = ''; +if(isset($_POST['de_easy_pays'])){ + $tmps = array(); + foreach( (array) $_POST['de_easy_pays'] as $v ){ + $tmps[] = preg_replace('/[^0-9a-z_\-]/i', '', $v); + } + $de_easy_pay_services = implode(",", $tmps); +} + //KVE-2019-0689, KVE-2019-0691, KVE-2019-0694 $check_sanitize_keys = array( 'de_admin_company_name', //회사명 @@ -356,6 +366,7 @@ $sql = " update {$g5['g5_shop_default_table']} de_card_test = '{$de_card_test}', de_card_use = '{$de_card_use}', de_easy_pay_use = '{$de_easy_pay_use}', + de_easy_pay_services = '{$de_easy_pay_services}', de_samsung_pay_use = '{$de_samsung_pay_use}', de_inicis_lpay_use = '{$de_inicis_lpay_use}', de_inicis_kakaopay_use = '{$de_inicis_kakaopay_use}', diff --git a/adm/shop_admin/orderform.php b/adm/shop_admin/orderform.php index 20ad39935..ec2a598e3 100644 --- a/adm/shop_admin/orderform.php +++ b/adm/shop_admin/orderform.php @@ -312,23 +312,6 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js // 결제방법 $s_receipt_way = check_pay_name_replace($od['od_settle_case'], $od); - if($od['od_settle_case'] == '간편결제') { - switch($od['od_pg']) { - case 'lg': - $s_receipt_way = 'PAYNOW'; - break; - case 'inicis': - $s_receipt_way = 'KPAY'; - break; - case 'kcp': - $s_receipt_way = 'PAYCO'; - break; - default: - $s_receipt_way = check_pay_name_replace($row['od_settle_case'], $od); - break; - } - } - if ($od['od_receipt_point'] > 0) $s_receipt_way .= "+포인트"; ?> diff --git a/adm/shop_admin/orderlist.php b/adm/shop_admin/orderlist.php index 084dd38b5..d1f179860 100644 --- a/adm/shop_admin/orderlist.php +++ b/adm/shop_admin/orderlist.php @@ -221,7 +221,7 @@ if( function_exists('pg_setting_check') ){ > > - + > @@ -305,24 +305,6 @@ if( function_exists('pg_setting_check') ){ { $s_receipt_way = check_pay_name_replace($row['od_settle_case'], $row); $s_br = '
'; - - // 간편결제 - if($row['od_settle_case'] == '간편결제') { - switch($row['od_pg']) { - case 'lg': - $s_receipt_way = 'PAYNOW'; - break; - case 'inicis': - $s_receipt_way = 'KPAY'; - break; - case 'kcp': - $s_receipt_way = 'PAYCO'; - break; - default: - $s_receipt_way = check_pay_name_replace($row['od_settle_case'], $row); - break; - } - } } else { diff --git a/adm/shop_admin/sale1date.php b/adm/shop_admin/sale1date.php index 765bcd288..7acd44ab2 100644 --- a/adm/shop_admin/sale1date.php +++ b/adm/shop_admin/sale1date.php @@ -27,6 +27,7 @@ function print_line($save) + @@ -65,6 +66,7 @@ $result = sql_query($sql); 가상계좌 계좌이체 카드입금 + 간편결제 휴대폰 포인트입금 주문취소 @@ -119,10 +121,15 @@ $result = sql_query($sql); $tot['receiptcard'] += $row['od_receipt_price']; $tot['receiptpoint'] += $row['od_receipt_point']; $tot['misu'] += $row['od_misu']; + + if(in_array($row['od_settle_case'], array('간편결제', 'KAKAOPAY', 'lpay', 'inicis_payco', 'inicis_kakaopay', '삼성페이'))) { + $save['receipteasy'] += $row['od_receipt_price']; + $tot['receipteasy'] += $row['od_receipt_price']; + } } if ($i == 0) { - echo '자료가 없습니다.'; + echo '자료가 없습니다.'; } else { print_line($save); } @@ -138,6 +145,7 @@ $result = sql_query($sql); + diff --git a/adm/shop_admin/sale1month.php b/adm/shop_admin/sale1month.php index b7adb8fad..b3eddc508 100644 --- a/adm/shop_admin/sale1month.php +++ b/adm/shop_admin/sale1month.php @@ -27,6 +27,7 @@ function print_line($save) + @@ -66,6 +67,7 @@ $result = sql_query($sql); 가상계좌 계좌이체 카드입금 + 간편결제 휴대폰 포인트입금 주문취소 @@ -120,6 +122,11 @@ $result = sql_query($sql); $tot['receiptcard'] += $row['od_receipt_price']; $tot['receiptpoint'] += $row['od_receipt_point']; $tot['misu'] += $row['od_misu']; + + if(in_array($row['od_settle_case'], array('간편결제', 'KAKAOPAY', 'lpay', 'inicis_payco', 'inicis_kakaopay', '삼성페이'))) { + $save['receipteasy'] += $row['od_receipt_price']; + $tot['receipteasy'] += $row['od_receipt_price']; + } } if ($i == 0) { @@ -139,6 +146,7 @@ $result = sql_query($sql); + diff --git a/adm/shop_admin/sale1today.php b/adm/shop_admin/sale1today.php index 73726ef6a..1af2b4b31 100644 --- a/adm/shop_admin/sale1today.php +++ b/adm/shop_admin/sale1today.php @@ -41,6 +41,7 @@ $result = sql_query($sql); 가상계좌 계좌이체 카드입금 + 간편결제 휴대폰 포인트입금 주문취소 @@ -58,7 +59,7 @@ $result = sql_query($sql); $href = ''; } - $receipt_bank = $receipt_card = $receipt_vbank = $receipt_iche = $receipt_hp = 0; + $receipt_bank = $receipt_card = $receipt_vbank = $receipt_iche = $receipt_easy = $receipt_hp = 0; if($row['od_settle_case'] == '무통장') $receipt_bank = $row['od_receipt_price']; if($row['od_settle_case'] == '가상계좌') @@ -69,7 +70,9 @@ $result = sql_query($sql); $receipt_hp = $row['od_receipt_price']; if($row['od_settle_case'] == '신용카드') $receipt_card = $row['od_receipt_price']; - + if(in_array($row['od_settle_case'], array('간편결제', 'KAKAOPAY', 'lpay', 'inicis_payco', 'inicis_kakaopay', '삼성페이'))) { + $receipt_easy = $row['od_receipt_price']; + } ?> @@ -80,6 +83,7 @@ $result = sql_query($sql); + @@ -93,13 +97,14 @@ $result = sql_query($sql); $tot['receipt_vbank'] += $receipt_vbank; $tot['receipt_iche'] += $receipt_iche; $tot['receipt_card'] += $receipt_card; + $tot['receipt_easy'] += $receipt_easy; $tot['receipt_hp'] += $receipt_hp; $tot['receipt_point'] += $row['od_receipt_point']; $tot['misu'] += $row['od_misu']; } if ($i == 0) { - echo '자료가 없습니다'; + echo '자료가 없습니다'; } ?> @@ -112,6 +117,7 @@ $result = sql_query($sql); + diff --git a/adm/shop_admin/sale1year.php b/adm/shop_admin/sale1year.php index 549754d6b..8e749c035 100644 --- a/adm/shop_admin/sale1year.php +++ b/adm/shop_admin/sale1year.php @@ -22,6 +22,7 @@ function print_line($save) + @@ -60,6 +61,7 @@ $result = sql_query($sql); 가상계좌 계좌이체 카드입금 + 간편결제 휴대폰 포인트입금 주문취소 @@ -114,6 +116,11 @@ $result = sql_query($sql); $tot['receiptcard'] += $row['od_receipt_price']; $tot['receiptpoint'] += $row['od_receipt_point']; $tot['misu'] += $row['od_misu']; + + if(in_array($row['od_settle_case'], array('간편결제', 'KAKAOPAY', 'lpay', 'inicis_payco', 'inicis_kakaopay', '삼성페이'))) { + $save['receipteasy'] += $row['od_receipt_price']; + $tot['receipteasy'] += $row['od_receipt_price']; + } } if ($i == 0) { @@ -133,6 +140,7 @@ $result = sql_query($sql); + diff --git a/css/default_shop.css b/css/default_shop.css index a034d1bd4..53db56a30 100644 --- a/css/default_shop.css +++ b/css/default_shop.css @@ -816,7 +816,8 @@ box-shadow: 1px 2px 2px #eee;} #sod_frm_paysel .inicis_lpay{background:url('../img/lpay_logo.png') no-repeat 50% 50% #fff;overflow:hidden;text-indent:-999px} #sod_frm_paysel .inicis_kakaopay{position:relative;overflow:hidden;text-indent:-999px} #sod_frm_paysel .inicis_kakaopay em{position:absolute;top:15px;left:45px;width:70px;height:30px;background:url('../img/kakao.png') no-repeat 50% 50% #ffeb00;overflow:hidden;text-indent:-999px;border-radius:30px} -#sod_frm_paysel .kakaopay_icon{background:url('../img/kakao.png') no-repeat 50% 50% #f4dc34;overflow:hidden;text-indent:-999px} +#sod_frm_paysel .kakaopay_icon{background:url('../img/kakao.png') no-repeat 50% 50% #fff;overflow:hidden;text-indent:-999px} +#sod_frm_paysel .naverpay_icon{background:url('../img/ico-default-naverpay.png') no-repeat 50% 50% #fff;overflow:hidden;text-indent:-999px} #sod_frm_paysel .bank_icon{background:url('../img/pay_icon1.png') no-repeat 15px 50% #fff} #sod_frm_paysel .vbank_icon{background:url('../img/pay_icon2.png') no-repeat 15px 50% #fff;padding-top:13px} #sod_frm_paysel .iche_icon{background:url('../img/pay_icon2.png') no-repeat 15px 50% #fff;padding-top:13px} diff --git a/css/mobile_shop.css b/css/mobile_shop.css index 8a5dd6b9a..e031d1238 100644 --- a/css/mobile_shop.css +++ b/css/mobile_shop.css @@ -226,7 +226,8 @@ box-shadow: 0 0 6px rgba(0,0,0,0.2);} #m_sod_frm_paysel .PAYCO{background:url('../img/payco.png') no-repeat 1px;width:46px;height:15px;overflow:hidden;text-indent:-999px;display:inline-block;background-size:100%;} #m_sod_frm_paysel .inicis_lpay{background:url('../img/lpay_logo.png') no-repeat;width:35px;height:12px;overflow:hidden;text-indent:-999px;display:inline-block;background-size:100%;} #m_sod_frm_paysel .inicis_kakaopay{background:url('../img/kakao.png') no-repeat 50% 50% #ffeb00;border-radius:30px;height:22px;width:74px;display:inline-block;overflow:hidden;text-indent:-999px;background-size:35px auto} -#m_sod_frm_paysel .kakaopay_icon{background:url('../img/kakao.png') no-repeat 50% 50% #ffeb00;border-radius:30px;height:22px;width:74px;display:inline-block;overflow:hidden;text-indent:-999px;background-size:35px auto} +#m_sod_frm_paysel .kakaopay_icon{background:url('../img/ico-mobile-kakaopay.png') no-repeat #fff;height:15px;width:43px;display:inline-block;overflow:hidden;text-indent:-999px;background-size:35px auto} +#m_sod_frm_paysel .naverpay_icon{background:url('../img/ico-mobile-naverpay.png') no-repeat #fff;height:15px;width:40px;display:inline-block;overflow:hidden;text-indent:-999px;background-size:35px auto} #m_sod_frm_paysel .samsung_pay{margin-left:-23px;background:url('../img/samsungpay.png') no-repeat 24px 3px;height:25px;width:106px;display:inline-block;overflow:hidden;text-indent:-999px} #sod_frm_pay{padding:10px;;border-top:1px solid #f3f3f3} diff --git a/img/ico-default-naverpay.png b/img/ico-default-naverpay.png new file mode 100644 index 000000000..c5782f4cf Binary files /dev/null and b/img/ico-default-naverpay.png differ diff --git a/img/ico-mobile-kakaopay.png b/img/ico-mobile-kakaopay.png new file mode 100644 index 000000000..9ceab78e4 Binary files /dev/null and b/img/ico-mobile-kakaopay.png differ diff --git a/img/ico-mobile-naverpay.png b/img/ico-mobile-naverpay.png new file mode 100644 index 000000000..2f63ba271 Binary files /dev/null and b/img/ico-mobile-naverpay.png differ diff --git a/install/gnuboard5shop.sql b/install/gnuboard5shop.sql index 9be7ce570..d3cb5f961 100644 --- a/install/gnuboard5shop.sql +++ b/install/gnuboard5shop.sql @@ -665,6 +665,7 @@ CREATE TABLE IF NOT EXISTS `g5_shop_order` ( `od_status` varchar(255) NOT NULL DEFAULT '', `od_hope_date` date NOT NULL DEFAULT '0000-00-00', `od_settle_case` varchar(255) NOT NULL DEFAULT '', + `od_other_pay_type` varchar(100) NOT NULL DEFAULT '', `od_test` tinyint(4) NOT NULL DEFAULT '0', `od_mobile` tinyint(4) NOT NULL DEFAULT '0', `od_pg` varchar(255) NOT NULL DEFAULT '', diff --git a/lib/shop.lib.php b/lib/shop.lib.php index 66ac31c6f..32cb08716 100644 --- a/lib/shop.lib.php +++ b/lib/shop.lib.php @@ -2287,6 +2287,20 @@ function get_shop_order_data($od_id, $type='item') return $row; } +function is_use_easypay($payname=''){ + global $default; + + $de_easy_pay_service_array = (isset($default['de_easy_pay_services']) && $default['de_easy_pay_services']) ? explode(',', $default['de_easy_pay_services']) : array(); + + if($payname === 'global_nhnkcp' && $de_easy_pay_service_array && ('kcp' !== $default['de_pg_service'])){ // NHN_KCP 외 타PG 사용시 + if( in_array('global_nhnkcp_naverpay', $de_easy_pay_service_array) && ($default['de_card_test'] || (!$default['de_card_test'] && $default['de_kcp_mid'] && $default['de_kcp_site_key']) ) ){ + return true; + } + } + + return false; +} + function exists_inicis_shop_order($oid, $pp=array(), $od_time='', $od_ip='') { @@ -2613,7 +2627,7 @@ function get_item_images_info($it, $size=array(), $image_width, $image_height){ } //결제방식 이름을 체크하여 치환 대상인 문자열은 따로 리턴합니다. -function check_pay_name_replace($payname, $od=array()){ +function check_pay_name_replace($payname, $od=array(), $is_client=0){ if( $payname === 'lpay' ){ return 'L.pay'; @@ -2623,6 +2637,23 @@ function check_pay_name_replace($payname, $od=array()){ if(isset($od['od_bank_account']) && $od['od_bank_account'] === '카카오머니'){ return $payname.'(카카오페이)'; } + } else if($payname === '간편결제'){ + + $add_str = $is_client ? '('.$payname.')' : ''; + + if( isset($od['od_pg']) && $od['od_pg'] === 'lg' ){ + return 'PAYNOW'; + } else if( isset($od['od_pg']) && $od['od_pg'] === 'inicis' ){ + return 'KPAY'; + } else if( isset($od['od_pg']) && $od['od_pg'] === 'kcp' ){ + if( isset($od['od_other_pay_type']) && $od['od_other_pay_type'] === 'OT16' ){ + return '네이버페이_NHNKCP'.$add_str; + } else if( isset($od['od_other_pay_type']) && ($od['od_other_pay_type'] === 'OT13' || $od['od_other_pay_type'] === 'NHNKCP_KAKAOMONEY') ){ + return '카카오페이_NHNKCP'.$add_str; + } + + return 'PAYCO'.$add_str; + } } return $payname; diff --git a/mobile/shop/kcp/easypay_form.1.php b/mobile/shop/kcp/easypay_form.1.php new file mode 100644 index 000000000..27d013d95 --- /dev/null +++ b/mobile/shop/kcp/easypay_form.1.php @@ -0,0 +1,100 @@ + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
\ No newline at end of file diff --git a/mobile/shop/kcp/easypay_form.2.php b/mobile/shop/kcp/easypay_form.2.php new file mode 100644 index 000000000..62bae811c --- /dev/null +++ b/mobile/shop/kcp/easypay_form.2.php @@ -0,0 +1,35 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/mobile/shop/kcp/global_m_nhn_kcp.php b/mobile/shop/kcp/global_m_nhn_kcp.php new file mode 100644 index 000000000..0c258a89a --- /dev/null +++ b/mobile/shop/kcp/global_m_nhn_kcp.php @@ -0,0 +1,10 @@ + \ No newline at end of file diff --git a/mobile/shop/kcp/m_order.script.php b/mobile/shop/kcp/m_order.script.php new file mode 100644 index 000000000..bfa82f97e --- /dev/null +++ b/mobile/shop/kcp/m_order.script.php @@ -0,0 +1,83 @@ + + \ No newline at end of file diff --git a/mobile/shop/kcp/order_approval_form.php b/mobile/shop/kcp/order_approval_form.php index 2dbe2e67e..cee60fafc 100644 --- a/mobile/shop/kcp/order_approval_form.php +++ b/mobile/shop/kcp/order_approval_form.php @@ -1,5 +1,10 @@ '; ?> + + + + + + + + @@ -278,7 +300,7 @@ if($enc_data != '' && $enc_info != '' && $tran_cd != '') { - + diff --git a/mobile/shop/kcp/orderform.1.php b/mobile/shop/kcp/orderform.1.php index 77457e6c1..d1eecd557 100644 --- a/mobile/shop/kcp/orderform.1.php +++ b/mobile/shop/kcp/orderform.1.php @@ -18,8 +18,12 @@ if(!($default['de_iche_use'] || $default['de_vbank_use'] || $default['de_hp_use' + + + + diff --git a/mobile/shop/kcp/pp_ax_hub.php b/mobile/shop/kcp/pp_ax_hub.php index 46c916d9b..9ae59ed55 100644 --- a/mobile/shop/kcp/pp_ax_hub.php +++ b/mobile/shop/kcp/pp_ax_hub.php @@ -201,6 +201,16 @@ $app_no = $c_PayPlus->mf_get_res_data( "app_no" ); // 승인 번호 $noinf = $c_PayPlus->mf_get_res_data( "noinf" ); // 무이자 여부 ( 'Y' : 무이자 ) $quota = $c_PayPlus->mf_get_res_data( "quota" ); // 할부 개월 수 + $od_other_pay_type = $c_PayPlus->mf_get_res_data( "card_other_pay_type" ); // 간편결제유형 + + $kcp_pay_method = $c_PayPlus->mf_get_res_data( "pay_method" ); // 카카오페이 결제수단 + // 카드 코드는 PACA, 카카오머니 코드는 PAKM + + if( $kcp_pay_method == "PAKM" ){ // 카카오머니 + $card_mny = $kakaomny_mny = $c_PayPlus->mf_get_res_data( "kakaomny_mny" ); + $app_time = $app_kakaomny_time = $c_PayPlus->mf_get_res_data( "app_kakaomny_time" ); + $od_other_pay_type = 'NHNKCP_KAKAOMONEY'; + } } /* = -------------------------------------------------------------------------- = */ diff --git a/mobile/shop/orderform.sub.php b/mobile/shop/orderform.sub.php index d4168dc1a..b5159ea96 100644 --- a/mobile/shop/orderform.sub.php +++ b/mobile/shop/orderform.sub.php @@ -8,6 +8,10 @@ if( is_inicis_simple_pay() ){ //이니시스 삼성페이 또는 Lpay 사용 require_once(G5_MSHOP_PATH.'/samsungpay/incSamsungpayCommon.php'); } +if(function_exists('is_use_easypay') && is_use_easypay('global_nhnkcp')){ // 타 PG 사용시 NHN KCP 네이버페이 사용이 설정되어 있다면 + require_once(G5_MSHOP_PATH.'/kcp/global_m_nhn_kcp.php'); +} + $tablet_size = "1.0"; // 화면 사이즈 조정 - 기기화면에 맞게 수정(갤럭시탭,아이패드 - 1.85, 스마트폰 - 1.0) // 개인결제번호제거 @@ -252,6 +256,10 @@ require_once(G5_MSHOP_PATH.'/'.$default['de_pg_service'].'/orderform.1.php'); if( is_inicis_simple_pay() ){ //이니시스 삼성페이 또는 lpay 사용시 require_once(G5_MSHOP_PATH.'/samsungpay/orderform.1.php'); } + +if(function_exists('is_use_easypay') && is_use_easypay('global_nhnkcp')){ // 타 PG 사용시 NHN KCP 네이버페이 사용이 설정되어 있다면 + require_once(G5_MSHOP_PATH.'/kcp/easypay_form.1.php'); +} ?> @@ -586,6 +594,8 @@ if($is_kakaopay_use) { echo '
  • '.PHP_EOL; $checked = ''; } + + $easypay_prints = array(); // PG 간편결제 if($default['de_easy_pay_use']) { @@ -602,8 +612,30 @@ if($is_kakaopay_use) { } $multi_settle++; - echo '
  • '.PHP_EOL; - $checked = ''; + + if($default['de_pg_service'] === 'kcp' && isset($default['de_easy_pay_services']) && $default['de_easy_pay_services']){ + $de_easy_pay_service_array = explode(',', $default['de_easy_pay_services']); + if( in_array('nhnkcp_payco', $de_easy_pay_service_array) ){ + $easypay_prints['nhnkcp_payco'] = '
  • '; + } + if( in_array('nhnkcp_naverpay', $de_easy_pay_service_array) ){ + $easypay_prints['nhnkcp_naverpay'] = '
  • '; + } + if( in_array('nhnkcp_kakaopay', $de_easy_pay_service_array) ){ + $easypay_prints['nhnkcp_kakaopay'] = '
  • '; + } + } else { + $easypay_prints[strtolower($pg_easy_pay_name)] = '
  • '; + } + } + + if( ! isset($easypay_prints['nhnkcp_naverpay']) && function_exists('is_use_easypay') && is_use_easypay('global_nhnkcp') ){ + $easypay_prints['nhnkcp_naverpay'] = '
  • '; + } + + if($easypay_prints) { + $multi_settle++; + echo run_replace('shop_orderform_easypay_buttons', implode(PHP_EOL, $easypay_prints), $easypay_prints, $multi_settle); } //이니시스 삼성페이 @@ -696,6 +728,10 @@ if($is_kakaopay_use) { require_once(G5_MSHOP_PATH.'/samsungpay/orderform.2.php'); } + if(function_exists('is_use_easypay') && is_use_easypay('global_nhnkcp')){ // 타 PG 사용시 NHN KCP 네이버페이 사용이 설정되어 있다면 + require_once(G5_MSHOP_PATH.'/kcp/easypay_form.2.php'); + } + if($is_kakaopay_use) { require_once(G5_SHOP_PATH.'/kakaopay/orderform.2.php'); } @@ -730,6 +766,10 @@ if($is_kakaopay_use) { if( is_inicis_simple_pay() ){ //삼성페이 사용시 require_once(G5_MSHOP_PATH.'/samsungpay/order.script.php'); } + +if(function_exists('is_use_easypay') && is_use_easypay('global_nhnkcp')){ // 타 PG 사용시 NHN KCP 네이버페이 사용이 설정되어 있다면 + require_once(G5_MSHOP_PATH.'/kcp/m_order.script.php'); +} ?> + + + + + \ No newline at end of file diff --git a/shop/kcp/global_nhn_kcp_order.script.php b/shop/kcp/global_nhn_kcp_order.script.php new file mode 100644 index 000000000..9d1b96b27 --- /dev/null +++ b/shop/kcp/global_nhn_kcp_order.script.php @@ -0,0 +1,75 @@ + + \ No newline at end of file diff --git a/shop/kcp/orderform.2.php b/shop/kcp/orderform.2.php index 4a70fb668..d526997ae 100644 --- a/shop/kcp/orderform.2.php +++ b/shop/kcp/orderform.2.php @@ -12,6 +12,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 + + + diff --git a/shop/kcp/pp_ax_hub.php b/shop/kcp/pp_ax_hub.php index 5ac49a8b2..5cd5ebef5 100644 --- a/shop/kcp/pp_ax_hub.php +++ b/shop/kcp/pp_ax_hub.php @@ -269,6 +269,16 @@ if ( $req_tx == "pay" ) $card_bin_type_01 = $c_PayPlus->mf_get_res_data( "card_bin_type_01" ); // 카드구분1 $card_bin_type_02 = $c_PayPlus->mf_get_res_data( "card_bin_type_02" ); // 카드구분2 $card_mny = $c_PayPlus->mf_get_res_data( "card_mny" ); // 카드결제금액 + $od_other_pay_type = $c_PayPlus->mf_get_res_data( "card_other_pay_type" ); // 간편결제유형 + + $kcp_pay_method = $c_PayPlus->mf_get_res_data( "pay_method" ); // 카카오페이 결제수단 + // 카드 코드는 PACA, 카카오머니 코드는 PAKM + + if( $kcp_pay_method == "PAKM" ){ // 카카오머니 + $card_mny = $kakaomny_mny = $c_PayPlus->mf_get_res_data( "kakaomny_mny" ); + $app_time = $app_kakaomny_time = $c_PayPlus->mf_get_res_data( "app_kakaomny_time" ); + $od_other_pay_type = 'NHNKCP_KAKAOMONEY'; + } /* = -------------------------------------------------------------- = */ /* = 05-1.1. 복합결제(포인트+신용카드) 승인 결과 처리 = */ diff --git a/shop/orderform.sub.php b/shop/orderform.sub.php index e5f472bc5..e2c70a106 100644 --- a/shop/orderform.sub.php +++ b/shop/orderform.sub.php @@ -8,6 +8,10 @@ if( $default['de_inicis_lpay_use'] || $default['de_inicis_kakaopay_use'] ){ // require_once(G5_SHOP_PATH.'/inicis/lpay_common.php'); } +if(function_exists('is_use_easypay') && is_use_easypay('global_nhnkcp')){ // 타 PG 사용시 NHN KCP 네이버페이 사용이 설정되어 있다면 + require_once(G5_SHOP_PATH.'/kcp/global_nhn_kcp.php'); +} + // 결제대행사별 코드 include (스크립트 등) require_once(G5_SHOP_PATH.'/'.$default['de_pg_service'].'/orderform.1.php'); @@ -15,6 +19,10 @@ if( $default['de_inicis_lpay_use'] || $default['de_inicis_kakaopay_use'] ){ // require_once(G5_SHOP_PATH.'/inicis/lpay_form.1.php'); } +if(function_exists('is_use_easypay') && is_use_easypay('global_nhnkcp')){ // 타 PG 사용시 NHN KCP 네이버페이 사용이 설정되어 있다면 + require_once(G5_SHOP_PATH.'/kcp/global_nhn_kcp_form.1.php'); +} + if($is_kakaopay_use) { require_once(G5_SHOP_PATH.'/kakaopay/orderform.1.php'); } @@ -605,6 +613,8 @@ if($is_kakaopay_use) { echo ' '.PHP_EOL; $checked = ''; } + + $easypay_prints = array(); // PG 간편결제 if($default['de_easy_pay_use']) { @@ -621,8 +631,31 @@ if($is_kakaopay_use) { } $multi_settle++; - echo ' '.PHP_EOL; - $checked = ''; + + if($default['de_pg_service'] === 'kcp' && isset($default['de_easy_pay_services']) && $default['de_easy_pay_services']){ + $de_easy_pay_service_array = explode(',', $default['de_easy_pay_services']); + if( in_array('nhnkcp_payco', $de_easy_pay_service_array) ){ + $easypay_prints['nhnkcp_payco'] = ' '; + } + if( in_array('nhnkcp_naverpay', $de_easy_pay_service_array) ){ + $easypay_prints['nhnkcp_naverpay'] = ' '; + } + if( in_array('nhnkcp_kakaopay', $de_easy_pay_service_array) ){ + $easypay_prints['nhnkcp_kakaopay'] = ' '; + } + } else { + $easypay_prints[strtolower($pg_easy_pay_name)] = ' '; + } + + } + + if( ! isset($easypay_prints['nhnkcp_naverpay']) && function_exists('is_use_easypay') && is_use_easypay('global_nhnkcp') ){ + $easypay_prints['nhnkcp_naverpay'] = ' '; + } + + if($easypay_prints) { + $multi_settle++; + echo run_replace('shop_orderform_easypay_buttons', implode(PHP_EOL, $easypay_prints), $easypay_prints, $multi_settle); } //이니시스 Lpay @@ -734,6 +767,9 @@ if($is_kakaopay_use) { if( $default['de_inicis_lpay_use'] || $default['de_inicis_kakaopay_use'] ){ //이니시스 L.pay 또는 이니시스 카카오페이 사용시 require_once(G5_SHOP_PATH.'/inicis/lpay_order.script.php'); } +if(function_exists('is_use_easypay') && is_use_easypay('global_nhnkcp')){ // 타 PG 사용시 NHN KCP 네이버페이 사용이 설정되어 있다면 + require_once(G5_SHOP_PATH.'/kcp/global_nhn_kcp_order.script.php'); +} ?>