이니시스 Lpay 간편결제 추가
This commit is contained in:
@ -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'])) {
|
||||
<a href="http://sir.kr/main/service/samsungpay.php" target="_blank" class="kg_btn">삼성페이 서비스신청하기</a>
|
||||
</th>
|
||||
<td>
|
||||
<?php echo help("체크시 KG이니시스 삼성페이를 사용합니다. <br >실결제시 반드시 결제대행사 KG이니시스 항목에 상점 아이디와 키패스워드를 입력해 주세요.", 50); ?>
|
||||
<?php echo help("체크시 KG이니시스 삼성페이를 사용합니다.( 모바일 결제시 주문화면에 삼성페이 버튼이 출력됩니다. ) <br >실결제시 반드시 결제대행사 KG이니시스 항목에 상점 아이디와 키패스워드를 입력해 주세요.", 50); ?>
|
||||
<input type="checkbox" name="de_samsung_pay_use" value="1" id="de_samsung_pay_use"<?php echo $default['de_samsung_pay_use']?' checked':''; ?>> <label for="de_samsung_pay_use">사용</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="pg_info_fld inicis_info_fld">
|
||||
<th scope="row">
|
||||
<label for="de_inicis_lpay_use">KG이니시스 L.pay</label>
|
||||
</th>
|
||||
<td>
|
||||
<?php echo help("체크시 KG이니시스 L.pay를 사용합니다. <br >실결제시 반드시 결제대행사 KG이니시스 항목의 상점 정보( 아이디, 키패스워드, 웹결제 사인키 )를 입력해 주세요.", 50); ?>
|
||||
<input type="checkbox" name="de_inicis_lpay_use" value="1" id="de_inicis_lpay_use"<?php echo $default['de_inicis_lpay_use']?' checked':''; ?>> <label for="de_inicis_lpay_use">사용</label>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="pg_info_fld inicis_info_fld">
|
||||
<th scope="row">
|
||||
<label for="de_inicis_cartpoint_use">KG이니시스 신용카드 포인트 결제</label>
|
||||
|
||||
@ -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']}',
|
||||
|
||||
@ -468,7 +468,7 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($od['od_settle_case'] == '간편결제' || ($od['od_pg'] == 'inicis' && $od['od_settle_case'] == '삼성페이') ) { ?>
|
||||
<?php if ($od['od_settle_case'] == '간편결제' || ($od['od_pg'] == 'inicis' && is_inicis_order_pay($od['od_settle_case']) ) ) { ?>
|
||||
<tr>
|
||||
<th scope="row" class="sodr_sppay"><?php echo $s_receipt_way; ?> 결제금액</th>
|
||||
<td>
|
||||
@ -759,7 +759,7 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
||||
</tr>
|
||||
<?php } ?>
|
||||
|
||||
<?php if ($od['od_settle_case'] == '간편결제' || ($od['od_pg'] == 'inicis' && $od['od_settle_case'] == '삼성페이')) { ?>
|
||||
<?php if ($od['od_settle_case'] == '간편결제' || ($od['od_pg'] == 'inicis' && is_inicis_order_pay($od['od_settle_case']) )) { ?>
|
||||
<tr>
|
||||
<th scope="row" class="sodr_sppay"><label for="od_receipt_price"><?php echo $s_receipt_way; ?> 결제금액</label></th>
|
||||
<td>
|
||||
@ -1066,7 +1066,7 @@ function form_submit(f)
|
||||
|
||||
var msg = "";
|
||||
|
||||
<?php if($od['od_settle_case'] == '신용카드' || $od['od_settle_case'] == 'KAKAOPAY' || $od['od_settle_case'] == '간편결제' || ($od['od_pg'] == 'inicis' && $od['od_settle_case'] == '삼성페이')) { ?>
|
||||
<?php if($od['od_settle_case'] == '신용카드' || $od['od_settle_case'] == 'KAKAOPAY' || $od['od_settle_case'] == '간편결제' || ($od['od_pg'] == 'inicis' && is_inicis_order_pay($od['od_settle_case']) )) { ?>
|
||||
if(status == "취소" || status == "반품" || status == "품절") {
|
||||
var $ct_chk = $("input[name^=ct_chk]");
|
||||
var chk_cnt = $ct_chk.size();
|
||||
|
||||
@ -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');
|
||||
|
||||
@ -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}
|
||||
|
||||
@ -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}
|
||||
|
||||
|
||||
BIN
img/lpay_logo.png
Normal file
BIN
img/lpay_logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.4 KiB |
@ -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',
|
||||
|
||||
@ -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)
|
||||
{
|
||||
|
||||
@ -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 '<div id="sod_frm_paysel"><ul>';
|
||||
}
|
||||
|
||||
@ -614,6 +614,12 @@ if($is_kakaopay_use) {
|
||||
$checked = '';
|
||||
}
|
||||
|
||||
//이니시스 Lpay
|
||||
if($default['de_inicis_lpay_use']) {
|
||||
echo '<li><input type="radio" id="od_settle_inicislpay" data-case="lpay" name="od_settle_case" value="lpay" '.$checked.'> <label for="od_settle_inicislpay" class="inicis_lpay">L.pay</label></li>'.PHP_EOL;
|
||||
$checked = '';
|
||||
}
|
||||
|
||||
echo '</ul>';
|
||||
|
||||
$temp_point = 0;
|
||||
@ -667,7 +673,7 @@ if($is_kakaopay_use) {
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
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 '</div>';
|
||||
}
|
||||
|
||||
@ -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) {
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if( $default['de_samsung_pay_use'] ){ //삼성페이 사용시
|
||||
if( is_inicis_simple_pay() ){ //삼성페이 사용시
|
||||
require_once(G5_MSHOP_PATH.'/samsungpay/order.script.php');
|
||||
}
|
||||
?>
|
||||
@ -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;
|
||||
|
||||
@ -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';
|
||||
|
||||
@ -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') {
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">결제방식</th>
|
||||
<td><?php echo ($easy_pay_name ? $easy_pay_name.'('.$od['od_settle_case'].')' : $od['od_settle_case']); ?></td>
|
||||
<td><?php echo ($easy_pay_name ? $easy_pay_name.'('.$od['od_settle_case'].')' : check_pay_name_replace($od['od_settle_case'])); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">결제금액</th>
|
||||
@ -351,7 +351,7 @@ if($od['od_pg'] == 'lg') {
|
||||
<?php
|
||||
}
|
||||
|
||||
if($od['od_settle_case'] == '신용카드' || $od['od_settle_case'] == '삼성페이')
|
||||
if($od['od_settle_case'] == '신용카드' || is_inicis_order_pay($od['od_settle_case']) )
|
||||
{
|
||||
if($od['od_pg'] == 'lg') {
|
||||
require_once G5_SHOP_PATH.'/settle_lg.inc.php';
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
//삼성페이 사용시에만 해당함
|
||||
if( ! $default['de_samsung_pay_use'] || ('inicis' == $default['de_pg_service']) ){ //PG가 이니시스인 경우 아래 내용 사용 안함
|
||||
//삼성페이 또는 Lpay 사용시에만 해당함
|
||||
if( ! is_inicis_simple_pay() || ('inicis' == $default['de_pg_service']) ){ //PG가 이니시스인 경우 아래 내용 사용 안함
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
//삼성페이 사용시에만 해당함
|
||||
if( ! $default['de_samsung_pay_use'] || ('inicis' == $default['de_pg_service']) ){ //PG가 이니시스인 경우 아래 내용 사용 안함
|
||||
//삼성페이 또는 L.pay 사용시에만 해당함
|
||||
if( ! is_inicis_simple_pay() || ('inicis' == $default['de_pg_service']) ){ //PG가 이니시스인 경우 아래 내용 사용 안함
|
||||
return;
|
||||
}
|
||||
?>
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
//삼성페이 사용시에만 해당함
|
||||
if( ! $default['de_samsung_pay_use'] || ('inicis' == $default['de_pg_service']) ){ //PG가 이니시스인 경우 아래 내용 사용 안함
|
||||
//삼성페이 또는 L.pay 사용시에만 해당함
|
||||
if( ! is_inicis_simple_pay() || ('inicis' == $default['de_pg_service']) ){ //PG가 이니시스인 경우 아래 내용 사용 안함
|
||||
return;
|
||||
}
|
||||
?>
|
||||
|
||||
@ -1,8 +1,8 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
//삼성페이 사용시에만 해당함
|
||||
if( ! $default['de_samsung_pay_use'] || ('inicis' == $default['de_pg_service']) ){ //PG가 이니시스인 경우 아래 내용 사용 안함
|
||||
//삼성페이 또는 L.pay 사용시에만 해당함
|
||||
if( ! is_inicis_simple_pay() || ('inicis' == $default['de_pg_service']) ){ //PG가 이니시스인 경우 아래 내용 사용 안함
|
||||
return;
|
||||
}
|
||||
?>
|
||||
|
||||
10
shop/inicis/lpay_common.php
Normal file
10
shop/inicis/lpay_common.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
//삼성페이 또는 Lpay 사용시에만 해당함
|
||||
if( ! $default['de_inicis_lpay_use'] || ('inicis' == $default['de_pg_service']) ){ //PG가 이니시스인 경우 아래 내용 사용 안함
|
||||
return;
|
||||
}
|
||||
|
||||
include_once(G5_SHOP_PATH.'/settle_inicis.inc.php');
|
||||
?>
|
||||
126
shop/inicis/lpay_form.1.php
Normal file
126
shop/inicis/lpay_form.1.php
Normal file
@ -0,0 +1,126 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
|
||||
|
||||
//이니시스 lpay 사용시에만 해당함
|
||||
if( ! $default['de_inicis_lpay_use'] || ('inicis' == $default['de_pg_service']) ){ //PG가 이니시스인 경우 아래 내용 사용 안함
|
||||
return;
|
||||
}
|
||||
|
||||
add_javascript('<script language="javascript" type="text/javascript" src="'.$stdpay_js_url.'" charset="UTF-8"></script>', 10);
|
||||
?>
|
||||
|
||||
<form name="inicis_pay_form" id="inicis_pay_form" method="POST">
|
||||
|
||||
<?php /* 주문폼 자바스크립트 에러 방지를 위해 추가함 */ ?>
|
||||
<input type="hidden" name="good_mny" value="">
|
||||
<?php
|
||||
if($default['de_tax_flag_use']) {
|
||||
?>
|
||||
<input type="hidden" name="comm_tax_mny" value=""> <!-- 과세금액 -->
|
||||
<input type="hidden" name="comm_vat_mny" value=""> <!-- 부가세 -->
|
||||
<input type="hidden" name="comm_free_mny" value=""> <!-- 비과세 금액 -->
|
||||
<?php
|
||||
}
|
||||
?>
|
||||
|
||||
<input type="hidden" name="version" value="1.0" >
|
||||
<input type="hidden" name="mid" value="<?php echo $mid; ?>">
|
||||
<input type="hidden" name="oid" value="<?php echo $od_id; ?>">
|
||||
<input type="hidden" name="goodname" value="">
|
||||
<input type="hidden" name="price" value="">
|
||||
<input type="hidden" name="buyername" value="">
|
||||
<input type="hidden" name="buyeremail" value="">
|
||||
<input type="hidden" name="parentemail" value="">
|
||||
<input type="hidden" name="buyertel" value="">
|
||||
<input type="hidden" name="recvname" value="">
|
||||
<input type="hidden" name="recvtel" value="">
|
||||
<input type="hidden" name="recvaddr" value="">
|
||||
<input type="hidden" name="recvpostnum" value="">
|
||||
|
||||
<!-- 기타설정 -->
|
||||
<input type="hidden" name="currency" value="WON">
|
||||
|
||||
<!-- 결제방법 -->
|
||||
<input type="hidden" name="gopaymethod" value="">
|
||||
|
||||
<!--
|
||||
SKIN : 플러그인 스킨 칼라 변경 기능 - 6가지 칼라(ORIGINAL, GREEN, ORANGE, BLUE, KAKKI, GRAY)
|
||||
HPP : 컨텐츠 또는 실물 결제 여부에 따라 HPP(1)과 HPP(2)중 선택 적용(HPP(1):컨텐츠, HPP(2):실물).
|
||||
Card(0): 신용카드 지불시에 이니시스 대표 가맹점인 경우에 필수적으로 세팅 필요 ( 자체 가맹점인 경우에는 카드사의 계약에 따라 설정) - 자세한 내용은 메뉴얼 참조.
|
||||
OCB : OK CASH BAG 가맹점으로 신용카드 결제시에 OK CASH BAG 적립을 적용하시기 원하시면 "OCB" 세팅 필요 그 외에 경우에는 삭제해야 정상적인 결제 이루어짐.
|
||||
no_receipt : 은행계좌이체시 현금영수증 발행여부 체크박스 비활성화 (현금영수증 발급 계약이 되어 있어야 사용가능)
|
||||
-->
|
||||
<input type="hidden" name="acceptmethod" value="<?php echo $acceptmethod; ?>">
|
||||
|
||||
<!--
|
||||
플러그인 좌측 상단 상점 로고 이미지 사용
|
||||
이미지의 크기 : 90 X 34 pixels
|
||||
플러그인 좌측 상단에 상점 로고 이미지를 사용하실 수 있으며,
|
||||
주석을 풀고 이미지가 있는 URL을 입력하시면 플러그인 상단 부분에 상점 이미지를 삽입할수 있습니다.
|
||||
-->
|
||||
<!--input type="hidden" name="ini_logoimage_url" value="http://[사용할 이미지주소]"-->
|
||||
|
||||
<!--
|
||||
좌측 결제메뉴 위치에 이미지 추가
|
||||
이미지의 크기 : 단일 결제 수단 - 91 X 148 pixels, 신용카드/ISP/계좌이체/가상계좌 - 91 X 96 pixels
|
||||
좌측 결제메뉴 위치에 미미지를 추가하시 위해서는 담당 영업대표에게 사용여부 계약을 하신 후
|
||||
주석을 풀고 이미지가 있는 URL을 입력하시면 플러그인 좌측 결제메뉴 부분에 이미지를 삽입할수 있습니다.
|
||||
-->
|
||||
<!--input type="hidden" name="ini_menuarea_url" value="http://[사용할 이미지주소]"-->
|
||||
|
||||
<!--
|
||||
플러그인에 의해서 값이 채워지거나, 플러그인이 참조하는 필드들
|
||||
삭제/수정 불가
|
||||
-->
|
||||
<input type="hidden" name="timestamp" value="">
|
||||
<input type="hidden" name="signature" value="">
|
||||
<input type="hidden" name="returnUrl" value="<?php echo $returnUrl; ?>">
|
||||
<input type="hidden" name="mKey" value="">
|
||||
<input type="hidden" name="charset" value="UTF-8">
|
||||
<input type="hidden" name="payViewType" value="overlay">
|
||||
<input type="hidden" name="closeUrl" value="<?php echo $closeUrl; ?>">
|
||||
<input type="hidden" name="popupUrl" value="<?php echo $popupUrl; ?>">
|
||||
<input type="hidden" name="nointerest" value="<?php echo $cardNoInterestQuota; ?>">
|
||||
<input type="hidden" name="quotabase" value="<?php echo $cardQuotaBase; ?>">
|
||||
<?php if($default['de_tax_flag_use']) { ?>
|
||||
<input type="hidden" name="tax" value="">
|
||||
<input type="hidden" name="taxfree" value="">
|
||||
<?php } ?>
|
||||
|
||||
</form>
|
||||
<script language=javascript>
|
||||
function make_signature(frm)
|
||||
{
|
||||
// 데이터 암호화 처리
|
||||
var result = true;
|
||||
$.ajax({
|
||||
url: g5_url+"/shop/inicis/makesignature.php",
|
||||
type: "POST",
|
||||
data: {
|
||||
price : frm.good_mny.value
|
||||
},
|
||||
dataType: "json",
|
||||
async: false,
|
||||
cache: false,
|
||||
success: function(data) {
|
||||
if(data.error == "") {
|
||||
frm.timestamp.value = data.timestamp;
|
||||
frm.signature.value = data.sign;
|
||||
frm.mKey.value = data.mKey;
|
||||
} else {
|
||||
alert(data.error);
|
||||
result = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
function paybtn(f) {
|
||||
|
||||
console.log( f.id );
|
||||
|
||||
INIStdPay.pay(f.id);
|
||||
}
|
||||
</script>
|
||||
73
shop/inicis/lpay_order.script.php
Normal file
73
shop/inicis/lpay_order.script.php
Normal file
@ -0,0 +1,73 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
//삼성페이 또는 L.pay 사용시에만 해당함
|
||||
if( ! $default['de_inicis_lpay_use'] || ('inicis' == $default['de_pg_service']) ){ //PG가 이니시스인 경우 아래 내용 사용 안함
|
||||
return;
|
||||
}
|
||||
?>
|
||||
<script>
|
||||
jQuery(function($){
|
||||
$( document ).ready(function() {
|
||||
var pf = document.forderform;
|
||||
|
||||
$(pf).on("form_sumbit_order_samsungpay", inicis_pay_form_submit);
|
||||
|
||||
function inicis_pay_form_submit(){
|
||||
var $form = $(this),
|
||||
pf = $form[0],
|
||||
inicis_pay_form = document.inicis_pay_form;
|
||||
|
||||
inicis_pay_form.gopaymethod.value = "onlylpay";
|
||||
inicis_pay_form.acceptmethod.value = "cardonly";
|
||||
|
||||
inicis_pay_form.price.value = inicis_pay_form.good_mny.value = pf.good_mny.value;
|
||||
inicis_pay_form.goodname.value = pf.od_goods_name.value;
|
||||
|
||||
inicis_pay_form.buyername.value = pf.od_name.value;
|
||||
inicis_pay_form.buyeremail.value = pf.od_email.value;
|
||||
inicis_pay_form.buyertel.value = pf.od_hp.value ? pf.od_hp.value : pf.od_tel.value;
|
||||
inicis_pay_form.recvname.value = pf.od_b_name.value;
|
||||
inicis_pay_form.recvtel.value = pf.od_b_hp.value ? pf.od_b_hp.value : pf.od_b_tel.value;
|
||||
inicis_pay_form.recvpostnum.value = pf.od_b_zip.value;
|
||||
inicis_pay_form.recvaddr.value = pf.od_b_addr1.value + " " +pf.od_b_addr2.value;
|
||||
|
||||
<?php if($default['de_tax_flag_use']) { ?>
|
||||
inicis_pay_form.comm_tax_mny.value = pf.comm_tax_mny.value;
|
||||
inicis_pay_form.comm_vat_mny.value = pf.comm_vat_mny.value;
|
||||
inicis_pay_form.comm_free_mny.value = pf.comm_free_mny.value;
|
||||
inicis_pay_form.tax.value = pf.comm_vat_mny.value;
|
||||
inicis_pay_form.taxfree.value = pf.comm_free_mny.value;
|
||||
<?php } ?>
|
||||
|
||||
// 주문 정보 임시저장
|
||||
var order_data = $(pf).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(inicis_pay_form))
|
||||
return false;
|
||||
|
||||
setTimeout(function(){
|
||||
paybtn(inicis_pay_form);
|
||||
}, 1);
|
||||
|
||||
return false;
|
||||
}
|
||||
});
|
||||
});
|
||||
</script>
|
||||
@ -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');
|
||||
|
||||
@ -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'] = '주문서 작성';
|
||||
|
||||
@ -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) {
|
||||
<input type="hidden" name="item_coupon" value="0">
|
||||
<input type="hidden" name="od_coupon" value="0">
|
||||
<input type="hidden" name="od_send_coupon" value="0">
|
||||
<input type="hidden" name="od_goods_name" value="<?php echo $goods; ?>">
|
||||
|
||||
<?php
|
||||
// 결제대행사별 코드 include (결제대행사 정보 필드)
|
||||
@ -537,7 +546,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']) {
|
||||
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 '<fieldset id="sod_frm_paysel">';
|
||||
echo '<legend>결제방법 선택</legend>';
|
||||
}
|
||||
@ -603,6 +612,12 @@ if($is_kakaopay_use) {
|
||||
$checked = '';
|
||||
}
|
||||
|
||||
//이니시스 Lpay
|
||||
if($default['de_inicis_lpay_use']) {
|
||||
echo '<input type="radio" id="od_settle_inicislpay" data-case="lpay" name="od_settle_case" value="lpay" '.$checked.'> <label for="od_settle_inicislpay" class="inicis_lpay">L.pay</label>'.PHP_EOL;
|
||||
$checked = '';
|
||||
}
|
||||
|
||||
$temp_point = 0;
|
||||
// 회원이면서 포인트사용이면
|
||||
if ($is_member && $config['cf_use_point'])
|
||||
@ -657,7 +672,7 @@ if($is_kakaopay_use) {
|
||||
echo '</div>';
|
||||
}
|
||||
|
||||
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 '</fieldset>';
|
||||
}
|
||||
|
||||
@ -686,6 +701,11 @@ if($is_kakaopay_use) {
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
if( $default['de_inicis_lpay_use'] ){ //이니시스 L.pay 사용시
|
||||
require_once(G5_SHOP_PATH.'/inicis/lpay_order.script.php');
|
||||
}
|
||||
?>
|
||||
<script>
|
||||
var zipcode = "";
|
||||
var form_action_url = "<?php echo $order_action_url; ?>";
|
||||
@ -1309,183 +1329,197 @@ function forderform_check(f)
|
||||
return false;
|
||||
}
|
||||
|
||||
// pay_method 설정
|
||||
<?php if($default['de_pg_service'] == 'kcp') { ?>
|
||||
f.site_cd.value = f.def_site_cd.value;
|
||||
f.payco_direct.value = "";
|
||||
switch(settle_method)
|
||||
{
|
||||
case "계좌이체":
|
||||
f.pay_method.value = "010000000000";
|
||||
break;
|
||||
case "가상계좌":
|
||||
f.pay_method.value = "001000000000";
|
||||
break;
|
||||
case "휴대폰":
|
||||
f.pay_method.value = "000010000000";
|
||||
break;
|
||||
case "신용카드":
|
||||
f.pay_method.value = "100000000000";
|
||||
break;
|
||||
case "간편결제":
|
||||
<?php if($default['de_card_test']) { ?>
|
||||
f.site_cd.value = "S6729";
|
||||
<?php } ?>
|
||||
f.pay_method.value = "100000000000";
|
||||
f.payco_direct.value = "Y";
|
||||
break;
|
||||
default:
|
||||
f.pay_method.value = "무통장";
|
||||
break;
|
||||
}
|
||||
<?php } else if($default['de_pg_service'] == 'lg') { ?>
|
||||
f.LGD_EASYPAY_ONLY.value = "";
|
||||
if(typeof f.LGD_CUSTOM_USABLEPAY === "undefined") {
|
||||
var input = document.createElement("input");
|
||||
input.setAttribute("type", "hidden");
|
||||
input.setAttribute("name", "LGD_CUSTOM_USABLEPAY");
|
||||
input.setAttribute("value", "");
|
||||
f.LGD_EASYPAY_ONLY.parentNode.insertBefore(input, f.LGD_EASYPAY_ONLY);
|
||||
var form_order_method = '';
|
||||
|
||||
if( settle_method == "lpay" ){ //이니시스 L.pay 이면 ( 이니시스의 삼성페이는 모바일에서만 단독실행 가능함 )
|
||||
form_order_method = 'samsungpay';
|
||||
}
|
||||
|
||||
switch(settle_method)
|
||||
{
|
||||
case "계좌이체":
|
||||
f.LGD_CUSTOM_FIRSTPAY.value = "SC0030";
|
||||
f.LGD_CUSTOM_USABLEPAY.value = "SC0030";
|
||||
break;
|
||||
case "가상계좌":
|
||||
f.LGD_CUSTOM_FIRSTPAY.value = "SC0040";
|
||||
f.LGD_CUSTOM_USABLEPAY.value = "SC0040";
|
||||
break;
|
||||
case "휴대폰":
|
||||
f.LGD_CUSTOM_FIRSTPAY.value = "SC0060";
|
||||
f.LGD_CUSTOM_USABLEPAY.value = "SC0060";
|
||||
break;
|
||||
case "신용카드":
|
||||
f.LGD_CUSTOM_FIRSTPAY.value = "SC0010";
|
||||
f.LGD_CUSTOM_USABLEPAY.value = "SC0010";
|
||||
break;
|
||||
case "간편결제":
|
||||
var elm = f.LGD_CUSTOM_USABLEPAY;
|
||||
if(elm.parentNode)
|
||||
elm.parentNode.removeChild(elm);
|
||||
f.LGD_EASYPAY_ONLY.value = "PAYNOW";
|
||||
break;
|
||||
default:
|
||||
f.LGD_CUSTOM_FIRSTPAY.value = "무통장";
|
||||
break;
|
||||
}
|
||||
<?php } else if($default['de_pg_service'] == 'inicis') { ?>
|
||||
switch(settle_method)
|
||||
{
|
||||
case "계좌이체":
|
||||
f.gopaymethod.value = "DirectBank";
|
||||
break;
|
||||
case "가상계좌":
|
||||
f.gopaymethod.value = "VBank";
|
||||
break;
|
||||
case "휴대폰":
|
||||
f.gopaymethod.value = "HPP";
|
||||
break;
|
||||
case "신용카드":
|
||||
f.gopaymethod.value = "Card";
|
||||
f.acceptmethod.value = f.acceptmethod.value.replace(":useescrow", "");
|
||||
break;
|
||||
case "간편결제":
|
||||
f.gopaymethod.value = "Kpay";
|
||||
break;
|
||||
default:
|
||||
f.gopaymethod.value = "무통장";
|
||||
break;
|
||||
}
|
||||
<?php } ?>
|
||||
if( jQuery(f).triggerHandler("form_sumbit_order_"+form_order_method) !== false ) {
|
||||
|
||||
// 결제정보설정
|
||||
<?php if($default['de_pg_service'] == 'kcp') { ?>
|
||||
f.buyr_name.value = f.od_name.value;
|
||||
f.buyr_mail.value = f.od_email.value;
|
||||
f.buyr_tel1.value = f.od_tel.value;
|
||||
f.buyr_tel2.value = f.od_hp.value;
|
||||
f.rcvr_name.value = f.od_b_name.value;
|
||||
f.rcvr_tel1.value = f.od_b_tel.value;
|
||||
f.rcvr_tel2.value = f.od_b_hp.value;
|
||||
f.rcvr_mail.value = f.od_email.value;
|
||||
f.rcvr_zipx.value = f.od_b_zip.value;
|
||||
f.rcvr_add1.value = f.od_b_addr1.value;
|
||||
f.rcvr_add2.value = f.od_b_addr2.value;
|
||||
|
||||
if(f.pay_method.value != "무통장") {
|
||||
jsf__pay( f );
|
||||
} else {
|
||||
f.submit();
|
||||
}
|
||||
<?php } ?>
|
||||
<?php if($default['de_pg_service'] == 'lg') { ?>
|
||||
f.LGD_BUYER.value = f.od_name.value;
|
||||
f.LGD_BUYEREMAIL.value = f.od_email.value;
|
||||
f.LGD_BUYERPHONE.value = f.od_hp.value;
|
||||
f.LGD_AMOUNT.value = f.good_mny.value;
|
||||
f.LGD_RECEIVER.value = f.od_b_name.value;
|
||||
f.LGD_RECEIVERPHONE.value = f.od_b_hp.value;
|
||||
<?php if($default['de_escrow_use']) { ?>
|
||||
f.LGD_ESCROW_ZIPCODE.value = f.od_b_zip.value;
|
||||
f.LGD_ESCROW_ADDRESS1.value = f.od_b_addr1.value;
|
||||
f.LGD_ESCROW_ADDRESS2.value = f.od_b_addr2.value;
|
||||
f.LGD_ESCROW_BUYERPHONE.value = f.od_hp.value;
|
||||
<?php } ?>
|
||||
<?php if($default['de_tax_flag_use']) { ?>
|
||||
f.LGD_TAXFREEAMOUNT.value = f.comm_free_mny.value;
|
||||
<?php } ?>
|
||||
|
||||
if(f.LGD_CUSTOM_FIRSTPAY.value != "무통장") {
|
||||
launchCrossPlatform(f);
|
||||
} else {
|
||||
f.submit();
|
||||
}
|
||||
<?php } ?>
|
||||
<?php if($default['de_pg_service'] == 'inicis') { ?>
|
||||
f.price.value = f.good_mny.value;
|
||||
<?php if($default['de_tax_flag_use']) { ?>
|
||||
f.tax.value = f.comm_vat_mny.value;
|
||||
f.taxfree.value = f.comm_free_mny.value;
|
||||
<?php } ?>
|
||||
f.buyername.value = f.od_name.value;
|
||||
f.buyeremail.value = f.od_email.value;
|
||||
f.buyertel.value = f.od_hp.value ? f.od_hp.value : f.od_tel.value;
|
||||
f.recvname.value = f.od_b_name.value;
|
||||
f.recvtel.value = f.od_b_hp.value ? f.od_b_hp.value : f.od_b_tel.value;
|
||||
f.recvpostnum.value = f.od_b_zip.value;
|
||||
f.recvaddr.value = f.od_b_addr1.value + " " +f.od_b_addr2.value;
|
||||
|
||||
if(f.gopaymethod.value != "무통장") {
|
||||
// 주문정보 임시저장
|
||||
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;
|
||||
// pay_method 설정
|
||||
<?php if($default['de_pg_service'] == 'kcp') { ?>
|
||||
f.site_cd.value = f.def_site_cd.value;
|
||||
f.payco_direct.value = "";
|
||||
switch(settle_method)
|
||||
{
|
||||
case "계좌이체":
|
||||
f.pay_method.value = "010000000000";
|
||||
break;
|
||||
case "가상계좌":
|
||||
f.pay_method.value = "001000000000";
|
||||
break;
|
||||
case "휴대폰":
|
||||
f.pay_method.value = "000010000000";
|
||||
break;
|
||||
case "신용카드":
|
||||
f.pay_method.value = "100000000000";
|
||||
break;
|
||||
case "간편결제":
|
||||
<?php if($default['de_card_test']) { ?>
|
||||
f.site_cd.value = "S6729";
|
||||
<?php } ?>
|
||||
f.pay_method.value = "100000000000";
|
||||
f.payco_direct.value = "Y";
|
||||
break;
|
||||
default:
|
||||
f.pay_method.value = "무통장";
|
||||
break;
|
||||
}
|
||||
<?php } else if($default['de_pg_service'] == 'lg') { ?>
|
||||
f.LGD_EASYPAY_ONLY.value = "";
|
||||
if(typeof f.LGD_CUSTOM_USABLEPAY === "undefined") {
|
||||
var input = document.createElement("input");
|
||||
input.setAttribute("type", "hidden");
|
||||
input.setAttribute("name", "LGD_CUSTOM_USABLEPAY");
|
||||
input.setAttribute("value", "");
|
||||
f.LGD_EASYPAY_ONLY.parentNode.insertBefore(input, f.LGD_EASYPAY_ONLY);
|
||||
}
|
||||
|
||||
if(!make_signature(f))
|
||||
return false;
|
||||
switch(settle_method)
|
||||
{
|
||||
case "계좌이체":
|
||||
f.LGD_CUSTOM_FIRSTPAY.value = "SC0030";
|
||||
f.LGD_CUSTOM_USABLEPAY.value = "SC0030";
|
||||
break;
|
||||
case "가상계좌":
|
||||
f.LGD_CUSTOM_FIRSTPAY.value = "SC0040";
|
||||
f.LGD_CUSTOM_USABLEPAY.value = "SC0040";
|
||||
break;
|
||||
case "휴대폰":
|
||||
f.LGD_CUSTOM_FIRSTPAY.value = "SC0060";
|
||||
f.LGD_CUSTOM_USABLEPAY.value = "SC0060";
|
||||
break;
|
||||
case "신용카드":
|
||||
f.LGD_CUSTOM_FIRSTPAY.value = "SC0010";
|
||||
f.LGD_CUSTOM_USABLEPAY.value = "SC0010";
|
||||
break;
|
||||
case "간편결제":
|
||||
var elm = f.LGD_CUSTOM_USABLEPAY;
|
||||
if(elm.parentNode)
|
||||
elm.parentNode.removeChild(elm);
|
||||
f.LGD_EASYPAY_ONLY.value = "PAYNOW";
|
||||
break;
|
||||
default:
|
||||
f.LGD_CUSTOM_FIRSTPAY.value = "무통장";
|
||||
break;
|
||||
}
|
||||
<?php } else if($default['de_pg_service'] == 'inicis') { ?>
|
||||
switch(settle_method)
|
||||
{
|
||||
case "계좌이체":
|
||||
f.gopaymethod.value = "DirectBank";
|
||||
break;
|
||||
case "가상계좌":
|
||||
f.gopaymethod.value = "VBank";
|
||||
break;
|
||||
case "휴대폰":
|
||||
f.gopaymethod.value = "HPP";
|
||||
break;
|
||||
case "신용카드":
|
||||
f.gopaymethod.value = "Card";
|
||||
f.acceptmethod.value = f.acceptmethod.value.replace(":useescrow", "");
|
||||
break;
|
||||
case "간편결제":
|
||||
f.gopaymethod.value = "Kpay";
|
||||
break;
|
||||
case "lpay":
|
||||
f.gopaymethod.value = "onlylpay";
|
||||
f.acceptmethod.value = f.acceptmethod.value+":cardonly";
|
||||
break;
|
||||
default:
|
||||
f.gopaymethod.value = "무통장";
|
||||
break;
|
||||
}
|
||||
<?php } ?>
|
||||
|
||||
paybtn(f);
|
||||
} else {
|
||||
f.submit();
|
||||
// 결제정보설정
|
||||
<?php if($default['de_pg_service'] == 'kcp') { ?>
|
||||
f.buyr_name.value = f.od_name.value;
|
||||
f.buyr_mail.value = f.od_email.value;
|
||||
f.buyr_tel1.value = f.od_tel.value;
|
||||
f.buyr_tel2.value = f.od_hp.value;
|
||||
f.rcvr_name.value = f.od_b_name.value;
|
||||
f.rcvr_tel1.value = f.od_b_tel.value;
|
||||
f.rcvr_tel2.value = f.od_b_hp.value;
|
||||
f.rcvr_mail.value = f.od_email.value;
|
||||
f.rcvr_zipx.value = f.od_b_zip.value;
|
||||
f.rcvr_add1.value = f.od_b_addr1.value;
|
||||
f.rcvr_add2.value = f.od_b_addr2.value;
|
||||
|
||||
if(f.pay_method.value != "무통장") {
|
||||
jsf__pay( f );
|
||||
} else {
|
||||
f.submit();
|
||||
}
|
||||
<?php } ?>
|
||||
<?php if($default['de_pg_service'] == 'lg') { ?>
|
||||
f.LGD_BUYER.value = f.od_name.value;
|
||||
f.LGD_BUYEREMAIL.value = f.od_email.value;
|
||||
f.LGD_BUYERPHONE.value = f.od_hp.value;
|
||||
f.LGD_AMOUNT.value = f.good_mny.value;
|
||||
f.LGD_RECEIVER.value = f.od_b_name.value;
|
||||
f.LGD_RECEIVERPHONE.value = f.od_b_hp.value;
|
||||
<?php if($default['de_escrow_use']) { ?>
|
||||
f.LGD_ESCROW_ZIPCODE.value = f.od_b_zip.value;
|
||||
f.LGD_ESCROW_ADDRESS1.value = f.od_b_addr1.value;
|
||||
f.LGD_ESCROW_ADDRESS2.value = f.od_b_addr2.value;
|
||||
f.LGD_ESCROW_BUYERPHONE.value = f.od_hp.value;
|
||||
<?php } ?>
|
||||
<?php if($default['de_tax_flag_use']) { ?>
|
||||
f.LGD_TAXFREEAMOUNT.value = f.comm_free_mny.value;
|
||||
<?php } ?>
|
||||
|
||||
if(f.LGD_CUSTOM_FIRSTPAY.value != "무통장") {
|
||||
launchCrossPlatform(f);
|
||||
} else {
|
||||
f.submit();
|
||||
}
|
||||
<?php } ?>
|
||||
<?php if($default['de_pg_service'] == 'inicis') { ?>
|
||||
f.price.value = f.good_mny.value;
|
||||
<?php if($default['de_tax_flag_use']) { ?>
|
||||
f.tax.value = f.comm_vat_mny.value;
|
||||
f.taxfree.value = f.comm_free_mny.value;
|
||||
<?php } ?>
|
||||
f.buyername.value = f.od_name.value;
|
||||
f.buyeremail.value = f.od_email.value;
|
||||
f.buyertel.value = f.od_hp.value ? f.od_hp.value : f.od_tel.value;
|
||||
f.recvname.value = f.od_b_name.value;
|
||||
f.recvtel.value = f.od_b_hp.value ? f.od_b_hp.value : f.od_b_tel.value;
|
||||
f.recvpostnum.value = f.od_b_zip.value;
|
||||
f.recvaddr.value = f.od_b_addr1.value + " " +f.od_b_addr2.value;
|
||||
|
||||
if(f.gopaymethod.value != "무통장") {
|
||||
// 주문정보 임시저장
|
||||
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;
|
||||
|
||||
paybtn(f);
|
||||
} else {
|
||||
f.submit();
|
||||
}
|
||||
<?php } ?>
|
||||
}
|
||||
<?php } ?>
|
||||
|
||||
}
|
||||
|
||||
// 구매자 정보와 동일합니다.
|
||||
|
||||
@ -2,6 +2,11 @@
|
||||
include_once('./_common.php');
|
||||
include_once(G5_LIB_PATH.'/mailer.lib.php');
|
||||
|
||||
//이니시스 lpay 요청으로 왔다면 $default['de_pg_service'] 값을 이니시스로 변경합니다.
|
||||
if( $od_settle_case == 'lpay' ){
|
||||
$default['de_pg_service'] = 'inicis';
|
||||
}
|
||||
|
||||
if(($od_settle_case != '무통장' && $od_settle_case != 'KAKAOPAY') && $default['de_pg_service'] == 'lg' && !$_POST['LGD_PAYKEY'])
|
||||
alert('결제등록 요청 후 주문해 주십시오.');
|
||||
|
||||
@ -378,7 +383,7 @@ else if ($od_settle_case == "신용카드")
|
||||
if($od_misu == 0)
|
||||
$od_status = '입금';
|
||||
}
|
||||
else if ($od_settle_case == "간편결제")
|
||||
else if ($od_settle_case == "간편결제" || ($od_settle_case == "lpay" && $default['de_pg_service'] === 'inicis') )
|
||||
{
|
||||
switch($default['de_pg_service']) {
|
||||
case 'lg':
|
||||
|
||||
@ -273,7 +273,7 @@ if($od['od_pg'] == 'lg') {
|
||||
$app_no_subj = '';
|
||||
$disp_bank = true;
|
||||
$disp_receipt = false;
|
||||
if($od['od_settle_case'] == '신용카드' || $od['od_settle_case'] == 'KAKAOPAY') {
|
||||
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;
|
||||
@ -326,7 +326,7 @@ if($od['od_pg'] == 'lg') {
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">결제방식</th>
|
||||
<td><?php echo ($easy_pay_name ? $easy_pay_name.'('.$od['od_settle_case'].')' : $od['od_settle_case']); ?></td>
|
||||
<td><?php echo ($easy_pay_name ? $easy_pay_name.'('.$od['od_settle_case'].')' : check_pay_name_replace($od['od_settle_case']) ); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">결제금액</th>
|
||||
@ -394,7 +394,7 @@ if($od['od_pg'] == 'lg') {
|
||||
<?php
|
||||
}
|
||||
|
||||
if($od['od_settle_case'] == '신용카드')
|
||||
if($od['od_settle_case'] == '신용카드' || is_inicis_order_pay($od['od_settle_case']) )
|
||||
{
|
||||
if($od['od_pg'] == 'lg') {
|
||||
require_once G5_SHOP_PATH.'/settle_lg.inc.php';
|
||||
|
||||
@ -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}
|
||||
|
||||
@ -357,6 +357,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}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user