From 1b03e331f80352abcabad622c342f244372877bc Mon Sep 17 00:00:00 2001 From: chicpro Date: Mon, 7 Sep 2015 12:09:07 +0900 Subject: [PATCH 01/26] =?UTF-8?q?PG=EC=82=AC=20=EA=B0=84=ED=8E=B8=EA=B2=B0?= =?UTF-8?q?=EC=A0=9C=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/shop_admin/configform.php | 16 ++++++ adm/shop_admin/configformupdate.php | 1 + css/default_shop.css | 4 ++ css/mobile_shop.css | 4 ++ img/kpay_logo.png | Bin 0 -> 1520 bytes img/payco_logo.png | Bin 0 -> 711 bytes img/paynow_logo.png | Bin 0 -> 679 bytes install/gnuboard5shop.sql | 1 + mobile/shop/inicis/settle_common.php | 37 +++++++------- mobile/shop/kcp/order_approval_form.php | 8 +++ mobile/shop/kcp/orderform.1.php | 1 + mobile/shop/lg/orderform.1.php | 1 + mobile/shop/lg/xpay_approval.php | 2 + mobile/shop/orderform.php | 43 +++++++++++++--- mobile/shop/orderformupdate.php | 26 ++++++++++ mobile/shop/orderinquiryview.php | 21 +++++++- mobile/shop/settle_kcp.inc.php | 6 +++ shop/inicis/orderform.1.php | 2 +- shop/inicis/orderform.3.php | 2 +- shop/kcp/orderform.1.php | 2 +- shop/kcp/orderform.2.php | 2 + shop/kcp/orderform.3.php | 4 +- shop/kcp/orderform.5.php | 2 +- shop/lg/orderform.1.php | 2 +- shop/lg/orderform.2.php | 1 + shop/lg/orderform.3.php | 2 +- shop/orderform.php | 63 +++++++++++++++++++++--- shop/orderformupdate.php | 26 ++++++++++ shop/orderinquiryview.php | 19 ++++++- shop/settle_kcp.inc.php | 6 +++ theme/basic/css/default_shop.css | 4 ++ theme/basic/css/mobile_shop.css | 5 ++ 32 files changed, 271 insertions(+), 42 deletions(-) create mode 100644 img/kpay_logo.png create mode 100644 img/payco_logo.png create mode 100644 img/paynow_logo.png diff --git a/adm/shop_admin/configform.php b/adm/shop_admin/configform.php index 5a94568d7..f7fc04b03 100644 --- a/adm/shop_admin/configform.php +++ b/adm/shop_admin/configform.php @@ -96,6 +96,12 @@ if(!isset($default['de_mobile_search_list_row'])) { sql_query(" ALTER TABLE `{$g5['g5_shop_default_table']}` ADD `de_mobile_search_list_row` int(11) NOT NULL DEFAULT '0' AFTER `de_mobile_search_list_mod` ", true); } + +// PG 간펼결제 사용여부 필드 추가 +if(!isset($default['de_easy_pay_use'])) { + sql_query(" ALTER TABLE `{$g5['g5_shop_default_table']}` + ADD `de_easy_pay_use` tinyint(4) NOT NULL DEFAULT '0' AFTER `de_iche_use` ", true); +} ?>
@@ -542,6 +548,16 @@ if(!isset($default['de_mobile_search_list_row'])) { + + + + + + + diff --git a/adm/shop_admin/configformupdate.php b/adm/shop_admin/configformupdate.php index 286165603..e49547b47 100644 --- a/adm/shop_admin/configformupdate.php +++ b/adm/shop_admin/configformupdate.php @@ -127,6 +127,7 @@ $sql = " update {$g5['g5_shop_default_table']} de_bank_account = '{$_POST['de_bank_account']}', de_card_test = '{$_POST['de_card_test']}', de_card_use = '{$_POST['de_card_use']}', + de_easy_pay_use = '{$_POST['de_easy_pay_use']}', de_card_noint_use = '{$_POST['de_card_noint_use']}', de_card_point = '{$_POST['de_card_point']}', de_settle_min_point = '{$_POST['de_settle_min_point']}', diff --git a/css/default_shop.css b/css/default_shop.css index ba2f13246..2a0ae3b99 100644 --- a/css/default_shop.css +++ b/css/default_shop.css @@ -390,6 +390,10 @@ a.btn_admin:focus, a.btn_admin:hover {text-decoration:none} #sod_frm_paysel {margin:0 0 20px;padding:10px;border:1px solid #e9e9e9;background:#f2f5f9;text-align:center} #sod_frm_paysel legend {position:absolute;font-size:0;line-height:0;overflow:hidden} +#sod_frm_paysel .KPAY{background:url('../img/kpay_logo.png') no-repeat;padding-left:37px;display:inline-block} +#sod_frm_paysel .PAYNOW{background:url('../img/paynow_logo.png') no-repeat;padding-left:46px;display:inline-block} +#sod_frm_paysel .PAYCO{background:url('../img/payco_logo.png') no-repeat 1px;padding-left:46px;display:inline-block} + #settle_bank {margin:10px 0 0} #sod_frm_escrow {margin:30px 0 0} diff --git a/css/mobile_shop.css b/css/mobile_shop.css index b95c26821..97fdcc377 100644 --- a/css/mobile_shop.css +++ b/css/mobile_shop.css @@ -352,6 +352,10 @@ html.no-overflowscrolling #sc_coupon_frm, html.no-overflowscrolling #od_coupon_f #sod_frm_paysel ul {margin:0;padding:0;} #sod_frm_paysel ul:after {display:block;visibility:hidden;clear:both;content:""} #sod_frm_paysel li {float:left;padding:5px 2%;width:46%} +#sod_frm_paysel .KPAY{background:url('../img/kpay_logo.png') no-repeat;padding-left:37px;} +#sod_frm_paysel .PAYNOW{background:url('../img/paynow_logo.png') no-repeat;padding-left:46px;} +#sod_frm_paysel .PAYCO{background:url('../img/payco_logo.png') no-repeat 1px ;padding-left:46px;} + #sod_frm_paysel #settle_bank {padding:10px;background:#fff;line-height:2em;border:1px solid #dbdbdb} #sod_frm_paysel #settle_bank label {display:inline-block;margin:0 10px 0 0;font-weight:bold} #sod_frm_paysel #settle_bank .frm_input {background:#fff;text-align:center} diff --git a/img/kpay_logo.png b/img/kpay_logo.png new file mode 100644 index 0000000000000000000000000000000000000000..7f7e76c753ff49368b0697f98657785aeb95ae8c GIT binary patch literal 1520 zcmV&#r28R##BI%8dRjID7M!32SZ=jlA@+ss8(s4s%fyT)wXFhQLL2KMw?Q#@ewIC zMjo{S@=|7Ymt_}sS@y}y?9A<5zV#+IGm|;@oO}QG_df)?x z=2iUpvr81FdDggw#`6S4${>m$_~| zzpLZ!N{=9b+v5S-$OueYtzbQO4(zvXfxWvM{9Z5c2!X5Z$_6$s$lB?ZueDEr3yx$ZeFcfw)`H#rx9cs zBn1r+48~5MI#DaP-(DI@)J+nl<>%1am##}g0|_WS`%lu4@l3kkzD|BJ^fonr@jqln zjw^Kkua$z;nnVkH0!mFC0+JE|=R=dO1lcpC2hNo0l2 z_}x3{iZj1l`ZpT~VJSt{5QW$@HM0NIyv2iK96z2f$5MM)V-(`@GrVl73UTQgWUX3r z$MQ~f6Sv4H`mB~rug?!$XBTis>+87ecwP~{f2=1EG4XC8Ue`M@I0y=SAByN0Ae2fF zP91NMJ8msg)-@cGmlk{tQ!ayi=0r39@qyFKY}3E|sn5QnV&lDvW8bV7H8D1(v!jx4 zYWxTY5&@D)m=0i;NCIKNATknw!esG5n#4s3&_s*yWFS-CSAAWwSW*QUZv+RD_#UOs zd!uBvFmJVYR;BOYSnT%wA>yn{Z+)DS&c1vcd`jmz5ag%9iz7`UZges6m!}HDA~#o{{5Y zV^P)&=BPEbWR1@`BoLJ*9T%3=L2FGkoVSq?#r9|h=1Itmu%w< zgv1C))SHPduUArT*IaBrH&s^NP8c#gNR)t>l`_H{KT{~*Xe&m+Kq8T1ct|ZT>Iu1A zfLbrSAz%8ThOT-4-B3sxCe@k%>g=eMers7zu)q8Y%7g?+Dk_+1Ya*Ug{R1H4rV(p0 zfp2@oW5LX+VEY~;os$bQjNo?3XcIvd6$Js08$?`0Hd}ze)FRwkncQ56&?P}=uz!KO zvZRO7>g=#-S3R=Z($J;v8_0Q!x-eWk%*?Q>!Uhk8FmxoS(hVTvrzFW3NP=b%VuLIPQNV{2k6Q9R#cpgssC%B1n0rhl+!rZkIzLLT)$>h=N?m$-K@>$R&k=`YdFIzBb{d@%zVI1s-v9RJd@8mMHUrTKul>9{=-Tn|OpSOzj@B~`nL}sJua0VX2akv8q z;3(8WFMUtLSr5Gp8sG(7gpv9b!#=nVSE17Nl~4z>p%8AvL4Vr?cca}cFcVgp%uXFb zpO>JwZ6ELYI}b2Mxr9xEZ%_fd;U(OId2YDO!_R^bP~@Hw`!PI&uh0gK@FufYL!A7F z&QYCPFvsUo=m|^IZIv&!nox^D6Q5&~MSfpyWv zH0Ettw6WSCt6`17B2W!{f+HCnr&@0IvrQeP+G@&FB4<*G@!!J(4=})kZG>SKU=u9W zKRU6wz?MaOwzLy-oNj?tI2X&*rvA3t&#fXEkdOUJXNP3L7MBIGp$S zWPw$>(Ls_o)ls}S!ifwm4mHU-2PJGS^np{EN{3xB`Hv3fby(=|9CrG{=G&=$u9xT+ zH$iodf1LllYl{?nBr>`)FY|w~bs0?+dm|)WEy-eA8xy`qI>mkoFaX;@j4%w3 $P_RMESG1, "P_RMESG2" => $P_RMESG2, "P_NOTI" => $P_NOTI, - "P_AUTH_NO" => $P_AUTH_NO + "P_AUTH_NO" => $P_AUTH_NO, + "P_SRC_CODE" => $P_SRC_CODE ); // 결과 incis log 테이블 기록 - if($P_TYPE == 'BANK') { + if($P_TYPE == 'BANK' || $P_SRC_CODE == 'A') { $sql = " insert into {$g5['g5_shop_inicis_log_table']} set oid = '$P_OID', P_TID = '$P_TID', diff --git a/mobile/shop/kcp/order_approval_form.php b/mobile/shop/kcp/order_approval_form.php index e807ae404..07ecbbbe3 100644 --- a/mobile/shop/kcp/order_approval_form.php +++ b/mobile/shop/kcp/order_approval_form.php @@ -62,6 +62,8 @@ $comm_vat_mny = $_POST[ "comm_vat_mny" ]; // 부가세 $comm_free_mny = $_POST["comm_free_mny" ]; // 비과세금액 + $payco_direct = $_POST["payco_direct" ]; // PAYCO 결제창 호출 + /* * 기타 파라메터 추가 부분 - Start - */ @@ -99,6 +101,10 @@ $pay_method = 'VCNT'; $ActionResult = 'vcnt'; break; + case '간편결제': + $pay_method = 'CARD'; + $ActionResult = 'card'; + break; default: $pay_method = ''; $ActionResult = ''; @@ -242,6 +248,8 @@ if($enc_data != '' && $enc_info != '' && $tran_cd != '') { + + diff --git a/mobile/shop/kcp/orderform.1.php b/mobile/shop/kcp/orderform.1.php index 12c582f9f..312629b3e 100644 --- a/mobile/shop/kcp/orderform.1.php +++ b/mobile/shop/kcp/orderform.1.php @@ -18,6 +18,7 @@ if(!($default['de_iche_use'] || $default['de_vbank_use'] || $default['de_hp_use' + diff --git a/mobile/shop/lg/orderform.1.php b/mobile/shop/lg/orderform.1.php index 225008a94..1fd1a22e6 100644 --- a/mobile/shop/lg/orderform.1.php +++ b/mobile/shop/lg/orderform.1.php @@ -13,6 +13,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 + \ No newline at end of file diff --git a/mobile/shop/lg/xpay_approval.php b/mobile/shop/lg/xpay_approval.php index be45cf87b..c81ce3371 100644 --- a/mobile/shop/lg/xpay_approval.php +++ b/mobile/shop/lg/xpay_approval.php @@ -17,6 +17,7 @@ $LGD_TAXFREEAMOUNT = $_POST['LGD_TAXFREEAMOUNT']; //비과세 금 $LGD_CASHRECEIPTYN = $_POST['LGD_CASHRECEIPTYN']; //현금영수증 사용설정 $LGD_BUYERID = $_POST['LGD_BUYERID']; //구매자 ID $LGD_BUYERPHONE = $_POST['LGD_BUYERPHONE']; //구매자 휴대폰번호 +$LGD_EASYPAY_ONLY = $_POST['LGD_EASYPAY_ONLY']; //페이나우결제창 호출 $LGD_RETURNURL = G5_MSHOP_URL.'/lg/returnurl.php'; $LGD_KVPMISPNOTEURL = G5_MSHOP_URL.'/lg/note_url.php'; @@ -87,6 +88,7 @@ $payReqMap['LGD_TAXFREEAMOUNT'] = $LGD_TAXFREEAMOUNT; $payReqMap['LGD_CASHRECEIPTYN'] = $LGD_CASHRECEIPTYN; $payReqMap['LGD_BUYERPHONE'] = $LGD_BUYERPHONE; $payReqMap['LGD_BUYERID'] = $LGD_BUYERID; +$payReqMap['LGD_EASYPAY_ONLY'] = $LGD_EASYPAY_ONLY; /* **************************************************** diff --git a/mobile/shop/orderform.php b/mobile/shop/orderform.php index a63a03539..f71ffcd8d 100644 --- a/mobile/shop/orderform.php +++ b/mobile/shop/orderform.php @@ -554,7 +554,7 @@ require_once(G5_MSHOP_PATH.'/'.$default['de_pg_service'].'/orderform.1.php'); $escrow_title = "에스크로 "; } - if ($default['de_bank_use'] || $default['de_vbank_use'] || $default['de_iche_use'] || $default['de_card_use'] || $default['de_hp_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']) { echo '
    '; } @@ -593,6 +593,25 @@ require_once(G5_MSHOP_PATH.'/'.$default['de_pg_service'].'/orderform.1.php'); $checked = ''; } + // PG 간편결제 + if($default['de_easy_pay_use']) { + switch($default['de_pg_service']) { + case 'lg': + $pg_easy_pay_name = 'PAYNOW'; + break; + case 'inicis': + $pg_easy_pay_name = 'KPAY'; + break; + default: + $pg_easy_pay_name = 'PAYCO'; + break; + } + + $multi_settle++; + echo '
  • '.PHP_EOL; + $checked = ''; + } + echo '
'; $temp_point = 0; @@ -646,7 +665,7 @@ require_once(G5_MSHOP_PATH.'/'.$default['de_pg_service'].'/orderform.1.php'); echo '
'; } - if ($default['de_bank_use'] || $default['de_vbank_use'] || $default['de_iche_use'] || $default['de_card_use'] || $default['de_hp_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']) { echo ''; } @@ -916,7 +935,7 @@ $(function() { $("#show_pay_btn").css("display", "inline"); }); - $("#od_settle_iche,#od_settle_card,#od_settle_vbank,#od_settle_hp").bind("click", function() { + $("#od_settle_iche,#od_settle_card,#od_settle_vbank,#od_settle_hp,#od_settle_easy_pay").bind("click", function() { $("#settle_bank").hide(); $("#show_req_btn").css("display", "inline"); $("#show_pay_btn").css("display", "none"); @@ -1168,8 +1187,13 @@ function pay_approval() f.rcvr_add1.value = pf.od_b_addr1.value; f.rcvr_add2.value = pf.od_b_addr2.value; f.settle_method.value = settle_method; + if(settle_method == "간편결제") + f.payco_direct.value = "Y"; + else + f.payco_direct.value = ""; var pay_method = ""; + var easy_pay = ""; switch(settle_method) { case "계좌이체": pay_method = "SC0030"; @@ -1183,12 +1207,16 @@ function pay_approval() case "신용카드": pay_method = "SC0010"; break; + case "간편결제": + easy_pay = "PAYNOW"; + break; } f.LGD_CUSTOM_FIRSTPAY.value = pay_method; f.LGD_BUYER.value = pf.od_name.value; f.LGD_BUYEREMAIL.value = pf.od_email.value; f.LGD_BUYERPHONE.value = pf.od_hp.value; f.LGD_AMOUNT.value = f.good_mny.value; + f.LGD_EASYPAY_ONLY.value = easy_pay; f.LGD_TAXFREEAMOUNT.value = pf.comm_free_mny.value; @@ -1200,6 +1228,8 @@ function pay_approval() var ypos = (screen.width - height) / 2; var position = "top=" + ypos + ",left=" + xpos; var features = position + ", width=320, height=440"; + var p_reserved = f.P_RESERVED.value; + f.P_RESERVED.value = p_reserved; switch(settle_method) { case "계좌이체": paymethod = "bank"; @@ -1213,6 +1243,10 @@ function pay_approval() case "신용카드": paymethod = "wcard"; break; + case "간편결제": + paymethod = "wcard"; + f.P_RESERVED.value = p_reserved+"&d_kpay=Y&d_kpay_app=Y"; + break; } f.P_AMT.value = f.good_mny.value; f.P_UNAME.value = pf.od_name.value; @@ -1226,9 +1260,6 @@ function pay_approval() f.action = "https://mobile.inicis.com/smart/" + paymethod + "/"; - //var new_win = window.open("about:blank", "tar_opener", "scrollbars=yes,resizable=yes"); - //f.target = "tar_opener"; - // 주문 정보 임시저장 var order_data = $(pf).serialize(); var save_result = ""; diff --git a/mobile/shop/orderformupdate.php b/mobile/shop/orderformupdate.php index ddb95c9fc..9c337949f 100644 --- a/mobile/shop/orderformupdate.php +++ b/mobile/shop/orderformupdate.php @@ -392,6 +392,32 @@ else if ($od_settle_case == "신용카드") if($od_misu == 0) $od_status = '입금'; } +else if ($od_settle_case == "간편결제") +{ + switch($default['de_pg_service']) { + case 'lg': + include G5_SHOP_PATH.'/lg/xpay_result.php'; + break; + case 'inicis': + include G5_MSHOP_PATH.'/inicis/pay_result.php'; + break; + default: + include G5_MSHOP_PATH.'/kcp/pp_ax_hub.php'; + $card_name = iconv("cp949", "utf-8", $card_name); + break; + } + + $od_tno = $tno; + $od_app_no = $app_no; + $od_receipt_price = $amount; + $od_receipt_point = $i_temp_point; + $od_receipt_time = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3 \\4:\\5:\\6", $app_time); + $od_bank_account = $card_name; + $pg_price = $amount; + $od_misu = $i_price - $od_receipt_price; + if($od_misu == 0) + $od_status = '입금'; +} else { die("od_settle_case Error!!!"); diff --git a/mobile/shop/orderinquiryview.php b/mobile/shop/orderinquiryview.php index b50a813fb..26c885469 100644 --- a/mobile/shop/orderinquiryview.php +++ b/mobile/shop/orderinquiryview.php @@ -239,11 +239,29 @@ if($od['od_pg'] == 'lg') { $app_no_subj = ''; $disp_bank = true; $disp_receipt = false; + $easy_pay_name = ''; if($od['od_settle_case'] == '신용카드') { $app_no_subj = '승인번호'; $app_no = $od['od_app_no']; $disp_bank = false; $disp_receipt = true; + } else if($od['od_settle_case'] == '간편결제') { + $app_no_subj = '승인번호'; + $app_no = $od['od_app_no']; + $disp_bank = false; + switch($od['od_pg']) { + case 'lg': + $easy_pay_name = 'PAYNOW'; + break; + case 'inicis': + $easy_pay_name = 'KPAY'; + break; + case 'kcp': + $easy_pay_name = 'PAYCO'; + break; + default: + break; + } } else if($od['od_settle_case'] == '휴대폰') { $app_no_subj = '휴대폰번호'; $app_no = $od['od_bank_account']; @@ -273,10 +291,9 @@ if($od['od_pg'] == 'lg') { 주문일시 - 결제방식 - + 결제금액 diff --git a/mobile/shop/settle_kcp.inc.php b/mobile/shop/settle_kcp.inc.php index 148eb229e..9db76f2d3 100644 --- a/mobile/shop/settle_kcp.inc.php +++ b/mobile/shop/settle_kcp.inc.php @@ -37,6 +37,12 @@ else { $g_conf_site_cd = $default['de_kcp_mid']; $g_conf_site_key = $default['de_kcp_site_key']; +// 테스트 결제 때 PAYCO site_cd, site_key 재설정 +if($default['de_card_test'] && ($_POST['settle_method'] == '간편결제' || $_POST['od_settle_case'] == '간편결제')) { + $g_conf_site_cd = 'S6729'; + $g_conf_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 는 지원하지 않습니다."); diff --git a/shop/inicis/orderform.1.php b/shop/inicis/orderform.1.php index d55e1f64c..859b3d343 100644 --- a/shop/inicis/orderform.1.php +++ b/shop/inicis/orderform.1.php @@ -2,7 +2,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 // 전자결제를 사용할 때만 실행 -if($default['de_iche_use'] || $default['de_vbank_use'] || $default['de_hp_use'] || $default['de_card_use']) { +if($default['de_iche_use'] || $default['de_vbank_use'] || $default['de_hp_use'] || $default['de_card_use'] || $default['de_easy_pay_use']) { ?> diff --git a/shop/inicis/orderform.3.php b/shop/inicis/orderform.3.php index e0dca41bb..8d46ff60c 100644 --- a/shop/inicis/orderform.3.php +++ b/shop/inicis/orderform.3.php @@ -2,7 +2,7 @@ if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가 // 전자결제를 사용할 때만 실행 -if($default['de_iche_use'] || $default['de_vbank_use'] || $default['de_hp_use'] || $default['de_card_use']) { +if($default['de_iche_use'] || $default['de_vbank_use'] || $default['de_hp_use'] || $default['de_card_use'] || $default['de_easy_pay_use']) { ?> + +
@@ -554,10 +561,17 @@ require_once(G5_MSHOP_PATH.'/'.$default['de_pg_service'].'/orderform.1.php'); $escrow_title = "에스크로 "; } - 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']) { + 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']) { echo '
    '; } + // 카카오페이 + if($is_kakaopay_use) { + $multi_settle++; + echo '
  • '.PHP_EOL; + $checked = ''; + } + // 무통장입금 사용 if ($default['de_bank_use']) { $multi_settle++; @@ -677,12 +691,22 @@ require_once(G5_MSHOP_PATH.'/'.$default['de_pg_service'].'/orderform.1.php'); + + f.buyr_name.value = pf.od_name.value; f.buyr_mail.value = pf.od_email.value; diff --git a/mobile/shop/orderformupdate.php b/mobile/shop/orderformupdate.php index 9c337949f..663538f22 100644 --- a/mobile/shop/orderformupdate.php +++ b/mobile/shop/orderformupdate.php @@ -9,7 +9,7 @@ if(get_session('ss_direct')) $page_return_url .= '?sw_direct=1'; // 결제등록 완료 체크 -if($od_settle_case != '무통장') { +if($od_settle_case != '무통장' && $od_settle_case != 'KAKAOPAY') { if($default['de_pg_service'] == 'kcp' && ($_POST['tran_cd'] == '' || $_POST['enc_info'] == '' || $_POST['enc_data'] == '')) alert('결제등록 요청 후 주문해 주십시오.', $page_return_url); @@ -418,22 +418,48 @@ else if ($od_settle_case == "간편결제") if($od_misu == 0) $od_status = '입금'; } +else if ($od_settle_case == "KAKAOPAY") +{ + include G5_SHOP_PATH.'/kakaopay/kakaopay_result.php'; + + $od_tno = $tno; + $od_app_no = $app_no; + $od_receipt_price = $amount; + $od_receipt_point = $i_temp_point; + $od_receipt_time = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3 \\4:\\5:\\6", $app_time); + $od_bank_account = $card_name; + $pg_price = $amount; + $od_misu = $i_price - $od_receipt_price; + if($od_misu == 0) + $od_status = '입금'; +} else { die("od_settle_case Error!!!"); } +$od_pg = $default['de_pg_service']; +if($od_settle_case == 'KAKAOPAY') + $od_pg = 'KAKAOPAY'; + // 주문금액과 결제금액이 일치하는지 체크 if($tno) { if((int)$order_price !== (int)$pg_price) { $cancel_msg = '결제금액 불일치'; - switch($default['de_pg_service']) { + switch($od_pg) { case 'lg': include G5_SHOP_PATH.'/lg/xpay_cancel.php'; break; case 'inicis': include G5_SHOP_PATH.'/inicis/inipay_cancel.php'; break; + case 'KAKAOPAY': + $_REQUEST['TID'] = $tno; + $_REQUEST['Amt'] = $amount; + $_REQUEST['CancelMsg'] = $cancel_msg; + $_REQUEST['PartialCancelCode'] = 0; + include G5_SHOP_PATH.'/kakaopay/kakaopay_cancel.php'; + break; default: include G5_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php'; break; @@ -465,7 +491,6 @@ if($default['de_tax_flag_use']) { $od_free_mny = (int)$_POST['comm_free_mny']; } -$od_pg = $default['de_pg_service']; $od_email = get_email_address($od_email); $od_name = clean_xss_tags($od_name); $od_tel = clean_xss_tags($od_tel); @@ -547,13 +572,20 @@ $result = sql_query($sql, false); if(!$result) { if($tno) { $cancel_msg = '주문정보 입력 오류'; - switch($default['de_pg_service']) { + switch($od_pg) { case 'lg': include G5_SHOP_PATH.'/lg/xpay_cancel.php'; break; case 'inicis': include G5_SHOP_PATH.'/inicis/inipay_cancel.php'; break; + case 'KAKAOPAY': + $_REQUEST['TID'] = $tno; + $_REQUEST['Amt'] = $amount; + $_REQUEST['CancelMsg'] = $cancel_msg; + $_REQUEST['PartialCancelCode'] = 0; + include G5_SHOP_PATH.'/kakaopay/kakaopay_cancel.php'; + break; default: include G5_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php'; break; @@ -564,7 +596,7 @@ if(!$result) { $error = 'order'; include G5_SHOP_PATH.'/ordererrormail.php'; - die('

    고객님의 주문 정보를 처리하는 중 오류가 발생해서 주문이 완료되지 않았습니다.

    '.strtoupper($default['de_pg_service']).'를 이용한 전자결제(신용카드, 계좌이체, 가상계좌 등)은 자동 취소되었습니다.'); + die('

    고객님의 주문 정보를 처리하는 중 오류가 발생해서 주문이 완료되지 않았습니다.

    '.strtoupper($od_pg).'를 이용한 전자결제(신용카드, 계좌이체, 가상계좌 등)은 자동 취소되었습니다.'); } // 장바구니 상태변경 @@ -586,13 +618,20 @@ $result = sql_query($sql, false); if(!$result) { if($tno) { $cancel_msg = '주문상태 변경 오류'; - switch($default['de_pg_service']) { + switch($od_pg) { case 'lg': include G5_SHOP_PATH.'/lg/xpay_cancel.php'; break; case 'inicis': include G5_SHOP_PATH.'/inicis/inipay_cancel.php'; break; + case 'KAKAOPAY': + $_REQUEST['TID'] = $tno; + $_REQUEST['Amt'] = $amount; + $_REQUEST['CancelMsg'] = $cancel_msg; + $_REQUEST['PartialCancelCode'] = 0; + include G5_SHOP_PATH.'/kakaopay/kakaopay_cancel.php'; + break; default: include G5_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php'; break; @@ -606,7 +645,7 @@ if(!$result) { // 주문삭제 sql_query(" delete from {$g5['g5_shop_order_table']} where od_id = '$od_id' "); - die('

    고객님의 주문 정보를 처리하는 중 오류가 발생해서 주문이 완료되지 않았습니다.

    '.strtoupper($default['de_pg_service']).'를 이용한 전자결제(신용카드, 계좌이체, 가상계좌 등)은 자동 취소되었습니다.'); + die('

    고객님의 주문 정보를 처리하는 중 오류가 발생해서 주문이 완료되지 않았습니다.

    '.strtoupper($od_pg).'를 이용한 전자결제(신용카드, 계좌이체, 가상계좌 등)은 자동 취소되었습니다.'); } // 회원이면서 포인트를 사용했다면 포인트 테이블에 사용을 추가 diff --git a/mobile/shop/orderinquiryview.php b/mobile/shop/orderinquiryview.php index 26c885469..262c5fdd4 100644 --- a/mobile/shop/orderinquiryview.php +++ b/mobile/shop/orderinquiryview.php @@ -240,7 +240,7 @@ if($od['od_pg'] == 'lg') { $disp_bank = true; $disp_receipt = false; $easy_pay_name = ''; - if($od['od_settle_case'] == '신용카드') { + if($od['od_settle_case'] == '신용카드' || $od['od_settle_case'] == 'KAKAOPAY') { $app_no_subj = '승인번호'; $app_no = $od['od_app_no']; $disp_bank = false; @@ -379,6 +379,14 @@ if($od['od_pg'] == 'lg') { 영수증 출력 + 영수증 출력 + diff --git a/shop/kakaopay/kakaopay_cancel.php b/shop/kakaopay/kakaopay_cancel.php new file mode 100644 index 000000000..be19daf7f --- /dev/null +++ b/shop/kakaopay/kakaopay_cancel.php @@ -0,0 +1,39 @@ +CnsActionUrl($CnsPayDealRequestUrl); +$connector->CnsPayVersion($phpVersion); +$connector->setRequestData($_REQUEST); +$connector->addRequestData("actionType", "CL0"); +$connector->addRequestData("CancelPwd", $cancelPwd); +$connector->addRequestData("CancelIP", $_SERVER['REMOTE_ADDR']); + +//가맹점키 셋팅 (MID 별로 틀림) +$connector->addRequestData("EncodeKey", $merchantKey); + +// 4. CNSPAY Lite 서버 접속하여 처리 +$connector->requestAction(); + +// 5. 결과 처리 +$resultCode = $connector->getResultData("ResultCode"); // 결과코드 (정상 :2001(취소성공), 2002(취소진행중), 그 외 에러) +$resultMsg = $connector->getResultData("ResultMsg"); // 결과메시지 +$cancelAmt = $connector->getResultData("CancelAmt"); // 취소금액 +$cancelDate = $connector->getResultData("CancelDate"); // 취소일 +$cancelTime = $connector->getResultData("CancelTime"); // 취소시간 +$payMethod = $connector->getResultData("PayMethod"); // 취소 결제수단 +$mid = $connector->getResultData("MID"); // 가맹점 ID +$tid = $connector->getResultData("TID"); // TID +$errorCD = $connector->getResultData("ErrorCD"); // 상세 에러코드 +$errorMsg = $connector->getResultData("ErrorMsg"); // 상세 에러메시지 +$authDate = $cancelDate . $cancelTime; // 거래시간 +$ccPartCl = $connector->getResultData("CcPartCl"); // 부분취소 가능여부 (0:부분취소불가, 1:부분취소가능) +$stateCD = $connector->getResultData("StateCD"); // 거래상태코드 (0: 승인, 1:전취소, 2:후취소) +$authDate = $connector->makeDateString($authDate); +$errorMsg = iconv("euc-kr", "utf-8", $errorMsg); +$resultMsg = iconv("euc-kr", "utf-8", $resultMsg); +?> \ No newline at end of file diff --git a/shop/kakaopay/kakaopay_result.php b/shop/kakaopay/kakaopay_result.php index 490fb1835..3ed788bcb 100644 --- a/shop/kakaopay/kakaopay_result.php +++ b/shop/kakaopay/kakaopay_result.php @@ -1,8 +1,8 @@ requestData[$key] = iconv("UTF-8", "EUC-KR", $request[$key]); } return "_TRUE_"; @@ -62,7 +65,7 @@ return "_FAIL_"; } } - + // 2014.12.02 추가 (check key in array) private function getRequestData($key) { if (array_key_exists($key, $this->requestData)) { @@ -71,7 +74,7 @@ return ""; } } - + public function requestAction() { $encodeKey = $this->requestData["EncodeKey"]; unset($this->requestData["EncodeKey"]); @@ -92,7 +95,7 @@ $requestMessage = $this->makeRequestText($this->requestData); $resultMessage = $this->connectToServer($serviceUrl, $requestMessage); $this->writeLog("Result"); - // 2014.12.02 수신 전문 로깅 처리 제외 + // 2014.12.02 수신 전문 로깅 처리 제외 //$this->writeLog($resultMessage); if ($resultMessage == "_FAIL_" || substr($resultMessage, 0, 4) == "FAIL") { $resultCode = ""; @@ -124,7 +127,7 @@ return "_FAIL_"; } } - + // 2014.12.02 결과 배열 마스킹 private function resultDataMask($strLogText) { $arrMask = array(); @@ -138,14 +141,14 @@ return str_replace("\n", "", trim($strLogText)); } } - + // 2014.12.02 주요 정보 마스킹 private function requestMask ($name, $text) { $value = str_replace("\n", "", trim($text)); - + if ($value == null || strlen(trim($value)) == 0) return ""; - - if ($name == "X_CARDNO" || $name == "realPan" || $name == "cardNo" + + if ($name == "X_CARDNO" || $name == "realPan" || $name == "cardNo" || $name == "CardBin" || $name == "CardNo") { return $this->masking($value, 6, true, false); } else if ($name == "BuyerName" || $name == "buyerName") { @@ -164,20 +167,20 @@ return $value; } } - + // 2014.12.02 마스킹 처리 private function masking($string, $num, $isLeftOrder, $beginMasking) { - + if ( $string == null ) return ""; - + $res = ""; $res2 = ""; $sleng = 0; - + $str = iconv('euc-kr','utf-8',$string); $n = mb_strlen($str, 'utf-8'); - + if ( $num >= 1 ) { if ( $n < $num ) { $res = $str; @@ -205,10 +208,10 @@ } else { $res = $str; } - + return iconv('utf-8','euc-kr',$res); } - + private function requestNetCancel() { try { // 예기치 못한 오류인경우 망상취소 시도. @@ -441,10 +444,10 @@ return "_FAIL_"; } } - - + + public function makeHashInputString($salt) { - + $result = ""; for($count = 0;$count < strlen($salt)/2;$count++) { @@ -452,14 +455,14 @@ $temp1 = hexdec($temp0); $temp3 = reset(unpack("l", pack("l", $temp1 +0xffffff00))); $temp4 = pack('C*', $temp3); - + $result = $result.$temp4; - + } - + return $result; } - + } ?> diff --git a/shop/kakaopay/orderform.2.php b/shop/kakaopay/orderform.2.php index 090c4f607..608316229 100644 --- a/shop/kakaopay/orderform.2.php +++ b/shop/kakaopay/orderform.2.php @@ -13,13 +13,13 @@ if($is_kakaopay_use) { - + - + diff --git a/shop/orderformupdate.php b/shop/orderformupdate.php index b8d7896ac..e1037db21 100644 --- a/shop/orderformupdate.php +++ b/shop/orderformupdate.php @@ -439,6 +439,11 @@ if($tno) { include G5_SHOP_PATH.'/inicis/inipay_cancel.php'; break; case 'KAKAOPAY': + $_REQUEST['TID'] = $tno; + $_REQUEST['Amt'] = $amount; + $_REQUEST['CancelMsg'] = $cancel_msg; + $_REQUEST['PartialCancelCode'] = 0; + include G5_SHOP_PATH.'/kakaopay/kakaopay_cancel.php'; break; default: include G5_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php'; @@ -559,6 +564,11 @@ if(!$result) { include G5_SHOP_PATH.'/inicis/inipay_cancel.php'; break; case 'KAKAOPAY': + $_REQUEST['TID'] = $tno; + $_REQUEST['Amt'] = $amount; + $_REQUEST['CancelMsg'] = $cancel_msg; + $_REQUEST['PartialCancelCode'] = 0; + include G5_SHOP_PATH.'/kakaopay/kakaopay_cancel.php'; break; default: include G5_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php'; @@ -600,6 +610,11 @@ if(!$result) { include G5_SHOP_PATH.'/inicis/inipay_cancel.php'; break; case 'KAKAOPAY': + $_REQUEST['TID'] = $tno; + $_REQUEST['Amt'] = $amount; + $_REQUEST['CancelMsg'] = $cancel_msg; + $_REQUEST['PartialCancelCode'] = 0; + include G5_SHOP_PATH.'/kakaopay/kakaopay_cancel.php'; break; default: include G5_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php'; diff --git a/shop/orderinquiryview.php b/shop/orderinquiryview.php index 0bbd8e1fd..930686dde 100644 --- a/shop/orderinquiryview.php +++ b/shop/orderinquiryview.php @@ -257,7 +257,7 @@ if($od['od_pg'] == 'lg') { $app_no_subj = ''; $disp_bank = true; $disp_receipt = false; - if($od['od_settle_case'] == '신용카드') { + if($od['od_settle_case'] == '신용카드' || $od['od_settle_case'] == 'KAKAOPAY') { $app_no_subj = '승인번호'; $app_no = $od['od_app_no']; $disp_bank = false; @@ -396,6 +396,14 @@ if($od['od_pg'] == 'lg') { 영수증 출력 + 영수증 출력 + From 544b4de21db1b0a992ac921d5d0f79441448678d Mon Sep 17 00:00:00 2001 From: chicpro Date: Wed, 16 Sep 2015 11:04:57 +0900 Subject: [PATCH 13/26] =?UTF-8?q?=EC=B9=B4=EC=B9=B4=EC=98=A4=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=20=EA=B2=B0=EC=A0=9C=EC=9A=94=EC=B2=AD=20=EB=A0=88?= =?UTF-8?q?=EC=9D=B4=EC=96=B4=20=EC=9C=84=EC=B9=98=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shop/kakaopay/orderform.3.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/shop/kakaopay/orderform.3.php b/shop/kakaopay/orderform.3.php index 24c25e0b4..21e0a3531 100644 --- a/shop/kakaopay/orderform.3.php +++ b/shop/kakaopay/orderform.3.php @@ -3,4 +3,8 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가 ?> -

    \ No newline at end of file + \ No newline at end of file From 8b84b0c6bad022c0e4f7c560a8e8b039d2deeede Mon Sep 17 00:00:00 2001 From: chicpro Date: Wed, 16 Sep 2015 11:46:48 +0900 Subject: [PATCH 14/26] =?UTF-8?q?=EB=AA=85=EC=B9=AD=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/shop_admin/configform.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/adm/shop_admin/configform.php b/adm/shop_admin/configform.php index 3c9d34505..94c346f27 100644 --- a/adm/shop_admin/configform.php +++ b/adm/shop_admin/configform.php @@ -691,7 +691,7 @@ if(!isset($default['de_kakaopay_mid'])) { - + 카카오페이 서비스신청하기 @@ -700,7 +700,7 @@ if(!isset($default['de_kakaopay_mid'])) { - + From 3dc5c19148f4b0cee41570b5f189bfc88d7d7fbc Mon Sep 17 00:00:00 2001 From: chicpro Date: Wed, 16 Sep 2015 12:01:54 +0900 Subject: [PATCH 15/26] =?UTF-8?q?=EB=A1=9C=EA=B7=B8=EC=97=90=EC=84=9C=20?= =?UTF-8?q?=EB=AF=BC=EA=B0=90=EC=A0=95=EB=B3=B4=20=EA=B8=B0=EB=A1=9D?= =?UTF-8?q?=ED=95=98=EC=A7=80=20=EC=95=8A=EB=8F=84=EB=A1=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shop/kakaopay/lgcns_CNSpay.php | 4 ++++ shop/kakaopay/lgcns_KMpay.php | 29 ++++++++++++++++------------- 2 files changed, 20 insertions(+), 13 deletions(-) diff --git a/shop/kakaopay/lgcns_CNSpay.php b/shop/kakaopay/lgcns_CNSpay.php index 455e37f18..80ebbf25f 100644 --- a/shop/kakaopay/lgcns_CNSpay.php +++ b/shop/kakaopay/lgcns_CNSpay.php @@ -395,9 +395,13 @@ } public function writeLog($strLogText) { $log_string = ""; + $exclude = array('MID', 'merchantEncKey', 'merchantHashKey', 'CancelPwd'); if (is_array($strLogText)) { $log_string = "[".date("Y/m/d H:i:s")."] \r\n"; foreach (array_keys($strLogText) as $key) { + if(in_array($key, $exclude)) + continue; + $log_string = $log_string." [".$key."] => ".$strLogText[$key]."\r\n"; } } else { diff --git a/shop/kakaopay/lgcns_KMpay.php b/shop/kakaopay/lgcns_KMpay.php index 490df1b8e..534b77603 100644 --- a/shop/kakaopay/lgcns_KMpay.php +++ b/shop/kakaopay/lgcns_KMpay.php @@ -16,7 +16,7 @@ } public function setPhpVersion($version) { $this->phpVersion = $version; - } + } public function parameterEncrypt($key, $plainText) { try { $encryptText = ""; @@ -141,6 +141,9 @@ if (is_array($strLogText)) { $log_string = "[".date("Y/m/d H:i:s")."] \r\n"; foreach (array_keys($strLogText) as $key) { + if($key == 'MERCHANT_ID') + continue; + $log_string = $log_string." [".$key."] => ".$strLogText[$key]."\r\n"; } } else { @@ -243,7 +246,7 @@ fclose($log_file); } } - + class KMPayDataValidator { public $resultValid = ""; public function KMPayDataValidator($value) { @@ -268,7 +271,7 @@ $amount = $this->getValueFromArray($value, "AMOUNT"); $currency = $this->getValueFromArray($value, "CURRENCY"); $returnUrl = $this->getValueFromArray($value, "RETURN_URL"); - + //추가정보 $cardMerchantNum = $this->getValueFromArray($value, "CARD_MERCHANT_NUM"); $supplyAmt = $this->getValueFromArray($value, "SUPPLY_AMT"); @@ -279,8 +282,8 @@ $certifiedFlag = $this->getValueFromArray($value, "CERTIFIED_FLAG"); $offerPeriodFlag = $this->getValueFromArray($value, "OFFER_PERIOD_FLAG"); $offerPeriod = $this->getValueFromArray($value, "OFFER_PERIOD"); - - + + if (strlen($certifiedFlag) == 0) { $certifiedFlag = "N"; } @@ -293,7 +296,7 @@ if (strlen($cancelTime) == 0) { $cancelTime = "1440"; } - + //필수 if (strlen($prType) == 0) { return "USER_ERROR_CODE,804,결제요청타입은 필수입력사항 입니다."; @@ -315,7 +318,7 @@ else if (strlen($merchantTxnNum) > 40) { return "USER_ERROR_CODE,824,가맹점 거래번호의 제한 길이가 초과 되었습니다."; } - + if (strlen($productName) == 0) { return "USER_ERROR_CODE,809,상품명은 필수입력사항 입니다."; } @@ -333,18 +336,18 @@ if (strlen($currency) == 0) { return "USER_ERROR_CODE,813,거래통화는 필수입력사항 입니다."; } - + if ($certifiedFlag == "CN") { //웹결제에서는 필수체크 안함 } else if (strlen($certifiedFlag) == 0) { return "USER_ERROR_CODE,830,결제승인결과전송URL은 필수입력사항 입니다."; } - + if (strlen($cardMerchantNum) > 0 && !is_numeric($cardMerchantNum)) { return "USER_ERROR_CODE,814,카드 가맹점 번호는 숫자형입니다."; } - + if (strlen($supplyAmt) > 0 && !is_numeric($supplyAmt)) { return "USER_ERROR_CODE,815,공급가액은 숫자형입니다."; } @@ -360,7 +363,7 @@ if (strlen($cancelTime) > 0 && !is_numeric($cancelTime)) { return "USER_ERROR_CODE,818,결제취소시간(분)은 숫자형입니다."; } - + if (strlen($fixedInt) == 0) { // 정상 } @@ -370,11 +373,11 @@ else if (!((0 <= intval($fixedInt) && intval($fixedInt) <= 24) || $fixedInt == "36")) { return "USER_ERROR_CODE,820,고정할부개월이 잘못되었습니다."; } - + if ($certifiedFlag != "N" && $certifiedFlag != "CN") { return "USER_ERROR_CODE,831,가맹점 인증 구분값은 N 혹은 CN 입니다"; } - + return ""; } } From cf915e2fa7cd0c34cc49f425527699ffdf557820 Mon Sep 17 00:00:00 2001 From: chicpro Date: Wed, 16 Sep 2015 12:09:19 +0900 Subject: [PATCH 16/26] =?UTF-8?q?log=20=ED=8F=B4=EB=8D=94=20=EA=B6=8C?= =?UTF-8?q?=ED=95=9C=20=EC=B2=B4=ED=81=AC=20=EC=BD=94=EB=93=9C=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/shop_admin/configform.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/adm/shop_admin/configform.php b/adm/shop_admin/configform.php index 94c346f27..7a5c3c691 100644 --- a/adm/shop_admin/configform.php +++ b/adm/shop_admin/configform.php @@ -1593,6 +1593,23 @@ if($default['de_iche_use'] || $default['de_vbank_use'] || $default['de_hp_use'] } } } + + // 카카오페이의 경우 log 디렉토리 체크 + if($default['de_kakaopay_mid'] && $default['de_kakaopay_key'] && $default['de_kakaopay_enckey'] && $default['de_kakaopay_hashkey'] && $default['de_kakaopay_cancelpwd']) { + $log_path = G5_SHOP_PATH.'/kakaopay/log'; + + if(!is_dir($log_path)) { + echo ''.PHP_EOL; + } else { + if(!is_writable($log_path)) { + echo ''.PHP_EOL; + } + } + } } include_once (G5_ADMIN_PATH.'/admin.tail.php'); From 8f179704e61d7a6a80fd04f277d45bfb23e7cd88 Mon Sep 17 00:00:00 2001 From: sora90224 Date: Wed, 16 Sep 2015 12:15:03 +0900 Subject: [PATCH 17/26] =?UTF-8?q?=EC=A3=BC=EB=AC=B8=EC=84=9C=EC=9E=91?= =?UTF-8?q?=EC=84=B1=20=EC=B9=B4=EC=B9=B4=EC=98=A4=ED=8E=98=EC=9D=B4=20?= =?UTF-8?q?=EC=95=84=EC=9D=B4=EC=BD=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css/default_shop.css | 1 + shop/orderform.php | 2 +- theme/basic/css/default_shop.css | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/css/default_shop.css b/css/default_shop.css index 2a0ae3b99..0c5144a59 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;padding-left:37px;display:inline-block} #sod_frm_paysel .PAYNOW{background:url('../img/paynow_logo.png') no-repeat;padding-left:46px;display:inline-block} #sod_frm_paysel .PAYCO{background:url('../img/payco_logo.png') no-repeat 1px;padding-left:46px;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/shop/orderform.php b/shop/orderform.php index 89b868b22..9d0a2f19d 100644 --- a/shop/orderform.php +++ b/shop/orderform.php @@ -596,7 +596,7 @@ if($is_kakaopay_use) { // 카카오페이 if($is_kakaopay_use) { $multi_settle++; - echo ' '.PHP_EOL; + echo ' '.PHP_EOL; $checked = ''; } diff --git a/theme/basic/css/default_shop.css b/theme/basic/css/default_shop.css index 3e13c8fca..8226f17ab 100644 --- a/theme/basic/css/default_shop.css +++ b/theme/basic/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;padding-left:37px;display:inline-block} #sod_frm_paysel .PAYNOW{background:url('../../../img/paynow_logo.png') no-repeat;padding-left:46px;display:inline-block} #sod_frm_paysel .PAYCO{background:url('../../../img/payco_logo.png') no-repeat 1px;padding-left:46px;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} From 38fc34f438c6fdb3d52ebfc5d2e0c38f7fdefc27 Mon Sep 17 00:00:00 2001 From: sora90224 Date: Wed, 16 Sep 2015 13:39:06 +0900 Subject: [PATCH 18/26] =?UTF-8?q?=EC=A3=BC=EB=AC=B8=EC=84=9C=20=EC=B9=B4?= =?UTF-8?q?=EC=B9=B4=EC=98=A4=ED=8E=98=EC=9D=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css/mobile_shop.css | 5 +++-- img/kakao.png | Bin 0 -> 862 bytes mobile/shop/orderform.php | 2 +- theme/basic/css/mobile_shop.css | 3 ++- 4 files changed, 6 insertions(+), 4 deletions(-) create mode 100644 img/kakao.png diff --git a/css/mobile_shop.css b/css/mobile_shop.css index 97fdcc377..9a926aab1 100644 --- a/css/mobile_shop.css +++ b/css/mobile_shop.css @@ -351,10 +351,11 @@ html.no-overflowscrolling #sc_coupon_frm, html.no-overflowscrolling #od_coupon_f #sod_frm_paysel {margin:10px 0 ;padding:10px;background:#f2f2f2;border:1px solid #e0e0e0} #sod_frm_paysel ul {margin:0;padding:0;} #sod_frm_paysel ul:after {display:block;visibility:hidden;clear:both;content:""} -#sod_frm_paysel li {float:left;padding:5px 2%;width:46%} -#sod_frm_paysel .KPAY{background:url('../img/kpay_logo.png') no-repeat;padding-left:37px;} +#sod_frm_paysel li {float:left;padding:5px 2%;width:46%;height:21px} +x#sod_frm_paysel .KPAY{background:url('../img/kpay_logo.png') no-repeat;padding-left:37px;} #sod_frm_paysel .PAYNOW{background:url('../img/paynow_logo.png') no-repeat;padding-left:46px;} #sod_frm_paysel .PAYCO{background:url('../img/payco_logo.png') no-repeat 1px ;padding-left:46px;} +.kakaopay_icon{background:url('../img/kakao.png') no-repeat ;height:21px;width:74px;display:inline-block;overflow:hidden;text-indent:-999px} #sod_frm_paysel #settle_bank {padding:10px;background:#fff;line-height:2em;border:1px solid #dbdbdb} #sod_frm_paysel #settle_bank label {display:inline-block;margin:0 10px 0 0;font-weight:bold} diff --git a/img/kakao.png b/img/kakao.png new file mode 100644 index 0000000000000000000000000000000000000000..6f1029398b1657c6b975dcd5d5f6f890a8b2c45d GIT binary patch literal 862 zcmV-k1EKthP)2~^2?pJ|I5M!3u$Hjv)->8`TQ!eXtqT3UcgoA< zy(cIV+Zb-h&HXs%-t#}_f6jfl+k38C+{Rq45xfz+5xjrUJQrvP?>9ATY-eVFzkTYt_9CL$gzQB&4`BDaEIRK_rwM9SSURIEE;)=S(Y#o6B!`DFO>+0ACW|! z6?8elRC)d807ft{GGz)GIh-4rGRS2gi@GfKfd}6lO%)@1x5aJjFtM9w~yR+lzMDi4trd}Nq zQnUi0b8Zx4B)#pW!7~71Ecm%z%?ic{5FdKe5t_l?cv2G!eBKrwX*Tt9=ozCWTi};~ zba?SV*vKw2kiYS9QWHgOj76LaHcpV@*C%>7rf&v^BS&2|AiJ+eEbSNA0OLx#mcW+r zQZgX^R(Cstwz`fZh*)mqXs_7OR}$am`{<>wyh{l&uC9O1rEJ zLcIHY;enJoqVbom_Q7q1_eX#M00|07*qoM6N<$f>580?f?J) literal 0 HcmV?d00001 diff --git a/mobile/shop/orderform.php b/mobile/shop/orderform.php index 9e75fa6d5..97921a569 100644 --- a/mobile/shop/orderform.php +++ b/mobile/shop/orderform.php @@ -568,7 +568,7 @@ if($is_kakaopay_use) { // 카카오페이 if($is_kakaopay_use) { $multi_settle++; - echo '
  • '.PHP_EOL; + echo '
  • '.PHP_EOL; $checked = ''; } diff --git a/theme/basic/css/mobile_shop.css b/theme/basic/css/mobile_shop.css index 2ef73afb0..6cf57847a 100644 --- a/theme/basic/css/mobile_shop.css +++ b/theme/basic/css/mobile_shop.css @@ -350,10 +350,11 @@ html.no-overflowscrolling #sc_coupon_frm, html.no-overflowscrolling #od_coupon_f #sod_frm_paysel {margin:10px 0 ;padding:10px;background:#f2f2f2;border:1px solid #e0e0e0} #sod_frm_paysel ul {margin:0;padding:0;} #sod_frm_paysel ul:after {display:block;visibility:hidden;clear:both;content:""} -#sod_frm_paysel li {float:left;padding:5px 2%;width:46%} +#sod_frm_paysel li {float:left;padding:5px 2%;width:46%;height:21px} #sod_frm_paysel .KPAY{background:url('../../../img/kpay_logo.png') no-repeat;padding-left:37px;} #sod_frm_paysel .PAYNOW{background:url('../../../img/paynow_logo.png') no-repeat;padding-left:46px;} #sod_frm_paysel .PAYCO{background:url('../../../img/payco_logo.png') no-repeat 1px ;padding-left:46px;} +.kakaopay_icon{background:url('../../../img/kakao.png') no-repeat ;height:21px;width:74px;display:inline-block;overflow:hidden;text-indent:-999px} #sod_frm_paysel #settle_bank {padding:10px;background:#fff;line-height:2em;border:1px solid #dbdbdb} From 9a1a1c476556fa6253015654ab0cdeb6708044fb Mon Sep 17 00:00:00 2001 From: chicpro Date: Wed, 16 Sep 2015 14:59:27 +0900 Subject: [PATCH 19/26] =?UTF-8?q?=EB=AA=A8=EB=B0=94=EC=9D=BC=20=EC=B9=B4?= =?UTF-8?q?=EC=B9=B4=EC=98=A4=ED=8E=98=EC=9D=B4=20=EA=B8=88=EC=95=A1=20?= =?UTF-8?q?=EC=84=A4=EC=A0=95=20=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 insertion(+) diff --git a/mobile/shop/orderform.php b/mobile/shop/orderform.php index 97921a569..4470df898 100644 --- a/mobile/shop/orderform.php +++ b/mobile/shop/orderform.php @@ -1200,6 +1200,7 @@ function pay_approval() // 카카오페이 지불 if(settle_method == "KAKAOPAY") { + pf.good_mny.value = f.good_mny.value; getTxnId(pf); return false; } From 8f662516bb90e51c2e65da9642db3b91b6fca82f Mon Sep 17 00:00:00 2001 From: chicpro Date: Wed, 16 Sep 2015 17:20:42 +0900 Subject: [PATCH 20/26] =?UTF-8?q?=EA=B4=80=EB=A6=AC=EC=9E=90=20=EC=B7=A8?= =?UTF-8?q?=EC=86=8C=20=EA=B8=B0=EB=8A=A5=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/shop_admin/orderform.php | 72 ++++++++++++++++++++-- adm/shop_admin/orderformcartupdate.php | 10 ++- adm/shop_admin/orderpartcancel.php | 6 +- adm/shop_admin/orderpartcancelupdate.php | 2 +- mobile/shop/orderformupdate.php | 8 ++- shop/kakaopay/orderpartcancel.inc.php | 77 ++++++++++++++++++++++++ shop/orderformupdate.php | 8 ++- 7 files changed, 172 insertions(+), 11 deletions(-) create mode 100644 shop/kakaopay/orderpartcancel.inc.php diff --git a/adm/shop_admin/orderform.php b/adm/shop_admin/orderform.php index c043395e8..a00d7ef07 100644 --- a/adm/shop_admin/orderform.php +++ b/adm/shop_admin/orderform.php @@ -444,6 +444,25 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js + + + KAKOPAY 결제금액 + + 0원 + + + + + + KAKAOPAY 승인일시 + + 신용카드 결제 일시 정보가 없습니다. + + + + + + 결제금액 @@ -482,6 +501,10 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js $pg_url = 'https://iniweb.inicis.com/'; $pg_test = 'KG이니시스'; break; + case 'KAKAOPAY': + $pg_url = 'https://mms.cnspay.co.kr'; + $pg_test = 'KAKAOPAY'; + break; default: $pg_url = 'http://admin8.kcp.co.kr'; $pg_test = 'KCP'; @@ -713,6 +736,42 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js + + + + + + 원 + + + + + + " onclick="if (this.checked == true) this.form.od_receipt_time.value=this.form.od_card_chk.value; else this.form.od_receipt_time.value = this.form.od_receipt_time.defaultValue;"> +
    + " id="od_receipt_time" class="frm_input" size="19" maxlength="19"> + + + + + + + + + + 원 + + + + + + " onclick="if (this.checked == true) this.form.od_receipt_time.value=this.form.od_card_chk.value; else this.form.od_receipt_time.value = this.form.od_receipt_time.defaultValue;"> +
    + " id="od_receipt_time" class="frm_input" size="19" maxlength="19"> + + + + 점 @@ -773,7 +832,7 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js 0) { ?> 개인결제추가 - 0 && ($od['od_settle_case'] == '신용카드' || $od['od_settle_case'] == '계좌이체')) { ?> + 0 && ($od['od_settle_case'] == '신용카드' || $od['od_settle_case'] == '계좌이체' || $od['od_settle_case'] == 'KAKAOPAY')) { ?> 부분취소 목록 @@ -1001,16 +1060,21 @@ function form_submit(f) var msg = ""; - + if(status == "취소" || status == "반품" || status == "품절") { var $ct_chk = $("input[name^=ct_chk]"); var chk_cnt = $ct_chk.size(); var chked_cnt = $ct_chk.filter(":checked").size(); + + var cancel_pg = "카카오페이"; + + var cancel_pg = "PG사의 "; + if(chk_cnt == chked_cnt) { - if(confirm("PG사의 신용카드 결제를 함께 취소하시겠습니까?\n\n한번 취소한 결제는 다시 복구할 수 없습니다.")) { + if(confirm(cancel_pg+" 결제를 함께 취소하시겠습니까?\n\n한번 취소한 결제는 다시 복구할 수 없습니다.")) { f.pg_cancel.value = 1; - msg = "PG사의 신용카드 결제 취소와 함께 "; + msg = cancel_pg+" 결제 취소와 함께 "; } else { f.pg_cancel.value = 0; msg = ""; diff --git a/adm/shop_admin/orderformcartupdate.php b/adm/shop_admin/orderformcartupdate.php index e4ce7ade7..20a051728 100644 --- a/adm/shop_admin/orderformcartupdate.php +++ b/adm/shop_admin/orderformcartupdate.php @@ -181,7 +181,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'] == '신용카드') { + if($od['od_tno'] && ($od['od_settle_case'] == '신용카드' || $od['od_settle_case'] == '간편결제' || $od['od_settle_case'] == 'KAKAOPAY')) { switch($od['od_pg']) { case 'lg': include_once(G5_SHOP_PATH.'/settle_lg.inc.php'); @@ -253,6 +253,14 @@ if (in_array($_POST['ct_status'], $status_cancel)) { $pg_res_msg = iconv_utf8($res_msg); } break; + case 'KAKAOPAY': + include_once(G5_SHOP_PATH.'/settle_kakaopay.inc.php'); + $_REQUEST['TID'] = $od['od_tno']; + $_REQUEST['Amt'] = $od['od_receipt_price']; + $_REQUEST['CancelMsg'] = '쇼핑몰 운영자 승인 취소'; + $_REQUEST['PartialCancelCode'] = 0; + include G5_SHOP_PATH.'/kakaopay/kakaopay_cancel.php'; + break; default: include_once(G5_SHOP_PATH.'/settle_kcp.inc.php'); require_once(G5_SHOP_PATH.'/kcp/pp_ax_hub_lib.php'); diff --git a/adm/shop_admin/orderpartcancel.php b/adm/shop_admin/orderpartcancel.php index c1e0345c4..47018b0e4 100644 --- a/adm/shop_admin/orderpartcancel.php +++ b/adm/shop_admin/orderpartcancel.php @@ -49,10 +49,12 @@ $od_misu = abs($od['od_misu']); 원 + 원 + @@ -73,7 +75,9 @@ function form_check(f) { var max_mny = parseInt(); var tax_mny = parseInt(f.mod_tax_mny.value.replace("/[^0-9]/g", "")); - var free_mny = parseInt(f.mod_free_mny.value.replace("/[^0-9]/g", "")); + var free_mny = 0; + if(typeof f.mod_free.mny.value != "undefined") + free_mny = parseInt(f.mod_free_mny.value.replace("/[^0-9]/g", "")); if(!tax_mny && !free_mny) { alert("과세 취소금액 또는 비과세 취소금액을 입력해 주십시오."); diff --git a/adm/shop_admin/orderpartcancelupdate.php b/adm/shop_admin/orderpartcancelupdate.php index c0b80689e..69e997c6f 100644 --- a/adm/shop_admin/orderpartcancelupdate.php +++ b/adm/shop_admin/orderpartcancelupdate.php @@ -36,7 +36,7 @@ if($free_mny && $free_mny > $od_misu) alert('비과세 취소금액을 '.display_price($od_misu).' 이하로 입력해 주십시오.'); // PG사별 부분취소 실행 -include_once(G5_SHOP_PATH.'/'.$od['od_pg'].'/orderpartcancel.inc.php'); +include_once(G5_SHOP_PATH.'/'.strtolower($od['od_pg']).'/orderpartcancel.inc.php'); include_once(G5_PATH.'/head.sub.php'); ?> diff --git a/mobile/shop/orderformupdate.php b/mobile/shop/orderformupdate.php index 663538f22..d6e420b8d 100644 --- a/mobile/shop/orderformupdate.php +++ b/mobile/shop/orderformupdate.php @@ -485,7 +485,7 @@ if($escw_yn == 'Y') $od_tax_mny = round($i_price / 1.1); $od_vat_mny = $i_price - $od_tax_mny; $od_free_mny = 0; -if($default['de_tax_flag_use']) { +if($default['de_tax_flag_use'] && $od_pg != 'KAKAOPAY') { $od_tax_mny = (int)$_POST['comm_tax_mny']; $od_vat_mny = (int)$_POST['comm_vat_mny']; $od_free_mny = (int)$_POST['comm_free_mny']; @@ -511,6 +511,10 @@ $od_b_addr3 = clean_xss_tags($od_b_addr3); $od_b_addr_jibeon = preg_match("/^(N|R)$/", $od_b_addr_jibeon) ? $od_b_addr_jibeon : ''; $od_memo = clean_xss_tags($od_memo); $od_deposit_name = clean_xss_tags($od_deposit_name); +$od_tax_flag = $default['de_tax_flag_use']; + +if($od_tax_flag && $od_pg == 'KAKAOPAY') + $od_tax_flag = 0; // 주문서에 입력 $sql = " insert {$g5['g5_shop_order_table']} @@ -554,7 +558,7 @@ $sql = " insert {$g5['g5_shop_order_table']} od_tno = '$od_tno', od_app_no = '$od_app_no', od_escrow = '$od_escrow', - od_tax_flag = '{$default['de_tax_flag_use']}', + od_tax_flag = '$od_tax_flag', od_tax_mny = '$od_tax_mny', od_vat_mny = '$od_vat_mny', od_free_mny = '$od_free_mny', diff --git a/shop/kakaopay/orderpartcancel.inc.php b/shop/kakaopay/orderpartcancel.inc.php new file mode 100644 index 000000000..973200b74 --- /dev/null +++ b/shop/kakaopay/orderpartcancel.inc.php @@ -0,0 +1,77 @@ +CnsActionUrl($CnsPayDealRequestUrl); +$connector->CnsPayVersion($phpVersion); +$connector->setRequestData($_REQUEST); +$connector->addRequestData("actionType", "CL0"); +$connector->addRequestData("CancelPwd", $cancelPwd); +$connector->addRequestData("CancelIP", $_SERVER['REMOTE_ADDR']); + +//가맹점키 셋팅 (MID 별로 틀림) +$connector->addRequestData("EncodeKey", $merchantKey); + +// 4. CNSPAY Lite 서버 접속하여 처리 +$connector->requestAction(); + +// 5. 결과 처리 +$resultCode = $connector->getResultData("ResultCode"); // 결과코드 (정상 :2001(취소성공), 2002(취소진행중), 그 외 에러) +$resultMsg = $connector->getResultData("ResultMsg"); // 결과메시지 +$cancelAmt = $connector->getResultData("CancelAmt"); // 취소금액 +$cancelDate = $connector->getResultData("CancelDate"); // 취소일 +$cancelTime = $connector->getResultData("CancelTime"); // 취소시간 +$payMethod = $connector->getResultData("PayMethod"); // 취소 결제수단 +$mid = $connector->getResultData("MID"); // 가맹점 ID +$tid = $connector->getResultData("TID"); // TID +$errorCD = $connector->getResultData("ErrorCD"); // 상세 에러코드 +$errorMsg = $connector->getResultData("ErrorMsg"); // 상세 에러메시지 +$authDate = $cancelDate . $cancelTime; // 거래시간 +$ccPartCl = $connector->getResultData("CcPartCl"); // 부분취소 가능여부 (0:부분취소불가, 1:부분취소가능) +$stateCD = $connector->getResultData("StateCD"); // 거래상태코드 (0: 승인, 1:전취소, 2:후취소) +$authDate = $connector->makeDateString($authDate); +$errorMsg = iconv("euc-kr", "utf-8", $errorMsg); +$resultMsg = iconv("euc-kr", "utf-8", $resultMsg); + +if($resultCode == "2001" || $resultCode == "2002") { + $mod_mny = (int)$tax_mny + (int)$free_mny; + + $sql = " update {$g5['g5_shop_order_table']} + set od_refund_price = od_refund_price + '$mod_mny', + od_shop_memo = concat(od_shop_memo, \"$mod_memo\"), + od_casseqno = '$CancelNo' + where od_id = '{$od['od_id']}' + and od_tno = '{$od['od_tno']}' "; + sql_query($sql); + + // 미수금 등의 정보 업데이트 + $info = get_order_info($od_id); + + $sql = " update {$g5['g5_shop_order_table']} + set od_misu = '{$info['od_misu']}', + od_tax_mny = '{$info['od_tax_mny']}', + od_vat_mny = '{$info['od_vat_mny']}', + od_free_mny = '{$info['od_free_mny']}' + where od_id = '$od_id' "; + sql_query($sql); +} else { + alert($resultMsg . ' 코드 : ' . $resultCode); +} +?> \ No newline at end of file diff --git a/shop/orderformupdate.php b/shop/orderformupdate.php index e1037db21..466b62364 100644 --- a/shop/orderformupdate.php +++ b/shop/orderformupdate.php @@ -470,7 +470,7 @@ if($escw_yn == 'Y') $od_tax_mny = round($i_price / 1.1); $od_vat_mny = $i_price - $od_tax_mny; $od_free_mny = 0; -if($default['de_tax_flag_use']) { +if($default['de_tax_flag_use'] && $od_pg != 'KAKAOPAY') { $od_tax_mny = (int)$_POST['comm_tax_mny']; $od_vat_mny = (int)$_POST['comm_vat_mny']; $od_free_mny = (int)$_POST['comm_free_mny']; @@ -496,6 +496,10 @@ $od_b_addr3 = clean_xss_tags($od_b_addr3); $od_b_addr_jibeon = preg_match("/^(N|R)$/", $od_b_addr_jibeon) ? $od_b_addr_jibeon : ''; $od_memo = clean_xss_tags($od_memo); $od_deposit_name = clean_xss_tags($od_deposit_name); +$od_tax_flag = $default['de_tax_flag_use']; + +if($od_tax_flag && $od_pg == 'KAKAOPAY') + $od_tax_flag = 0; // 주문서에 입력 $sql = " insert {$g5['g5_shop_order_table']} @@ -539,7 +543,7 @@ $sql = " insert {$g5['g5_shop_order_table']} od_tno = '$od_tno', od_app_no = '$od_app_no', od_escrow = '$od_escrow', - od_tax_flag = '{$default['de_tax_flag_use']}', + od_tax_flag = '$od_tax_flag', od_tax_mny = '$od_tax_mny', od_vat_mny = '$od_vat_mny', od_free_mny = '$od_free_mny', From a51cc22d0b0564e250bbcbeaa2ee6b52044b17ea Mon Sep 17 00:00:00 2001 From: chicpro Date: Thu, 17 Sep 2015 09:18:10 +0900 Subject: [PATCH 21/26] =?UTF-8?q?=EC=B9=B4=EC=B9=B4=EC=98=A4=ED=8E=98?= =?UTF-8?q?=EC=9D=B4=20=EA=B2=80=EC=83=89=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- adm/shop_admin/orderlist.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/adm/shop_admin/orderlist.php b/adm/shop_admin/orderlist.php index 72e2ba6ad..ceadccd54 100644 --- a/adm/shop_admin/orderlist.php +++ b/adm/shop_admin/orderlist.php @@ -193,7 +193,9 @@ if(!sql_query(" select mb_id from {$g5['g5_shop_order_delete_table']} limit 1 ", > > - + + > +
From 8a51ca13bec6b1caa6d58a8b3517f5c6f2fd28b9 Mon Sep 17 00:00:00 2001 From: chicpro Date: Thu, 17 Sep 2015 14:39:28 +0900 Subject: [PATCH 22/26] =?UTF-8?q?=EB=B0=98=EC=9D=91=ED=98=95=20=EB=8C=80?= =?UTF-8?q?=EB=B9=84=20=EC=A3=BC=EB=AC=B8=ED=8F=BC=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../shop/{orderform.php => orderform.sub.php} | 34 +- shop/orderform.php | 1556 +---------------- shop/orderform.sub.php | 1492 ++++++++++++++++ 3 files changed, 1535 insertions(+), 1547 deletions(-) rename mobile/shop/{orderform.php => orderform.sub.php} (98%) create mode 100644 shop/orderform.sub.php diff --git a/mobile/shop/orderform.php b/mobile/shop/orderform.sub.php similarity index 98% rename from mobile/shop/orderform.php rename to mobile/shop/orderform.sub.php index 4470df898..8bf794b1f 100644 --- a/mobile/shop/orderform.php +++ b/mobile/shop/orderform.sub.php @@ -1,31 +1,5 @@ d;", maxDate: "+d;" }); }); - - - \ No newline at end of file + \ No newline at end of file diff --git a/shop/orderform.php b/shop/orderform.php index 9d0a2f19d..784af5bc9 100644 --- a/shop/orderform.php +++ b/shop/orderform.php @@ -7,10 +7,8 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js // 주문상품 재고체크 js 파일 add_javascript('', 0); -if (G5_IS_MOBILE) { - include_once(G5_MSHOP_PATH.'/orderform.php'); - return; -} +// 모바일 주문인지 +$is_mobile_order = is_mobile(); set_session("ss_direct", $sw_direct); // 장바구니가 비어있는가? @@ -24,1527 +22,55 @@ else { if (get_cart_count($tmp_cart_id) == 0) alert('장바구니가 비어 있습니다.', G5_SHOP_URL.'/cart.php'); -$g5['title'] = '주문서 작성'; - -// 전자결제를 사용할 때만 실행 -if($default['de_iche_use'] || $default['de_vbank_use'] || $default['de_hp_use'] || $default['de_card_use'] || $default['de_easy_pay_use']) { - switch($default['de_pg_service']) { - case 'lg': - $g5['body_script'] = ' onload="isActiveXOK();"'; - break; - case 'inicis': - $g5['body_script'] = ' onload="javascript:enable_click()"'; - break; - default: - $g5['body_script'] = ' onload="CheckPayplusInstall();"'; - break; - } -} - -include_once('./_head.php'); -if ($default['de_hope_date_use']) { - include_once(G5_PLUGIN_PATH.'/jquery-ui/datepicker.php'); -} - // 새로운 주문번호 생성 $od_id = get_uniqid(); set_session('ss_order_id', $od_id); $s_cart_id = $tmp_cart_id; -$order_action_url = G5_HTTPS_SHOP_URL.'/orderformupdate.php'; -require_once('./settle_'.$default['de_pg_service'].'.inc.php'); -require_once('./settle_kakaopay.inc.php'); +$g5['title'] = '주문서 작성'; -// 결제대행사별 코드 include (스크립트 등) -require_once('./'.$default['de_pg_service'].'/orderform.1.php'); - -if($is_kakaopay_use) { - require_once('./kakaopay/orderform.1.php'); -} -?> - -
-
- -

주문하실 상품을 확인하세요.

- -
- - - - - - - - - - - - - - - 0) - $good_info .= chr(30); - $good_info .= "seq=".($i+1).chr(31); - $good_info .= "ordr_numb={$od_id}_".sprintf("%04d", $i).chr(31); - $good_info .= "good_name=".addslashes($row['it_name']).chr(31); - $good_info .= "good_cntx=".$row['ct_qty'].chr(31); - $good_info .= "good_amtx=".$row['ct_price'].chr(31); - } - - $image = get_it_image($row['it_id'], 50, 50); - - $it_name = '' . stripslashes($row['it_name']) . ''; - $it_options = print_item_options($row['it_id'], $s_cart_id); - if($it_options) { - $it_name .= '
'.$it_options.'
'; - } - - // 복합과세금액 - if($default['de_tax_flag_use']) { - if($row['it_notax']) { - $comm_free_mny += $sum['price']; - } else { - $tot_tax_mny += $sum['price']; - } - } - - $point = $sum['point']; - $sell_price = $sum['price']; - - // 쿠폰 - if($is_member) { - $cp_button = ''; - $cp_count = 0; - - $sql = " select cp_id - from {$g5['g5_shop_coupon_table']} - where mb_id IN ( '{$member['mb_id']}', '전체회원' ) - and cp_start <= '".G5_TIME_YMD."' - and cp_end >= '".G5_TIME_YMD."' - and cp_minimum <= '$sell_price' - and ( - ( cp_method = '0' and cp_target = '{$row['it_id']}' ) - OR - ( cp_method = '1' and ( cp_target IN ( '{$row['ca_id']}', '{$row['ca_id2']}', '{$row['ca_id3']}' ) ) ) - ) "; - $res = sql_query($sql); - - for($k=0; $cp=sql_fetch_array($res); $k++) { - if(is_used_coupon($member['mb_id'], $cp['cp_id'])) - continue; - - $cp_count++; - } - - if($cp_count) { - $cp_button = ''; - $it_cp_count++; - } - } - - // 배송비 - switch($row['ct_send_cost']) - { - case 1: - $ct_send_cost = '착불'; - break; - case 2: - $ct_send_cost = '무료'; - break; - default: - $ct_send_cost = '선불'; - break; - } - - // 조건부무료 - if($row['it_sc_type'] == 2) { - $sendcost = get_item_sendcost($row['it_id'], $sum['price'], $sum['qty'], $s_cart_id); - - if($sendcost == 0) - $ct_send_cost = '무료'; - } - ?> - - - - - - - - - - - - - '; - alert('장바구니가 비어 있습니다.', G5_SHOP_URL.'/cart.php'); - } else { - // 배송비 계산 - $send_cost = get_sendcost($s_cart_id); +// 전자결제를 사용할 때만 실행 +if(!$is_mobile_order) { + if($default['de_iche_use'] || $default['de_vbank_use'] || $default['de_hp_use'] || $default['de_card_use'] || $default['de_easy_pay_use']) { + switch($default['de_pg_service']) { + case 'lg': + $g5['body_script'] = ' onload="isActiveXOK();"'; + break; + case 'inicis': + $g5['body_script'] = ' onload="javascript:enable_click()"'; + break; + default: + $g5['body_script'] = ' onload="CheckPayplusInstall();"'; + break; } - - // 복합과세처리 - if($default['de_tax_flag_use']) { - $comm_tax_mny = round(($tot_tax_mny + $send_cost) / 1.1); - $comm_vat_mny = ($tot_tax_mny + $send_cost) - $comm_tax_mny; - } - ?> - -
상품이미지상품명총수량판매가쿠폰소계포인트배송비
- - - - - - - - - -
장바구니에 담긴 상품이 없습니다.
-
- - - - - -
-
주문
-
- 0) { ?> -
쿠폰할인
-
0 원
- -
배송비
-
-
총계
-
- - -
-
포인트
-
-
- - - - - - - - - - - - - -
-

주문하시는 분

- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- 영,숫자 3~20자 (주문서 조회시 필요) - -
주소 - - -
- -
- - -
- -
- -
- - 이후로 배송 바랍니다. -
-
-
- - - -
-

받으시는 분

- -
- - - '.PHP_EOL; - $addr_list .= ''.PHP_EOL; - - // 기본배송지 - $sql = " select * - from {$g5['g5_shop_order_address_table']} - where mb_id = '{$member['mb_id']}' - and ad_default = '1' "; - $row = sql_fetch($sql); - if($row['ad_id']) { - $val1 = $row['ad_name'].$sep.$row['ad_tel'].$sep.$row['ad_hp'].$sep.$row['ad_zip1'].$sep.$row['ad_zip2'].$sep.$row['ad_addr1'].$sep.$row['ad_addr2'].$sep.$row['ad_addr3'].$sep.$row['ad_jibeon'].$sep.$row['ad_subject']; - $addr_list .= ''.PHP_EOL; - $addr_list .= ''.PHP_EOL; - } - - // 최근배송지 - $sql = " select * - from {$g5['g5_shop_order_address_table']} - where mb_id = '{$member['mb_id']}' - and ad_default = '0' - order by ad_id desc - limit 1 "; - $result = sql_query($sql); - for($i=0; $row=sql_fetch_array($result); $i++) { - $val1 = $row['ad_name'].$sep.$row['ad_tel'].$sep.$row['ad_hp'].$sep.$row['ad_zip1'].$sep.$row['ad_zip2'].$sep.$row['ad_addr1'].$sep.$row['ad_addr2'].$sep.$row['ad_addr3'].$sep.$row['ad_jibeon'].$sep.$row['ad_subject']; - $val2 = ''; - $addr_list .= ' '.PHP_EOL.$val2.PHP_EOL; - } - - $addr_list .= ''.PHP_EOL; - $addr_list .= ''.PHP_EOL; - - $addr_list .='배송지목록'; - } else { - // 주문자와 동일 - $addr_list .= ''.PHP_EOL; - $addr_list .= ''.PHP_EOL; - } - ?> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
배송지선택 - -
- - - -
주소 - - -
- -
- - -
- -
- -
-
-
- - - - = '".G5_TIME_YMD."' - and cp_minimum <= '$tot_sell_price' "; - $res = sql_query($sql); - - for($k=0; $cp=sql_fetch_array($res); $k++) { - if(is_used_coupon($member['mb_id'], $cp['cp_id'])) - continue; - - $oc_cnt++; - } - - if($send_cost > 0) { - // 배송비쿠폰 - $sql = " select cp_id - from {$g5['g5_shop_coupon_table']} - where mb_id IN ( '{$member['mb_id']}', '전체회원' ) - and cp_method = '3' - and cp_start <= '".G5_TIME_YMD."' - and cp_end >= '".G5_TIME_YMD."' - and cp_minimum <= '$tot_sell_price' "; - $res = sql_query($sql); - - for($k=0; $cp=sql_fetch_array($res); $k++) { - if(is_used_coupon($member['mb_id'], $cp['cp_id'])) - continue; - - $sc_cnt++; - } - } - } - ?> - -
-

결제정보

- -
- - - 0) { ?> - - - - - - - - - - 0) { ?> - - - - - - - - - - - - - - - - - - -
주문할인쿠폰 - - -
주문할인금액0
배송비할인쿠폰 - - -
배송비할인금액0
총 주문금액
추가배송비0원 (지역에 따라 추가되는 도선료 등의 배송비입니다.)
-
- - 무통장입금 이외의 결제 수단으로 결제하시는 경우 포인트를 적립해드리지 않습니다.

'; - - $multi_settle == 0; - $checked = ''; - - $escrow_title = ""; - if ($default['de_escrow_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']) { - echo '
'; - echo '결제방법 선택'; - } - - // 카카오페이 - if($is_kakaopay_use) { - $multi_settle++; - echo ' '.PHP_EOL; - $checked = ''; - } - - // 무통장입금 사용 - if ($default['de_bank_use']) { - $multi_settle++; - echo ' '.PHP_EOL; - $checked = ''; - } - - // 가상계좌 사용 - if ($default['de_vbank_use']) { - $multi_settle++; - echo ' '.PHP_EOL; - $checked = ''; - } - - // 계좌이체 사용 - if ($default['de_iche_use']) { - $multi_settle++; - echo ' '.PHP_EOL; - $checked = ''; - } - - // 휴대폰 사용 - if ($default['de_hp_use']) { - $multi_settle++; - echo ' '.PHP_EOL; - $checked = ''; - } - - // 신용카드 사용 - if ($default['de_card_use']) { - $multi_settle++; - echo ' '.PHP_EOL; - $checked = ''; - } - - // PG 간편결제 - if($default['de_easy_pay_use']) { - switch($default['de_pg_service']) { - case 'lg': - $pg_easy_pay_name = 'PAYNOW'; - break; - case 'inicis': - $pg_easy_pay_name = 'KPAY'; - break; - default: - $pg_easy_pay_name = 'PAYCO'; - break; - } - - $multi_settle++; - echo ' '.PHP_EOL; - $checked = ''; - } - - $temp_point = 0; - // 회원이면서 포인트사용이면 - if ($is_member && $config['cf_use_point']) - { - // 포인트 결제 사용 포인트보다 회원의 포인트가 크다면 - if ($member['mb_point'] >= $default['de_settle_min_point']) - { - $temp_point = (int)$default['de_settle_max_point']; - - if($temp_point > (int)$tot_sell_price) - $temp_point = (int)$tot_sell_price; - - if($temp_point > (int)$member['mb_point']) - $temp_point = (int)$member['mb_point']; - - $point_unit = (int)$default['de_settle_point_unit']; - $temp_point = (int)((int)($temp_point / $point_unit) * $point_unit); - ?> -

보유포인트()중 최대 까지 사용 가능

- - - 점 (점 단위로 입력하세요.) - '.$str[0].PHP_EOL; - } - else - { - $bank_account = ''.PHP_EOL; - } - echo ''; - } - - if ($default['de_bank_use'] || $default['de_vbank_use'] || $default['de_iche_use'] || $default['de_card_use'] || $default['de_hp_use']) { - echo '
'; - } - - if ($multi_settle == 0) - echo '

결제할 방법이 없습니다.
운영자에게 알려주시면 감사하겠습니다.

'; - ?> -
- - - - - - - -
- - +if(G5_IS_MOBILE) + include_once(G5_MSHOP_PATH.'/_head.php'); +else + include_once(G5_SHOP_PATH.'/_head.php'); - \ No newline at end of file +if(!$is_mobile_order) + require_once(G5_SHOP_PATH.'/'.$default['de_pg_service'].'/orderform.5.php'); +?> diff --git a/shop/orderform.sub.php b/shop/orderform.sub.php new file mode 100644 index 000000000..0709f503d --- /dev/null +++ b/shop/orderform.sub.php @@ -0,0 +1,1492 @@ + + +
+
+ +

주문하실 상품을 확인하세요.

+ +
+ + + + + + + + + + + + + + + 0) + $good_info .= chr(30); + $good_info .= "seq=".($i+1).chr(31); + $good_info .= "ordr_numb={$od_id}_".sprintf("%04d", $i).chr(31); + $good_info .= "good_name=".addslashes($row['it_name']).chr(31); + $good_info .= "good_cntx=".$row['ct_qty'].chr(31); + $good_info .= "good_amtx=".$row['ct_price'].chr(31); + } + + $image = get_it_image($row['it_id'], 50, 50); + + $it_name = '' . stripslashes($row['it_name']) . ''; + $it_options = print_item_options($row['it_id'], $s_cart_id); + if($it_options) { + $it_name .= '
'.$it_options.'
'; + } + + // 복합과세금액 + if($default['de_tax_flag_use']) { + if($row['it_notax']) { + $comm_free_mny += $sum['price']; + } else { + $tot_tax_mny += $sum['price']; + } + } + + $point = $sum['point']; + $sell_price = $sum['price']; + + // 쿠폰 + if($is_member) { + $cp_button = ''; + $cp_count = 0; + + $sql = " select cp_id + from {$g5['g5_shop_coupon_table']} + where mb_id IN ( '{$member['mb_id']}', '전체회원' ) + and cp_start <= '".G5_TIME_YMD."' + and cp_end >= '".G5_TIME_YMD."' + and cp_minimum <= '$sell_price' + and ( + ( cp_method = '0' and cp_target = '{$row['it_id']}' ) + OR + ( cp_method = '1' and ( cp_target IN ( '{$row['ca_id']}', '{$row['ca_id2']}', '{$row['ca_id3']}' ) ) ) + ) "; + $res = sql_query($sql); + + for($k=0; $cp=sql_fetch_array($res); $k++) { + if(is_used_coupon($member['mb_id'], $cp['cp_id'])) + continue; + + $cp_count++; + } + + if($cp_count) { + $cp_button = ''; + $it_cp_count++; + } + } + + // 배송비 + switch($row['ct_send_cost']) + { + case 1: + $ct_send_cost = '착불'; + break; + case 2: + $ct_send_cost = '무료'; + break; + default: + $ct_send_cost = '선불'; + break; + } + + // 조건부무료 + if($row['it_sc_type'] == 2) { + $sendcost = get_item_sendcost($row['it_id'], $sum['price'], $sum['qty'], $s_cart_id); + + if($sendcost == 0) + $ct_send_cost = '무료'; + } + ?> + + + + + + + + + + + + + '; + alert('장바구니가 비어 있습니다.', G5_SHOP_URL.'/cart.php'); + } else { + // 배송비 계산 + $send_cost = get_sendcost($s_cart_id); + } + + // 복합과세처리 + if($default['de_tax_flag_use']) { + $comm_tax_mny = round(($tot_tax_mny + $send_cost) / 1.1); + $comm_vat_mny = ($tot_tax_mny + $send_cost) - $comm_tax_mny; + } + ?> + +
상품이미지상품명총수량판매가쿠폰소계포인트배송비
+ + + + + + + + + +
장바구니에 담긴 상품이 없습니다.
+
+ + + + + +
+
주문
+
+ 0) { ?> +
쿠폰할인
+
0 원
+ +
배송비
+
+
총계
+
+ + +
+
포인트
+
+
+ + + + + + + + + + + + + +
+

주문하시는 분

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ 영,숫자 3~20자 (주문서 조회시 필요) + +
주소 + + +
+ +
+ + +
+ +
+ +
+ + 이후로 배송 바랍니다. +
+
+
+ + + +
+

받으시는 분

+ +
+ + + '.PHP_EOL; + $addr_list .= ''.PHP_EOL; + + // 기본배송지 + $sql = " select * + from {$g5['g5_shop_order_address_table']} + where mb_id = '{$member['mb_id']}' + and ad_default = '1' "; + $row = sql_fetch($sql); + if($row['ad_id']) { + $val1 = $row['ad_name'].$sep.$row['ad_tel'].$sep.$row['ad_hp'].$sep.$row['ad_zip1'].$sep.$row['ad_zip2'].$sep.$row['ad_addr1'].$sep.$row['ad_addr2'].$sep.$row['ad_addr3'].$sep.$row['ad_jibeon'].$sep.$row['ad_subject']; + $addr_list .= ''.PHP_EOL; + $addr_list .= ''.PHP_EOL; + } + + // 최근배송지 + $sql = " select * + from {$g5['g5_shop_order_address_table']} + where mb_id = '{$member['mb_id']}' + and ad_default = '0' + order by ad_id desc + limit 1 "; + $result = sql_query($sql); + for($i=0; $row=sql_fetch_array($result); $i++) { + $val1 = $row['ad_name'].$sep.$row['ad_tel'].$sep.$row['ad_hp'].$sep.$row['ad_zip1'].$sep.$row['ad_zip2'].$sep.$row['ad_addr1'].$sep.$row['ad_addr2'].$sep.$row['ad_addr3'].$sep.$row['ad_jibeon'].$sep.$row['ad_subject']; + $val2 = ''; + $addr_list .= ' '.PHP_EOL.$val2.PHP_EOL; + } + + $addr_list .= ''.PHP_EOL; + $addr_list .= ''.PHP_EOL; + + $addr_list .='배송지목록'; + } else { + // 주문자와 동일 + $addr_list .= ''.PHP_EOL; + $addr_list .= ''.PHP_EOL; + } + ?> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
배송지선택 + +
+ + + +
주소 + + +
+ +
+ + +
+ +
+ +
+
+
+ + + + = '".G5_TIME_YMD."' + and cp_minimum <= '$tot_sell_price' "; + $res = sql_query($sql); + + for($k=0; $cp=sql_fetch_array($res); $k++) { + if(is_used_coupon($member['mb_id'], $cp['cp_id'])) + continue; + + $oc_cnt++; + } + + if($send_cost > 0) { + // 배송비쿠폰 + $sql = " select cp_id + from {$g5['g5_shop_coupon_table']} + where mb_id IN ( '{$member['mb_id']}', '전체회원' ) + and cp_method = '3' + and cp_start <= '".G5_TIME_YMD."' + and cp_end >= '".G5_TIME_YMD."' + and cp_minimum <= '$tot_sell_price' "; + $res = sql_query($sql); + + for($k=0; $cp=sql_fetch_array($res); $k++) { + if(is_used_coupon($member['mb_id'], $cp['cp_id'])) + continue; + + $sc_cnt++; + } + } + } + ?> + +
+

결제정보

+ +
+ + + 0) { ?> + + + + + + + + + + 0) { ?> + + + + + + + + + + + + + + + + + + +
주문할인쿠폰 + + +
주문할인금액0
배송비할인쿠폰 + + +
배송비할인금액0
총 주문금액
추가배송비0원 (지역에 따라 추가되는 도선료 등의 배송비입니다.)
+
+ + 무통장입금 이외의 결제 수단으로 결제하시는 경우 포인트를 적립해드리지 않습니다.

'; + + $multi_settle == 0; + $checked = ''; + + $escrow_title = ""; + if ($default['de_escrow_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']) { + echo '
'; + echo '결제방법 선택'; + } + + // 카카오페이 + if($is_kakaopay_use) { + $multi_settle++; + echo ' '.PHP_EOL; + $checked = ''; + } + + // 무통장입금 사용 + if ($default['de_bank_use']) { + $multi_settle++; + echo ' '.PHP_EOL; + $checked = ''; + } + + // 가상계좌 사용 + if ($default['de_vbank_use']) { + $multi_settle++; + echo ' '.PHP_EOL; + $checked = ''; + } + + // 계좌이체 사용 + if ($default['de_iche_use']) { + $multi_settle++; + echo ' '.PHP_EOL; + $checked = ''; + } + + // 휴대폰 사용 + if ($default['de_hp_use']) { + $multi_settle++; + echo ' '.PHP_EOL; + $checked = ''; + } + + // 신용카드 사용 + if ($default['de_card_use']) { + $multi_settle++; + echo ' '.PHP_EOL; + $checked = ''; + } + + // PG 간편결제 + if($default['de_easy_pay_use']) { + switch($default['de_pg_service']) { + case 'lg': + $pg_easy_pay_name = 'PAYNOW'; + break; + case 'inicis': + $pg_easy_pay_name = 'KPAY'; + break; + default: + $pg_easy_pay_name = 'PAYCO'; + break; + } + + $multi_settle++; + echo ' '.PHP_EOL; + $checked = ''; + } + + $temp_point = 0; + // 회원이면서 포인트사용이면 + if ($is_member && $config['cf_use_point']) + { + // 포인트 결제 사용 포인트보다 회원의 포인트가 크다면 + if ($member['mb_point'] >= $default['de_settle_min_point']) + { + $temp_point = (int)$default['de_settle_max_point']; + + if($temp_point > (int)$tot_sell_price) + $temp_point = (int)$tot_sell_price; + + if($temp_point > (int)$member['mb_point']) + $temp_point = (int)$member['mb_point']; + + $point_unit = (int)$default['de_settle_point_unit']; + $temp_point = (int)((int)($temp_point / $point_unit) * $point_unit); + ?> +

보유포인트()중 최대 까지 사용 가능

+ + + 점 (점 단위로 입력하세요.) + '.$str[0].PHP_EOL; + } + else + { + $bank_account = ''.PHP_EOL; + } + echo ''; + } + + if ($default['de_bank_use'] || $default['de_vbank_use'] || $default['de_iche_use'] || $default['de_card_use'] || $default['de_hp_use']) { + echo '
'; + } + + if ($multi_settle == 0) + echo '

결제할 방법이 없습니다.
운영자에게 알려주시면 감사하겠습니다.

'; + ?> +
+ + + + + + + +
+ + \ No newline at end of file From adf212c868cf4d42f33f57f65d844e0fa5c069df Mon Sep 17 00:00:00 2001 From: chicpro Date: Thu, 17 Sep 2015 16:15:27 +0900 Subject: [PATCH 23/26] =?UTF-8?q?kcp=20=EA=B2=B0=EC=A0=9C=20=EC=8A=A4?= =?UTF-8?q?=ED=81=AC=EB=A6=BD=ED=8A=B8=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- shop/kcp/orderform.1.php | 25 ++++++++----------------- shop/kcp/orderform.5.php | 9 +-------- 2 files changed, 9 insertions(+), 25 deletions(-) diff --git a/shop/kcp/orderform.1.php b/shop/kcp/orderform.1.php index 4680d5a31..3437920cf 100644 --- a/shop/kcp/orderform.1.php +++ b/shop/kcp/orderform.1.php @@ -17,20 +17,11 @@ if($default['de_iche_use'] || $default['de_vbank_use'] || $default['de_hp_use'] /* ============================================================================== */ ?> - \ No newline at end of file +?> \ No newline at end of file From 694280beda84b62a8478607ba35a13529aac51e2 Mon Sep 17 00:00:00 2001 From: sora90224 Date: Thu, 17 Sep 2015 16:54:03 +0900 Subject: [PATCH 24/26] =?UTF-8?q?=EB=AA=A8=EB=B0=94=EC=9D=BC/=ED=94=BC?= =?UTF-8?q?=EC=94=A8=20=EB=B0=98=EC=9D=91=ED=98=95=20=EC=A3=BC=EB=AC=B8?= =?UTF-8?q?=ED=8F=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- css/default_shop.css | 58 +++++++++++++++++++++++++++++++- css/mobile_shop.css | 9 ++++- theme/basic/css/default_shop.css | 58 +++++++++++++++++++++++++++++++- theme/basic/css/mobile_shop.css | 8 ++++- 4 files changed, 129 insertions(+), 4 deletions(-) diff --git a/css/default_shop.css b/css/default_shop.css index 0c5144a59..d361ad361 100644 --- a/css/default_shop.css +++ b/css/default_shop.css @@ -521,4 +521,60 @@ a.btn_admin:focus, a.btn_admin:hover {text-decoration:none} /* 쿠폰 */ #coupon .td_numbig {width:150px} -#coupon .td_datetime {width:180px} \ No newline at end of file +#coupon .td_datetime {width:180px} + +/* 모바일일때 피시버전 주문폼*/ +.sod_list {position:relative;margin:0;padding:0;list-style:none} +.sod_list .sod_li {position:relative;padding:0;border:1px solid #e9e9e9;margin:10px 0} +.sod_list .sod_li:after {display:block;visibility:hidden;clear:both;content:""} +.sod_list .li_chk{position:absolute;top:10px;left:10px;} +.sod_list .li_name{min-height:130px} +.sod_list .li_name a,.sod_list .li_name strong{display:block;padding: 0 10px 0 25px;border-bottom:1px solid #e9e9e9;height:35px;line-height:35px} +.sod_list .li_name strong{padding-left:10px} +.sod_list .total_img{position:absolute;top:45px;left:10px;} +.sod_list .sod_opt{padding:10px 10px 5px;margin-left:90px;color:#9e9e9e;font-size:0.93em;background:none;border:none} +.sod_list .sod_opt li{margin-bottom:3px;border:none} +.sod_list .li_cp{position:relative} +.sod_list .li_cp .cp_btn, .sod_list .li_cp .cp_cancel, .sod_list .li_mod .mod_btn {margin:0;padding:5px 8px;border:0;background:#000;color:#fff;font-size:0.93em} +.sod_list .li_cp .cp_cancel,.odf_tbl #od_coupon_cancel,.odf_tbl #sc_coupon_cancel{border:1px solid #999;color:#777;background:#fafafa;margin-left:3px;padding:4px 5px} +.sod_list .li_prqty{margin:10px;} +.sod_list .li_prqty:after {display:block;visibility:hidden;clear:both;content:""} +.sod_list .li_prqty .li_prqty_sp{width:33%;display:inline-block;float:left;text-align:center;line-height:2.2em;border-top:1px solid #d3d3d3;border-bottom:1px solid #d3d3d3;border-left:1px solid #e9e9e9;color:#9e9e9e;font-size:0.93em;margin-left:-1px} +.sod_list .li_prqty .prqty_price{border-left:1px solid #d3d3d3;} +.sod_list .li_prqty .prqty_sc{border-right:1px solid #d3d3d3;} +.sod_list .li_prqty .li_prqty_sp span{display:block;background:#f2f2f2;} +.sod_list .li_total {position:relative;border-top:1px solid #e9e9e9;margin:10px 10px 0;} +.sod_list .total_span {display:block;position:relative;padding:5px 0;text-align:right;color:#343434} +.sod_list .total_span span{position:absolute;top:5px;left:0} +.sod_list .total_span strong{font-size:1.2em} + +#sod_frm {margin:10px;} +#sod_frm section{margin-bottom:10px} +#sod_frm p#sod_frm_pt_alert {margin:20px 0;text-align:center } +#sod_bsk_list #mod_option_frm .sit_ov_tbl{background:#ededed;margin-top:5px} +#sod_bsk_list #mod_option_frm .sit_ov_tbl th,#sod_bsk_list #mod_option_frm .sit_ov_tbl td{border:none;padding-left:5px;font-weight:normal} +#sod_bsk_list #mod_option_frm .sit_ov_tbl th{width:90px} +html.no-overflowscrolling #cp_frm {height:auto;max-height:10000px !important} /* overflow 미지원 기기 대응 */ +#sod_frm_deli {position:relative;line-height:2em} +#sod_frm_deli #order_address {display:block;;width:100px;background:#333;color:#fff;text-align:center} +#sod_frm_orderer {margin:15px 0 30px} +#sod_frm_orderer #od_addr_jibeon, #sod_frm_taker #od_b_addr_jibeon {display:inline-block;margin:5px 0 0} +#sod_frm .odf_tbl table{width:100%;margin:0;padding:0;border-top:1px solid #e9e9e9;border-left:1px solid #e9e9e9;border-right:1px solid #e9e9e9;border-collapse:collapse} +#sod_frm .odf_tbl table tbody td,#sod_frm .odf_tbl table tbody th{;border-bottom:1px solid #e9e9e9;padding:5px 0px 5px 10px ;text-align:left;line-height:26px;position:relative;} +#sod_frm .odf_tbl table th{width:90px;color:#343434;font-weight:normal;letter-spacing:-0.1em} +#sod_frm .odf_tbl table .frm_input{background-color:#fff !important;height:24px;line-height:24px;text-indent:5px} +#sod_frm .odf_tbl table .frm_address{margin-top:5px} +#sod_frm .odf_tbl button.btn_frmline{font-size:0.92em;padding:0 8px;height:26px;line-height:26px} +#sod_frm .odf_tbl textarea{width:99%;border:1px solid #e4eaec;} +#sod_frm_same {margin:0 0 10px} +#sod_frm_pay {position:relative} +#sod_frm_pay .tbl_head01 caption {font-size:0;line-height:0;overflow:hidden} +#sod_frm_pay .tbl_head01 th {width:auto !important;font-weight:bold;text-align:center !important} +#sod_frm_pay .tbl_head01 td {border-top:1px solid #e9e9e9 !important;border-bottom:1px solid #e9e9e9 !important;line-height:1.5em !important;word-break:break-all !important} + +html.no-overflowscrolling #sc_coupon_frm, html.no-overflowscrolling #od_coupon_frm {height:auto;max-height:10000px !important} /* overflow 미지원 기기 대응 */ +#sod_frm_pay_info {margin:0 0 10px} +#sod_frm_paysel {margin:10px 0 ;padding:10px;background:#f2f2f2;border:1px solid #e0e0e0} +#sod_frm_paysel ul {margin:0;padding:0;} +#sod_frm_paysel ul:after {display:block;visibility:hidden;clear:both;content:""} +#sod_frm_paysel li {float:left;padding:5px 2%;width:46%;height:21px;text-align:left;list-style:none} diff --git a/css/mobile_shop.css b/css/mobile_shop.css index 9a926aab1..aa0757857 100644 --- a/css/mobile_shop.css +++ b/css/mobile_shop.css @@ -711,4 +711,11 @@ a.btn_admin:focus, a.btn_admin:hover {text-decoration:none} /*이벤트*/ #sev_hhtml,#sev_thtml{padding:10px} -#sev_hhtml img,#sev_thtml img{width:100%} \ No newline at end of file +#sev_hhtml img,#sev_thtml img{width:100%} + + +/*피시일때 모바일버전 주문폼*/ +#sod_frm p{margin-bottom:10px} +#forderform .tbl_frm01 th{border-bottom:1px solid #e9e9e9;background:#f7f7f7;padding-left:10px} +#sod_list thead th{padding:8px 0 } +#sod_list .sod_opt{min-width:70px} diff --git a/theme/basic/css/default_shop.css b/theme/basic/css/default_shop.css index 8226f17ab..b0daa1414 100644 --- a/theme/basic/css/default_shop.css +++ b/theme/basic/css/default_shop.css @@ -521,4 +521,60 @@ a.btn_admin:focus, a.btn_admin:hover {text-decoration:none} /* 쿠폰 */ #coupon .td_numbig {width:150px} -#coupon .td_datetime {width:180px} \ No newline at end of file +#coupon .td_datetime {width:180px} + +/* 모바일일때 피시버전 주문폼*/ +.sod_list {position:relative;margin:0;padding:0;list-style:none} +.sod_list .sod_li {position:relative;padding:0;border:1px solid #e9e9e9;margin:10px 0} +.sod_list .sod_li:after {display:block;visibility:hidden;clear:both;content:""} +.sod_list .li_chk{position:absolute;top:10px;left:10px;} +.sod_list .li_name{min-height:130px} +.sod_list .li_name a,.sod_list .li_name strong{display:block;padding: 0 10px 0 25px;border-bottom:1px solid #e9e9e9;height:35px;line-height:35px} +.sod_list .li_name strong{padding-left:10px} +.sod_list .total_img{position:absolute;top:45px;left:10px;} +.sod_list .sod_opt{padding:10px 10px 5px;margin-left:90px;color:#9e9e9e;font-size:0.93em;background:none;border:none} +.sod_list .sod_opt li{margin-bottom:3px;border:none} +.sod_list .li_cp{position:relative} +.sod_list .li_cp .cp_btn, .sod_list .li_cp .cp_cancel, .sod_list .li_mod .mod_btn {margin:0;padding:5px 8px;border:0;background:#000;color:#fff;font-size:0.93em} +.sod_list .li_cp .cp_cancel,.odf_tbl #od_coupon_cancel,.odf_tbl #sc_coupon_cancel{border:1px solid #999;color:#777;background:#fafafa;margin-left:3px;padding:4px 5px} +.sod_list .li_prqty{margin:10px;} +.sod_list .li_prqty:after {display:block;visibility:hidden;clear:both;content:""} +.sod_list .li_prqty .li_prqty_sp{width:33%;display:inline-block;float:left;text-align:center;line-height:2.2em;border-top:1px solid #d3d3d3;border-bottom:1px solid #d3d3d3;border-left:1px solid #e9e9e9;color:#9e9e9e;font-size:0.93em;margin-left:-1px} +.sod_list .li_prqty .prqty_price{border-left:1px solid #d3d3d3;} +.sod_list .li_prqty .prqty_sc{border-right:1px solid #d3d3d3;} +.sod_list .li_prqty .li_prqty_sp span{display:block;background:#f2f2f2;} +.sod_list .li_total {position:relative;border-top:1px solid #e9e9e9;margin:10px 10px 0;} +.sod_list .total_span {display:block;position:relative;padding:5px 0;text-align:right;color:#343434} +.sod_list .total_span span{position:absolute;top:5px;left:0} +.sod_list .total_span strong{font-size:1.2em} + +#sod_frm {margin:10px;} +#sod_frm section{margin-bottom:10px} +#sod_frm p#sod_frm_pt_alert {margin:20px 0;text-align:center } +#sod_bsk_list #mod_option_frm .sit_ov_tbl{background:#ededed;margin-top:5px} +#sod_bsk_list #mod_option_frm .sit_ov_tbl th,#sod_bsk_list #mod_option_frm .sit_ov_tbl td{border:none;padding-left:5px;font-weight:normal} +#sod_bsk_list #mod_option_frm .sit_ov_tbl th{width:90px} +html.no-overflowscrolling #cp_frm {height:auto;max-height:10000px !important} /* overflow 미지원 기기 대응 */ +#sod_frm_deli {position:relative;line-height:2em} +#sod_frm_deli #order_address {display:block;;width:100px;background:#333;color:#fff;text-align:center} +#sod_frm_orderer {margin:15px 0 30px} +#sod_frm_orderer #od_addr_jibeon, #sod_frm_taker #od_b_addr_jibeon {display:inline-block;margin:5px 0 0} +#sod_frm .odf_tbl table{width:100%;margin:0;padding:0;border-top:1px solid #e9e9e9;border-left:1px solid #e9e9e9;border-right:1px solid #e9e9e9;border-collapse:collapse} +#sod_frm .odf_tbl table tbody td,#sod_frm .odf_tbl table tbody th{;border-bottom:1px solid #e9e9e9;padding:5px 0px 5px 10px ;text-align:left;line-height:26px;position:relative;} +#sod_frm .odf_tbl table th{width:90px;color:#343434;font-weight:normal;letter-spacing:-0.1em} +#sod_frm .odf_tbl table .frm_input{background-color:#fff !important;height:24px;line-height:24px;text-indent:5px} +#sod_frm .odf_tbl table .frm_address{margin-top:5px} +#sod_frm .odf_tbl button.btn_frmline{font-size:0.92em;padding:0 8px;height:26px;line-height:26px} +#sod_frm .odf_tbl textarea{width:99%;border:1px solid #e4eaec;} +#sod_frm_same {margin:0 0 10px} +#sod_frm_pay {position:relative} +#sod_frm_pay .tbl_head01 caption {font-size:0;line-height:0;overflow:hidden} +#sod_frm_pay .tbl_head01 th {width:auto !important;font-weight:bold;text-align:center !important} +#sod_frm_pay .tbl_head01 td {border-top:1px solid #e9e9e9 !important;border-bottom:1px solid #e9e9e9 !important;line-height:1.5em !important;word-break:break-all !important} + +html.no-overflowscrolling #sc_coupon_frm, html.no-overflowscrolling #od_coupon_frm {height:auto;max-height:10000px !important} /* overflow 미지원 기기 대응 */ +#sod_frm_pay_info {margin:0 0 10px} +#sod_frm_paysel {margin:10px 0 ;padding:10px;background:#f2f2f2;border:1px solid #e0e0e0} +#sod_frm_paysel ul {margin:0;padding:0;} +#sod_frm_paysel ul:after {display:block;visibility:hidden;clear:both;content:""} +#sod_frm_paysel li {float:left;padding:5px 2%;width:46%;height:21px;text-align:left;list-style:none} diff --git a/theme/basic/css/mobile_shop.css b/theme/basic/css/mobile_shop.css index 6cf57847a..0e6085b7f 100644 --- a/theme/basic/css/mobile_shop.css +++ b/theme/basic/css/mobile_shop.css @@ -711,4 +711,10 @@ a.btn_admin:focus, a.btn_admin:hover {text-decoration:none} /*이벤트*/ #sev_hhtml,#sev_thtml{padding:10px} -#sev_hhtml img,#sev_thtml img{width:100%} \ No newline at end of file +#sev_hhtml img,#sev_thtml img{width:100%} + +/*피시일때 모바일버전 주문폼*/ +#sod_frm p{margin-bottom:10px} +#forderform .tbl_frm01 th{border-bottom:1px solid #e9e9e9;background:#f7f7f7;padding-left:10px} +#sod_list thead th{padding:8px 0 } +#sod_list .sod_opt{min-width:70px} From 4b80bf0abe14f06cbcb28330a1576342cba0a9b3 Mon Sep 17 00:00:00 2001 From: sora90224 Date: Thu, 17 Sep 2015 17:13:48 +0900 Subject: [PATCH 25/26] =?UTF-8?q?=EB=AA=A8=EB=B0=94=EC=9D=BC/=ED=94=BC?= =?UTF-8?q?=EC=94=A8=20=EB=B0=98=EC=9D=91=ED=98=95=20=EC=A3=BC=EB=AC=B8?= =?UTF-8?q?=ED=8F=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- theme/basic/css/mobile_shop.css | 1 + 1 file changed, 1 insertion(+) diff --git a/theme/basic/css/mobile_shop.css b/theme/basic/css/mobile_shop.css index 0e6085b7f..c2feada1f 100644 --- a/theme/basic/css/mobile_shop.css +++ b/theme/basic/css/mobile_shop.css @@ -718,3 +718,4 @@ a.btn_admin:focus, a.btn_admin:hover {text-decoration:none} #forderform .tbl_frm01 th{border-bottom:1px solid #e9e9e9;background:#f7f7f7;padding-left:10px} #sod_list thead th{padding:8px 0 } #sod_list .sod_opt{min-width:70px} +#sod_frm #display_pay_button .btn01{width: 49%;text-align: center;padding: 11px 0px;background: #fff;border: 1px solid #34B5A1;color:#34B5A1} \ No newline at end of file From 0babe9698aefa3705de3663f9b2b33f5605efdd8 Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 18 Sep 2015 10:14:27 +0900 Subject: [PATCH 26/26] =?UTF-8?q?=EC=87=BC=ED=95=91=EB=AA=B0=20=EC=BA=A1?= =?UTF-8?q?=EC=B1=A0=20=EC=9D=B4=EB=AF=B8=EC=A7=80=20=EA=B2=BD=EB=A1=9C=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 --- theme/basic/css/default_shop.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/theme/basic/css/default_shop.css b/theme/basic/css/default_shop.css index 3e13c8fca..92bc599f3 100644 --- a/theme/basic/css/default_shop.css +++ b/theme/basic/css/default_shop.css @@ -100,9 +100,9 @@ a:hover, a:focus, a:active {color:#000;text-decoration:underline} #captcha legend {position:absolute;margin:0;padding:0;font-size:0;line-height:0;text-indent:-9999em;overflow:hidden} #captcha #captcha_img {width:100px;height:41px;border:1px solid #e9e9e9} #captcha #captcha_mp3 {position:absolute;top:0;left:101px;;margin:0;padding:0;width:23px;height:22px;border:0;background:transparent;vertical-align:middle;overflow:hidden;cursor:pointer} -#captcha #captcha_mp3 span {position:absolute;top:0;left:0;width:23px;height:22px;background:url('../plugin/kcaptcha/img/sound.gif')} +#captcha #captcha_mp3 span {position:absolute;top:0;left:0;width:23px;height:22px;background:url('../../../plugin/kcaptcha/img/sound.gif')} #captcha #captcha_reload {position:absolute;top:21px;left:101px;margin:0;padding:0;width:23px;height:22px;border:0;background:transparent;vertical-align:middle;overflow:hidden;cursor:pointer} -#captcha #captcha_reload span {position:absolute;top:0;left:0;width:23px;height:22px;background:url('../plugin/kcaptcha/img/reload.gif')} +#captcha #captcha_reload span {position:absolute;top:0;left:0;width:23px;height:22px;background:url('../../../plugin/kcaptcha/img/reload.gif')} #captcha #captcha_key {margin:0 0 0 25px;padding:0 5px;width:70px;height:41px;border:1px solid #b8c9c2;background:#f7f7f7;font-size:1.333em;font-weight:bold;text-align:center;line-height:2.8em} #captcha #captcha_info {display:block;margin:5px 0 0;font-size:0.95em;letter-spacing:-0.1em}