From c2385258603eac4121566f448d7b2fa360112a91 Mon Sep 17 00:00:00 2001 From: chicpro Date: Fri, 22 Apr 2016 17:57:14 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B0=9C=EC=9D=B8=EA=B2=B0=EC=A0=9C=20?= =?UTF-8?q?=EC=9D=B4=EB=8B=88=EC=8B=9C=EC=8A=A4=20=EB=AA=A8=EB=93=88=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 --- shop/inicis/makesignature.php | 5 ++++- shop/orderform.php | 2 ++ shop/personalpayform.php | 20 +++----------------- shop/personalpayform.sub.php | 26 +++++++++++++++++++++++--- 4 files changed, 32 insertions(+), 21 deletions(-) diff --git a/shop/inicis/makesignature.php b/shop/inicis/makesignature.php index 90247d1ae..ac7faf70a 100644 --- a/shop/inicis/makesignature.php +++ b/shop/inicis/makesignature.php @@ -3,7 +3,10 @@ include_once('./_common.php'); include_once(G5_LIB_PATH.'/json.lib.php'); include_once(G5_SHOP_PATH.'/settle_inicis.inc.php'); -$orderNumber = get_session('ss_order_id'); +if($default['de_pg_service'] != 'inicis') + die(json_encode(array('error'=>'올바른 방법으로 이용해 주십시오.'))); + +$orderNumber = get_session('ss_order_inicis_id'); $price = preg_replace('#[^0-9]#', '', $_POST['price']); if(strlen($price) < 1) diff --git a/shop/orderform.php b/shop/orderform.php index 7ba0c3d8e..8609c8119 100644 --- a/shop/orderform.php +++ b/shop/orderform.php @@ -26,6 +26,8 @@ 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') + set_session('ss_order_inicis_id', $od_id); $g5['title'] = '주문서 작성'; diff --git a/shop/personalpayform.php b/shop/personalpayform.php index 802207a49..4975c5898 100644 --- a/shop/personalpayform.php +++ b/shop/personalpayform.php @@ -15,23 +15,6 @@ if($pp['pp_tno']) $g5['title'] = $pp['pp_name'].'님 개인결제'; -// 전자결제를 사용할 때만 실행 -if(!$is_mobile_pay) { - if($default['de_iche_use'] || $default['de_vbank_use'] || $default['de_hp_use'] || $default['de_card_use']) { - switch($default['de_pg_service']) { - case 'lg': - $g5['body_script'] = ''; - break; - case 'inicis': - $g5['body_script'] = ' onload="javascript:enable_click()"'; - break; - default: - $g5['body_script'] = ' onload="CheckPayplusInstall();"'; - break; - } - } -} - if(G5_IS_MOBILE) include_once(G5_MSHOP_PATH.'/_head.php'); else @@ -56,6 +39,9 @@ $od_id = $pp_id; $tot_price = $pp['pp_price']; $goods = $pp['pp_name'].'님 개인결제'; +if($default['de_pg_service'] == 'inicis') + set_session('ss_order_inicis_id', $od_id); + // 기기별 결제폼 include if($is_mobile_pay) { $order_action_url = G5_HTTPS_MSHOP_URL.'/personalpayformupdate.php'; diff --git a/shop/personalpayform.sub.php b/shop/personalpayform.sub.php index 6549fe093..5265d1d68 100644 --- a/shop/personalpayform.sub.php +++ b/shop/personalpayform.sub.php @@ -258,17 +258,37 @@ function forderform_check(f) } + f.price.value = f.good_mny.value; f.buyername.value = f.pp_name.value; f.buyeremail.value = f.pp_email.value; f.buyertel.value = f.pp_hp.value; if(f.gopaymethod.value != "무통장") { - if(!set_encrypt_data(f)) + // 주문정보 임시저장 + var order_data = $(f).serialize(); + var save_result = ""; + $.ajax({ + type: "POST", + data: order_data, + url: g5_url+"/shop/ajax.orderdatasave.php", + cache: false, + async: false, + success: function(data) { + save_result = data; + } + }); + + if(save_result) { + alert(save_result); + return false; + } + + if(!make_signature(f)) return false; - return pay(f); + paybtn(f); } else { - return true; + f.submit(); } }