diff --git a/adm/shop_admin/configform.php b/adm/shop_admin/configform.php index e40d955f9..fedb37059 100644 --- a/adm/shop_admin/configform.php +++ b/adm/shop_admin/configform.php @@ -114,6 +114,12 @@ if(!isset($default['de_inicis_cartpoint_use'])) { ADD `de_inicis_cartpoint_use` tinyint(4) NOT NULL DEFAULT '0' AFTER `de_samsung_pay_use` ", true); } +// 이니시스 lpay 사용여부 필드 추가 +if(!isset($default['de_inicis_lpay_use'])) { + sql_query(" ALTER TABLE `{$g5['g5_shop_default_table']}` + ADD `de_inicis_lpay_use` tinyint(4) NOT NULL DEFAULT '0' AFTER `de_samsung_pay_use` ", true); +} + // 카카오페이 필드 추가 if(!isset($default['de_kakaopay_mid'])) { sql_query(" ALTER TABLE `{$g5['g5_shop_default_table']}` @@ -750,10 +756,19 @@ if(!isset($default['de_listtype_list_skin'])) { 삼성페이 서비스신청하기 - 실결제시 반드시 결제대행사 KG이니시스 항목에 상점 아이디와 키패스워드를 입력해 주세요.", 50); ?> + 실결제시 반드시 결제대행사 KG이니시스 항목에 상점 아이디와 키패스워드를 입력해 주세요.", 50); ?> > + + + + + + 실결제시 반드시 결제대행사 KG이니시스 항목의 상점 정보( 아이디, 키패스워드, 웹결제 사인키 )를 입력해 주세요.", 50); ?> + > + + diff --git a/adm/shop_admin/configformupdate.php b/adm/shop_admin/configformupdate.php index b104104db..14c40f016 100644 --- a/adm/shop_admin/configformupdate.php +++ b/adm/shop_admin/configformupdate.php @@ -145,6 +145,7 @@ $sql = " update {$g5['g5_shop_default_table']} de_card_use = '{$_POST['de_card_use']}', de_easy_pay_use = '{$_POST['de_easy_pay_use']}', de_samsung_pay_use = '{$_POST['de_samsung_pay_use']}', + de_inicis_lpay_use = '{$_POST['de_inicis_lpay_use']}', de_inicis_cartpoint_use = '{$_POST['de_inicis_cartpoint_use']}', de_card_noint_use = '{$_POST['de_card_noint_use']}', de_card_point = '{$_POST['de_card_point']}', diff --git a/adm/shop_admin/orderform.php b/adm/shop_admin/orderform.php index 0f6cb9fe1..a6ac3ec00 100644 --- a/adm/shop_admin/orderform.php +++ b/adm/shop_admin/orderform.php @@ -468,7 +468,7 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js - + 결제금액 @@ -759,7 +759,7 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js - + @@ -1066,7 +1066,7 @@ function form_submit(f) var msg = ""; - + if(status == "취소" || status == "반품" || status == "품절") { var $ct_chk = $("input[name^=ct_chk]"); var chk_cnt = $ct_chk.size(); diff --git a/adm/shop_admin/orderformcartupdate.php b/adm/shop_admin/orderformcartupdate.php index 2cdf0c235..d6b3e14fd 100644 --- a/adm/shop_admin/orderformcartupdate.php +++ b/adm/shop_admin/orderformcartupdate.php @@ -183,7 +183,7 @@ if (in_array($_POST['ct_status'], $status_cancel)) { $sql = " select * from {$g5['g5_shop_order_table']} where od_id = '$od_id' "; $od = sql_fetch($sql); - if($od['od_tno'] && ($od['od_settle_case'] == '신용카드' || $od['od_settle_case'] == '간편결제' || $od['od_settle_case'] == 'KAKAOPAY') || ($od['od_pg'] == 'inicis' && $od['od_settle_case'] == '삼성페이')) { + if($od['od_tno'] && ($od['od_settle_case'] == '신용카드' || $od['od_settle_case'] == '간편결제' || $od['od_settle_case'] == 'KAKAOPAY') || ($od['od_pg'] == 'inicis' && is_inicis_order_pay($od['od_settle_case']) )) { switch($od['od_pg']) { case 'lg': include_once(G5_SHOP_PATH.'/settle_lg.inc.php'); diff --git a/css/default_shop.css b/css/default_shop.css index 6ec53c3b1..6ea53f989 100644 --- a/css/default_shop.css +++ b/css/default_shop.css @@ -393,6 +393,7 @@ a.btn_admin:focus, a.btn_admin:hover {text-decoration:none} #sod_frm_paysel .KPAY{background:url('../../../img/kpay_logo.png') no-repeat;width:37px;height:15px;overflow:hidden;text-indent:-999px;display:inline-block;} #sod_frm_paysel .PAYNOW{background:url('../../../img/paynow_logo.png') no-repeat;width:46px;height:15px;overflow:hidden;text-indent:-999px;display:inline-block;} #sod_frm_paysel .PAYCO{background:url('../../../img/payco_logo.png') no-repeat 1px;width:46px;height:15px;overflow:hidden;text-indent:-999px;display:inline-block;} +#sod_frm_paysel .inicis_lpay{background:url('../../../img/lpay_logo.png') no-repeat 1px;width:46px;height:15px;overflow:hidden;text-indent:-999px;display:inline-block;} .kakaopay_icon{background:url('../img/kakao.png') no-repeat ;height:21px;width:74px;display:inline-block;overflow:hidden;text-indent:-999px} #settle_bank {margin:10px 0 0} diff --git a/css/mobile_shop.css b/css/mobile_shop.css index f30b0f597..23b74b0c2 100644 --- a/css/mobile_shop.css +++ b/css/mobile_shop.css @@ -358,6 +358,7 @@ html.no-overflowscrolling #sc_coupon_frm, html.no-overflowscrolling #od_coupon_f #sod_frm_paysel .KPAY{background:url('../img/kpay_logo.png') no-repeat;width:37px;height:15px;overflow:hidden;text-indent:-999px;display:inline-block;} #sod_frm_paysel .PAYNOW{background:url('../img/paynow_logo.png') no-repeat;width:46px;height:15px;overflow:hidden;text-indent:-999px;display:inline-block;} #sod_frm_paysel .PAYCO{background:url('../img/payco_logo.png') no-repeat 1px;width:46px;height:15px;overflow:hidden;text-indent:-999px;display:inline-block;} +#sod_frm_paysel .inicis_lpay{background:url('../img/lpay_logo.png') no-repeat 1px;width:46px;height:15px;overflow:hidden;text-indent:-999px;display:inline-block;} .kakaopay_icon{background:url('../img/kakao.png') no-repeat ;height:21px;width:74px;display:inline-block;overflow:hidden;text-indent:-999px} .samsung_pay{background:url('../img/samsungpay.png') no-repeat ;height:12px;width:83px;display:inline-block;overflow:hidden;text-indent:-999px} diff --git a/img/lpay_logo.png b/img/lpay_logo.png new file mode 100644 index 000000000..70b6cdbbd Binary files /dev/null and b/img/lpay_logo.png differ diff --git a/install/gnuboard5shop.sql b/install/gnuboard5shop.sql index ade35fa55..e27c2b2a2 100644 --- a/install/gnuboard5shop.sql +++ b/install/gnuboard5shop.sql @@ -354,6 +354,7 @@ CREATE TABLE IF NOT EXISTS `g5_shop_default` ( `de_iche_use` tinyint(4) NOT NULL DEFAULT '0', `de_easy_pay_use` tinyint(4) NOT NULL DEFAULT '0', `de_samsung_pay_use` tinyint(4) NOT NULL DEFAULT '0', + `de_inicis_lpay_use` tinyint(4) NOT NULL DEFAULT '0', `de_inicis_cartpoint_use` tinyint(4) NOT NULL DEFAULT '0', `de_item_use_use` tinyint(4) NOT NULL DEFAULT '0', `de_item_use_write` tinyint(4) NOT NULL DEFAULT '0', diff --git a/lib/shop.lib.php b/lib/shop.lib.php index 5d906e022..d55f86ce4 100644 --- a/lib/shop.lib.php +++ b/lib/shop.lib.php @@ -2271,6 +2271,37 @@ function make_order_field($data, $exclude) return $field; } +//이니시스의 삼성페이 또는 L.pay 결제가 활성화 되어 있는지 체크합니다. +function is_inicis_simple_pay(){ + global $default; + + if ( $default['de_samsung_pay_use'] || $default['de_inicis_lpay_use'] ){ + return true; + } + + return false; +} + +//이니시스의 삼성페이 또는 L.pay 결제인지 확인합니다. +function is_inicis_order_pay($type){ + + if( in_array($type, array('삼성페이', 'lpay') ) ){ + return true; + } + + return false; +} + +//결제방식 이름을 체크하여 치환 대상인 문자열은 따로 리턴합니다. +function check_pay_name_replace($payname){ + + if( $payname === 'lpay' ){ + return 'L.pay'; + } + + return $payname; +} + // 다운로드한 쿠폰인지 function is_coupon_downloaded($mb_id, $cz_id) { diff --git a/mobile/shop/orderform.sub.php b/mobile/shop/orderform.sub.php index 0dfdef66e..190579798 100644 --- a/mobile/shop/orderform.sub.php +++ b/mobile/shop/orderform.sub.php @@ -4,7 +4,7 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 require_once(G5_MSHOP_PATH.'/settle_'.$default['de_pg_service'].'.inc.php'); require_once(G5_SHOP_PATH.'/settle_kakaopay.inc.php'); -if( $default['de_samsung_pay_use'] ){ //삼성페이 사용시 +if( is_inicis_simple_pay() ){ //이니시스 삼성페이 또는 Lpay 사용시 require_once(G5_MSHOP_PATH.'/samsungpay/incSamsungpayCommon.php'); } @@ -245,7 +245,7 @@ ob_end_clean(); // 결제대행사별 코드 include (결제등록 필드) require_once(G5_MSHOP_PATH.'/'.$default['de_pg_service'].'/orderform.1.php'); -if( $default['de_samsung_pay_use'] ){ //삼성페이 사용시 +if( is_inicis_simple_pay() ){ //이니시스 삼성페이 또는 lpay 사용시 require_once(G5_MSHOP_PATH.'/samsungpay/orderform.1.php'); } ?> @@ -543,7 +543,7 @@ if($is_kakaopay_use) { $escrow_title = "에스크로 "; } - if ($is_kakaopay_use || $default['de_bank_use'] || $default['de_vbank_use'] || $default['de_iche_use'] || $default['de_card_use'] || $default['de_hp_use'] || $default['de_easy_pay_use'] || $default['de_samsung_pay_use']) { + if ($is_kakaopay_use || $default['de_bank_use'] || $default['de_vbank_use'] || $default['de_iche_use'] || $default['de_card_use'] || $default['de_hp_use'] || $default['de_easy_pay_use'] || is_inicis_simple_pay()) { echo '
'; $temp_point = 0; @@ -667,7 +673,7 @@ if($is_kakaopay_use) { echo '
'; } - if ($default['de_bank_use'] || $default['de_vbank_use'] || $default['de_iche_use'] || $default['de_card_use'] || $default['de_hp_use'] || $default['de_easy_pay_use'] || $default['de_samsung_pay_use']) { + if ($default['de_bank_use'] || $default['de_vbank_use'] || $default['de_iche_use'] || $default['de_card_use'] || $default['de_hp_use'] || $default['de_easy_pay_use'] || is_inicis_simple_pay() ) { echo ''; } @@ -680,7 +686,7 @@ if($is_kakaopay_use) { // 결제대행사별 코드 include (결제대행사 정보 필드 및 주분버튼) require_once(G5_MSHOP_PATH.'/'.$default['de_pg_service'].'/orderform.2.php'); - if( $default['de_samsung_pay_use'] ){ //삼성페이 사용시 + if( is_inicis_simple_pay() ){ //삼성페이 또는 L.pay 사용시 require_once(G5_MSHOP_PATH.'/samsungpay/orderform.2.php'); } @@ -706,7 +712,7 @@ if($is_kakaopay_use) { // 결제대행사별 코드 include (에스크로 안내) require_once(G5_MSHOP_PATH.'/'.$default['de_pg_service'].'/orderform.3.php'); - if( $default['de_samsung_pay_use'] ){ //삼성페이 사용시 + if( is_inicis_simple_pay() ){ //삼성페이 사용시 require_once(G5_MSHOP_PATH.'/samsungpay/orderform.3.php'); } } @@ -715,7 +721,7 @@ if($is_kakaopay_use) { @@ -1209,7 +1215,7 @@ function pay_approval() var form_order_method = ''; - if( settle_method == "삼성페이" ){ + if( settle_method == "삼성페이" || settle_method == "lpay" ){ form_order_method = 'samsungpay'; } @@ -1294,6 +1300,12 @@ function pay_approval() //f.DEF_RESERVED.value = f.DEF_RESERVED.value.replace("&useescrow=Y", ""); f.P_SKIP_TERMS.value = "Y"; //약관을 skip 해야 제대로 실행됨 break; + case "lpay": + paymethod = "wcard"; + f.P_RESERVED.value = f.P_RESERVED.value.replace("&useescrow=Y", "")+"&d_lpay=Y"; + //f.DEF_RESERVED.value = f.DEF_RESERVED.value.replace("&useescrow=Y", ""); + f.P_SKIP_TERMS.value = "Y"; //약관을 skip 해야 제대로 실행됨 + break; } f.P_AMT.value = f.good_mny.value; f.P_UNAME.value = pf.od_name.value; diff --git a/mobile/shop/orderformupdate.php b/mobile/shop/orderformupdate.php index 59e2e07f4..f196b497d 100644 --- a/mobile/shop/orderformupdate.php +++ b/mobile/shop/orderformupdate.php @@ -2,8 +2,8 @@ include_once('./_common.php'); include_once(G5_LIB_PATH.'/mailer.lib.php'); -//삼성페이 요청으로 왔다면 현재 삼성페이는 이니시스 밖에 없으므로 $default['de_pg_service'] 값을 이니시스로 변경한다. -if( $od_settle_case == '삼성페이' && !empty($_POST['P_HASH']) ){ +//삼성페이 또는 lpay 요청으로 왔다면 현재 삼성페이 또는 lpay는 이니시스 밖에 없으므로 $default['de_pg_service'] 값을 이니시스로 변경한다. +if( is_inicis_order_pay($od_settle_case) && !empty($_POST['P_HASH']) ){ $default['de_pg_service'] = 'inicis'; } @@ -431,7 +431,7 @@ else if ($od_settle_case == "간편결제") if($od_misu == 0) $od_status = '입금'; } -else if ($od_settle_case == "삼성페이") +else if ( is_inicis_order_pay($od_settle_case) ) //이니시스의 삼성페이 또는 L.pay { // 이니시스에서만 지원 include G5_MSHOP_PATH.'/inicis/pay_result.php'; diff --git a/mobile/shop/orderinquiryview.php b/mobile/shop/orderinquiryview.php index 758ce0ddb..009ab483e 100644 --- a/mobile/shop/orderinquiryview.php +++ b/mobile/shop/orderinquiryview.php @@ -230,7 +230,7 @@ if($od['od_pg'] == 'lg') { $disp_bank = true; $disp_receipt = false; $easy_pay_name = ''; - if($od['od_settle_case'] == '신용카드' || $od['od_settle_case'] == 'KAKAOPAY' || $od['od_settle_case'] == '삼성페이') { + if($od['od_settle_case'] == '신용카드' || $od['od_settle_case'] == 'KAKAOPAY' || is_inicis_order_pay($od['od_settle_case']) ) { $app_no_subj = '승인번호'; $app_no = $od['od_app_no']; $disp_bank = false; @@ -283,7 +283,7 @@ if($od['od_pg'] == 'lg') { 결제방식 - + 결제금액 @@ -351,7 +351,7 @@ if($od['od_pg'] == 'lg') { diff --git a/mobile/shop/samsungpay/orderform.1.php b/mobile/shop/samsungpay/orderform.1.php index 90c5fef46..a91eb6198 100644 --- a/mobile/shop/samsungpay/orderform.1.php +++ b/mobile/shop/samsungpay/orderform.1.php @@ -1,8 +1,8 @@ diff --git a/mobile/shop/samsungpay/orderform.2.php b/mobile/shop/samsungpay/orderform.2.php index e1da52c92..0f47acbaf 100644 --- a/mobile/shop/samsungpay/orderform.2.php +++ b/mobile/shop/samsungpay/orderform.2.php @@ -1,8 +1,8 @@ diff --git a/shop/inicis/lpay_common.php b/shop/inicis/lpay_common.php new file mode 100644 index 000000000..3e59cfa4b --- /dev/null +++ b/shop/inicis/lpay_common.php @@ -0,0 +1,10 @@ + \ No newline at end of file diff --git a/shop/inicis/lpay_form.1.php b/shop/inicis/lpay_form.1.php new file mode 100644 index 000000000..891c7d4fa --- /dev/null +++ b/shop/inicis/lpay_form.1.php @@ -0,0 +1,126 @@ +', 10); +?> + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ \ No newline at end of file diff --git a/shop/inicis/lpay_order.script.php b/shop/inicis/lpay_order.script.php new file mode 100644 index 000000000..1a5aacd5c --- /dev/null +++ b/shop/inicis/lpay_order.script.php @@ -0,0 +1,73 @@ + + \ No newline at end of file diff --git a/shop/inicis/makesignature.php b/shop/inicis/makesignature.php index ac7faf70a..7a09e2264 100644 --- a/shop/inicis/makesignature.php +++ b/shop/inicis/makesignature.php @@ -3,7 +3,7 @@ include_once('./_common.php'); include_once(G5_LIB_PATH.'/json.lib.php'); include_once(G5_SHOP_PATH.'/settle_inicis.inc.php'); -if($default['de_pg_service'] != 'inicis') +if($default['de_pg_service'] != 'inicis' && ! $default['de_inicis_lpay_use'] ) die(json_encode(array('error'=>'올바른 방법으로 이용해 주십시오.'))); $orderNumber = get_session('ss_order_inicis_id'); diff --git a/shop/orderform.php b/shop/orderform.php index 8609c8119..14b51933b 100644 --- a/shop/orderform.php +++ b/shop/orderform.php @@ -26,7 +26,7 @@ if (get_cart_count($tmp_cart_id) == 0) $od_id = get_uniqid(); set_session('ss_order_id', $od_id); $s_cart_id = $tmp_cart_id; -if($default['de_pg_service'] == 'inicis') +if($default['de_pg_service'] == 'inicis' || $default['de_inicis_lpay_use']) set_session('ss_order_inicis_id', $od_id); $g5['title'] = '주문서 작성'; diff --git a/shop/orderform.sub.php b/shop/orderform.sub.php index eaa8eb791..9b519f74f 100644 --- a/shop/orderform.sub.php +++ b/shop/orderform.sub.php @@ -4,9 +4,17 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 require_once(G5_SHOP_PATH.'/settle_'.$default['de_pg_service'].'.inc.php'); require_once(G5_SHOP_PATH.'/settle_kakaopay.inc.php'); +if( $default['de_inicis_lpay_use'] ){ //이니시스 Lpay 사용시 + require_once(G5_SHOP_PATH.'/inicis/lpay_common.php'); +} + // 결제대행사별 코드 include (스크립트 등) require_once(G5_SHOP_PATH.'/'.$default['de_pg_service'].'/orderform.1.php'); +if( $default['de_inicis_lpay_use'] ){ //이니시스 L.pay 사용시 + require_once(G5_SHOP_PATH.'/inicis/lpay_form.1.php'); +} + if($is_kakaopay_use) { require_once(G5_SHOP_PATH.'/kakaopay/orderform.1.php'); } @@ -248,6 +256,7 @@ if($is_kakaopay_use) { + '; echo '결제방법 선택'; } @@ -603,6 +612,12 @@ if($is_kakaopay_use) { $checked = ''; } + //이니시스 Lpay + if($default['de_inicis_lpay_use']) { + echo ' '.PHP_EOL; + $checked = ''; + } + $temp_point = 0; // 회원이면서 포인트사용이면 if ($is_member && $config['cf_use_point']) @@ -657,7 +672,7 @@ if($is_kakaopay_use) { echo ''; } - if ($default['de_bank_use'] || $default['de_vbank_use'] || $default['de_iche_use'] || $default['de_card_use'] || $default['de_hp_use']) { + if ($is_kakaopay_use || $default['de_bank_use'] || $default['de_vbank_use'] || $default['de_iche_use'] || $default['de_card_use'] || $default['de_hp_use'] || $default['de_easy_pay_use'] || $default['de_inicis_lpay_use'] ) { echo ''; } @@ -686,6 +701,11 @@ if($is_kakaopay_use) { +