diff --git a/adm/admin.menu400.shop_1of2.php b/adm/admin.menu400.shop_1of2.php
index 7273e2b6a..16809e249 100644
--- a/adm/admin.menu400.shop_1of2.php
+++ b/adm/admin.menu400.shop_1of2.php
@@ -8,6 +8,7 @@ $menu['menu400'] = array (
array('400410', '주문개별내역', G4_ADMIN_URL.'/shop_admin/orderstatuslist.php', 'scf_order_by', 1),
array('400420', '주문통합내역', G4_ADMIN_URL.'/shop_admin/orderlist2.php', 'scf_order_all', 1),
array('400430', '취소교환반품내역', G4_ADMIN_URL.'/shop_admin/orderrequestlist.php', 'scf_request', 1),
+ array('400440', '개인결제관리', G4_ADMIN_URL.'/shop_admin/personalpaylist.php', 'scf_personalpay', 1),
array('400200', '분류관리', G4_ADMIN_URL.'/shop_admin/categorylist.php', 'scf_cate'),
array('400300', '상품관리', G4_ADMIN_URL.'/shop_admin/itemlist.php', 'scf_item'),
array('400660', '상품문의', G4_ADMIN_URL.'/shop_admin/itemqalist.php', 'scf_item_qna'),
diff --git a/adm/shop_admin/couponform.php b/adm/shop_admin/couponform.php
index bcb4b9e57..d268f3f7f 100644
--- a/adm/shop_admin/couponform.php
+++ b/adm/shop_admin/couponform.php
@@ -34,6 +34,11 @@ include_once (G4_ADMIN_PATH.'/admin.head.php');
@@ -959,6 +962,13 @@ $(function() {
else
$chk.attr("checked", false);
});
+
+ // 개인결제추가
+ $("#personalpay_add").on("click", function() {
+ var href = this.href;
+ window.open(href, "personalpaywin", "left=100, top=100, width=700, height=650, scrollbars=yes");
+ return false;
+ });
});
function form_submit(f)
diff --git a/adm/shop_admin/personalpaycopy.php b/adm/shop_admin/personalpaycopy.php
new file mode 100644
index 000000000..fed55e8bd
--- /dev/null
+++ b/adm/shop_admin/personalpaycopy.php
@@ -0,0 +1,63 @@
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/adm/shop_admin/personalpaycopyupdate.php b/adm/shop_admin/personalpaycopyupdate.php
new file mode 100644
index 000000000..66f79953d
--- /dev/null
+++ b/adm/shop_admin/personalpaycopyupdate.php
@@ -0,0 +1,54 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/adm/shop_admin/personalpayform.php b/adm/shop_admin/personalpayform.php
new file mode 100644
index 000000000..8c2c3dd7c
--- /dev/null
+++ b/adm/shop_admin/personalpayform.php
@@ -0,0 +1,154 @@
+ 0)
+ $pp['pp_amount'] = $od['misu'];
+}
+else
+ include_once (G4_ADMIN_PATH.'/admin.head.php');
+?>
+
+
+
+
+
\ No newline at end of file
diff --git a/adm/shop_admin/personalpayformupdate.php b/adm/shop_admin/personalpayformupdate.php
new file mode 100644
index 000000000..1f78b5c60
--- /dev/null
+++ b/adm/shop_admin/personalpayformupdate.php
@@ -0,0 +1,70 @@
+
\ No newline at end of file
diff --git a/adm/shop_admin/personalpaylist.php b/adm/shop_admin/personalpaylist.php
new file mode 100644
index 000000000..4b0b4d1f5
--- /dev/null
+++ b/adm/shop_admin/personalpaylist.php
@@ -0,0 +1,190 @@
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/adm/shop_admin/personalpaylistdelete.php b/adm/shop_admin/personalpaylistdelete.php
new file mode 100644
index 000000000..8bb5f7c61
--- /dev/null
+++ b/adm/shop_admin/personalpaylistdelete.php
@@ -0,0 +1,25 @@
+
\ No newline at end of file
diff --git a/extend/shop.extend2.php b/extend/shop.extend2.php
index d33f12600..a20a40d9b 100644
--- a/extend/shop.extend2.php
+++ b/extend/shop.extend2.php
@@ -416,6 +416,31 @@ if(!sql_query(" select it_mobile_name from {$g4['shop_item_table']} limit 1 ", f
ADD `it_mobile_name` VARCHAR(255) NOT NULL DEFAULT '' AFTER `it_name` ", true);
}
+// 개인결제 테이블추가
+if(!sql_query(" select pp_id from {$g4['shop_personalpay_table']} limit 1 ", false)) {
+ sql_query(" CREATE TABLE IF NOT EXISTS `{$g4['shop_personalpay_table']}` (
+ `pp_id` BIGINT(20) unsigned NOT NULL,
+ `od_id` BIGINT(20) unsigned NOT NULL,
+ `pp_name` VARCHAR(255) NOT NULL DEFAULT '',
+ `pp_content` TEXT NOT NULL,
+ `pp_use` TINYINT(4) NOT NULL DEFAULT '0',
+ `pp_amount` INT(11) NOT NULL DEFAULT '0',
+ `pp_tno` varchar(255) NOT NULL DEFAULT '',
+ `pp_app_no` varchar(20) NOT NULL DEFAULT '',
+ `pp_receipt_amount` INT(11) NOT NULL DEFAULT '0',
+ `pp_settle_case` VARCHAR(255) NOT NULL DEFAULT '',
+ `pp_bank_account` VARCHAR(255) NOT NULL DEFAULT '',
+ `pp_deposit_name` VARCHAR(255) NOT NULL DEFAULT '',
+ `pp_receipt_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `pp_receipt_ip` VARCHAR(255) NOT NULL DEFAULT '',
+ `pp_shop_memo` TEXT NOT NULL,
+ `pp_ip` VARCHAR(255) NOT NULL DEFAULT '',
+ `pp_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
+ PRIMARY KEY (`pp_id`),
+ KEY `od_id` (`od_id`)
+ )", true);
+}
+
// od_app_no 필드 추가
if(!sql_query(" select od_app_no from {$g4['shop_order_table']} limit 1 ", false)) {
sql_query(" ALTER TABLE `{$g4['shop_order_table']}`
diff --git a/install/install_db.php b/install/install_db.php
index b8970e064..ddcc6c30c 100644
--- a/install/install_db.php
+++ b/install/install_db.php
@@ -492,6 +492,7 @@ if($shop_install) {
fwrite($f, "\$g4['shop_coupon_table'] = SHOP_TABLE_PREFIX.'coupon'; // 쿠폰정보 테이블\n");
fwrite($f, "\$g4['shop_sendcost_table'] = SHOP_TABLE_PREFIX.'sendcost'; // 추가배송비 테이블\n");
fwrite($f, "\$g4['shop_request_table'] = SHOP_TABLE_PREFIX.'request'; // 주문 취소, 교환, 반품 요청테이블\n");
+ fwrite($f, "\$g4['shop_personalpay_table'] = SHOP_TABLE_PREFIX.'personalpay'; // 개인결제 정보 테이블\n");
fwrite($f, "?>");
}
diff --git a/install/shop.sql b/install/shop.sql
index 0d13708a5..370b7dda4 100644
--- a/install/shop.sql
+++ b/install/shop.sql
@@ -615,6 +615,35 @@ CREATE TABLE IF NOT EXISTS `shop_order` (
-- --------------------------------------------------------
+--
+-- Table structure for table `shop_personalpay`
+--
+
+DROP TABLE IF EXISTS `shop_personalpay`;
+CREATE TABLE IF NOT EXISTS `shop_personalpay` (
+ `pp_id` BIGINT(20) unsigned NOT NULL,
+ `od_id` BIGINT(20) unsigned NOT NULL,
+ `pp_name` VARCHAR(255) NOT NULL DEFAULT '',
+ `pp_content` TEXT NOT NULL,
+ `pp_use` TINYINT(4) NOT NULL DEFAULT '0',
+ `pp_amount` INT(11) NOT NULL DEFAULT '0',
+ `pp_tno` VARCHAR(255) NOT NULL DEFAULT '',
+ `pp_app_no` VARCHAR(20) NOT NULL DEFAULT '',
+ `pp_receipt_amount` INT(11) NOT NULL DEFAULT '0',
+ `pp_settle_case` VARCHAR(255) NOT NULL DEFAULT '',
+ `pp_bank_account` VARCHAR(255) NOT NULL DEFAULT '',
+ `pp_deposit_name` VARCHAR(255) NOT NULL DEFAULT '',
+ `pp_receipt_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
+ `pp_receipt_ip` VARCHAR(255) NOT NULL DEFAULT '',
+ `pp_shop_memo` TEXT NOT NULL,
+ `pp_ip` VARCHAR(255) NOT NULL DEFAULT '',
+ `pp_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
+ PRIMARY KEY (`pp_id`),
+ KEY `od_id` (`od_id`)
+) ENGINE=MyISAM DEFAULT CHARSET=utf8;
+
+-- --------------------------------------------------------
+
--
-- Table structure for table `shop_request`
--
diff --git a/mobile/shop/kcp/personalpay_approval_form.php b/mobile/shop/kcp/personalpay_approval_form.php
new file mode 100644
index 000000000..20b28b94a
--- /dev/null
+++ b/mobile/shop/kcp/personalpay_approval_form.php
@@ -0,0 +1,327 @@
+
+
+
+
+
+
+
+스마트폰 웹 결제창
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/mobile/shop/personalpay.php b/mobile/shop/personalpay.php
new file mode 100644
index 000000000..76f2d02fb
--- /dev/null
+++ b/mobile/shop/personalpay.php
@@ -0,0 +1,66 @@
+
+
+
+
+
+ personalpay.skin.php 파일을 찾을 수 없습니다.
관리자에게 알려주시면 감사하겠습니다.';
+ }
+
+ if ($i==0)
+ {
+ echo '
';
+ }
+ ?>
+
+
+
+
+
+
diff --git a/mobile/shop/personalpayform.php b/mobile/shop/personalpayform.php
new file mode 100644
index 000000000..91d884ad2
--- /dev/null
+++ b/mobile/shop/personalpayform.php
@@ -0,0 +1,375 @@
+ 0 ";
+$pp = sql_fetch($sql);
+
+if(!$pp['pp_id'])
+ alert('개인결제 정보가 존재하지 않습니다.');
+
+if($pp['pp_receipt_amount'] > 0)
+ alert('이미 결제하신 개인결제 내역입니다.');
+
+$g4['title'] = $pp['pp_name'].'님 개인결제';
+include_once(G4_MSHOP_PATH.'/_head.php');
+
+$action_url = G4_HTTPS_MSHOP_URL.'/personalpayformupdate.php';
+if (file_exists('./settle_'.$default['de_card_pg'].'.inc.php')) {
+ include './settle_'.$default['de_card_pg'].'.inc.php';
+}
+
+// 결제등록 요청시 사용할 입금마감일
+$ipgm_date = date("Ymd", (G4_SERVER_TIME + 86400 * 5));
+$tablet_size = "1.0"; // 화면 사이즈 조정 - 기기화면에 맞게 수정(갤럭시탭,아이패드 - 1.85, 스마트폰 - 1.0)
+
+// 개인결제 체크를 위한 hash
+$hash_data = md5($pp['pp_id'].$pp['pp_amount'].$pp['pp_time']);
+set_session('ss_personalpay_id', $pp['pp_id']);
+set_session('ss_personalpay_hash', $hash_data);
+?>
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 에스크로 안내
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/mobile/shop/personalpayformupdate.php b/mobile/shop/personalpayformupdate.php
new file mode 100644
index 000000000..ad00c426d
--- /dev/null
+++ b/mobile/shop/personalpayformupdate.php
@@ -0,0 +1,154 @@
+ 0)
+ alert('이미 결제하신 개인결제 내역입니다.');
+
+$hash_data = md5($_POST['pp_id'].$_POST['good_mny'].$pp['pp_time']);
+if($_POST['pp_id'] != get_session('ss_personalpay_id') || $hash_data != get_session('ss_personalpay_hash'))
+ die('개인결제 정보가 올바르지 않습니다.');
+
+if ($pp_settle_case == "계좌이체")
+{
+ include G4_MSHOP_PATH.'/kcp/pp_ax_hub.php';
+
+ $pp_tno = $tno;
+ $pp_receipt_amount = $amount;
+ $pp_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);
+ $pp_deposit_name = $pp_name;
+ $bank_name = iconv("cp949", "utf8", $bank_name);
+ $pp_bank_account = $bank_name;
+ $pg_amount = $amount;
+}
+else if ($pp_settle_case == "가상계좌")
+{
+ include G4_MSHOP_PATH.'/kcp/pp_ax_hub.php';
+
+ $pp_tno = $tno;
+ $pp_receipt_amount = 0;
+ $bankname = iconv("cp949", "utf8", $bankname);
+ $depositor = iconv("cp949", "utf8", $depositor);
+ $pp_bank_account = $bankname.' '.$account.' '.$depositor;
+ $pp_deposit_name = $depositor;
+ $pg_amount = $amount;
+}
+else if ($pp_settle_case == "휴대폰")
+{
+ include G4_MSHOP_PATH.'/kcp/pp_ax_hub.php';
+
+ $pp_tno = $tno;
+ $pp_receipt_amount = $amount;
+ $pp_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);
+ $pp_bank_account = $commid.' '.$mobile_no;
+ $pg_amount = $amount;
+}
+else if ($pp_settle_case == "신용카드")
+{
+ include G4_MSHOP_PATH.'/kcp/pp_ax_hub.php';
+
+ $pp_tno = $tno;
+ $pp_receipt_amount = $amount;
+ $pp_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);
+ $card_name = iconv("cp949", "utf8", $card_name);
+ $pp_bank_account = $card_name;
+ $pg_amount = $amount;
+}
+else
+{
+ die("od_settle_case Error!!!");
+}
+
+// 주문금액과 결제금액이 일치하는지 체크
+if((int)$pp['pp_amount'] !== (int)$pg_amount) {
+ $cancel_msg = '결제금액 불일치';
+ include G4_MSHOP_PATH.'/kcp/pp_ax_hub_cancel.php'; // 결제취소처리
+
+ die("Receipt Amount Error");
+}
+
+if ($is_member)
+ $od_pwd = $member['mb_password'];
+else
+ $od_pwd = sql_password($_POST['od_pwd']);
+
+// 결제정보 입력
+$sql = " update {$g4['shop_personalpay_table']}
+ set pp_tno = '$pp_tno',
+ pp_app_no = '$app_no',
+ pp_receipt_amount = '$pp_receipt_amount',
+ pp_settle_case = '$pp_settle_case',
+ pp_bank_account = '$pp_bank_account',
+ pp_deposit_name = '$pp_deposit_name',
+ pp_receipt_time = '$pp_receipt_time',
+ pp_receipt_ip = '{$_SERVER['REMOTE_ADDR']}'
+ where pp_id = '{$pp['pp_id']}' ";
+$result = sql_query($sql, false);
+
+// 결제정보 입력 오류시 kcp 결제 취소
+if(!$result) {
+ if($tno) {
+ $cancel_msg = '결제정보 입력 오류';
+ include G4_MSHOP_PATH.'/kcp/pp_ax_hub_cancel.php'; // 결제취소처리
+ }
+
+ die("$sql
" . mysql_errno() . " : " . mysql_error() . "
error file : {$_SERVER['PHP_SELF']}");
+}
+
+// 주문번호가 있으면 결제정보 반영
+if($pp_receipt_amount > 0 && $pp['pp_id'] && $pp['od_id']) {
+ $od_escrow = 0;
+ if($escw_yn == 'Y')
+ $od_escrow = 1;
+
+ $sql = " update {$g4['shop_order_table']}
+ set od_receipt_amount = od_receipt_amount + '$pp_receipt_amount',
+ od_receipt_time = '$pp_receipt_time',
+ od_tno = '$pp_tno',
+ od_app_no = '$app_no',
+ od_escrow = '$od_escrow',
+ od_settle_case = '$pp_settle_case',
+ od_deposit_name = '$pp_deposit_name',
+ od_bank_account = '$pp_bank_account',
+ od_shop_memo = concat(od_shop_memo, \"\\n개인결제 ".$pp['pp_id']." 로 결제완료 - ".$pp_receipt_time."\")
+ where od_id = '{$pp['od_id']}' ";
+ $result = sql_query($sql, false);
+
+ // 결제정보 입력 오류시 kcp 결제 취소
+ if(!$result) {
+ if($tno) {
+ $cancel_msg = '결제정보 입력 오류';
+ include G4_MSHOP_PATH.'/kcp/pp_ax_hub_cancel.php'; // 결제취소처리
+ }
+
+ die("
$sql
" . mysql_errno() . " : " . mysql_error() . "
error file : {$_SERVER['PHP_SELF']}");
+ }
+}
+
+// 개인결제번호제거
+set_session('ss_personalpay_id', '');
+set_session('ss_personalpay_hash', '');
+
+$uid = md5($pp['pp_id'].$pp['pp_time'].$_SERVER['REMOTE_ADDR']);
+set_session('ss_personalpay_uid', $uid);
+
+goto_url(G4_SHOP_URL.'/personalpayresult.php?pp_id='.$pp['pp_id'].'&uid='.$uid);
+?>
diff --git a/mobile/shop/personalpayresult.php b/mobile/shop/personalpayresult.php
new file mode 100644
index 000000000..3b02dd96e
--- /dev/null
+++ b/mobile/shop/personalpayresult.php
@@ -0,0 +1,195 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/mobile/shop/shop.head.php b/mobile/shop/shop.head.php
index 71a70e8c5..6936cb426 100644
--- a/mobile/shop/shop.head.php
+++ b/mobile/shop/shop.head.php
@@ -47,6 +47,7 @@ include_once(G4_LIB_PATH.'/popular.lib.php');
마이페이지
장바구니
+ 개인결제
커뮤니티
diff --git a/mobile/skin/shop/basic/personalpay.skin.php b/mobile/skin/shop/basic/personalpay.skin.php
new file mode 100644
index 000000000..133ef43dc
--- /dev/null
+++ b/mobile/skin/shop/basic/personalpay.skin.php
@@ -0,0 +1,38 @@
+
+
+
+
+
+= 2) { // 1줄 이미지 : 2개 이상
+ if ($i%$list_mod == 0) $sct_last = 'sct_last'; // 줄 마지막
+ else if ($i%$list_mod == 1) $sct_last = 'sct_clear'; // 줄 첫번째
+ else $sct_last = '';
+ } else { // 1줄 이미지 : 1개
+ $sct_last = 'sct_clear';
+ }
+
+ if ($i == 1) {
+ echo "\n";
+ }
+
+ $href = G4_SHOP_URL.'/personalpayform.php?pp_id='.$row['pp_id'].'&page='.$page;
+?>
+-
+
+ 개인결제 이미지
+
+
+
+
+ 1) echo "
\n";
+
+if($i == 1) echo "등록된 개인결제가 없습니다.
\n";
+?>
+
\ No newline at end of file
diff --git a/shop/orderformupdate.php b/shop/orderformupdate.php
index 1124ddc90..049b36e8e 100644
--- a/shop/orderformupdate.php
+++ b/shop/orderformupdate.php
@@ -326,7 +326,7 @@ else if ($od_settle_case == "가상계좌")
$bankname = iconv("cp949", "utf8", $bankname);
$depositor = iconv("cp949", "utf8", $depositor);
$od_bank_account = $bankname.' '.$account.' '.$depositor;
- $od_deposit_name = $od_name;
+ $od_deposit_name = $depositor;
$pg_amount = $amount;
}
else if ($od_settle_case == "휴대폰")
diff --git a/shop/personalpay.php b/shop/personalpay.php
new file mode 100644
index 000000000..359e699ad
--- /dev/null
+++ b/shop/personalpay.php
@@ -0,0 +1,72 @@
+
+
+
+
+
+ personalpay.skin.php 파일을 찾을 수 없습니다.
관리자에게 알려주시면 감사하겠습니다.';
+ }
+
+ if ($i==0)
+ {
+ echo '
';
+ }
+ ?>
+
+
+
+
+
+
diff --git a/shop/personalpayform.php b/shop/personalpayform.php
new file mode 100644
index 000000000..709c3ba55
--- /dev/null
+++ b/shop/personalpayform.php
@@ -0,0 +1,577 @@
+ 0 ";
+$pp = sql_fetch($sql);
+
+if(!$pp['pp_id'])
+ alert('개인결제 정보가 존재하지 않습니다.');
+
+if($pp['pp_receipt_amount'] > 0)
+ alert('이미 결제하신 개인결제 내역입니다.');
+
+$g4['title'] = $pp['pp_name'].'님 개인결제';
+include_once('./_head.php');
+
+$action_url = G4_HTTPS_SHOP_URL.'/personalpayformupdate.php';
+if (file_exists('./settle_'.$default['de_card_pg'].'.inc.php')) {
+ include './settle_'.$default['de_card_pg'].'.inc.php';
+}
+
+// 개인결제 체크를 위한 hash
+$hash_data = md5($pp['pp_id'].$pp['pp_amount'].$pp['pp_time']);
+set_session('ss_personalpay_id', $pp['pp_id']);
+set_session('ss_personalpay_hash', $hash_data);
+?>
+
+
+
+
+
+
+
+
+ 결제안내
+ 결제를 하시려면 상단의 노란색 표시줄을 클릭하시거나, [수동설치]를 눌러 Payplus Plug-in을 설치하시기 바랍니다.
+ [수동설치]를 눌러 설치하신 경우 새로고침(F5)키를 눌러 진행하시기 바랍니다.
+
+
+
+
+
+
+
+ 에스크로 안내
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/shop/personalpayformupdate.php b/shop/personalpayformupdate.php
new file mode 100644
index 000000000..793d9962b
--- /dev/null
+++ b/shop/personalpayformupdate.php
@@ -0,0 +1,172 @@
+ 0)
+ alert('이미 결제하신 개인결제 내역입니다.');
+
+$hash_data = md5($_POST['pp_id'].$_POST['good_mny'].$pp['pp_time']);
+if($_POST['pp_id'] != get_session('ss_personalpay_id') || $hash_data != get_session('ss_personalpay_hash'))
+ die('개인결제 정보가 올바르지 않습니다.');
+
+
+if ($pp_settle_case == "계좌이체")
+{
+ include G4_SHOP_PATH.'/kcp/pp_ax_hub.php';
+
+ $pp_tno = $tno;
+ $pp_receipt_amount = $amount;
+ $pp_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);
+ $pp_deposit_name = $pp_name;
+ $bank_name = iconv("cp949", "utf8", $bank_name);
+ $pp_bank_account = $bank_name;
+ $pg_amount = $amount;
+}
+else if ($pp_settle_case == "가상계좌")
+{
+ include G4_SHOP_PATH.'/kcp/pp_ax_hub.php';
+
+ $pp_tno = $tno;
+ $pp_receipt_amount = 0;
+ $bankname = iconv("cp949", "utf8", $bankname);
+ $depositor = iconv("cp949", "utf8", $depositor);
+ $pp_bank_account = $bankname.' '.$account.' '.$depositor;
+ $pp_deposit_name = $depositor;
+ $pg_amount = $amount;
+}
+else if ($pp_settle_case == "휴대폰")
+{
+ include G4_SHOP_PATH.'/kcp/pp_ax_hub.php';
+
+ $pp_tno = $tno;
+ $pp_receipt_amount = $amount;
+ $pp_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);
+ $pp_bank_account = $commid.' '.$mobile_no;
+ $pg_amount = $amount;
+}
+else if ($pp_settle_case == "신용카드")
+{
+ include G4_SHOP_PATH.'/kcp/pp_ax_hub.php';
+
+ $pp_tno = $tno;
+ $pp_receipt_amount = $amount;
+ $pp_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);
+ $card_name = iconv("cp949", "utf8", $card_name);
+ $pp_bank_account = $card_name;
+ $pg_amount = $amount;
+}
+else
+{
+ die("od_settle_case Error!!!");
+}
+
+// 주문금액과 결제금액이 일치하는지 체크
+if((int)$pp['pp_amount'] !== (int)$pg_amount) {
+ $cancel_msg = '결제금액 불일치';
+ include G4_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php'; // 결제취소처리
+
+ die("Receipt Amount Error");
+}
+
+// 결제정보 입력
+$sql = " update {$g4['shop_personalpay_table']}
+ set pp_tno = '$pp_tno',
+ pp_app_no = '$app_no',
+ pp_receipt_amount = '$pp_receipt_amount',
+ pp_settle_case = '$pp_settle_case',
+ pp_bank_account = '$pp_bank_account',
+ pp_deposit_name = '$pp_deposit_name',
+ pp_receipt_time = '$pp_receipt_time',
+ pp_receipt_ip = '{$_SERVER['REMOTE_ADDR']}'
+ where pp_id = '{$pp['pp_id']}' ";
+$result = sql_query($sql, false);
+
+// 결제정보 입력 오류시 kcp 결제 취소
+if(!$result) {
+ if($tno) {
+ $cancel_msg = '결제정보 입력 오류';
+ include G4_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php'; // 결제취소처리
+ }
+
+ die("$sql
" . mysql_errno() . " : " . mysql_error() . "
error file : {$_SERVER['PHP_SELF']}");
+}
+
+// 주문번호가 있으면 결제정보 반영
+if($pp_receipt_amount > 0 && $pp['pp_id'] && $pp['od_id']) {
+ $od_escrow = 0;
+ if($escw_yn == 'Y')
+ $od_escrow = 1;
+
+ $sql = " update {$g4['shop_order_table']}
+ set od_receipt_amount = od_receipt_amount + '$pp_receipt_amount',
+ od_receipt_time = '$pp_receipt_time',
+ od_tno = '$pp_tno',
+ od_app_no = '$app_no',
+ od_escrow = '$od_escrow',
+ od_settle_case = '$pp_settle_case',
+ od_deposit_name = '$pp_deposit_name',
+ od_bank_account = '$pp_bank_account',
+ od_shop_memo = concat(od_shop_memo, \"\\n개인결제 ".$pp['pp_id']." 로 결제완료 - ".$pp_receipt_time."\")
+ where od_id = '{$pp['od_id']}' ";
+ $result = sql_query($sql, false);
+
+ // 결제정보 입력 오류시 kcp 결제 취소
+ if(!$result) {
+ if($tno) {
+ $cancel_msg = '결제정보 입력 오류';
+ include G4_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php'; // 결제취소처리
+ }
+
+ die("
$sql
" . mysql_errno() . " : " . mysql_error() . "
error file : {$_SERVER['PHP_SELF']}");
+ }
+}
+
+// 개인결제번호제거
+set_session('ss_personalpay_id', '');
+set_session('ss_personalpay_hash', '');
+
+$uid = md5($pp['pp_id'].$pp['pp_time'].$_SERVER['REMOTE_ADDR']);
+set_session('ss_personalpay_uid', $uid);
+
+goto_url(G4_SHOP_URL.'/personalpayresult.php?pp_id='.$pp['pp_id'].'&uid='.$uid);
+?>
+
+
+
+ *** KCP [AX-HUB Version] ***
+
+
+
\ No newline at end of file
diff --git a/shop/personalpayresult.php b/shop/personalpayresult.php
new file mode 100644
index 000000000..7b8843b05
--- /dev/null
+++ b/shop/personalpayresult.php
@@ -0,0 +1,208 @@
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/shop/settle_kcp_common.php b/shop/settle_kcp_common.php
index 4eb4c0dde..76fa47d2c 100644
--- a/shop/settle_kcp_common.php
+++ b/shop/settle_kcp_common.php
@@ -141,13 +141,37 @@ if(!$default['de_card_test']) {
/* = -------------------------------------------------------------------------- = */
if ( $tx_cd == "TX00" )
{
- // 주문서 UPDATE
- $sql = " update {$g4['shop_order_table']}
- set od_receipt_amount = '$ipgm_mnyx',
- od_receipt_time = '$tx_tm'
- where od_id = '$order_no'
- and od_tno = '$tno' ";
- sql_query($sql, FALSE);
+ $sql = " select pp_id, od_id from {$g4['shop_personalpay_table']} where pp_id = '$order_no' and pp_tno = '$tno' ";
+ $row = sql_fetch($sql);
+
+ if($row['pp_id']) {
+ // 개인결제 UPDATE
+ $sql = " update {$g4['shop_personalpay_table']}
+ set pp_receipt_amount = '$ipgm_mnyx',
+ pp_receipt_time = '$tx_tm'
+ where pp_id = '$order_no'
+ and pp_tno = '$tno' ";
+ sql_query($sql, false);
+
+ if($row['od_id']) {
+ // 주문서 UPDATE
+ $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", $tx_tm);
+ $sql = " update {$g4['shop_order_table']}
+ set od_receipt_amount = od_receipt_amount + '$ipgm_mnyx',
+ od_receipt_time = '$tx_tm',
+ od_shop_memo = concat(od_shop_memo, \"\\n개인결제 ".$row['pp_id']." 로 결제완료 - ".$receipt_time."\")
+ where od_id = '{$row['od_id']}' ";
+ sql_query($sql, FALSE);
+ }
+ } else {
+ // 주문서 UPDATE
+ $sql = " update {$g4['shop_order_table']}
+ set od_receipt_amount = '$ipgm_mnyx',
+ od_receipt_time = '$tx_tm'
+ where od_id = '$order_no'
+ and od_tno = '$tno' ";
+ sql_query($sql, FALSE);
+ }
}
/* = -------------------------------------------------------------------------- = */
diff --git a/shop/shop.head.php b/shop/shop.head.php
index 7608da657..42bd53d9b 100644
--- a/shop/shop.head.php
+++ b/shop/shop.head.php
@@ -80,6 +80,7 @@ include_once(G4_LIB_PATH.'/popular.lib.php');
마이페이지
FAQ
+ 개인결제
사용후기
커뮤니티
diff --git a/skin/shop/basic/personalpay.skin.php b/skin/shop/basic/personalpay.skin.php
new file mode 100644
index 000000000..795393a7e
--- /dev/null
+++ b/skin/shop/basic/personalpay.skin.php
@@ -0,0 +1,36 @@
+
+
+
+
+= 2) { // 1줄 이미지 : 2개 이상
+ if ($i%$list_mod == 0) $sct_last = ' sct_last'; // 줄 마지막
+ else if ($i%$list_mod == 1) $sct_last = ' sct_clear'; // 줄 첫번째
+ else $sct_last = '';
+ } else { // 1줄 이미지 : 1개
+ $sct_last = ' sct_clear';
+ }
+
+ if ($i == 1) {
+ echo "\n";
+ }
+
+ $href = G4_SHOP_URL.'/personalpayform.php?pp_id='.$row['pp_id'].'&page='.$page;
+?>
+ -
+
+ 개인결제 이미지
+
+
+
+
+ 1) echo "
\n";
+
+if($i == 1) echo "등록된 개인결제가 없습니다.
\n";
+?>
\ No newline at end of file