Compare commits

...
50 Commits
Author SHA1 Message Date
thisgun 9a1067862a 버전 5.6.3 수정 2024-06-07 14:28:31 +09:00
thisgun 07f848e1c7 Merge branch 'master' of github.com:gnuboard/gnuboard5 2024-06-07 12:43:59 +09:00
thisgun 80846ac637 5.5버전 브랜치와 충돌수정 2024-06-07 12:43:34 +09:00
thisgun 62c0803cf5 초기화되지 않은 변수 수정 #325 2024-06-07 12:38:32 +09:00
thisgun 08df872863 HTMLPurifier_Filter_iframevideo 클래스명의 대소문자 불일치 수정#324 2024-06-07 12:31:17 +09:00
zipuragiandGitHub ca30e27b27 게시판에서 회원 아이디로 댓글 검색시 잘못된 결과가 나오는 문제 (#322) 2024-06-07 12:25:31 +09:00
thisgun 56615a5e9e 비회원인 상태에서 장바구니에서 주문하기 후 로그인하면 장바구니가 비어있는 문제 수정 2024-06-07 12:24:41 +09:00
총andGitHub 9c44d234ed Create SECURITY.md 2024-06-05 16:18:50 +09:00
thisgun e03e01d410 Open Redirect 취약점 수정 #318 2024-06-05 14:56:50 +09:00
thisgun 940e701fa4 관리자 회원관리에서 PHP WARNING 경고문이 나오는 코드 수정 #316 2024-06-05 10:09:24 +09:00
thisgun 031f8b4ef9 소셜로그인 타임아웃 설정타임 수정 #315 2024-06-04 17:59:31 +09:00
thisgun ed6b7f3326 글쓰기 임시저장과 쪽지쓰기 코드 수정 2024-06-04 17:38:33 +09:00
thisgun 0ded1df66d 삼품재고관리가 제대로 표시되지 않는 문제 수정 2024-06-04 11:27:16 +09:00
thisgun f4dfbacf03 글복사 sql query에 볋칭 as 추가 및 포인트 업데이트 코드 수정 2024-06-04 10:25:59 +09:00
thisgun 3fd8740c92 관리자 기본환경설정에서 불필요한 코드 제거 2024-06-03 18:16:59 +09:00
thisgun 68dc0bd4ec KG이니시스 MID SEED대칭키 수정 2024-06-03 18:16:17 +09:00
thisgun cc96048dfa NHN_KCP 결제정보 검증기능 추가 적용 2024-06-03 18:15:45 +09:00
thisgun 6697327265 쇼핑몰 주문 SMS 파일의 금액변수에 (int) 형 추가 2024-06-03 18:15:39 +09:00
thisgun a301d3e1f0 관리자 기본환경설정에서 불필요한 코드 제거 2024-06-03 12:39:48 +09:00
thisgun 2c0e05bbcc KG이니시스 MID SEED대칭키 수정 2024-05-31 19:23:42 +09:00
thisgun 92c1052cf5 NHN_KCP 결제정보 검증기능 추가 적용 2024-05-14 17:10:00 +09:00
thisgun c4763a64d8 쇼핑몰 주문 SMS 파일의 금액변수에 (int) 형 추가 2024-05-14 16:04:14 +09:00
kit rioandthisgun 02e0996eb4 kisa seed_cbc undefined 변수 수정
SEED_CBC_Decrypt 함수
return null 전에 초기화
2024-04-17 18:41:44 +09:00
thisgun 82648dcbfc 버전 5.6.2 수정 2024-04-17 18:29:23 +09:00
thisgun 61a0236938 버전 5.5.16 수정 2024-04-17 18:23:10 +09:00
thisgun 712172a0ea NHN_KCP 결제정보 검증기능 적용 2024-04-17 18:19:43 +09:00
thisgun d0eadcb12e 나이스페이 관리자 테스트결제 경고문 표시 및 모바일결제 스크립트 오류 수정 2024-04-17 15:45:36 +09:00
thisgun f38baea729 Merge branch 'master' of github.com:gnuboard/g5-update 2024-04-17 15:22:12 +09:00
thisgun 6048a8a1c5 NHN_KCP 결제정보 검증기능 적용 2024-04-17 15:21:55 +09:00
총andGitHub b84a6114f4 Merge pull request #12 from gnuboard/fix/cbc
seed_cbc undefined 변수 수정
2024-04-12 16:09:56 +09:00
kit rio b3ea5f19a8 kisa seed_cbc undefined 변수 수정
SEED_CBC_Decrypt 함수
return null 전에 초기화
2024-04-11 17:46:58 +09:00
thisgun b52a1f4da4 버전 5.6.1 수정 2024-04-11 12:32:58 +09:00
thisgun ce89cba2c7 버전 5.5.15 수정 2024-04-11 12:14:00 +09:00
thisgun c3634c05f7 KG이니시스 통합인증 암호화적용 여부 선택옵션 추가 2024-04-11 12:10:59 +09:00
thisgun 470d65d92a KG이니시스 통합인증 암호화적용 여부 선택옵션 추가 2024-04-11 11:55:55 +09:00
thisgun 2aff3cd491 버전 5.6 수정 2024-04-03 10:45:11 +09:00
thisgun 84669cb47f 나이스페이 결제수단 추가 2024-04-03 10:42:04 +09:00
thisgun baa114c471 버전 5.5.14 수정 2024-04-03 10:02:42 +09:00
thisgun 2bfd995e49 쇼핑몰 결제시 결세수단 체크 과정 추가 2024-04-03 09:59:02 +09:00
thisgun 1e72d7e81c DB 업그레이드시 기본설정,QA설정,로그인,방문자,쇼핑몰설정 테이블에 pk auto_increment 추가 2024-04-03 09:58:49 +09:00
thisgun 79b0066ec1 Merge branch 'master' of github.com:gnuboard/gnuboard5 2024-04-03 09:57:01 +09:00
kaglaandGitHub 47e243c0ad Fix/db (#311)
* QA설정테이블에 qa_id pkey auto_increment 추가

* 설정, 로그인, 방문자 테이블에 pkey, auto_increment 추가

* 쇼핑몰 설정테이블에 de_id pkey auto_increment 추가
2024-04-03 09:56:45 +09:00
thisgun bf6678e036 글쓰기 sql query 에 별칭 as 추가 #309 2024-04-03 09:44:37 +09:00
thisgun aba7d75de6 쇼핑몰 모바일 상품 리스트 페이지에서 불필요한 변수 제거 #308 2024-03-27 12:21:54 +09:00
thisgun 474fc8f9a9 관리자 xss 체크 alert이 너무 자주 발생하는 문제 #301 수정 2024-03-27 11:22:25 +09:00
thisgun a0eb804918 [KVE-2024-0023] 답변이 달린 상품문의글 수정가능 취약점 수정 2024-03-25 10:47:29 +09:00
thisgun 0d9c773d22 [KVE-2024-0022] 쇼핑몰 사용후기 별점 조작 취약점 수정 2024-03-25 10:03:07 +09:00
thisgun 6705d014f9 [KVE-2024-0021] Stored XSS 취약점 수정 2024-03-25 09:25:53 +09:00
thisgun 985546fbad G5_USE_SHOP 상수가 false 시 기본테마 로그인에 warning 경고문이 나오는 문제 수정 2024-02-19 18:07:18 +09:00
thisgun fa6aa881de 게시글 복사시 첨부파일 변수명값이 초기화가 안된 오류 수정 2024-02-19 12:49:17 +09:00
87 changed files with 2685 additions and 122 deletions
+3
View File
@@ -0,0 +1,3 @@
# Gnuboard5 Security Policy
Please ask [https://sir.kr/security/.](https://sir.kr/co_qa)
+1 -1
View File
@@ -554,7 +554,7 @@ function admin_check_xss_params($params)
if (is_array($value)) {
admin_check_xss_params($value);
} else if ((preg_match('/<\s?[^\>]*\/?\s?>/i', $value) && (preg_match('/script.*?\/script/ius', $value) || preg_match('/[onload|onerror]=.*/ius', $value))) || preg_match('/^(?=.*token\()(?=.*xmlhttprequest\()(?=.*send\().*$/im', $value) || (preg_match('/[onload|onerror|focus]=.*/ius', $value) && preg_match('/(eval|expression|exec|prompt)(\s*)\((.*)\)/ius', $value))) {
} else if ((preg_match('/<\s?[^\>]*\/?\s?>/i', $value) && (preg_match('/script.*?\/script/ius', $value) || preg_match('/(onload|onerror)=.*/ius', $value))) || preg_match('/^(?=.*token\()(?=.*xmlhttprequest\()(?=.*send\().*$/im', $value) || (preg_match('/(onload|onerror|focus)=.*/ius', $value) && preg_match('/(eval|expression|exec|prompt)(\s*)\((.*)\)/ius', $value))) {
alert('요청 쿼리에 잘못된 스크립트문장이 있습니다.\\nXSS 공격일수도 있습니다.', G5_URL);
die();
}
+15
View File
@@ -409,6 +409,11 @@ if (!isset($config['cf_cert_kg_mid'])) {
ADD COLUMN `cf_cert_kg_mid` VARCHAR(255) NOT NULL DEFAULT '' AFTER `cf_cert_kg_cd`; ";
sql_query($sql, false);
}
if (!isset($config['cf_cert_use_seed'])) {
$sql = "ALTER TABLE `{$g5['config_table']}`
ADD COLUMN `cf_cert_use_seed` TINYINT(4) NOT NULL DEFAULT '1' AFTER `cf_cert_kg_mid`; ";
sql_query($sql, false);
}
if (!$config['cf_faq_skin']) {
$config['cf_faq_skin'] = "basic";
}
@@ -1003,6 +1008,16 @@ if ($config['cf_sms_use'] && $config['cf_icode_id'] && $config['cf_icode_pw']) {
</select>
</td>
</tr>
<tr>
<th scope="row" class="cf_cert_service"><label for="cf_cert_use_seed">통합인증 암호화 적용</label></th>
<td class="cf_cert_service">
<?php echo help('KG이니시스 통합인증서비스에 암호화를 적용합니다. 만일 글자가 깨지는 문제가 발생하면 사용안함으로 적용해 주세요.') ?>
<select name="cf_cert_use_seed" id="cf_cert_use_seed">
<?php echo option_selected("0", $config['cf_cert_use_seed'], "사용안함"); ?>
<?php echo option_selected("1", $config['cf_cert_use_seed'], "사용함"); ?>
</select>
</td>
</tr>
<tr>
<th scope="row" class="cf_cert_service"><label for="cf_cert_hp">휴대폰 본인확인</label></th>
<td class="cf_cert_service">
+10 -9
View File
@@ -12,7 +12,6 @@ if ($is_admin != 'super') {
$cf_title = isset($_POST['cf_title']) ? strip_tags(clean_xss_attributes($_POST['cf_title'])) : '';
$cf_admin = isset($_POST['cf_admin']) ? clean_xss_tags($_POST['cf_admin'], 1, 1) : '';
$posts = array();
$mb = get_member($cf_admin);
@@ -28,11 +27,11 @@ $check_keys = array('cf_cert_kcb_cd', 'cf_cert_kcp_cd', 'cf_editor', 'cf_recaptc
foreach ($check_keys as $key) {
if (isset($_POST[$key]) && $_POST[$key]) {
$posts[$key] = $_POST[$key] = preg_replace('/[^a-z0-9_\-\.]/i', '', $_POST[$key]);
$_POST[$key] = preg_replace('/[^a-z0-9_\-\.]/i', '', $_POST[$key]);
}
}
$posts['cf_icode_server_port'] = $_POST['cf_icode_server_port'] = isset($_POST['cf_icode_server_port']) ? preg_replace('/[^0-9]/', '', $_POST['cf_icode_server_port']) : '7295';
$_POST['cf_icode_server_port'] = isset($_POST['cf_icode_server_port']) ? preg_replace('/[^0-9]/', '', $_POST['cf_icode_server_port']) : '7295';
if (isset($_POST['cf_intercept_ip']) && $_POST['cf_intercept_ip']) {
$pattern = explode("\n", trim($_POST['cf_intercept_ip']));
@@ -105,6 +104,7 @@ $check_keys = array(
'cf_cert_ipin' => 'char',
'cf_cert_hp' => 'char',
'cf_cert_simple' => 'char',
'cf_cert_use_seed' => 'int',
'cf_admin_email' => 'char',
'cf_admin_email_name' => 'char',
'cf_add_script' => 'text',
@@ -164,12 +164,12 @@ for ($i = 1; $i <= 10; $i++) {
foreach ($check_keys as $k => $v) {
if ($v === 'int') {
$posts[$key] = $_POST[$k] = isset($_POST[$k]) ? (int) $_POST[$k] : 0;
$_POST[$k] = isset($_POST[$k]) ? (int) $_POST[$k] : 0;
} else {
if (in_array($k, array('cf_analytics', 'cf_add_meta', 'cf_add_script', 'cf_stipulation', 'cf_privacy'))) {
$posts[$key] = $_POST[$k] = isset($_POST[$k]) ? $_POST[$k] : '';
$_POST[$k] = isset($_POST[$k]) ? $_POST[$k] : '';
} else {
$posts[$key] = $_POST[$k] = isset($_POST[$k]) ? strip_tags(clean_xss_attributes($_POST[$k])) : '';
$_POST[$k] = isset($_POST[$k]) ? strip_tags(clean_xss_attributes($_POST[$k])) : '';
}
}
}
@@ -180,9 +180,9 @@ if ($_POST['cf_cert_use'] && !$_POST['cf_cert_ipin'] && !$_POST['cf_cert_hp'] &&
}
if (!$_POST['cf_cert_use']) {
$posts[$key] = $_POST['cf_cert_ipin'] = '';
$posts[$key] = $_POST['cf_cert_hp'] = '';
$posts[$key] = $_POST['cf_cert_simple'] = '';
$_POST['cf_cert_ipin'] = '';
$_POST['cf_cert_hp'] = '';
$_POST['cf_cert_simple'] = '';
}
$sql = " update {$g5['config_table']}
@@ -284,6 +284,7 @@ $sql = " update {$g5['config_table']}
cf_cert_ipin = '{$_POST['cf_cert_ipin']}',
cf_cert_hp = '{$_POST['cf_cert_hp']}',
cf_cert_simple = '{$_POST['cf_cert_simple']}',
cf_cert_use_seed = '".(int)$_POST['cf_cert_use_seed']."',
cf_cert_kg_cd = '{$_POST['cf_cert_kg_cd']}',
cf_cert_kg_mid = '" . trim($_POST['cf_cert_kg_mid']) . "',
cf_cert_kcb_cd = '{$_POST['cf_cert_kcb_cd']}',
+2
View File
@@ -624,6 +624,7 @@ a.lg_btn{display:inline-block;margin:5px 0 0;padding:5px 10px;background:#ED008C
a.kg_btn{display:inline-block;margin:5px 0 0;padding:5px 10px;background:#4A2C7C;color:#fff;font-weight:normal;text-decoration:none}
a.kakao_btn{display:inline-block;margin:5px 0 0;padding:5px 10px;background:#FDDC2F;color:#3B1E1E;font-weight:normal;text-decoration:none}
a.naver_btn {display:inline-block;margin:5px 0 0;padding:5px 10px;background:#00C73C;color:#fff;font-weight:normal;text-decoration:none}
a.nicepay_btn{display:inline-block;margin:5px 0 0;padding:5px 10px;background:#0057bf;color:#fff;font-weight:normal;text-decoration:none}
.scf_cardtest {margin:5px 0 0}
.scf_cardtest_btn {margin-left:5px;vertical-align:middle}
@@ -666,6 +667,7 @@ ul.de_pg_tab li.tab-current a{background:#2CC185;color:#fff}
.inicis_info_fld th{background-color:#F6F1FF}
.kakao_info_fld th{background-color:#FFFCED}
.naver_info_fld th{background-color:#F3FFF3}
.nicepay_info_fld th{background-color:#d1e6ff}
/* 주문내역 */
#sodr_list td {text-align:center}
+51 -1
View File
@@ -205,6 +205,14 @@ if (defined('G5_USE_SHOP') && G5_USE_SHOP) {
break;
}
}
if (!isset($default['de_id'])) {
sql_query(" ALTER TABLE `{$g5['g5_shop_default_table']}`
ADD COLUMN `de_id` INT(11) NOT NULL AUTO_INCREMENT FIRST,
ADD PRIMARY KEY (`de_id`); ", true);
$is_check = true;
}
}
// auth.au_menu 컬럼 크기 조정
@@ -212,13 +220,55 @@ $sql = " SHOW COLUMNS FROM `{$g5['auth_table']}` LIKE 'au_menu' ";
$row = sql_fetch($sql);
if (
stripos($row['Type'], 'varchar') !== false
&& (int) preg_replace('/[^0-9]/', '', $row['Type']) <= 50
&& (int) preg_replace('/[^0-9]/', '', $row['Type']) < 50
) {
sql_query(" ALTER TABLE `{$g5['auth_table']}` CHANGE `au_menu` `au_menu` VARCHAR(50) NOT NULL; ", true);
$is_check = true;
}
// qa config 테이블 auto id key 추가
$row = sql_fetch("select * from `{$g5['qa_config_table']}` limit 1");
if (!isset($row['qa_id'])) {
sql_query(" ALTER TABLE `{$g5['qa_config_table']}` ADD COLUMN `qa_id` INT(11) NOT NULL AUTO_INCREMENT FIRST,
ADD PRIMARY KEY (`qa_id`); ", true);
$is_check = true;
}
// config 기본 테이블 auto id key 추가
if (!isset($config['cf_id'])) {
sql_query(" ALTER TABLE `{$g5['config_table']}`
ADD COLUMN `cf_id` INT(11) NOT NULL AUTO_INCREMENT FIRST,
ADD PRIMARY KEY (`cf_id`); ", true);
$is_check = true;
}
// login 테이블 auto id key 추가
$row = sql_fetch("select * from `{$g5['login_table']}` limit 1");
if (!isset($row['lo_id'])) {
sql_query(" ALTER TABLE `{$g5['login_table']}`
ADD COLUMN `lo_id` INT(11) NOT NULL AUTO_INCREMENT FIRST,
DROP PRIMARY KEY,
ADD PRIMARY KEY (`lo_id`),
ADD UNIQUE KEY `lo_ip_unique` (`lo_ip`) ", true);
$is_check = true;
}
// visit 테이블 auto id key 로 변경
$result = sql_query("describe `{$g5['visit_table']}`");
while ($row = sql_fetch_array($result)){
if (isset($row['Field']) && $row['Field'] === 'vi_id' && (isset($row['Default']) && $row['Default'] == 0)){
sql_query("ALTER TABLE `{$g5['visit_table']}`
CHANGE COLUMN `vi_id` `vi_id` INT(11) NOT NULL AUTO_INCREMENT;
", false);
$is_check = true;
}
}
$is_check = run_replace('admin_dbupgrade', $is_check);
$db_upgrade_msg = $is_check ? 'DB 업그레이드가 완료되었습니다.' : '더 이상 업그레이드 할 내용이 없습니다.<br>현재 DB 업그레이드가 완료된 상태입니다.';
+1 -1
View File
@@ -205,7 +205,7 @@ if (isset($mb_id) && $mb_id) {
if ($mb['mb_intercept_date']) {
$g5['title'] = "차단된 ";
} else {
$g5['title'] .= "";
$g5['title'] = "";
}
$g5['title'] .= '회원 ' . $html_title;
require_once './admin.head.php';
+3 -1
View File
@@ -12,6 +12,7 @@ require_once './admin.head.php';
if (!sql_query(" DESCRIBE `{$g5['qa_config_table']}` ", false)) {
sql_query(
" CREATE TABLE IF NOT EXISTS `{$g5['qa_config_table']}` (
`qa_id` int(11) NOT NULL auto_increment,
`qa_title` varchar(255) NOT NULL DEFAULT'',
`qa_category` varchar(255) NOT NULL DEFAULT'',
`qa_skin` varchar(255) NOT NULL DEFAULT '',
@@ -46,7 +47,8 @@ if (!sql_query(" DESCRIBE `{$g5['qa_config_table']}` ", false)) {
`qa_2` varchar(255) NOT NULL DEFAULT '',
`qa_3` varchar(255) NOT NULL DEFAULT '',
`qa_4` varchar(255) NOT NULL DEFAULT '',
`qa_5` varchar(255) NOT NULL DEFAULT ''
`qa_5` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`qa_id`)
)",
true
);
+17
View File
@@ -133,6 +133,8 @@ function pg_setting_check($is_print=false){
$pg_msg = 'LG유플러스';
} else if ( $default['de_pg_service'] === 'inicis' && $default['de_inicis_mid'] && $default['de_inicis_sign_key'] ){
$pg_msg = 'KG이니시스';
} else if ( $default['de_pg_service'] === 'nicepay' && $default['de_nicepay_mid'] && $default['de_nicepay_key'] ){
$pg_msg = 'NICEPAY';
}
}
@@ -156,6 +158,21 @@ function pg_setting_check($is_print=false){
}
}
function is_cancel_shop_pg_order($od){
$is_od_pg_cancel = false;
if (($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']))) {
$is_od_pg_cancel = true;
}
if ($od['od_pg'] === 'nicepay' && in_array($od['od_settle_case'], array('계좌이체', '휴대폰'))) {
$is_od_pg_cancel = true;
}
return $is_od_pg_cancel;
}
function check_order_inicis_tmps(){
global $g5, $config, $default, $member;
+52 -1
View File
@@ -207,6 +207,14 @@ if( ! isset($default['de_inicis_iniapi_key']) ){
sql_query($sql, false);
}
// NICEPAY mid, key 추가
if (! isset($default['de_nicepay_mid'])) {
$sql = "ALTER TABLE `{$g5['g5_shop_default_table']}`
ADD COLUMN `de_nicepay_mid` VARCHAR(20) NOT NULL DEFAULT '' AFTER `de_inicis_cartpoint_use`,
ADD COLUMN `de_nicepay_key` VARCHAR(150) NOT NULL DEFAULT '' AFTER `de_nicepay_mid`; ";
sql_query($sql, false);
}
if( function_exists('pg_setting_check') ){
pg_setting_check(true);
}
@@ -633,6 +641,12 @@ if(!$default['de_kakaopay_cancelpwd']){
<?php echo help("KG이니시스 가상계좌 사용시 다음 주소를 <strong><a href=\"https://iniweb.inicis.com/\" target=\"_blank\">KG이니시스 관리자</a> &gt; 거래내역 &gt; 가상계좌 &gt; 입금통보방식선택 &gt; URL 수신 설정</strong>에 넣으셔야 상점에 자동으로 입금 통보됩니다."); ?>
<?php echo G5_SHOP_URL; ?>/settle_inicis_common.php</td>
</tr>
<tr id="nicepay_vbank_url" class="pg_vbank_url">
<th scope="row">NICEPAY 가상계좌 입금통보 URL</th>
<td>
<?php echo help("NICEPAY 가상계좌 사용시 다음 주소를 <strong><a href=\"https://npg.nicepay.co.kr/\" target=\"_blank\">NICEPAY 관리자</a> &gt; 가맹점관리자페이지 설정 (메인화면 → 가맹점정보 클릭)</strong>에 넣으셔야 상점에 자동으로 입금 통보됩니다."); ?>
<?php echo G5_SHOP_URL; ?>/settle_nicepay_common.php</td>
</tr>
<tr>
<th scope="row"><label for="de_hp_use">휴대폰결제사용</label></th>
<td>
@@ -763,6 +777,7 @@ if(!$default['de_kakaopay_cancelpwd']){
<li class="<?php if($default['de_pg_service'] == 'kcp') echo 'tab-current'; ?>"><a href="#kcp_info_anchor" data-value="kcp" title="NHN KCP 선택하기" >NHN KCP</a></li>
<li class="<?php if($default['de_pg_service'] == 'lg') echo 'tab-current'; ?>"><a href="#lg_info_anchor" data-value="lg" title="토스페이먼츠 선택하기">토스페이먼츠</a></li>
<li class="<?php if($default['de_pg_service'] == 'inicis') echo 'tab-current'; ?>"><a href="#inicis_info_anchor" data-value="inicis" title="KG이니시스 선택하기">KG이니시스</a></li>
<li class="<?php if($default['de_pg_service'] == 'nicepay') echo 'tab-current'; ?>"><a href="#nicepay_info_anchor" data-value="nicepay" title="NICEPAY 선택하기">NICEPAY</a></li>
</ul>
</td>
</tr>
@@ -918,7 +933,7 @@ if(!$default['de_kakaopay_cancelpwd']){
</tr>
<tr class="kakao_info_fld">
<th scope="row">
<label for="de_kakaopay_enckey">카카오페이 사용</label>
<label for="de_kakaopay_enckey">KG이니시스<br>카카오페이 사용</label>
</th>
<td>
<?php echo help("체크시 카카오페이 (KG 이니시스)를 사용합니다. <br >KG 이니시스의 SIRK****** 아이디를 받은 상점만 해당됩니다.", 50); ?>
@@ -932,6 +947,38 @@ if(!$default['de_kakaopay_cancelpwd']){
<input type="text" name="de_kakaopay_hashkey" value="<?php echo get_sanitize_input($default['de_kakaopay_hashkey']); ?>" id="de_kakaopay_hashkey" class="frm_input" size="20">
</td>
</tr>
<tr class="pg_info_fld nicepay_info_fld" id="nicepay_info_anchor">
<th scope="row"><label for="de_nicepay_mid">NICEPAY MID</label><br><a href="http://sir.kr/main/service/inicis_pg.php" target="_blank" id="scf_nicepay_reg" class="nicepay_btn">NICEPAY 신청하기</a></th>
<td>
<span class="frm_info">NICEPAY로 부터 발급 받으신 상점MID를 SR 을 제외한 나머지 자리를 입력 합니다.<br>NICEPAY 상점관리자 > 가맹점정보 > KEY관리에서 확인 할수 있습니다.<br>만약, 상점아이디가 SR로 시작하지 않는다면 계약담당자에게 변경 요청을 해주시기 바랍니다. 예) SRpaytestm</span>
<span class="sitecode">SR</span>
<input type="text" name="de_nicepay_mid" value="<?php echo get_sanitize_input($default['de_nicepay_mid']); ?>" id="de_nicepay_mid" class="frm_input" size="12" maxlength="12">
영문소문자(숫자포함 가능)
</td>
</tr>
<tr class="pg_info_fld nicepay_info_fld">
<th scope="row"><label for="de_nicepay_key">NICEPAY KEY</label></th>
<td>
<input type="text" name="de_nicepay_key" value="<?php echo get_sanitize_input($default['de_nicepay_key']); ?>" id="de_nicepay_key" class="frm_input" size="100" maxlength="100">
</td>
</tr>
<tr class="pg_info_fld nicepay_info_fld">
<th scope="row"><label for="de_nicepay_easy_pays">NICEPAY 간편결제</label></th>
<td>
<?php echo help("체크시 NICEPAY 간편결제들을 활성화 합니다.\nNICEPAY > 간편결제는 테스트결제가 되지 않습니다. 실결제에만 정상작동 합니다.\n애플페이는 IOS 기기에 모바일결제만 가능합니다."); ?>
<input type="checkbox" id="de_easy_nicepay_samsungpay" name="de_easy_pays[]" value="nicepay_samsungpay" <?php if(stripos($default['de_easy_pay_services'], 'nicepay_samsungpay') !== false){ echo 'checked="checked"'; } ?> > <label for="de_easy_nicepay_samsungpay" disabled>삼성페이</label><br>
<input type="checkbox" id="de_easy_nicepay_naverpay" name="de_easy_pays[]" value="nicepay_naverpay" <?php if(stripos($default['de_easy_pay_services'], 'nicepay_naverpay') !== false){ echo 'checked="checked"'; } ?> > <label for="de_easy_nicepay_naverpay">NAVERPAY (네이버페이)</label><br>
<input type="checkbox" id="de_easy_nicepay_kakaopay" name="de_easy_pays[]" value="nicepay_kakaopay" <?php if(stripos($default['de_easy_pay_services'], 'nicepay_kakaopay') !== false){ echo 'checked="checked"'; } ?> > <label for="de_easy_nicepay_kakaopay">KAKAOPAY (카카오페이)</label><br>
<input type="checkbox" id="de_easy_nicepay_applepay" name="de_easy_pays[]" value="nicepay_applepay" <?php if(stripos($default['de_easy_pay_services'], 'nicepay_applepay') !== false){ echo 'checked="checked"'; } ?> > <label for="de_easy_nicepay_applepay">APPLEPAY (애플페이)</label><br>
<input type="checkbox" id="de_easy_nicepay_paycopay" name="de_easy_pays[]" value="nicepay_paycopay" <?php if(stripos($default['de_easy_pay_services'], 'nicepay_paycopay') !== false){ echo 'checked="checked"'; } ?> > <label for="de_easy_nicepay_paycopay">페이코</label><br>
<input type="checkbox" id="de_easy_nicepay_skpay" name="de_easy_pays[]" value="nicepay_skpay" <?php if(stripos($default['de_easy_pay_services'], 'nicepay_skpay') !== false){ echo 'checked="checked"'; } ?> > <label for="de_easy_nicepay_skpay">SK페이</label><br>
<input type="checkbox" id="de_easy_nicepay_ssgpay" name="de_easy_pays[]" value="nicepay_ssgpay" <?php if(stripos($default['de_easy_pay_services'], 'nicepay_ssgpay') !== false){ echo 'checked="checked"'; } ?> > <label for="de_easy_nicepay_ssgpay">SSG페이</label><br>
<input type="checkbox" id="de_easy_nicepay_lpay" name="de_easy_pays[]" value="nicepay_lpay" <?php if(stripos($default['de_easy_pay_services'], 'nicepay_lpay') !== false){ echo 'checked="checked"'; } ?> > <label for="de_easy_nicepay_lpay">LPAY</label>
</td>
</tr>
<?php if (defined('G5_SHOP_DIRECT_NAVERPAY') && G5_SHOP_DIRECT_NAVERPAY) { ?>
<tr class="naver_info_fld">
<th scope="row">
@@ -1728,6 +1775,10 @@ function fconfig_check(f)
if( f.de_inicis_mid.value && f.de_inicis_sign_key.value && parseInt(f.de_card_test.value) > 0 ){
pg_msg = "KG이니시스";
}
} else if ( f.de_pg_service.value == "nicepay" ) {
if( f.de_nicepay_mid.value && f.de_nicepay_key.value && parseInt(f.de_card_test.value) > 0 ){
pg_msg = "NICEPAY";
}
}
if( pg_msg ){
+4
View File
@@ -167,6 +167,8 @@ $check_sanitize_keys = array(
'de_inicis_lpay_use', //KG이니시스 Lpay 사용
'de_inicis_kakaopay_use', //KG이니시스 카카오페이 사용
'de_inicis_cartpoint_use', //KG이니시스 신용카드 포인트 결제
'de_nicepay_mid', //NICEPAY 상점아이디
'de_nicepay_key', //NICEPAY 상점키
'de_kakaopay_mid', //카카오페이 상점MID
'de_kakaopay_key', //카카오페이 상점키
'de_kakaopay_enckey', //카카오페이 상점 EncKey
@@ -377,6 +379,8 @@ $sql = " update {$g5['g5_shop_default_table']}
de_inicis_lpay_use = '{$de_inicis_lpay_use}',
de_inicis_kakaopay_use = '{$de_inicis_kakaopay_use}',
de_inicis_cartpoint_use = '{$de_inicis_cartpoint_use}',
de_nicepay_mid = '{$de_nicepay_mid}',
de_nicepay_key = '{$de_nicepay_key}',
de_card_noint_use = '{$de_card_noint_use}',
de_card_point = '{$de_card_point}',
de_settle_min_point = '{$de_settle_min_point}',
+2 -2
View File
@@ -285,8 +285,8 @@ if($supply_count) {
$value_array = array();
$count_ii_article = (isset($_POST['ii_article']) && is_array($_POST['ii_article'])) ? count($_POST['ii_article']) : 0;
for($i=0; $i<$count_ii_article; $i++) {
$key = isset($_POST['ii_article'][$i]) ? strip_tags($_POST['ii_article'][$i], '<br><span><strong><b>') : '';
$val = isset($_POST['ii_value'][$i]) ? strip_tags($_POST['ii_value'][$i], '<br><span><strong><b>') : '';
$key = isset($_POST['ii_article'][$i]) ? html_purifier($_POST['ii_article'][$i]) : '';
$val = isset($_POST['ii_value'][$i]) ? html_purifier($_POST['ii_value'][$i]) : '';
$value_array[$key] = $val;
}
$it_info_value = addslashes(serialize($value_array));
+2 -2
View File
@@ -35,7 +35,7 @@ $sql_common .= $sql_search;
// 테이블의 전체 레코드수만 얻음
$sql = " select count(*) as cnt " . $sql_common;
$row = sql_fetch($sql);
$total_count = $row['cnt'];
$total_count = isset($row['cnt']) ? $row['cnt'] : 0;
$rows = $config['cf_page_rows'];
$total_page = ceil($total_count / $rows); // 전체 페이지 계산
@@ -171,7 +171,7 @@ $listall = '<a href="'.$_SERVER['SCRIPT_NAME'].'" class="ov_listall">전체목
<?php echo $row['it_id']; ?>
</td>
<td class="td_left"><a href="<?php echo $href; ?>"><?php echo get_it_image($row['it_id'], 50, 50); ?> <?php echo cut_str(stripslashes($row['it_name']), 60, "&#133"); ?></a></td>
<td class="td_num<?php echo $it_stock_qty_st; ?>"><?php echo (int)$it_stock_qty; ?></td>
<td class="td_num<?php echo $it_stock_qty_st; ?>"><?php echo get_text($it_stock_qty); ?></td>
<td class="td_num"><?php echo number_format((float)$wait_qty); ?></td>
<td class="td_num"><?php echo number_format((float)$temporary_qty); ?></td>
<td class="td_num">
+24 -2
View File
@@ -107,6 +107,12 @@ if($od['od_pg'] == 'lg') {
}
}
$print_od_deposit_name = $od['od_deposit_name'];
// nicepay 로 주문하고 가상계좌인 경우
if ($od['od_pg'] === 'nicepay' && $od['od_settle_case'] === '가상계좌' && $od['od_deposit_name']){
$print_od_deposit_name .= '_NICE';
}
// add_javascript('js 구문', 출력순서); 숫자가 작을 수록 먼저 출력됨
add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
?>
@@ -408,7 +414,7 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
</tr>
<tr>
<th scope="row">입금자</th>
<td><?php echo get_text($od['od_deposit_name']); ?></td>
<td><?php echo get_text($print_od_deposit_name); ?></td>
</tr>
<tr>
<th scope="row">입금확인일시</th>
@@ -519,6 +525,10 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
$pg_url = 'https://mms.cnspay.co.kr';
$pg_test = 'KAKAOPAY';
break;
case 'nicepay':
$pg_url = 'https://npg.nicepay.co.kr/';
$pg_test = 'NICEPAY';
break;
default:
$pg_url = 'http://admin8.kcp.co.kr';
$pg_test = 'KCP';
@@ -623,6 +633,18 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
} else if($od['od_pg'] == 'inicis') {
$cash = unserialize($od['od_cash_info']);
$cash_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/Cash_mCmReceipt.jsp?noTid='.$cash['TID'].'&clpaymethod=22\',\'showreceipt\',\'width=380,height=540,scrollbars=no,resizable=no\');';
} else if($od['od_pg'] == 'nicepay') {
$od_tid = $od['od_tno'];
$cash_type = 0;
if (! $od_tid) {
$cash = unserialize($od['od_cash_info']);
$od_tid = isset($cash['TID']) ? $cash['TID'] : '';
$cash_type = $od_tid ? 1 : 0;
}
$cash_receipt_script = 'window.open(\'https://npg.nicepay.co.kr/issue/IssueLoader.do?type='.$cash_type.'&TID='.$od_tid.'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
} else {
require G5_SHOP_PATH.'/settle_kcp.inc.php';
@@ -1075,7 +1097,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' && is_inicis_order_pay($od['od_settle_case']) )) { ?>
<?php if (is_cancel_shop_pg_order($od)) { ?>
if(status == "취소" || status == "반품" || status == "품절") {
var $ct_chk = $("input[name^=ct_chk]");
var chk_cnt = $ct_chk.length;
+28 -2
View File
@@ -191,7 +191,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' && is_inicis_order_pay($od['od_settle_case']) )) {
if ($od['od_tno'] && is_cancel_shop_pg_order($od)) {
switch($od['od_pg']) {
case 'lg':
include_once(G5_SHOP_PATH.'/settle_lg.inc.php');
@@ -243,6 +243,32 @@ if (in_array($_POST['ct_status'], $status_cancel)) {
$pg_res_msg = 'curl 로 데이터를 받지 못했습니다.';
}
break;
case 'nicepay':
include_once(G5_SHOP_PATH.'/settle_nicepay.inc.php');
$cancel_msg = '쇼핑몰 운영자 승인 취소';
$tno = $od['od_tno'];
$cancelAmt = $od['od_receipt_price'];
// 0:전체 취소, 1:부분 취소(별도 계약 필요)
$partialCancelCode = 0;
include G5_SHOP_PATH.'/nicepay/cancel_process.php';
if (isset($result['ResultCode'])) {
// 실패했다면
if ($result['ResultCode'] !== '2001') {
$pg_res_cd = $result['ResultCode'];
$pg_res_msg = $result['ResultMsg'];
}
} else {
$pg_res_cd = '';
$pg_res_msg = 'curl 로 데이터를 받지 못하거나 통신에 실패했습니다.';
}
break;
case 'KAKAOPAY':
include_once(G5_SHOP_PATH.'/settle_kakaopay.inc.php');
@@ -296,7 +322,7 @@ if (in_array($_POST['ct_status'], $status_cancel)) {
// PG 취소요청 성공했으면
if($pg_res_cd == '') {
$pg_cancel_log = ' PG 신용카드 승인취소 처리';
$pg_cancel_log = ' PG '.$od['od_settle_case'].' 승인취소 처리';
$sql = " update {$g5['g5_shop_order_table']}
set od_refund_price = '{$od['od_receipt_price']}'
where od_id = '$od_id' ";
+2 -2
View File
@@ -4,8 +4,8 @@ include_once('./_common.php');
if (!$is_member) die('0');
$uid = isset($_REQUEST['uid']) ? preg_replace('/[^0-9]/', '', $_REQUEST['uid']) : 0;
$subject = isset($_REQUEST['subject']) ? trim($_REQUEST['subject']) : '';
$content = isset($_REQUEST['content']) ? trim($_REQUEST['content']) : '';
$subject = isset($_REQUEST['subject']) ? preg_replace("#[\\\]+$#", "", substr(trim($_POST['subject']),0,255)) : '';
$content = isset($_REQUEST['content']) ? preg_replace("#[\\\]+$#", "", substr(trim($_POST['content']),0,65536)) : '';
if ($subject && $content) {
$sql = " select count(*) as cnt from {$g5['autosave_table']} where mb_id = '{$member['mb_id']}' and as_subject = '$subject' and as_content = '$content' ";
+9 -1
View File
@@ -147,8 +147,16 @@ if(function_exists('set_cart_id')){
cart_item_clean();
set_cart_id('');
$s_cart_id = get_session('ss_cart_id');
$add_cart_where = '';
// 장바구니에서 주문하기를 하는 경우
if (strpos($link, 'orderform.php') !== false) {
$add_cart_where = " and ct_select_time < '".date('Y-m-d H:i:s', strtotime('-1 hour', G5_SERVER_TIME))."' ";
}
// 선택필드 초기화
$sql = " update {$g5['g5_shop_cart_table']} set ct_select = '0' where od_id = '$s_cart_id' ";
$sql = " update {$g5['g5_shop_cart_table']} set ct_select = '0' where od_id = '$s_cart_id' $add_cart_where ";
sql_query($sql);
}
+4
View File
@@ -31,6 +31,10 @@ if($url){
if( preg_match('#^/{3,}#', $url) ){
$url = preg_replace('#^/{3,}#', '/', $url);
}
if (function_exists('safe_filter_url_host')) {
$url = safe_filter_url_host($url);
}
}
$url = get_text($url);
+9 -5
View File
@@ -14,24 +14,28 @@ $str_nick_list = '';
$msg = '';
$error_list = array();
$member_list = array('id'=>array(), 'nick'=>array());
$me_memo = isset($_POST['me_memo']) ? preg_replace("#[\\\]+$#", "", substr(trim($_POST['me_memo']),0,65536)) : '';
run_event('memo_form_update_before', $recv_list);
for ($i=0; $i<count($recv_list); $i++) {
$row = sql_fetch(" select mb_id, mb_nick, mb_open, mb_leave_date, mb_intercept_date from {$g5['member_table']} where mb_id = '{$recv_list[$i]}' ");
$recv_list_id = substr(preg_replace("/[^a-zA-Z0-9_]*/", "", $recv_list[$i]), 0, 20);
$row = sql_fetch(" select mb_id, mb_nick, mb_open, mb_leave_date, mb_intercept_date from {$g5['member_table']} where mb_id = '{$recv_list_id}' ");
if ($row) {
if ($is_admin || ($row['mb_open'] && (!$row['mb_leave_date'] && !$row['mb_intercept_date']))) {
$member_list['id'][] = $row['mb_id'];
$member_list['nick'][] = $row['mb_nick'];
} else {
$error_list[] = $recv_list[$i];
$error_list[] = $recv_list_id;
}
}
/*
// 관리자가 아니면서
// 가입된 회원이 아니거나 정보공개를 하지 않았거나 탈퇴한 회원이거나 차단된 회원에게 쪽지를 보내는것은 에러
if ((!$row['mb_id'] || !$row['mb_open'] || $row['mb_leave_date'] || $row['mb_intercept_date']) && !$is_admin) {
$error_list[] = $recv_list[$i];
$error_list[] = $recv_list_id;
} else {
$member_list['id'][] = $row['mb_id'];
$member_list['nick'][] = $row['mb_nick'];
@@ -67,14 +71,14 @@ for ($i=0; $i<count($member_list['id']); $i++) {
$recv_mb_nick = get_text($member_list['nick'][$i]);
// 받는 회원 쪽지 INSERT
$sql = " insert into {$g5['memo_table']} ( me_recv_mb_id, me_send_mb_id, me_send_datetime, me_memo, me_read_datetime, me_type, me_send_ip ) values ( '$recv_mb_id', '{$member['mb_id']}', '".G5_TIME_YMDHIS."', '{$_POST['me_memo']}', '0000-00-00 00:00:00' , 'recv', '{$_SERVER['REMOTE_ADDR']}' ) ";
$sql = " insert into {$g5['memo_table']} ( me_recv_mb_id, me_send_mb_id, me_send_datetime, me_memo, me_read_datetime, me_type, me_send_ip ) values ( '$recv_mb_id', '{$member['mb_id']}', '".G5_TIME_YMDHIS."', '{$me_memo}', '0000-00-00 00:00:00' , 'recv', '{$_SERVER['REMOTE_ADDR']}' ) ";
sql_query($sql);
if( $me_id = sql_insert_id() ){
// 보내는 회원 쪽지 INSERT
$sql = " insert into {$g5['memo_table']} ( me_recv_mb_id, me_send_mb_id, me_send_datetime, me_memo, me_read_datetime, me_send_id, me_type , me_send_ip ) values ( '$recv_mb_id', '{$member['mb_id']}', '".G5_TIME_YMDHIS."', '{$_POST['me_memo']}', '0000-00-00 00:00:00', '$me_id', 'send', '{$_SERVER['REMOTE_ADDR']}' ) ";
$sql = " insert into {$g5['memo_table']} ( me_recv_mb_id, me_send_mb_id, me_send_datetime, me_memo, me_read_datetime, me_send_id, me_type , me_send_ip ) values ( '$recv_mb_id', '{$member['mb_id']}', '".G5_TIME_YMDHIS."', '{$me_memo}', '0000-00-00 00:00:00', '$me_id', 'send', '{$_SERVER['REMOTE_ADDR']}' ) ";
sql_query($sql);
$member_list['me_id'][$i] = $me_id;
+3 -1
View File
@@ -80,7 +80,7 @@ while ($row = sql_fetch_array($result))
}
$sql = " insert into $move_write_table
set wr_num = " . ($next_wr_num ? "'$next_wr_num'" : "(SELECT IFNULL(MIN(wr_num) - 1, -1) FROM $move_write_table sq) ") . ",
set wr_num = " . ($next_wr_num ? "'$next_wr_num'" : "(SELECT IFNULL(MIN(wr_num) - 1, -1) FROM $move_write_table as sq) ") . ",
wr_reply = '{$row2['wr_reply']}',
wr_is_comment = '{$row2['wr_is_comment']}',
wr_comment = '{$row2['wr_comment']}',
@@ -133,6 +133,8 @@ while ($row = sql_fetch_array($result))
$result3 = sql_query($sql3);
for ($k=0; $row3 = sql_fetch_array($result3); $k++)
{
$copy_file_name = '';
if ($row3['bf_file'])
{
// 원본파일을 복사하고 퍼미션을 변경
+1 -1
View File
@@ -3,7 +3,7 @@ include_once('./_common.php');
$po_id = isset($_POST['po_id']) ? preg_replace('/[^0-9]/', '', $_POST['po_id']) : 0;
$po = sql_fetch(" select * from {$g5['poll_table']} where po_id = '{$_POST['po_id']}' ");
$po = sql_fetch(" select * from {$g5['poll_table']} where po_id = '$po_id' ");
if (! (isset($po['po_id']) && $po['po_id']))
alert('po_id 값이 제대로 넘어오지 않았습니다.');
+1 -1
View File
@@ -259,7 +259,7 @@ if ($w == '' || $w == 'r') {
}
$sql = " insert into $write_table
set wr_num = " . ($w == 'r' ? "'$wr_num'" : "(SELECT IFNULL(MIN(wr_num) - 1, -1) FROM $write_table sq) ") . ",
set wr_num = " . ($w == 'r' ? "'$wr_num'" : "(SELECT IFNULL(MIN(wr_num) - 1, -1) FROM $write_table as sq) ") . ",
wr_reply = '$wr_reply',
wr_comment = 0,
ca_name = '$ca_name',
+5 -2
View File
@@ -806,12 +806,15 @@ box-shadow: 1px 2px 2px #eee;}
#sod_frm_paysel legend {position:absolute;font-size:0;line-height:0;overflow:hidden}
#sod_frm_paysel .KPAY{background:url('../img/kpay.png') no-repeat 50% 50% #fff;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .PAYNOW{background:url('../img/paynow.png') no-repeat 50% 50% #fff;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .PAYCO{background:url('../img/payco.png') no-repeat 50% 50% #fff;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .inicis_lpay{background:url('../img/lpay_logo.png') no-repeat 50% 50% #fff;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .PAYCO, #sod_frm_paysel .paycopay_icon{background:url('../img/payco.png') no-repeat 50% 50% #fff;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .inicis_lpay, #sod_frm_paysel .lpay_icon{background:url('../img/lpay_logo.png') no-repeat 50% 50% #fff;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .inicis_kakaopay{position:relative;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .inicis_kakaopay em{position:absolute;top:15px;left:45px;width:70px;height:30px;background:url('../img/kakao.png') no-repeat 50% 50% #ffeb00;overflow:hidden;text-indent:-999px;border-radius:30px}
#sod_frm_paysel .kakaopay_icon{background:url('../img/kakao.png') no-repeat 50% 50% #fff;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .naverpay_icon{background:url('../img/ico-default-naverpay.png') no-repeat 50% 50% #fff;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .samsungpay_icon{background:url('../img/samsungpay.png') no-repeat 50% 50% #fff;display:inline-block;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .ssgpay_icon{background:url('../img/ssgpay_icon.png') no-repeat 50% 50% #fff;display:inline-block;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .skpay_icon{background:url('../img/skpay11_icon.png') no-repeat 50% 50% #fff; background-size: 70px;display:inline-block;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .bank_icon{background:url('../img/pay_icon1.png') no-repeat 15px 50% #fff}
#sod_frm_paysel .vbank_icon{background:url('../img/pay_icon2.png') no-repeat 15px 50% #fff;padding-top:13px}
#sod_frm_paysel .iche_icon{background:url('../img/pay_icon2.png') no-repeat 15px 50% #fff;padding-top:13px}
+11 -5
View File
@@ -223,13 +223,15 @@ box-shadow: 0 0 6px rgba(0,0,0,0.2);}
#m_sod_frm_paysel li {float:left;padding:5px;width:46%;height:35px}
#m_sod_frm_paysel .KPAY{background:url('../img/kpay.png') no-repeat;width:37px;height:15px;overflow:hidden;text-indent:-999px;display:inline-block;background-size:100%}
#m_sod_frm_paysel .PAYNOW{background:url('../img/paynow.png') no-repeat;width:46px;height:15px;overflow:hidden;text-indent:-999px;display:inline-block;background-size:100%;}
#m_sod_frm_paysel .PAYCO{background:url('../img/payco.png') no-repeat 1px;width:50px;height:15px;overflow:hidden;text-indent:-999px;display:inline-block;background-size:100%}
#m_sod_frm_paysel .inicis_lpay{background:url('../img/lpay_logo.png') no-repeat;width:35px;height:12px;overflow:hidden;text-indent:-999px;display:inline-block;background-size:100%;}
#m_sod_frm_paysel .PAYCO, #m_sod_frm_paysel .paycopay_icon{background:url('../img/payco.png') no-repeat 1px;width:50px;height:15px;overflow:hidden;text-indent:-999px;display:inline-block;background-size:100%}
#m_sod_frm_paysel .inicis_lpay, #m_sod_frm_paysel .lpay_icon{background:url('../img/lpay_logo.png') no-repeat;width:35px;height:12px;overflow:hidden;text-indent:-999px;display:inline-block;background-size:100%;}
#m_sod_frm_paysel .inicis_kakaopay{background:url('../img/kakao.png') no-repeat 50% 50% #ffeb00;border-radius:30px;height:26px;width:74px;display:inline-block;overflow:hidden;text-indent:-999px;background-size:36px auto}
#m_sod_frm_paysel .kakaopay_icon{background:url('../img/ico-mobile-kakaopay.png') no-repeat #fff;height:23px;width:63px;display:inline-block;overflow:hidden;text-indent:-999px;background-size:45px auto;background-position: 10% 40%}
#m_sod_frm_paysel .naverpay_icon{background:url('../img/ico-mobile-naverpay.png') no-repeat #fff;height:23px;width:60px;display:inline-block;overflow:hidden;text-indent:-999px;background-size:45px auto;background-position: 0% 30%}
#m_sod_frm_paysel .applepay_icon{background:url('../img/ico-mobile-applepay.png') no-repeat #fff;height:30px;width:60px;display:inline-block;overflow:hidden;text-indent:-999px;background-size:43px auto}
#m_sod_frm_paysel .samsung_pay{margin-left:-23px;background:url('../img/samsungpay.png') no-repeat 24px 3px;height:25px;width:106px;display:inline-block;overflow:hidden;text-indent:-999px}
#m_sod_frm_paysel .ssgpay_icon{background:url('../img/ssgpay_icon.png') no-repeat 0px 3px #fff;width:55px;height:20px;background-size:100%;display:inline-block;overflow:hidden;text-indent:-999px}
#m_sod_frm_paysel .skpay_icon{background:url('../img/skpay11_icon.png') no-repeat 0px 3px #fff;width:55px;height:20px;background-size:100%;display:inline-block;overflow:hidden;text-indent:-999px}
#m_sod_frm_paysel .samsung_pay, #m_sod_frm_paysel .samsungpay_icon{margin-left:-23px;background:url('../img/samsungpay.png') no-repeat 24px 7px;height:25px;width:106px;display:inline-block;overflow:hidden;text-indent:-999px}
#sod_frm_pay{padding:10px;;border-top:1px solid #f3f3f3}
#sod_frm_pay h2{margin:10px 0;font-size:1.25em}
@@ -907,10 +909,14 @@ box-shadow:0 0 8px rgba(65,98,255,0.8)}
#sod_frm_paysel legend {position:absolute;font-size:0;line-height:0;overflow:hidden}
#sod_frm_paysel .KPAY{background:url('../img/kpay.png') no-repeat 50% 50% #fff;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .PAYNOW{background:url('../img/paynow.png') no-repeat 50% 50% #fff;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .PAYCO{background:url('../img/payco.png') no-repeat 50% 50% #fff;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .inicis_lpay{background:url('../img/lpay_logo.png') no-repeat 50% 50% #fff;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .PAYCO, #sod_frm_paysel .paycopay_icon{background:url('../img/payco.png') no-repeat 50% 50% #fff;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .inicis_lpay, #sod_frm_paysel .lpay_icon{background:url('../img/lpay_logo.png') no-repeat 50% 50% #fff;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .inicis_kakaopay{background:url('../img/kakao.png') no-repeat 50% 50% #f4dc34;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .kakaopay_icon{background:url('../img/kakao.png') no-repeat 50% 50% #f4dc34;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .naverpay_icon{background:url('../img/ico-default-naverpay.png') no-repeat 50% 50% #fff;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .samsungpay_icon{background:url('../img/samsungpay.png') no-repeat 50% 50% #fff;display:inline-block;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .ssgpay_icon{background:url('../img/ssgpay_icon.png') no-repeat 50% 50% #fff;display:inline-block;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .skpay_icon{background:url('../img/skpay11_icon.png') no-repeat 50% 50% #fff; background-size: 70px;display:inline-block;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .bank_icon{background:url('../img/pay_icon1.png') no-repeat 15px 50% #fff}
#sod_frm_paysel .vbank_icon{background:url('../img/pay_icon2.png') no-repeat 15px 50% #fff;padding-top:13px}
#sod_frm_paysel .iche_icon{background:url('../img/pay_icon2.png') no-repeat 15px 50% #fff;padding-top:13px}
+2
View File
@@ -1,6 +1,8 @@
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
define('KGINICIS_USE_CERT_SEED', isset($config['cf_cert_use_seed']) ? (int) $config['cf_cert_use_seed'] : 1);
// 유저 사이드뷰에서 아이콘 지정 안했을시 기본 no 프로필 이미지
define('G5_NO_PROFILE_IMG', '<span class="profile_img"><img src="'.G5_IMG_URL.'/no_profile.gif" alt="no_profile" width="'.$config['cf_member_icon_width'].'" height="'.$config['cf_member_icon_height'].'"></span>');
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

+11 -4
View File
@@ -189,6 +189,7 @@ CREATE TABLE IF NOT EXISTS `g5_board_new` (
DROP TABLE IF EXISTS `g5_config`;
CREATE TABLE IF NOT EXISTS `g5_config` (
`cf_id` int(11) NOT NULL auto_increment,
`cf_title` varchar(255) NOT NULL DEFAULT '',
`cf_theme` varchar(100) NOT NULL DEFAULT '',
`cf_admin` varchar(100) NOT NULL DEFAULT '',
@@ -291,6 +292,7 @@ CREATE TABLE IF NOT EXISTS `g5_config` (
`cf_cert_simple` varchar(255) NOT NULL DEFAULT '',
`cf_cert_kg_cd` varchar(255) NOT NULL DEFAULT '',
`cf_cert_kg_mid` varchar(255) NOT NULL DEFAULT '',
`cf_cert_use_seed` tinyint(4) NOT NULL DEFAULT '1',
`cf_cert_kcb_cd` varchar(255) NOT NULL DEFAULT '',
`cf_cert_kcp_cd` varchar(255) NOT NULL DEFAULT '',
`cf_lg_mid` varchar(100) NOT NULL DEFAULT '',
@@ -342,7 +344,8 @@ CREATE TABLE IF NOT EXISTS `g5_config` (
`cf_7` varchar(255) NOT NULL DEFAULT '',
`cf_8` varchar(255) NOT NULL DEFAULT '',
`cf_9` varchar(255) NOT NULL DEFAULT '',
`cf_10` varchar(255) NOT NULL DEFAULT ''
`cf_10` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`cf_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
@@ -445,12 +448,14 @@ CREATE TABLE IF NOT EXISTS `g5_group_member` (
DROP TABLE IF EXISTS `g5_login`;
CREATE TABLE IF NOT EXISTS `g5_login` (
`lo_id` int(11) NOT NULL AUTO_INCREMENT,
`lo_ip` varchar(100) NOT NULL default '',
`mb_id` varchar(20) NOT NULL default '',
`lo_datetime` datetime NOT NULL default '0000-00-00 00:00:00',
`lo_location` text NOT NULL,
`lo_url` text NOT NULL,
PRIMARY KEY (`lo_ip`)
PRIMARY KEY (`lo_id`),
UNIQUE KEY `lo_ip_unique` (`lo_ip`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
@@ -679,7 +684,7 @@ CREATE TABLE IF NOT EXISTS `g5_scrap` (
DROP TABLE IF EXISTS `g5_visit`;
CREATE TABLE IF NOT EXISTS `g5_visit` (
`vi_id` int(11) NOT NULL default '0',
`vi_id` int(11) NOT NULL AUTO_INCREMENT,
`vi_ip` varchar(100) NOT NULL default '',
`vi_date` date NOT NULL default '0000-00-00',
`vi_time` time NOT NULL default '00:00:00',
@@ -747,6 +752,7 @@ CREATE TABLE IF NOT EXISTS `g5_autosave` (
DROP TABLE IF EXISTS `g5_qa_config`;
CREATE TABLE IF NOT EXISTS `g5_qa_config` (
`qa_id` int(11) NOT NULL AUTO_INCREMENT,
`qa_title` varchar(255) NOT NULL DEFAULT'',
`qa_category` varchar(255) NOT NULL DEFAULT'',
`qa_skin` varchar(255) NOT NULL DEFAULT '',
@@ -782,7 +788,8 @@ CREATE TABLE IF NOT EXISTS `g5_qa_config` (
`qa_2` varchar(255) NOT NULL DEFAULT '',
`qa_3` varchar(255) NOT NULL DEFAULT '',
`qa_4` varchar(255) NOT NULL DEFAULT '',
`qa_5` varchar(255) NOT NULL DEFAULT ''
`qa_5` varchar(255) NOT NULL DEFAULT '',
PRIMARY KEY (`qa_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
+5 -1
View File
@@ -209,6 +209,7 @@ CREATE TABLE IF NOT EXISTS `g5_shop_coupon_zone` (
DROP TABLE IF EXISTS `g5_shop_default`;
CREATE TABLE IF NOT EXISTS `g5_shop_default` (
`de_id` int(11) NOT NULL auto_increment,
`de_admin_company_owner` varchar(255) NOT NULL DEFAULT '',
`de_admin_company_name` varchar(255) NOT NULL DEFAULT '',
`de_admin_company_saupja_no` varchar(255) NOT NULL DEFAULT '',
@@ -359,6 +360,8 @@ CREATE TABLE IF NOT EXISTS `g5_shop_default` (
`de_inicis_lpay_use` tinyint(4) NOT NULL DEFAULT '0',
`de_inicis_kakaopay_use` tinyint(4) NOT NULL DEFAULT '0',
`de_inicis_cartpoint_use` tinyint(4) NOT NULL DEFAULT '0',
`de_nicepay_mid` varchar(30) NOT NULL DEFAULT '',
`de_nicepay_key` varchar(255) NOT NULL DEFAULT '',
`de_item_use_use` tinyint(4) NOT NULL DEFAULT '0',
`de_item_use_write` tinyint(4) NOT NULL DEFAULT '0',
`de_code_dup_use` tinyint(4) NOT NULL DEFAULT '0',
@@ -386,7 +389,8 @@ CREATE TABLE IF NOT EXISTS `g5_shop_default` (
`de_member_reg_coupon_use` tinyint(4) NOT NULL DEFAULT '0',
`de_member_reg_coupon_term` int(11) NOT NULL DEFAULT '0',
`de_member_reg_coupon_price` int(11) NOT NULL DEFAULT '0',
`de_member_reg_coupon_minimum` int(11) NOT NULL DEFAULT '0'
`de_member_reg_coupon_minimum` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`de_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
+30 -2
View File
@@ -102,6 +102,10 @@ function goto_url($url)
{
run_event('goto_url', $url);
if (function_exists('safe_filter_url_host')) {
$url = safe_filter_url_host($url);
}
$url = str_replace("&amp;", "&", $url);
//echo "<script> location.replace('$url'); </script>";
@@ -182,6 +186,10 @@ function alert($msg='', $url='', $error=true, $post=false)
run_event('alert', $msg, $url, $error, $post);
if (function_exists('safe_filter_url_host')) {
$url = safe_filter_url_host($url);
}
$msg = $msg ? strip_tags($msg, '<br>') : '올바른 방법으로 이용해 주십시오.';
$header = '';
@@ -220,6 +228,12 @@ function confirm($msg, $url1='', $url2='', $url3='')
alert($msg);
}
if (function_exists('safe_filter_url_host')) {
$url1 = safe_filter_url_host($url1);
$url2 = safe_filter_url_host($url2);
$url3 = safe_filter_url_host($url3);
}
if(!trim($url1) || !trim($url2)) {
$msg = '$url1 과 $url2 를 지정해 주세요.';
alert($msg);
@@ -712,7 +726,7 @@ function get_sql_search($search_ca_name, $search_field, $search_text, $search_op
$tmp = explode(",", trim($search_field));
$field = explode("||", $tmp[0]);
$not_comment = "";
if (!empty($tmp[1]))
if (isset($tmp[1]))
$not_comment = $tmp[1];
$str .= "(";
@@ -768,8 +782,11 @@ function get_sql_search($search_ca_name, $search_field, $search_text, $search_op
$op1 = " $search_operator ";
}
$str .= " ) ";
if ($not_comment)
if ($not_comment === '1') {
$str .= " and wr_is_comment = '0' ";
} else if ($not_comment === '0') {
$str .= " and wr_is_comment = '1' ";
}
return $str;
}
@@ -1320,6 +1337,10 @@ function delete_point($mb_id, $rel_table, $rel_id, $rel_action)
and po_rel_action = '$rel_action' ";
$row = sql_fetch($sql);
if (! (isset($row['po_id']) && $row['po_id'])) {
return true;
}
if(isset($row['po_point']) && $row['po_point'] < 0) {
$mb_id = $row['mb_id'];
$po_point = abs($row['po_point']);
@@ -3594,6 +3615,13 @@ function login_password_check($mb, $pass, $hash)
return check_password($pass, $hash);
}
function safe_filter_url_host($url) {
$regex = run_replace('safe_filter_url_regex', '\\', $url);
return $regex ? preg_replace('#'. preg_quote($regex, '#') .'#iu', '', $url) : '';
}
// 동일한 host url 인지
function check_url_host($url, $msg='', $return_url=G5_URL, $is_redirect=false)
{
+2
View File
@@ -145,6 +145,8 @@ function get_content_by_field($write_table, $type='bbs', $where_field='', $where
{
global $g5, $g5_object;
static $cache = array();
$order_key = 'wr_id';
if( $type === 'content' ){
+51
View File
@@ -2487,6 +2487,15 @@ function shop_is_taxsave($od, $is_view_receipt=false){
return 0;
}
// 해당 주문에 현금영수증이 발급되었다면 마이페이지 주문
function is_order_cashreceipt($od) {
if ($od['od_cash'] && $od['od_cash_no'] && $od['od_cash_info'] && $od['od_receipt_price'] && in_array($od['od_settle_case'], array('무통장', '계좌이체', '가상계좌'))) {
return true;
}
return false;
}
// 장바구니 금액 체크 $is_price_update 가 true 이면 장바구니 가격 업데이트한다.
function before_check_cart_price($s_cart_id, $is_ct_select_condition=false, $is_price_update=false, $is_item_cache=false){
global $g5, $default, $config;
@@ -2642,6 +2651,15 @@ function make_order_field($data, $exclude)
return $field;
}
function shop_order_data_fields($is_personal=0) {
if ($is_personal){
return array('pp_name', 'pp_email', 'pp_hp', 'pp_settle_case');
}
return array('od_price', 'od_name', 'od_tel', 'od_hp', 'od_email', 'od_memo', 'od_settle_case', 'max_temp_point', 'od_temp_point', 'od_bank_account', 'od_deposit_name', 'od_test', 'od_ip', 'od_zip', 'od_addr1', 'od_addr2', 'od_addr3', 'od_addr_jibeon', 'od_b_name', 'od_b_tel', 'od_b_hp', 'od_b_addr1', 'od_b_addr2', 'od_b_addr3', 'od_b_addr_jibeon', 'od_b_zip', 'od_send_cost', 'od_send_cost2', 'od_hope_date');
}
// 주문요청기록 로그를 남깁니다.
function add_order_post_log($msg='', $code='error'){
global $g5, $member;
@@ -2752,6 +2770,39 @@ function get_item_images_info($it, $size=array(), $image_width, $image_height){
return $images;
}
function check_payment_method($od_settle_case) {
global $default;
$is_block = 0;
if ($od_settle_case === '무통장') {
if (! $default['de_bank_use']) {
$is_block = 1;
}
} else if ($od_settle_case === '계좌이체') {
if (! $default['de_iche_use']) {
$is_block = 1;
}
} else if ($od_settle_case === '가상계좌') {
if (! $default['de_vbank_use']) {
$is_block = 1;
}
} else if ($od_settle_case === '휴대폰') {
if (! $default['de_hp_use']) {
$is_block = 1;
}
} else if ($od_settle_case === '신용카드') {
if (! $default['de_card_use']) {
$is_block = 1;
}
}
if ($is_block) {
alert($od_settle_case.' 은 결제수단에서 사용이 금지되어 있습니다.', G5_SHOP_URL);
die('');
}
}
//결제방식 이름을 체크하여 치환 대상인 문자열은 따로 리턴합니다.
function check_pay_name_replace($payname, $od=array(), $is_client=0){
+18 -1
View File
@@ -9,7 +9,6 @@
/* = Copyright (c) 2010.05 KCP Inc. All Rights Reserved. = */
/* ============================================================================== */
/* ============================================================================== */
/* = 환경 설정 파일 Include = */
/* = -------------------------------------------------------------------------- = */
@@ -110,6 +109,24 @@
/* = -------------------------------------------------------------------------- = */
if ( $req_tx == "pay" )
{
/* 1004원은 실제로 업체에서 결제하셔야 될 원 금액을 넣어주셔야 합니다. 결제금액 유효성 검증 */
$c_PayPlus->mf_set_ordr_data( "ordr_mony", $good_mny );
$kcp_pay_type = ''; // 결제수단 검증 파라미터 pay_type (신용카드 : PACA, 계좌이체 : PABK, 가상계좌 : PAVC, 휴대폰 : PAMC)
if ($use_pay_method == "100000000000" && (in_array($od_settle_case, array('신용카드', '간편결제')))) { // 신용카드
$kcp_pay_type = 'PACA';
} else if ($use_pay_method == "010000000000" && $od_settle_case === '계좌이체') { // 계좌이체
$kcp_pay_type = 'PABK';
} else if ($use_pay_method == "001000000000" && $od_settle_case === '가상계좌') { // 가상계좌
$kcp_pay_type = 'PAVC';
} else if ($use_pay_method == "000010000000" && $od_settle_case === '휴대폰') { // 휴대폰
$kcp_pay_type = 'PAMC';
}
$c_PayPlus->mf_set_ordr_data( "pay_type", $kcp_pay_type );
$c_PayPlus->mf_set_ordr_data( "ordr_no", $ordr_idxx );
$post_enc_data = isset($_POST["enc_data"]) ? $_POST["enc_data"] : '';
$post_enc_info = isset($_POST["enc_info"]) ? $_POST["enc_info"] : '';
+1 -1
View File
@@ -168,7 +168,7 @@ var g5_shop_url = "<?php echo G5_SHOP_URL; ?>";
<?php
$qstr1 = '';
if($i > 0 && $total_count > $items) {
if($total_count > $items) {
$qstr1 .= 'ca_id='.$ca_id;
$qstr1 .='&sort='.$sort.'&sortodr='.$sortodr;
$ajax_url = G5_SHOP_URL.'/ajax.list.php?'.$qstr1.'&use_sns=1';
+6
View File
@@ -0,0 +1,6 @@
<?php
include_once('../../../common.php');
if (!defined('G5_USE_SHOP') || !G5_USE_SHOP)
die('<p>쇼핑몰 설치 후 이용해 주십시오.</p>');
define('_SHOP_', true);
+2
View File
@@ -0,0 +1,2 @@
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
+192
View File
@@ -0,0 +1,192 @@
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 나이스페이 공통 설정
require_once(G5_MSHOP_PATH.'/settle_nicepay.inc.php');
if (function_exists('add_log')) add_log($_POST);
/*
****************************************************************************************
* <Authentication Result Parameter>
****************************************************************************************
*/
$authResultCode = isset($_POST['AuthResultCode']) ? clean_xss_tags($_POST['AuthResultCode']) : ''; // authentication result code 0000:success
$authResultMsg = isset($_POST['AuthResultMsg']) ? clean_xss_tags($_POST['AuthResultMsg']) : ''; // authentication result message
$nextAppURL = isset($_POST['NextAppURL']) ? clean_xss_tags($_POST['NextAppURL']) : ''; // authorization request URL
$txTid = isset($_POST['TxTid']) ? clean_xss_tags($_POST['TxTid']) : ''; // transaction ID
$authToken = isset($_POST['AuthToken']) ? clean_xss_tags($_POST['AuthToken']) : ''; // authentication TOKEN
$payMethod = isset($_POST['PayMethod']) ? clean_xss_tags($_POST['PayMethod']) : ''; // payment method
$mid = isset($_POST['MID']) ? clean_xss_tags($_POST['MID']) : ''; // merchant id
$moid = isset($_POST['Moid']) ? clean_xss_tags($_POST['Moid']) : ''; // order number
$amt = isset($_POST['Amt']) ? (int) preg_replace('/[^0-9]/', '', $_POST['Amt']) : 0; // Amount of payment
$reqReserved = isset($_POST['ReqReserved']) ? clean_xss_tags($_POST['ReqReserved']) : ''; // mall custom field
$netCancelURL = isset($_POST['NetCancelURL']) ? clean_xss_tags($_POST['NetCancelURL']) : ''; // netCancelURL
if (isset($pp['pp_id']) && $pp['pp_id']) { //개인결제
$session_order_id = get_session('ss_personalpay_id');
$order_price = (int) $pp['pp_price'];
} else {
$session_order_id = get_session('ss_order_id'); // 쇼핑몰 일반결제
}
if ($session_order_id != $moid){
alert("요청한 주문번호가 틀려서 결제를 진행할수 없습니다.\\n다시 장바구니에서 시도해 주세요.", G5_SHOP_URL);
}
if ($default['de_nicepay_mid'] != $mid) {
alert("요청한 상점 mid와 설정된 mid가 틀리므로 결제를 진행할수 없습니다.", G5_SHOP_URL);
}
if ($order_price != $amt) {
alert("요청한 결제금액이 틀리므로 결제를 진행할수 없습니다.", G5_SHOP_URL);
}
// API CALL foreach example
if (! function_exists('jsonRespDump')) {
function jsonRespDump($resp){
$respArr = json_decode($resp);
foreach ( $respArr as $key => $value ){
echo "$key=". $value."<br />";
}
}
}
if (! function_exists('nicepay_res')) {
function nicepay_res($key, $data, $default_val='') {
$response_val = isset($data[$key]) ? $data[$key] : $default_val;
return ($response_val ? $response_val : $default_val);
}
}
/*
****************************************************************************************
* <authorization parameters init>
****************************************************************************************
*/
$response = "";
if($authResultCode === "0000"){
/*
****************************************************************************************
* <Hash encryption> (do not modify)
****************************************************************************************
*/
$ediDate = preg_replace('/[^0-9]/', '', G5_TIME_YMDHIS);
$merchantKey = $default['de_nicepay_key']; // 상점키
$signData = bin2hex(hash('sha256', $authToken . $mid . $amt . $ediDate . $merchantKey, true));
try{
$data = Array(
'TID' => $txTid,
'AuthToken' => $authToken,
'MID' => $mid,
'Amt' => $amt,
'EdiDate' => $ediDate,
'SignData' => $signData,
'CharSet' => 'utf-8'
);
/*
****************************************************************************************
* <authorization request>
* authorization through server to server communication.
****************************************************************************************
// 3001 : 신용카드 성공코드
// 4000 : 계좌이체 성공코드
// 4100 : 가상계좌 발급 성공코드
// A000 : 휴대폰 소액결제 성공코드
// 7001 : 현금영수증
// https://developers.nicepay.co.kr/manual-auth.php
*/
$response = nicepay_reqPost($data, $nextAppURL);
$respArr = json_decode($response, true);
$ResultCode = nicepay_res('ResultCode', $respArr);
$ResultMsg = nicepay_res('ResultMsg', $respArr);
$tno = nicepay_res('TID', $respArr);
$amount = (int) nicepay_res('Amt', $respArr, 0);
$app_time = nicepay_res('AuthDate', $respArr);
$pay_method = nicepay_res('PayMethod', $respArr);
$od_app_no = $app_no = nicepay_res('AuthCode', $respArr); // 승인 번호 (신용카드, 계좌이체, 휴대폰)
$pay_type = $NICEPAY_METHOD[$pay_method];
// 승인된 코드가 아니면 결제가 되지 않게 합니다.
if (! in_array($ResultCode, array('3001', '4000', '4100', 'A000', '7001'))) {
alert($ResultMsg.' 코드 : '.$ResultCode, G5_SHOP_URL);
die();
}
if ($ResultCode == '3001') { // 신용카드
$card_cd = nicepay_res('CardCode', $respArr); // 카드사 코드
$card_name = nicepay_res('CardName', $respArr); // 카드 종류
} else if ($ResultCode == '4100') { // 가상계좌
$bank_name = $bankname = nicepay_res('VbankBankName', $respArr);
$account = nicepay_res('VbankNum', $respArr);
$va_date = nicepay_res('VbankExpDate', $respArr).' '.nicepay_res('VbankExpTime', $respArr); // 가상계좌 입금마감시간
$app_no = nicepay_res('VbankNum', $respArr);
if ($default['de_escrow_use'] == 1)
$escw_yn = 'Y';
} else if ($ResultCode == '4000') { // 계좌이체
$bank_name = $bankname = nicepay_res('BankName', $respArr);
$bank_code = nicepay_res('BankCode', $respArr);
$RcptType = nicepay_res('RcptType', $respArr); // 현금영수증타입 (0:발행안함,1:소득공제,2:지출증빙)
$RcptTID = nicepay_res('RcptTID', $respArr); // 현금영수증 TID, 현금영수증 거래인 경우 리턴
$RcptAuthCode = nicepay_res('RcptAuthCode', $respArr); // 현금영수증 승인번호, 현금영수증 거래인 경우 리턴
$AuthDate = nicepay_res('AuthDate', $respArr); // 현금영수증 승인번호, 현금영수증 거래인 경우 리턴
// 현금영수증 발급시 1 또는 2 이면
if ($RcptType) {
$pg_receipt_infos['od_cash'] = 1; // 현금영수증 발급인것으로 처리
$pg_receipt_infos['od_cash_no'] = $RcptAuthCode; // 현금영수증 승인번호
$pg_receipt_infos['od_cash_info'] = serialize(array('TID'=>$RcptTID, 'ApplNum'=>$RcptAuthCode, 'AuthDate'=>$AuthDate));
}
if ($default['de_escrow_use'] == 1)
$escw_yn = 'Y';
}
$depositor = ''; // 입금할 계좌 예금주 (나이스페이 경우 가상계좌의 예금주명을 리턴받지 못합니다. )
$account = nicepay_res('VbankNum', $respArr);
$commid = ''; // 통신사 코드
$mobile_no = ''; // 휴대폰결제시 휴대폰번호 (나이스페이 경우 결제한 휴대폰번호를 리턴받지 못합니다.)
$card_name = nicepay_res('CardName', $respArr);
} catch(Exception $e) {
$e->getMessage();
$data = Array(
'TID' => $txTid,
'AuthToken' => $authToken,
'MID' => $mid,
'Amt' => $amt,
'EdiDate' => $ediDate,
'SignData' => $signData,
'NetCancel' => '1',
'CharSet' => 'utf-8'
);
/*
*************************************************************************************
* <NET CANCEL>
* If an exception occurs during communication, cancelation is recommended
*************************************************************************************
*/
$response = nicepay_reqPost($data, $netCancelURL);
// jsonRespDump($response);
alert("결제 오류로 더 이상 진행할수 없습니다.");
}
} else {
//When authentication fail
$ResultCode = $authResultCode;
$ResultMsg = $authResultMsg;
alert($ResultMsg.' 실패 코드 : '.$ResultCode);
}
+140
View File
@@ -0,0 +1,140 @@
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<!-- PC payment window only (not required for mobile payment window)-->
<script src="https://web.nicepay.co.kr/v3/webstd/js/nicepay-3.0.js" type="text/javascript"></script>
<script type="text/javascript">
//It is executed when call payment window.
function nicepayStart(f){
if(checkPlatform(window.navigator.userAgent) == "mobile"){
document.sm_form.action = "https://web.nicepay.co.kr/v3/v3Payment.jsp";
document.sm_form.acceptCharset="euc-kr";
document.sm_form.submit();
}else{
goPay(document.sm_form);
}
}
//[PC Only]When pc payment window is closed, nicepay-3.0.js call back nicepaySubmit() function <<'nicepaySubmit()' DO NOT CHANGE>>
function nicepaySubmit(){
document.sm_form.submit();
}
//[PC Only]payment window close function <<'nicepayClose()' DO NOT CHANGE>>
function nicepayClose(){
alert("payment window is closed");
}
//pc, mobile chack script (sample code)
function checkPlatform(ua) {
if(ua === undefined) {
ua = window.navigator.userAgent;
}
ua = ua.toLowerCase();
var platform = {};
var matched = {};
var userPlatform = "pc";
var platform_match = /(ipad)/.exec(ua) || /(ipod)/.exec(ua)
|| /(windows phone)/.exec(ua) || /(iphone)/.exec(ua)
|| /(kindle)/.exec(ua) || /(silk)/.exec(ua) || /(android)/.exec(ua)
|| /(win)/.exec(ua) || /(mac)/.exec(ua) || /(linux)/.exec(ua)
|| /(cros)/.exec(ua) || /(playbook)/.exec(ua)
|| /(bb)/.exec(ua) || /(blackberry)/.exec(ua)
|| [];
matched.platform = platform_match[0] || "";
if(matched.platform) {
platform[matched.platform] = true;
}
if(platform.android || platform.bb || platform.blackberry
|| platform.ipad || platform.iphone
|| platform.ipod || platform.kindle
|| platform.playbook || platform.silk
|| platform["windows phone"]) {
userPlatform = "mobile";
}
if(platform.cros || platform.mac || platform.linux || platform.win) {
userPlatform = "pc";
}
return userPlatform;
}
function nicepay_create_signdata(frm)
{
// 데이터 암호화 처리
var result = true;
$.ajax({
url: g5_url+"/shop/nicepay/createsigndata.php",
type: "POST",
data: {
price : frm.good_mny.value
},
dataType: "json",
async: false,
cache: false,
success: function(data) {
if(data.error == "") {
frm.EdiDate.value = data.ediDate;
frm.SignData.value = data.SignData;
} else {
alert(data.error);
result = false;
}
}
});
return result;
}
</script>
<form name="sm_form" method="post" action="" accept-charset="euc-kr">
<input type="hidden" name="PayMethod" value="CARD">
<input type="hidden" name="GoodsName" value="<?php echo get_text($goods); ?>">
<input type="hidden" name="Amt" value="<?php echo $tot_price; ?>">
<input type="hidden" name="MID" value="<?php echo $default['de_nicepay_mid']; ?>">
<input type="hidden" name="Moid" value="<?php echo $od_id; ?>">
<input type="hidden" name="BuyerName" value="">
<input type="hidden" name="BuyerEmail" value="">
<input type="hidden" name="BuyerTel" value="">
<input type="hidden" name="ReturnURL" value="<?php echo $nicepay_returnURL; ?>">
<input type="hidden" name="VbankExpDate" value="">
<input type="hidden" name="NpLang" value="KO"> <!-- EN:English, CN:Chinese, KO:Korean -->
<input type="hidden" name="GoodsCl" value="1"> <!-- products(1), contents(0)) -->
<input type="hidden" name="TransType" value="<?php echo $default['de_escrow_use'] ? '1' : '0';?>"> <!-- USE escrow false(0)/true(1) -->
<input type="hidden" name="CharSet" value="utf-8"> <!-- Return CharSet -->
<input type="hidden" name="ReqReserved" value=""> <!-- mall custom field -->
<input type="hidden" name="EdiDate" value=""> <!-- YYYYMMDDHHMISS -->
<input type="hidden" name="SignData" value=""> <!-- EncryptData -->
<input type="hidden" name="DirectShowOpt" value="">
<input type="hidden" name="SelectCardCode" value=""> <!-- 카드사 노출 제한, 카드코드 값(ex 비씨:01, 삼성:04) -->
<input type="hidden" name="NicepayReserved" value=""> <!-- 간편결제 (카카오페이에 사용됨) -->
<input type="hidden" name="DirectEasyPay"> <!-- 간편결제 요청 값 (네이버페이에 사용됨) -->
<input type="hidden" name="EasyPayMethod"> <!-- 간편결제 (네이버페이에 사용됨) -->
<input type="hidden" name="EasyPayCardCode"> <!-- 간편결제 카드 코드 -->
<input type="hidden" name="EasyPayQuota"> <!-- 간편결제 할부개월 (3개월일 경우 03 으로 설정) -->
<input type="hidden" name="MultiEasyPayQuota"> <!-- 간편결제 할부개월 다중 설정 옵션 PAYCO와 네이버페이만 가능 -->
<input type="hidden" name="good_mny" value="<?php echo $tot_price; ?>" >
<?php if ($default['de_tax_flag_use']) { ?>
<!-- 필드명:SupplyAmt / 사이즈:12 / 설명:공급가 액 -->
<input type="hidden" name="SupplyAmt" value="<?php echo $comm_tax_mny; ?>"> <!-- 과세금액 -->
<!-- 필드명:GoodsVat / 사이즈:12 / 설명:부가가 치세 -->
<input type="hidden" name="GoodsVat" value="<?php echo $comm_vat_mny; ?>"> <!-- 부가세 -->
<!-- 필드명:ServiceAmt / 사이즈:12 / 설명:봉사료 -->
<input type="hidden" name="ServiceAmt" value="0">
<!-- 필드명:TaxFreeAmt / 사이즈:12 / 설명:면세 금액 -->
<input type="hidden" name="TaxFreeAmt" value="<?php echo $comm_free_mny; ?>">
<input type="hidden" name="comm_tax_mny" value="<?php echo $comm_tax_mny; ?>"> <!-- 과세금액 -->
<input type="hidden" name="comm_vat_mny" value="<?php echo $comm_vat_mny; ?>"> <!-- 부가세 -->
<input type="hidden" name="comm_free_mny" value="<?php echo $comm_free_mny; ?>"> <!-- 비과세 금액 -->
<?php } ?>
</form>
+17
View File
@@ -0,0 +1,17 @@
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<input type="hidden" name="good_mny" value="<?php echo $tot_price ?>" >
<?php if($default['de_tax_flag_use']) { ?>
<input type="hidden" name="comm_tax_mny" value="<?php echo $comm_tax_mny; ?>"> <!-- 과세금액 -->
<input type="hidden" name="comm_vat_mny" value="<?php echo $comm_vat_mny; ?>"> <!-- 부가세 -->
<input type="hidden" name="comm_free_mny" value="<?php echo $comm_free_mny; ?>"> <!-- 비과세 금액 -->
<?php } ?>
<div id="display_pay_button" class="btn_confirm">
<span id="show_req_btn"><input type="button" name="submitChecked" onClick="pay_approval();" value="결제등록" class="btn_submit"></span>
<span id="show_pay_btn" style="display:none;"><input type="button" onClick="forderform_check();" value="주문하기" class="btn_submit"></span>
<a href="<?php echo G5_SHOP_URL; ?>" class="btn_cancel">취소</a>
</div>
+2
View File
@@ -0,0 +1,2 @@
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가;
+89
View File
@@ -0,0 +1,89 @@
<?php
include_once('./_common.php');
include_once(G5_MSHOP_PATH.'/settle_nicepay.inc.php');
if (function_exists('add_log')) add_log($_POST);
$authResultCode = isset($_POST['AuthResultCode']) ? clean_xss_tags($_POST['AuthResultCode']) : ''; // authentication result code 0000:success
$authResultMsg = isset($_POST['AuthResultMsg']) ? clean_xss_tags($_POST['AuthResultMsg']) : ''; // authentication result message
$mid = isset($_POST['MID']) ? clean_xss_tags($_POST['MID']) : ''; // merchant id
$moid = isset($_POST['Moid']) ? clean_xss_tags($_POST['Moid']) : ''; // order number
$sql = " select * from {$g5['g5_shop_order_data_table']} where od_id = '$moid' ";
$row = sql_fetch($sql);
if (empty($row)) {
die('');
}
$data = unserialize(base64_decode($row['dt_data']));
if(isset($data['pp_id']) && $data['pp_id']) {
$order_action_url = G5_HTTPS_MSHOP_URL.'/personalpayformupdate.php';
$page_return_url = G5_SHOP_URL.'/personalpayform.php?pp_id='.$data['pp_id'];
} else {
$order_action_url = G5_HTTPS_MSHOP_URL.'/orderformupdate.php';
$page_return_url = G5_SHOP_URL.'/orderform.php';
if($_SESSION['ss_direct'])
$page_return_url .= '?sw_direct=1';
}
$params = array();
$var_datas = array();
foreach($data as $key=>$value) {
if(is_array($value)) {
foreach($value as $k=>$v) {
$_POST[$key][$k] = $params[$key][$k] = clean_xss_tags(strip_tags($v));
}
} else {
if(in_array($key, array('od_memo'))){
$_POST[$key] = $params[$key] = clean_xss_tags(strip_tags($value), 0, 0, 0, 0);
} else {
$_POST[$key] = $params[$key] = clean_xss_tags(strip_tags($value));
}
}
}
// 성공했다면
if ($authResultCode === '0000') {
if(isset($data['pp_id']) && $data['pp_id']) { //개인결제
foreach($params as $key=>$value){
if( in_array($key, shop_order_data_fields(1)) ){
$var_datas[$key] = $value;
$$key = $value;
}
}
include_once(G5_MSHOP_PATH.'/personalpayformupdate.php');
} else { //상점주문
foreach($params as $key=>$value){
if( in_array($key, shop_order_data_fields()) ){
$var_datas[$key] = $value;
$$key = $value;
}
}
$od_send_cost = (int) $_POST['od_send_cost'];
$od_send_cost2 = (int) $_POST['od_send_cost2'];
include_once(G5_MSHOP_PATH.'/orderformupdate.php');
}
} else {
// 실패시
alert('오류 : '.$authResultMsg.' 코드 : '.$authResultCode, $page_return_url);
}
+127 -12
View File
@@ -613,19 +613,49 @@ if($is_kakaopay_use) {
$multi_settle++;
if($default['de_pg_service'] === 'kcp' && isset($default['de_easy_pay_services']) && $default['de_easy_pay_services']){
if (in_array($default['de_pg_service'], array('kcp', 'nicepay')) && isset($default['de_easy_pay_services']) && $default['de_easy_pay_services']) {
$de_easy_pay_service_array = explode(',', $default['de_easy_pay_services']);
if( in_array('nhnkcp_payco', $de_easy_pay_service_array) ){
$easypay_prints['nhnkcp_payco'] = '<li><input type="radio" id="od_settle_nhnkcp_payco" name="od_settle_case" data-pay="payco" value="간편결제"> <label for="od_settle_nhnkcp_payco" class="PAYCO nhnkcp_payco lb_icon" title="NHN_KCP - PAYCO">PAYCO</label></li>';
if ($default['de_pg_service'] === 'kcp') {
if( in_array('nhnkcp_payco', $de_easy_pay_service_array) ){
$easypay_prints['nhnkcp_payco'] = '<li><input type="radio" id="od_settle_nhnkcp_payco" name="od_settle_case" data-pay="payco" value="간편결제"> <label for="od_settle_nhnkcp_payco" class="PAYCO nhnkcp_payco lb_icon" title="NHN_KCP - PAYCO">PAYCO</label></li>';
}
if( in_array('nhnkcp_naverpay', $de_easy_pay_service_array) ){
$easypay_prints['nhnkcp_naverpay'] = '<li><input type="radio" id="od_settle_nhnkcp_naverpay" name="od_settle_case" data-pay="naverpay" value="간편결제" > <label for="od_settle_nhnkcp_naverpay" class="naverpay_icon nhnkcp_naverpay lb_icon" title="NHN_KCP - 네이버페이">네이버페이</label></li>';
}
if( in_array('nhnkcp_kakaopay', $de_easy_pay_service_array) ){
$easypay_prints['nhnkcp_kakaopay'] = '<li><input type="radio" id="od_settle_nhnkcp_kakaopay" name="od_settle_case" data-pay="kakaopay" value="간편결제" > <label for="od_settle_nhnkcp_kakaopay" class="kakaopay_icon nhnkcp_kakaopay lb_icon" title="NHN_KCP - 카카오페이">카카오페이</label></li>';
}
} else if ($default['de_pg_service'] === 'nicepay') {
if( in_array('nicepay_samsungpay', $de_easy_pay_service_array) ){
$easypay_prints['nicepay_samsungpay'] = '<li><input type="radio" id="od_settle_nicepay_samsungpay" name="od_settle_case" data-pay="nice_samsungpay" value="간편결제"> <label for="od_settle_nicepay_samsungpay" class="samsung_pay nice_samsungpay lb_icon" title="NICEPAY - 삼성페이">삼성페이</label></li>';
}
if( in_array('nicepay_naverpay', $de_easy_pay_service_array) ){
$easypay_prints['nicepay_naverpay'] = '<li><input type="radio" id="od_settle_nicepay_naverpay" name="od_settle_case" data-pay="nice_naverpay" value="간편결제" > <label for="od_settle_nicepay_naverpay" class="naverpay_icon nicepay_naverpay lb_icon" title="NICEPAY - 네이버페이">네이버페이</label></li>';
}
if( in_array('nicepay_kakaopay', $de_easy_pay_service_array) ){
$easypay_prints['nicepay_kakaopay'] = '<li><input type="radio" id="od_settle_nicepay_kakaopay" name="od_settle_case" data-pay="nice_kakaopay" value="간편결제" > <label for="od_settle_nicepay_kakaopay" class="kakaopay_icon nicepay_kakaopay lb_icon" title="NICEPAY - 카카오페이">카카오페이</label></li>';
}
if( in_array('nicepay_paycopay', $de_easy_pay_service_array) ){
$easypay_prints['nicepay_paycopay'] = '<li><input type="radio" id="od_settle_nicepay_paycopay" name="od_settle_case" data-pay="nice_paycopay" value="간편결제" > <label for="od_settle_nicepay_paycopay" class="paycopay_icon nicepay_paycopay lb_icon" title="NICEPAY - 페이코">페이코</label></li>';
}
if( in_array('nicepay_skpay', $de_easy_pay_service_array) ){
$easypay_prints['nicepay_skpay'] = '<li><input type="radio" id="od_settle_nicepay_skpay" name="od_settle_case" data-pay="nice_skpay" value="간편결제" > <label for="od_settle_nicepay_skpay" class="skpay_icon nicepay_skpay lb_icon" title="NICEPAY - SK페이">SK페이</label></li>';
}
if( in_array('nicepay_ssgpay', $de_easy_pay_service_array) ){
$easypay_prints['nicepay_ssgpay'] = '<li><input type="radio" id="od_settle_nicepay_ssgpay" name="od_settle_case" data-pay="nice_ssgpay" value="간편결제" > <label for="od_settle_nicepay_ssgpay" class="ssgpay_icon nicepay_ssgpay lb_icon" title="NICEPAY - SSGPAY">SSGPAY</label></li>';
}
if( in_array('nicepay_lpay', $de_easy_pay_service_array) ){
$easypay_prints['nicepay_lpay'] = '<li><input type="radio" id="od_settle_nicepay_lpay" name="od_settle_case" data-pay="nice_lpay" value="간편결제" > <label for="od_settle_nicepay_lpay" class="lpay_icon nicepay_lpay lb_icon" title="NICEPAY - LPAY">LPAY</label></li>';
}
}
if( in_array('nhnkcp_naverpay', $de_easy_pay_service_array) ){
$easypay_prints['nhnkcp_naverpay'] = '<li><input type="radio" id="od_settle_nhnkcp_naverpay" name="od_settle_case" data-pay="naverpay" value="간편결제" > <label for="od_settle_nhnkcp_naverpay" class="naverpay_icon nhnkcp_naverpay lb_icon" title="NHN_KCP - 네이버페이">네이버페이</label></li>';
}
if( in_array('nhnkcp_kakaopay', $de_easy_pay_service_array) ){
$easypay_prints['nhnkcp_kakaopay'] = '<li><input type="radio" id="od_settle_nhnkcp_kakaopay" name="od_settle_case" data-pay="kakaopay" value="간편결제" > <label for="od_settle_nhnkcp_kakaopay" class="kakaopay_icon nhnkcp_kakaopay lb_icon" title="NHN_KCP - 카카오페이">카카오페이</label></li>';
}
if( in_array('nhnkcp_applepay', $de_easy_pay_service_array) && preg_match('~^(?:(?:(?:Mozilla/\d\.\d\s*\()+|Mobile\s*Safari\s*\d+\.\d+(\.\d+)?\s*)(?:iPhone(?:\s+Simulator)?|iPad|iPod);\s*(?:U;\s*)?(?:[a-z]+(?:-[a-z]+)?;\s*)?CPU\s*(?:iPhone\s*)?(?:OS\s*\d+_\d+(?:_\d+)?\s*)?(?:like|comme)\s*Mac\s*O?S?\s*X(?:;\s*[a-z]+(?:-[a-z]+)?)?\)\s*)?(?:AppleWebKit/\d+(?:\.\d+(?:\.\d+)?|\s*\+)?\s*)?(?:\(KHTML,\s*(?:like|comme)\s*Gecko\s*\)\s*)?(?:Version/\d+\.\d+(?:\.\d+)?\s*)?(?:Mobile/\w+\s*)?(?:Safari/\d+\.\d+(?:\.\d+)?.*)?$~', $_SERVER['HTTP_USER_AGENT']) ){
$easypay_prints['nhnkcp_applepay'] = '<li><input type="radio" id="od_settle_nhnkcp_applepay" name="od_settle_case" data-pay="applepay" value="간편결제" > <label for="od_settle_nhnkcp_applepay" class="applepay_icon nhnkcp_applepay lb_icon" title="NHN_KCP - 애플페이">애플페이</label></li>';
if( (in_array('nhnkcp_applepay', $de_easy_pay_service_array) || in_array('nicepay_applepay', $de_easy_pay_service_array)) && preg_match('~^(?:(?:(?:Mozilla/\d\.\d\s*\()+|Mobile\s*Safari\s*\d+\.\d+(\.\d+)?\s*)(?:iPhone(?:\s+Simulator)?|iPad|iPod);\s*(?:U;\s*)?(?:[a-z]+(?:-[a-z]+)?;\s*)?CPU\s*(?:iPhone\s*)?(?:OS\s*\d+_\d+(?:_\d+)?\s*)?(?:like|comme)\s*Mac\s*O?S?\s*X(?:;\s*[a-z]+(?:-[a-z]+)?)?\)\s*)?(?:AppleWebKit/\d+(?:\.\d+(?:\.\d+)?|\s*\+)?\s*)?(?:\(KHTML,\s*(?:like|comme)\s*Gecko\s*\)\s*)?(?:Version/\d+\.\d+(?:\.\d+)?\s*)?(?:Mobile/\w+\s*)?(?:Safari/\d+\.\d+(?:\.\d+)?.*)?$~', $_SERVER['HTTP_USER_AGENT']) ){
if ($default['de_pg_service'] === 'kcp' && in_array('nhnkcp_applepay', $de_easy_pay_service_array)) {
$easypay_prints['nhnkcp_applepay'] = '<li><input type="radio" id="od_settle_nhnkcp_applepay" name="od_settle_case" data-pay="applepay" value="간편결제" > <label for="od_settle_nhnkcp_applepay" class="applepay_icon nhnkcp_applepay lb_icon" title="NHN_KCP - 애플페이">애플페이</label></li>';
} else if ($default['de_pg_service'] === 'nicepay' && in_array('nicepay_applepay', $de_easy_pay_service_array)) {
$easypay_prints['nicepay_applepay'] = '<li><input type="radio" id="od_settle_nicepay_applepay" name="od_settle_case" data-pay="nice_applepay" value="간편결제" > <label for="od_settle_nicepay_applepay" class="applepay_icon nicepay_applepay lb_icon" title="NICEPAY - 애플페이">애플페이</label></li>';
}
}
} else {
$easypay_prints[strtolower($pg_easy_pay_name)] = '<li><input type="radio" id="od_settle_easy_pay" name="od_settle_case" value="간편결제" '.$checked.'> <label for="od_settle_easy_pay" class="'.$pg_easy_pay_name.' lb_icon">'.$pg_easy_pay_name.'</label></li>';
@@ -1263,7 +1293,7 @@ function pay_approval()
var send_coupon = parseInt(pf.od_send_coupon.value);
f.good_mny.value = od_price + send_cost + send_cost2 - send_coupon - temp_point;
}
// 카카오페이 지불
if(settle_method == "KAKAOPAY") {
<?php if($default['de_tax_flag_use']) { ?>
@@ -1417,6 +1447,86 @@ function pay_approval()
<?php } ?>
f.P_RETURN_URL.value = "<?php echo $return_url.$od_id; ?>";
f.action = "https://mobile.inicis.com/smart/" + paymethod + "/";
<?php } else if($default['de_pg_service'] == 'nicepay') { ?>
f.Amt.value = f.good_mny.value;
f.BuyerName.value = pf.od_name.value;
f.BuyerEmail.value = pf.od_email.value;
f.BuyerTel.value = pf.od_hp.value ? pf.od_hp.value : pf.od_tel.value;
f.DirectShowOpt.value = ""; // 간편결제 요청 값 초기화
f.DirectEasyPay.value = ""; // 간편결제 요청 값 초기화
f.NicepayReserved.value = ""; // 간편결제 요청 값 초기화
f.EasyPayMethod.value = ""; // 간편결제 요청 값 초기화
<?php if ($default['de_escrow_use']) { // 간편결제시 에스크로값이 0이 되므로 기본설정값을 지정 ?>
f.TransType.value = "1";
<?php } ?>
switch(settle_method) {
case "계좌이체":
paymethod = "BANK";
break;
case "가상계좌":
paymethod = "VBANK";
break;
case "휴대폰":
paymethod = "CELLPHONE";
break;
case "신용카드":
paymethod = "CARD";
break;
case "간편결제":
paymethod = "CARD";
f.DirectShowOpt.value = "CARD";
f.TransType.value = "0"; // 간편결제의 경우 에스크로를 사용할수 없다.
var nicepay_easy_pay = jQuery("input[name='od_settle_case']:checked" ).attr("data-pay");
if(nicepay_easy_pay === "nice_naverpay"){
if(typeof f.DirectEasyPay !== "undefined") f.DirectEasyPay.value = "E020";
<?php
// * 카드 선택 시 전액 카드로 결제, 포인트 선택 시 전액 포인트로 결제.
// (카드와 포인트를 같이 사용하는 복합결제 형태의 결제는 불가함.)
// - 카드: EasyPayMethod=”E020=CARD”, 포인트: EasyPayMethod=”E020=POINT”
?>
if(typeof f.EasyPayMethod !== "undefined") f.EasyPayMethod.value = "E020=CARD";
} else if(nicepay_easy_pay === "nice_kakaopay"){
if(typeof f.NicepayReserved !== "undefined") f.NicepayReserved.value = "DirectKakao=Y";
} else if(nicepay_easy_pay === "nice_samsungpay"){
if(typeof f.DirectEasyPay !== "undefined") f.DirectEasyPay.value = "E021";
} else if(nicepay_easy_pay === "nice_applepay"){
if(typeof f.DirectEasyPay !== "undefined") f.DirectEasyPay.value = "E022";
} else if(nicepay_easy_pay === "nice_paycopay"){
if(typeof f.NicepayReserved !== "undefined") f.NicepayReserved.value = "DirectPayco=Y";
} else if(nicepay_easy_pay === "nice_skpay"){
if(typeof f.NicepayReserved !== "undefined") f.NicepayReserved.value = "DirectPay11=Y";
} else if(nicepay_easy_pay === "nice_ssgpay"){
if(typeof f.DirectEasyPay !== "undefined") f.DirectEasyPay.value = "E007";
} else if(nicepay_easy_pay === "nice_lpay"){
if(typeof f.DirectEasyPay !== "undefined") f.DirectEasyPay.value = "E018";
}
break;
default:
paymethod = "무통장";
break;
}
f.PayMethod.value = paymethod;
<?php if($default['de_tax_flag_use']) { ?>
f.SupplyAmt.value = pf.comm_tax_mny.value;
f.GoodsVat.value = pf.comm_vat_mny.value;
f.TaxFreeAmt.value = pf.comm_free_mny.value;
<?php } ?>
if (! nicepay_create_signdata(f)) {
return false;
}
<?php } ?>
// 주문 정보 임시저장
@@ -1438,6 +1548,11 @@ function pay_approval()
return false;
}
<?php if ($default['de_pg_service'] == 'nicepay') { ?>
nicepayStart(f);
return false;
<?php } ?>
f.submit();
}
+25 -1
View File
@@ -335,6 +335,11 @@ $order_price = $tot_od_price + $send_cost + $send_cost2 - $tot_sc_cp_price - $od
$od_status = '주문';
$od_tno = '';
if (function_exists('check_payment_method')) {
check_payment_method($od_settle_case);
}
if ($od_settle_case == "무통장")
{
$od_receipt_point = $i_temp_point;
@@ -355,6 +360,9 @@ else if ($od_settle_case == "계좌이체")
case 'inicis':
include G5_MSHOP_PATH.'/inicis/pay_result.php';
break;
case 'nicepay':
include G5_MSHOP_PATH.'/nicepay/nicepay_result.php';
break;
default:
include G5_MSHOP_PATH.'/kcp/pp_ax_hub.php';
$bank_name = iconv("cp949", "utf-8", $bank_name);
@@ -381,6 +389,9 @@ else if ($od_settle_case == "가상계좌")
case 'inicis':
include G5_MSHOP_PATH.'/inicis/pay_result.php';
break;
case 'nicepay':
include G5_MSHOP_PATH.'/nicepay/nicepay_result.php';
break;
default:
include G5_MSHOP_PATH.'/kcp/pp_ax_hub.php';
$bankname = iconv("cp949", "utf-8", $bankname);
@@ -407,6 +418,9 @@ else if ($od_settle_case == "휴대폰")
case 'inicis':
include G5_MSHOP_PATH.'/inicis/pay_result.php';
break;
case 'nicepay':
include G5_MSHOP_PATH.'/nicepay/nicepay_result.php';
break;
default:
include G5_MSHOP_PATH.'/kcp/pp_ax_hub.php';
break;
@@ -431,6 +445,9 @@ else if ($od_settle_case == "신용카드")
case 'inicis':
include G5_MSHOP_PATH.'/inicis/pay_result.php';
break;
case 'nicepay':
include G5_MSHOP_PATH.'/nicepay/nicepay_result.php';
break;
default:
include G5_MSHOP_PATH.'/kcp/pp_ax_hub.php';
$card_name = iconv("cp949", "utf-8", $card_name);
@@ -457,6 +474,9 @@ else if ($od_settle_case == "간편결제")
case 'inicis':
include G5_MSHOP_PATH.'/inicis/pay_result.php';
break;
case 'nicepay':
include G5_MSHOP_PATH.'/nicepay/nicepay_result.php';
break;
default:
include G5_MSHOP_PATH.'/kcp/pp_ax_hub.php';
$card_name = iconv("cp949", "utf-8", $card_name);
@@ -525,6 +545,10 @@ if($tno) {
case 'inicis':
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
break;
case 'nicepay':
$cancelAmt = (int)$pg_price;
include G5_SHOP_PATH.'/nicepay/cancel_process.php';
break;
case 'KAKAOPAY':
$_REQUEST['TID'] = $tno;
$_REQUEST['Amt'] = $amount;
@@ -838,7 +862,7 @@ if($config['cf_sms_use'] && ($default['de_sms_use2'] || $default['de_sms_use3'])
$sms_content = str_replace("{보낸분}", $od_name, $sms_content);
$sms_content = str_replace("{받는분}", $od_b_name, $sms_content);
$sms_content = str_replace("{주문번호}", $od_id, $sms_content);
$sms_content = str_replace("{주문금액}", number_format($tot_ct_price + $od_send_cost + $od_send_cost2), $sms_content);
$sms_content = str_replace("{주문금액}", number_format($tot_ct_price + $od_send_cost + (int) $od_send_cost2), $sms_content);
$sms_content = str_replace("{회원아이디}", $member['mb_id'], $sms_content);
$sms_content = str_replace("{회사명}", $default['de_admin_company_name'], $sms_content);
+13 -6
View File
@@ -248,6 +248,7 @@ if($od['od_pg'] == 'lg') {
$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_bank_account'];
@@ -297,7 +298,7 @@ if($od['od_pg'] == 'lg') {
}
// 승인번호, 휴대폰번호, 거래번호
if($app_no_subj && $app_no)
if($app_no_subj && trim($app_no))
{
?>
<tr>
@@ -339,6 +340,8 @@ if($od['od_pg'] == 'lg') {
$hp_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
} else if($od['od_pg'] == 'inicis') {
$hp_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/mCmReceipt_head.jsp?noTid='.$od['od_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
} else if($od['od_pg'] == 'nicepay') {
$hp_receipt_script = 'window.open(\'https://npg.nicepay.co.kr/issue/IssueLoader.do?type=0&TID='.$od['od_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
} else {
$hp_receipt_script = 'window.open(\''.G5_BILL_RECEIPT_URL.'mcash_bill&tno='.$od['od_tno'].'&order_no='.$od['od_id'].'&trade_mony='.$od['od_receipt_price'].'\', \'winreceipt\', \'width=500,height=690,scrollbars=yes,resizable=yes\');';
}
@@ -347,7 +350,7 @@ if($od['od_pg'] == 'lg') {
<?php
}
if($od['od_settle_case'] == '신용카드' || is_inicis_order_pay($od['od_settle_case']) || (shop_is_taxsave($od, true) && $misu_price == 0) )
if($od['od_settle_case'] == '신용카드' || $od['od_settle_case'] == '간편결제' || is_inicis_order_pay($od['od_settle_case']) || (shop_is_taxsave($od, true) && $misu_price == 0) )
{
if($od['od_pg'] == 'lg') {
require_once G5_SHOP_PATH.'/settle_lg.inc.php';
@@ -356,6 +359,8 @@ if($od['od_pg'] == 'lg') {
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
$card_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
} else if($od['od_pg'] == 'nicepay') {
$card_receipt_script = 'window.open(\'https://npg.nicepay.co.kr/issue/IssueLoader.do?type=0&TID='.$od['od_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
} else if($od['od_pg'] == 'inicis') {
$card_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/mCmReceipt_head.jsp?noTid='.$od['od_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
} else {
@@ -401,10 +406,10 @@ if($od['od_pg'] == 'lg') {
<?php
}
// 현금영수증 발급을 사용하는 경우에만
if (function_exists('shop_is_taxsave') && shop_is_taxsave($od)) {
// 현금영수증 발급을 사용하는 경우 또는 현금영수증 발급을 한 주문건이면
if ((function_exists('shop_is_taxsave') && shop_is_taxsave($od)) || (function_exists('is_order_cashreceipt') && is_order_cashreceipt($od))) {
// 미수금이 없고 현금일 경우에만 현금영수증을 발급 할 수 있습니다.
if ($misu_price == 0 && $od['od_receipt_price'] && ($od['od_settle_case'] == '무통장' || $od['od_settle_case'] == '계좌이체' || $od['od_settle_case'] == '가상계좌')) {
if ($misu_price == 0 && is_order_cashreceipt($od)) {
?>
<tr>
<th scope="row">현금영수증</th>
@@ -430,6 +435,8 @@ if($od['od_pg'] == 'lg') {
} else if($od['od_pg'] == 'inicis') {
$cash = unserialize($od['od_cash_info']);
$cash_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/Cash_mCmReceipt.jsp?noTid='.$cash['TID'].'&clpaymethod=22\',\'showreceipt\',\'width=380,height=540,scrollbars=no,resizable=no\');';
} else if($od['od_pg'] == 'nicepay') {
$cash_receipt_script = 'window.open(\'https://npg.nicepay.co.kr/issue/IssueLoader.do?type=1&TID='.$od['od_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
} else {
require_once G5_SHOP_PATH.'/settle_kcp.inc.php';
@@ -440,7 +447,7 @@ if($od['od_pg'] == 'lg') {
<a href="javascript:;" onclick="<?php echo $cash_receipt_script; ?>">현금영수증 확인하기</a>
<?php
}
else
else if (shop_is_taxsave($od))
{
?>
<a href="javascript:;" onclick="window.open('<?php echo G5_SHOP_URL; ?>/taxsave.php?od_id=<?php echo $od_id; ?>', 'taxsave', 'width=550,height=400,scrollbars=1,menus=0');">현금영수증을 발급하시려면 클릭하십시오.</a>
+51
View File
@@ -206,6 +206,52 @@ function pay_approval()
<?php } ?>
f.P_RETURN_URL.value = "<?php echo $return_url.$pp_id; ?>";
f.action = "https://mobile.inicis.com/smart/" + paymethod + "/";
<?php } else if($default['de_pg_service'] == 'nicepay') { ?>
f.Amt.value = f.good_mny.value;
f.BuyerName.value = pf.pp_name.value;
f.BuyerEmail.value = pf.pp_email.value;
f.BuyerTel.value = pf.pp_hp.value;
f.DirectShowOpt.value = ""; // 간편결제 요청 값 초기화
f.DirectEasyPay.value = ""; // 간편결제 요청 값 초기화
f.NicepayReserved.value = ""; // 간편결제 요청 값 초기화
f.EasyPayMethod.value = ""; // 간편결제 요청 값 초기화
<?php if ($default['de_escrow_use']) { // 간편결제시 에스크로값이 0이 되므로 기본설정값을 지정 ?>
f.TransType.value = "1";
<?php } ?>
switch(settle_method) {
case "계좌이체":
paymethod = "BANK";
break;
case "가상계좌":
paymethod = "VBANK";
break;
case "휴대폰":
paymethod = "CELLPHONE";
break;
case "신용카드":
paymethod = "CARD";
break;
default:
paymethod = "무통장";
break;
}
f.PayMethod.value = paymethod;
<?php if($default['de_tax_flag_use']) { ?>
f.SupplyAmt.value = pf.comm_tax_mny.value;
f.GoodsVat.value = pf.comm_vat_mny.value;
f.TaxFreeAmt.value = pf.comm_free_mny.value;
<?php } ?>
if (! nicepay_create_signdata(f)) {
return false;
}
<?php } ?>
//var new_win = window.open("about:blank", "tar_opener", "scrollbars=yes,resizable=yes");
@@ -229,7 +275,12 @@ function pay_approval()
alert(save_result);
return false;
}
<?php if($default['de_pg_service'] == 'nicepay') { ?>
nicepayStart(f);
return;
<?php } ?>
f.submit();
}
+16
View File
@@ -57,6 +57,9 @@ if ($pp_settle_case == "계좌이체")
case 'inicis':
include G5_MSHOP_PATH.'/inicis/pay_result.php';
break;
case 'nicepay':
include G5_MSHOP_PATH.'/nicepay/nicepay_result.php';
break;
default:
include G5_MSHOP_PATH.'/kcp/pp_ax_hub.php';
$bank_name = iconv("cp949", "utf-8", $bank_name);
@@ -79,6 +82,9 @@ else if ($pp_settle_case == "가상계좌")
case 'inicis':
include G5_MSHOP_PATH.'/inicis/pay_result.php';
break;
case 'nicepay':
include G5_MSHOP_PATH.'/nicepay/nicepay_result.php';
break;
default:
include G5_MSHOP_PATH.'/kcp/pp_ax_hub.php';
$bankname = iconv("cp949", "utf-8", $bankname);
@@ -102,6 +108,9 @@ else if ($pp_settle_case == "휴대폰")
case 'inicis':
include G5_MSHOP_PATH.'/inicis/pay_result.php';
break;
case 'nicepay':
include G5_MSHOP_PATH.'/nicepay/nicepay_result.php';
break;
default:
include G5_MSHOP_PATH.'/kcp/pp_ax_hub.php';
break;
@@ -122,6 +131,9 @@ else if ($pp_settle_case == "신용카드")
case 'inicis':
include G5_MSHOP_PATH.'/inicis/pay_result.php';
break;
case 'nicepay':
include G5_MSHOP_PATH.'/nicepay/nicepay_result.php';
break;
default:
include G5_MSHOP_PATH.'/kcp/pp_ax_hub.php';
$card_name = iconv("cp949", "utf-8", $card_name);
@@ -150,6 +162,10 @@ if((int)$pp['pp_price'] !== (int)$pg_price) {
case 'inicis':
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
break;
case 'nicepay':
$cancelAmt = (int)$pg_price;
include G5_SHOP_PATH.'/nicepay/cancel_process.php';
break;
default:
include G5_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php';
break;
+6
View File
@@ -147,6 +147,8 @@ if($pp['pp_pg'] == 'lg') {
$hp_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
} else if($pp['pp_pg'] == 'inicis') {
$hp_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/mCmReceipt_head.jsp?noTid='.$pp['pp_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
} else if($pp['pp_pg'] == 'nicepay') {
$hp_receipt_script = 'window.open(\'https://npg.nicepay.co.kr/issue/IssueLoader.do?type=0&TID='.$pp['pp_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
} else {
$hp_receipt_script = 'window.open(\''.G5_BILL_RECEIPT_URL.'mcash_bill&tno='.$pp['pp_tno'].'&order_no='.$pp['pp_id'].'&trade_mony='.$pp['pp_receipt_price'].'\', \'winreceipt\', \'width=500,height=690,scrollbars=yes,resizable=yes\');';
}
@@ -164,6 +166,8 @@ if($pp['pp_pg'] == 'lg') {
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
$card_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
} else if($pp['pp_pg'] == 'nicepay') {
$card_receipt_script = 'window.open(\'https://npg.nicepay.co.kr/issue/IssueLoader.do?type=0&TID='.$pp['pp_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
} else if($pp['pp_pg'] == 'inicis') {
$card_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/mCmReceipt_head.jsp?noTid='.$pp['pp_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
} else {
@@ -220,6 +224,8 @@ if($pp['pp_pg'] == 'lg') {
} else if($pp['pp_pg'] == 'inicis') {
$cash = unserialize($pp['pp_cash_info']);
$cash_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/Cash_mCmReceipt.jsp?noTid='.$cash['TID'].'&clpaymethod=22\',\'showreceipt\',\'width=380,height=540,scrollbars=no,resizable=no\');';
} else if($pp['pp_pg'] == 'nicepay') {
$cash_receipt_script = 'window.open(\'https://npg.nicepay.co.kr/issue/IssueLoader.do?type=1&TID='.$od['od_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
} else {
require_once G5_SHOP_PATH.'/settle_kcp.inc.php';
+6
View File
@@ -0,0 +1,6 @@
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
include_once(G5_SHOP_PATH.'/settle_nicepay.inc.php');
$nicepay_returnURL = G5_MSHOP_URL.'/nicepay/return_url_result.php';
+1 -1
View File
@@ -8,7 +8,7 @@ if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
*/
if( !class_exists('HTMLPurifier_Filter_Iframevideo') ){
class HTMLPurifier_Filter_iframevideo extends HTMLPurifier_Filter
class HTMLPurifier_Filter_Iframevideo extends HTMLPurifier_Filter
{
public $name = 'Iframevideo';
+1 -1
View File
@@ -17,7 +17,7 @@ if($config['cf_cert_use'] == 2) { // 실서비스 일때
$mTxId ='SIR_'.$max_cr_id;
}
$reqSvcCd ='01'; // 요청구분코드 ["01":간편인증, "02":전자서명]
$reservedMsg ='isUseToken=Y'; // 결과조회 응답시 개인정보SEED 암호화 처리 요청
$reservedMsg = (defined('KGINICIS_USE_CERT_SEED') && KGINICIS_USE_CERT_SEED) ? 'isUseToken=Y' : ''; // 결과조회 응답시 개인정보SEED 암호화 처리 요청
// 등록가맹점 확인
$plainText1 = hash("sha256",(string)$mid.(string)$mTxId.(string)$apiKey);
+8 -6
View File
@@ -6,7 +6,7 @@ require_once (dirname(__FILE__) .'/libs/INILib.php');
$txId = isset($_POST['txId']) ? clean_xss_tags($_POST['txId'], 1, 1) : '';
$mid = substr($txId, 6, 10);
$SEEDKEY = isset($_POST['token']) ? clean_xss_tags($_POST['token'], 1, 1) : '';
$SEEDIV = "SASKGINICIS00000";
$SEEDIV = 'SASHOSTSIRIAS000';
if ($txId && isset($_POST["resultCode"]) && $_POST["resultCode"] === "0000") {
@@ -54,11 +54,13 @@ if ($txId && isset($_POST["resultCode"]) && $_POST["resultCode"] === "0000") {
$birth_day = $res_data['userBirthday']; // 생년월일
$ci = $res_data['userCi']; // CI
// 개인정보SEED 암호화 된것을 복호화 합니다.
$user_name = decrypt_SEED($user_name, $SEEDKEY, $SEEDIV);
$phone_no = decrypt_SEED($phone_no, $SEEDKEY, $SEEDIV);
$birth_day = decrypt_SEED($birth_day, $SEEDKEY, $SEEDIV);
$ci = decrypt_SEED($ci, $SEEDKEY, $SEEDIV);
if (defined('KGINICIS_USE_CERT_SEED') && KGINICIS_USE_CERT_SEED) {
// 개인정보SEED 암호화 된것을 복호화 합니다.
$user_name = decrypt_SEED($user_name, $SEEDKEY, $SEEDIV);
$phone_no = decrypt_SEED($phone_no, $SEEDKEY, $SEEDIV);
$birth_day = decrypt_SEED($birth_day, $SEEDKEY, $SEEDIV);
$ci = decrypt_SEED($ci, $SEEDKEY, $SEEDIV);
}
@insert_cert_history($member['mb_id'], 'inicis', $cert_type); // 인증성공 시 내역 기록
+2 -1
View File
@@ -67,10 +67,11 @@ function decrypt_SEED($str, $bszUser_key, $bszIV) {
$pdwRoundKey = array_pad(array(), 32, 0);
$bszPlainText = null;
$planBytresMessage = array();
// 방법 1
$bszPlainText = KISA_SEED_CBC::SEED_CBC_Decrypt($keyBytes, $IVBytes, $planBytes, 0, count($planBytes));
for ($i = 0; $i < sizeof($bszPlainText); $i++) {
for ($i = 0; $i < sizeof((array) $bszPlainText); $i++) {
$planBytresMessage[] = sprintf("%02X", $bszPlainText[$i]);
}
return Hex2String($planBytresMessage);
+3 -2
View File
@@ -171,7 +171,7 @@ if (!defined('_KISA_SEED_KEY_')) {
var $key_data = null;
function KISA_SEED_KEY() {
function __construct() {
$this->key_data = array_pad(array(), 32, 0);
}
@@ -192,7 +192,7 @@ if (!defined('_KISA_SEED_INFO_')) {
var $cbc_last_block = null;
var $last_block_flag = 0;
function KISA_SEED_INFO() {
function __construct() {
$this->ivec = array_pad(array(), 4, 0);
$this->seed_key = new KISA_SEED_KEY();
$this->cbc_buffer = array_pad(array(), 4, 0);
@@ -782,6 +782,7 @@ class KISA_SEED_CBC {
$pbszCipherText = array_pad(array(), $message_length, 0);
Common::arraycopy_system($message, $message_offset, $pbszCipherText, 0, $message_length);
$nCipherTextLen = count($pbszCipherText);
$result = null;
if ($nCipherTextLen % KISA_SEED_CBC::BLOCK_SIZE_SEED) {
return $result;
+3 -2
View File
@@ -20,8 +20,8 @@ class OAuth1Client{
public $redirect_uri = "";
public $decode_json = true;
public $curl_time_out = 30;
public $curl_connect_time_out = 30;
public $curl_time_out = 10;
public $curl_connect_time_out = 15;
public $curl_ssl_verifypeer = false;
public $curl_auth_header = true;
public $curl_useragent = "OAuth/1 Simple PHP Client v0.1; HybridAuth http://hybridauth.sourceforge.net/";
@@ -194,6 +194,7 @@ class OAuth1Client{
curl_setopt( $ci, CURLOPT_USERAGENT , $this->curl_useragent );
curl_setopt( $ci, CURLOPT_CONNECTTIMEOUT, $this->curl_connect_time_out );
curl_setopt( $ci, CURLOPT_TIMEOUT , $this->curl_time_out );
curl_setopt( $ci, CURLOPT_MAXREDIRS , 10);
curl_setopt( $ci, CURLOPT_RETURNTRANSFER, true );
curl_setopt( $ci, CURLOPT_HTTPHEADER , array('Expect:') );
curl_setopt( $ci, CURLOPT_SSL_VERIFYPEER, $this->curl_ssl_verifypeer );
+3 -2
View File
@@ -26,8 +26,8 @@ class OAuth2Client
//--
public $sign_token_name = "access_token";
public $curl_time_out = 30;
public $curl_connect_time_out = 30;
public $curl_time_out = 10;
public $curl_connect_time_out = 15;
public $curl_ssl_verifypeer = false;
public $curl_ssl_verifyhost = false;
public $curl_header = array();
@@ -221,6 +221,7 @@ class OAuth2Client
curl_setopt($ch, CURLOPT_TIMEOUT , $this->curl_time_out );
curl_setopt($ch, CURLOPT_USERAGENT , $this->curl_useragent );
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT , $this->curl_connect_time_out );
curl_setopt($ch, CURLOPT_MAXREDIRS , 10);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER , $this->curl_ssl_verifypeer );
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST , $this->curl_ssl_verifyhost );
curl_setopt($ch, CURLOPT_HTTPHEADER , $this->curl_header );
+7
View File
@@ -60,6 +60,13 @@ else if ($w == "u")
$row = sql_fetch($sql);
if (!$row['cnt'])
alert("자신의 상품문의만 수정하실 수 있습니다.");
$sql = " select iq_answer from `{$g5['g5_shop_item_qa_table']}` where mb_id = '{$member['mb_id']}' and iq_id = '$iq_id' ";
$row = sql_fetch($sql);
if (isset($row['iq_answer']) && $row['iq_answer']) {
alert("답변이 있는 상품문의는 수정하실 수 없습니다.");
}
}
$sql = " update {$g5['g5_shop_item_qa_table']}
+1 -1
View File
@@ -12,7 +12,7 @@ $is_content = preg_replace('#<script(.*?)>(.*?)</script>#is', '', $is_content);
$is_name = isset($_POST['is_name']) ? trim($_POST['is_name']) : '';
$is_password = isset($_POST['is_password']) ? trim($_POST['is_password']) : '';
$is_score = isset($_POST['is_score']) ? (int) $_POST['is_score'] : 0;
$is_score = ($is_score > 5) ? 0 : $is_score;
$is_score = ($is_score > 5 || $is_score < 1) ? 1 : $is_score;
$get_editor_img_mode = $config['cf_editor'] ? false : true;
$is_id = isset($_REQUEST['is_id']) ? (int) $_REQUEST['is_id'] : 0;
$is_mobile_shop = isset($_REQUEST['is_mobile_shop']) ? (int) $_REQUEST['is_mobile_shop'] : 0;
+16 -1
View File
@@ -146,7 +146,22 @@ if ( $req_tx == "pay" )
{
/* 1004원은 실제로 업체에서 결제하셔야 될 원 금액을 넣어주셔야 합니다. 결제금액 유효성 검증 */
$c_PayPlus->mf_set_ordr_data( "ordr_mony", $good_mny );
$kcp_pay_type = ''; // 결제수단 검증 파라미터 pay_type (신용카드 : PACA, 계좌이체 : PABK, 가상계좌 : PAVC, 휴대폰 : PAMC)
if ($use_pay_method == "100000000000" && (in_array($od_settle_case, array('신용카드', '간편결제')))) { // 신용카드
$kcp_pay_type = 'PACA';
} else if ($use_pay_method == "010000000000" && $od_settle_case === '계좌이체') { // 계좌이체
$kcp_pay_type = 'PABK';
} else if ($use_pay_method == "001000000000" && $od_settle_case === '가상계좌') { // 가상계좌
$kcp_pay_type = 'PAVC';
} else if ($use_pay_method == "000010000000" && $od_settle_case === '휴대폰') { // 휴대폰
$kcp_pay_type = 'PAMC';
}
$c_PayPlus->mf_set_ordr_data( "pay_type", $kcp_pay_type );
$c_PayPlus->mf_set_ordr_data( "ordr_no", $ordr_idxx );
$post_enc_data = isset($_POST['enc_data']) ? $_POST['enc_data'] : '';
$post_enc_info = isset($_POST['enc_info']) ? $_POST['enc_info'] : '';
+2
View File
@@ -0,0 +1,2 @@
<?php
include_once('../../common.php');
+57
View File
@@ -0,0 +1,57 @@
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
/*
****************************************************************************************
* <Cancel Request Parameter>
* The sample page only shows basic (required) parameters.
****************************************************************************************
*/
$merchantKey = $default['de_nicepay_key'];
$mid = $default['de_nicepay_mid'];
$moid = isset($od_id) ? $od_id : get_session('ss_order_id');
$cancelMsg = $cancel_msg;
$tid = $tno;
$partialCancelCode = isset($partialCancelCode) ? (int) $partialCancelCode : 0;
/*
****************************************************************************************
* <Hash encryption> (do not modify)
* SHA-256 hash encryption is a way to prevent forgery.
****************************************************************************************
*/
$ediDate = preg_replace('/[^0-9]/', '', G5_TIME_YMDHIS);
$signData = bin2hex(hash('sha256', $mid . $cancelAmt . $ediDate . $merchantKey, true));
try{
$data = Array(
'TID' => $tid,
'MID' => $mid,
'Moid' => $moid,
'CancelAmt' => $cancelAmt,
'CancelMsg' => iconv("UTF-8", "EUC-KR", $cancelMsg),
'PartialCancelCode' => $partialCancelCode,
'EdiDate' => $ediDate,
'SignData' => $signData,
'CharSet' => 'utf-8'
);
if (function_exists('add_log')) add_log($data);
/*
****************************************************************************************
* <Cancel Request>
****************************************************************************************
*/
$response = nicepay_reqPost($data, "https://pg-api.nicepay.co.kr/webapi/cancel_process.jsp"); //Cancel API call
$result = json_decode($response, true);
if (function_exists('add_log')) add_log(array('1'=>1));
if (function_exists('add_log')) add_log($result, true, 'cc');
}catch(Exception $e){
$e->getMessage();
$ResultCode = "9999";
$ResultMsg = "통신실패";
}
+26
View File
@@ -0,0 +1,26 @@
<?php
include_once('./_common.php');
include_once(G5_SHOP_PATH.'/settle_nicepay.inc.php');
$orderNumber = get_session('ss_order_id');
if (! $orderNumber) {
$orderNumber = get_session('ss_personalpay_id');
}
if (! ($default['de_pg_service'] == 'nicepay' && $orderNumber)){
die(json_encode(array('error'=>'올바른 방법으로 이용해 주십시오.')));
}
if (function_exists('add_log')) add_log($_POST, false, 'ajax');
$price = preg_replace('#[^0-9]#', '', $_POST['price']);
if (strlen($price) < 1) {
die(json_encode(array('error'=>'가격이 올바르지 않습니다.')));
}
$ediDate = preg_replace('/[^0-9]/', '', G5_TIME_YMDHIS);
$hashString = bin2hex(hash('sha256', $ediDate.$default['de_nicepay_mid'].$price.$default['de_nicepay_key'], true));
die(json_encode(array('error'=>'', 'ediDate'=>$ediDate, 'SignData'=>$hashString)));
+77
View File
@@ -0,0 +1,77 @@
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if($od['od_pg'] != 'nicepay') return;
include_once(G5_SHOP_PATH.'/settle_nicepay.inc.php');
$mid = $default['de_nicepay_mid'];
$tid = $escrow_tno; // 거래 번호
$reqType = '03'; // 요청타입 (배송등록 03)
$deliveryCoNm = $escrow_corp; // 배송업체명
$buyerAddr = $od['od_b_addr1'].($od['od_b_addr2'] ? ' ' : '').$od['od_b_addr2']; // 배송지 주소
$invoiceNum = $escrow_numb; // 송장번호
$registerName = $default['de_admin_company_name']; // 등록자이름 (영카트 회사명으로 지정)
$confirmMail = 1; // 구매결정 메일발송 여부 (1은 발송, 2는 미발송)
$charSet = 'utf-8'; // 응답파라미터 인코딩 방식
$escrowRequestURL = "https://webapi.nicepay.co.kr/webapi/escrow_process.jsp"; //에스크로 요청 URL
/*
*******************************************************
* <해쉬암호화> (수정하지 마세요)
* SHA-256 해쉬암호화는 거래 위변조를 막기위한 방법입니다.
*******************************************************
*/
$ediDate = preg_replace('/[^0-9]/', '', G5_TIME_YMDHIS);
$signData = bin2hex(hash('sha256', $tid.$mid.$reqType.$ediDate.$default['de_nicepay_key'], true));
$response = "";
$data = array(
'MID' => $mid,
'TID' => $tid,
'EdiDate' => $ediDate,
'SignData' => $signData,
'ReqType' => $reqType,
'DeliveryCoNm' => $deliveryCoNm,
'BuyerAddr' => $buyerAddr,
'InvoiceNum' => $invoiceNum,
'RegisterName' => $registerName,
'ConfirmMail' => $confirmMail,
'CharSet' => $charSet
);
$response = nicepay_reqPost($data, $escrowRequestURL);
$nice_result = json_decode($response, true);
if (function_exists('add_log')) add_log($nice_result, true, 'es');
// 성공이면
if (isset($nice_result['ResultCode']) && $nice_result['ResultCode'] === 'C000') {
} else {
// C000 이 아니면 다 실패
/*
C002 에스크로 가맹점 아님
C003 에스크로 거래만 배송등록 가능
C004 에스크로결제 신청내역 미존재
C005 에스크로배송등록 불가상태
C006 거래내역이 존재하지 않음.
C007 취소된 거래는 배송등록 불가
*/
}
/**********************
* 4. 배송 등록 결과 *
**********************/
$resultCode = $nice_result['ResultCode']; // 결과코드 ("00"이면 지불 성공)
$resultMsg = $nice_result['ResultMsg']; // 결과내용 (지불결과에 대한 설명)
$dlv_date = $nice_result['ProcessDate'];
$dlv_time = $nice_result['ProcessTime'];
echo "에스크로배송";
exit;
View File
+204
View File
@@ -0,0 +1,204 @@
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// 나이스페이 공통 설정
require_once(G5_SHOP_PATH.'/settle_nicepay.inc.php');
if (function_exists('add_log')) add_log($_POST);
/*
****************************************************************************************
* <Authentication Result Parameter>
****************************************************************************************
*/
$authResultCode = isset($_POST['AuthResultCode']) ? clean_xss_tags($_POST['AuthResultCode']) : ''; // authentication result code 0000:success
$authResultMsg = isset($_POST['AuthResultMsg']) ? clean_xss_tags($_POST['AuthResultMsg']) : ''; // authentication result message
$nextAppURL = isset($_POST['NextAppURL']) ? clean_xss_tags($_POST['NextAppURL']) : ''; // authorization request URL
$txTid = isset($_POST['TxTid']) ? clean_xss_tags($_POST['TxTid']) : ''; // transaction ID
$authToken = isset($_POST['AuthToken']) ? clean_xss_tags($_POST['AuthToken']) : ''; // authentication TOKEN
$payMethod = isset($_POST['PayMethod']) ? clean_xss_tags($_POST['PayMethod']) : ''; // payment method
$mid = isset($_POST['MID']) ? clean_xss_tags($_POST['MID']) : ''; // merchant id
$moid = isset($_POST['Moid']) ? clean_xss_tags($_POST['Moid']) : ''; // order number
$amt = isset($_POST['Amt']) ? (int) preg_replace('/[^0-9]/', '', $_POST['Amt']) : 0; // Amount of payment
$reqReserved = isset($_POST['ReqReserved']) ? clean_xss_tags($_POST['ReqReserved']) : ''; // mall custom field
$netCancelURL = isset($_POST['NetCancelURL']) ? clean_xss_tags($_POST['NetCancelURL']) : ''; // netCancelURL
$Signature = isset($_POST['Signature']) ? clean_xss_tags($_POST['Signature']) : ''; // netCancelURL
if (isset($pp['pp_id']) && $pp['pp_id']) { //개인결제
$session_order_id = get_session('ss_personalpay_id');
$order_price = (int) $pp['pp_price'];
} else {
$session_order_id = get_session('ss_order_id'); // 쇼핑몰 일반결제
}
if ($session_order_id != $moid){
alert("요청한 주문번호가 틀려서 결제를 진행할수 없습니다.\\n다시 장바구니에서 시도해 주세요.", G5_SHOP_URL);
}
if ($default['de_nicepay_mid'] != $mid) {
alert("요청한 상점 mid와 설정된 mid가 틀리므로 결제를 진행할수 없습니다.", G5_SHOP_URL);
}
if ($order_price != $amt) {
alert("요청한 결제금액이 틀리므로 결제를 진행할수 없습니다.", G5_SHOP_URL);
}
// hex(sha256(AuthToken+MID+Amt+MerchantKey)), 위변조 검증 데이터
$signData = bin2hex(hash('sha256', $authToken. $default['de_nicepay_mid'] . $order_price . $default['de_nicepay_key'], true));
if ($Signature != $signData) {
alert("유효성 검증이 틀려서 결제를 진행할수 없습니다.");
}
// API CALL foreach example
function jsonRespDump($resp){
$respArr = json_decode($resp);
foreach ( $respArr as $key => $value ){
echo "$key=". $value."<br />";
}
}
if (! function_exists('nicepay_res')) {
function nicepay_res($key, $data, $default_val='') {
$response_val = isset($data[$key]) ? $data[$key] : $default_val;
return ($response_val ? $response_val : $default_val);
}
}
/*
****************************************************************************************
* <authorization parameters init>
****************************************************************************************
*/
$response = "";
if($authResultCode === "0000"){
/*
****************************************************************************************
* <Hash encryption> (do not modify)
****************************************************************************************
*/
$ediDate = preg_replace('/[^0-9]/', '', G5_TIME_YMDHIS);
$merchantKey = $default['de_nicepay_key']; // 상점키
$signData = bin2hex(hash('sha256', $authToken . $mid . $amt . $ediDate . $merchantKey, true));
try {
$data = Array(
'TID' => $txTid,
'AuthToken' => $authToken,
'MID' => $mid,
'Amt' => $amt,
'EdiDate' => $ediDate,
'SignData' => $signData,
'CharSet' => 'utf-8'
);
/*
****************************************************************************************
* <authorization request>
* authorization through server to server communication.
****************************************************************************************
// 3001 : 신용카드 성공코드
// 4000 : 계좌이체 성공코드
// 4100 : 가상계좌 발급 성공코드
// A000 : 휴대폰 소액결제 성공코드
// 7001 : 현금영수증
// https://developers.nicepay.co.kr/manual-auth.php
*/
$response = nicepay_reqPost($data, $nextAppURL);
if (! $response) {
alert('응답이 없거나 잘못된 url 입니다.', G5_SHOP_URL);
}
$respArr = json_decode($response, true);
if (function_exists('add_log')) add_log($respArr);
$ResultCode = nicepay_res('ResultCode', $respArr);
$ResultMsg = nicepay_res('ResultMsg', $respArr);
$tno = nicepay_res('TID', $respArr);
$amount = (int) nicepay_res('Amt', $respArr, 0);
$app_time = nicepay_res('AuthDate', $respArr);
$pay_method = nicepay_res('PayMethod', $respArr);
$od_app_no = $app_no = nicepay_res('AuthCode', $respArr); // 승인 번호 (신용카드, 계좌이체, 휴대폰)
$pay_type = $NICEPAY_METHOD[$pay_method];
// 승인된 코드가 아니면 결제가 되지 않게 합니다.
if (! in_array($ResultCode, array('3001', '4000', '4100', 'A000', '7001'))) {
alert($ResultMsg.' 코드 : '.$ResultCode, G5_SHOP_URL);
die();
}
if ($ResultCode == '3001') { // 신용카드
$card_cd = nicepay_res('CardCode', $respArr); // 카드사 코드
$card_name = nicepay_res('CardName', $respArr); // 카드 종류
} else if ($ResultCode == '4100') { // 가상계좌
$bank_name = $bankname = nicepay_res('VbankBankName', $respArr);
$account = nicepay_res('VbankNum', $respArr);
$va_date = nicepay_res('VbankExpDate', $respArr).' '.nicepay_res('VbankExpTime', $respArr); // 가상계좌 입금마감시간
$app_no = nicepay_res('VbankNum', $respArr);
if ($default['de_escrow_use'] == 1)
$escw_yn = 'Y';
} else if ($ResultCode == '4000') { // 계좌이체
$bank_name = $bankname = nicepay_res('BankName', $respArr);
$bank_code = nicepay_res('BankCode', $respArr);
$RcptType = nicepay_res('RcptType', $respArr); // 현금영수증타입 (0:발행안함,1:소득공제,2:지출증빙)
$RcptTID = nicepay_res('RcptTID', $respArr); // 현금영수증 TID, 현금영수증 거래인 경우 리턴
$RcptAuthCode = nicepay_res('RcptAuthCode', $respArr); // 현금영수증 승인번호, 현금영수증 거래인 경우 리턴
$AuthDate = nicepay_res('AuthDate', $respArr); // 현금영수증 승인번호, 현금영수증 거래인 경우 리턴
// 현금영수증 발급시 1 또는 2 이면
if ($RcptType) {
$pg_receipt_infos['od_cash'] = 1; // 현금영수증 발급인것으로 처리
$pg_receipt_infos['od_cash_no'] = $RcptAuthCode; // 현금영수증 승인번호
$pg_receipt_infos['od_cash_info'] = serialize(array('TID'=>$RcptTID, 'ApplNum'=>$RcptAuthCode, 'AuthDate'=>$AuthDate));
}
if ($default['de_escrow_use'] == 1)
$escw_yn = 'Y';
}
$depositor = ''; // 입금할 계좌 예금주 (나이스페이 경우 가상계좌의 예금주명을 리턴받지 못합니다. )
$account = nicepay_res('VbankNum', $respArr);
$commid = ''; // 통신사 코드
$mobile_no = ''; // 휴대폰결제시 휴대폰번호 (나이스페이 경우 결제한 휴대폰번호를 리턴받지 못합니다.)
$card_name = nicepay_res('CardName', $respArr);
} catch(Exception $e) {
$e->getMessage();
$data = Array(
'TID' => $txTid,
'AuthToken' => $authToken,
'MID' => $mid,
'Amt' => $amt,
'EdiDate' => $ediDate,
'SignData' => $signData,
'NetCancel' => '1',
'CharSet' => 'utf-8'
);
/*
*************************************************************************************
* <NET CANCEL>
* If an exception occurs during communication, cancelation is recommended
*************************************************************************************
*/
$response = nicepay_reqPost($data, $netCancelURL);
// jsonRespDump($response);
alert("결제 오류로 더 이상 진행할수 없습니다.");
}
} else {
//When authentication fail
$ResultCode = $authResultCode;
$ResultMsg = $authResultMsg;
alert($ResultMsg.' 실패 코드 : '.$ResultCode);
}
+98
View File
@@ -0,0 +1,98 @@
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
// kcp 전자결제를 사용할 때만 실행
if($default['de_iche_use'] || $default['de_vbank_use'] || $default['de_hp_use'] || $default['de_card_use'] || $default['de_easy_pay_use']) {
?>
<!-- PC payment window only (not required for mobile payment window)-->
<script src="https://web.nicepay.co.kr/v3/webstd/js/nicepay-3.0.js" type="text/javascript"></script>
<script type="text/javascript">
//It is executed when call payment window.
function nicepayStart(){
if(checkPlatform(window.navigator.userAgent) == "mobile"){
document.forderform.action = "https://web.nicepay.co.kr/v3/v3Payment.jsp";
document.forderform.acceptCharset="euc-kr";
document.forderform.submit();
}else{
goPay(document.forderform);
}
}
//[PC Only]When pc payment window is closed, nicepay-3.0.js call back nicepaySubmit() function <<'nicepaySubmit()' DO NOT CHANGE>>
function nicepaySubmit(){
document.forderform.submit();
}
//[PC Only]payment window close function <<'nicepayClose()' DO NOT CHANGE>>
function nicepayClose(){
// alert("payment window is closed");
}
//pc, mobile chack script (sample code)
function checkPlatform(ua) {
if(ua === undefined) {
ua = window.navigator.userAgent;
}
ua = ua.toLowerCase();
var platform = {};
var matched = {};
var userPlatform = "pc";
var platform_match = /(ipad)/.exec(ua) || /(ipod)/.exec(ua)
|| /(windows phone)/.exec(ua) || /(iphone)/.exec(ua)
|| /(kindle)/.exec(ua) || /(silk)/.exec(ua) || /(android)/.exec(ua)
|| /(win)/.exec(ua) || /(mac)/.exec(ua) || /(linux)/.exec(ua)
|| /(cros)/.exec(ua) || /(playbook)/.exec(ua)
|| /(bb)/.exec(ua) || /(blackberry)/.exec(ua)
|| [];
matched.platform = platform_match[0] || "";
if(matched.platform) {
platform[matched.platform] = true;
}
if(platform.android || platform.bb || platform.blackberry
|| platform.ipad || platform.iphone
|| platform.ipod || platform.kindle
|| platform.playbook || platform.silk
|| platform["windows phone"]) {
userPlatform = "mobile";
}
if(platform.cros || platform.mac || platform.linux || platform.win) {
userPlatform = "pc";
}
return userPlatform;
}
function nicepay_create_signdata(frm)
{
// 데이터 암호화 처리
var result = true;
$.ajax({
url: g5_url+"/shop/nicepay/createsigndata.php",
type: "POST",
data: {
price : frm.good_mny.value
},
dataType: "json",
async: false,
cache: false,
success: function(data) {
if(data.error == "") {
frm.EdiDate.value = data.ediDate;
frm.SignData.value = data.SignData;
} else {
alert(data.error);
result = false;
}
}
});
return result;
}
</script>
<?php }
+49
View File
@@ -0,0 +1,49 @@
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<input type="hidden" name="PayMethod" value="">
<input type="hidden" name="GoodsName" value="<?php echo get_text($goods); ?>">
<?php /* 주문폼 자바스크립트 에러 방지를 위해 추가함 */ ?>
<input type="hidden" name="good_mny" value="<?php echo $tot_price; ?>">
<input type="hidden" name="Amt" value="<?php echo $tot_price; ?>">
<input type="hidden" name="MID" value="<?php echo $default['de_nicepay_mid']; ?>">
<input type="hidden" name="Moid" value="<?php echo $od_id; ?>">
<input type="hidden" name="BuyerName" value="">
<input type="hidden" name="BuyerEmail" value="">
<input type="hidden" name="BuyerTel" value="">
<input type="hidden" name="ReturnURL" value="<?php echo $nicepay_returnURL; ?>">
<input type="hidden" name="VbankExpDate" value="">
<input type="hidden" name="NpLang" value="KO"/> <!-- EN:English, CN:Chinese, KO:Korean -->
<input type="hidden" name="GoodsCl" value="1"/> <!-- products(1), contents(0)) -->
<input type="hidden" name="TransType" value="<?php echo $default['de_escrow_use'] ? '1' : '0'; ?>"/> <!-- USE escrow false(0)/true(1) -->
<input type="hidden" name="CharSet" value="utf-8"/> <!-- Return CharSet -->
<input type="hidden" name="ReqReserved" value=""/> <!-- mall custom field -->
<input type="hidden" name="EdiDate" value=""/> <!-- YYYYMMDDHHMISS -->
<input type="hidden" name="SignData" value=""/> <!-- EncryptData -->
<input type="hidden" name="DirectShowOpt" value="">
<input type="hidden" name="SelectCardCode" value=""> <!-- 카드사 노출 제한, 카드코드 값(ex 비씨:01, 삼성:04) -->
<input type="hidden" name="NicepayReserved" value=""> <!-- 간편결제 (카카오페이에 사용됨) -->
<input type="hidden" name="DirectEasyPay"> <!-- 간편결제 요청 값 (네이버페이에 사용됨) -->
<input type="hidden" name="EasyPayMethod"> <!-- 간편결제 (네이버페이에 사용됨) -->
<input type="hidden" name="EasyPayCardCode"> <!-- 간편결제 카드 코드 -->
<input type="hidden" name="EasyPayQuota"> <!-- 간편결제 할부개월 (3개월일 경우 03 으로 설정) -->
<input type="hidden" name="MultiEasyPayQuota"> <!-- 간편결제 할부개월 다중 설정 옵션 PAYCO와 네이버페이만 가능 -->
<?php if ($default['de_tax_flag_use']) { ?>
<!-- 필드명:SupplyAmt / 사이즈:12 / 설명:공급가 액 -->
<input type="hidden" name="SupplyAmt" value="<?php echo $comm_tax_mny; ?>"> <!-- 과세금액 -->
<!-- 필드명:GoodsVat / 사이즈:12 / 설명:부가가 치세 -->
<input type="hidden" name="GoodsVat" value="<?php echo $comm_vat_mny; ?>"> <!-- 부가세 -->
<!-- 필드명:ServiceAmt / 사이즈:12 / 설명:봉사료 -->
<input type="hidden" name="ServiceAmt" value="0">
<!-- 필드명:TaxFreeAmt / 사이즈:12 / 설명:면세 금액 -->
<input type="hidden" name="TaxFreeAmt" value="<?php echo $comm_free_mny; ?>">
<input type="hidden" name="comm_tax_mny" value="<?php echo $comm_tax_mny; ?>"> <!-- 과세금액 -->
<input type="hidden" name="comm_vat_mny" value="<?php echo $comm_vat_mny; ?>"> <!-- 부가세 -->
<input type="hidden" name="comm_free_mny" value="<?php echo $comm_free_mny; ?>"> <!-- 비과세 금액 -->
<?php } ?>
<?php
/*
<input type="hidden" name="SelectQuota" value=""> <!-- 할부개월 제한, 일시불 : 00 으로 설정하며, 2 자리로 설정(ex:03) -->
*/
?>
+12
View File
@@ -0,0 +1,12 @@
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<div id="display_pay_button" class="btn_confirm">
<input type="button" value="주문하기" onclick="forderform_check(this.form);" class="btn_submit">
<a href="javascript:history.go(-1);" class="btn01">취소</a>
</div>
<div id="display_pay_process" style="display:none">
<img src="<?php echo G5_URL; ?>/shop/img/loading.gif" alt="">
<span>주문완료 중입니다. 잠시만 기다려 주십시오.</span>
</div>
+2
View File
@@ -0,0 +1,2 @@
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가;
+61
View File
@@ -0,0 +1,61 @@
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
if($od['od_pg'] != 'nicepay') return;
include_once(G5_SHOP_PATH.'/settle_nicepay.inc.php');
$od_id = $od['od_id'];
$tno = $od['od_tno'];
$partialCancelCode = 1;
$cancel_msg = $mod_memo; //취소사유
$cancelAmt = (int)$tax_mny + (int)$free_mny;
include G5_SHOP_PATH.'/nicepay/cancel_process.php';
$pg_res_cd = '';
$pg_res_msg = '';
$is_save_history = true;
if (isset($result['ResultCode'])) {
// nicepay 의 경우
if ($result['ResultCode'] === '2001' || $result['ResultCode'] === '2211') {
$add_memo_sql = '';
if ($is_save_history) {
// 환불금액기록
$mod_history = G5_TIME_YMDHIS.' '.$member['mb_id'].' 부분취소 ('.$cancelAmt.') 처리, 잔액 ('.$result['RemainAmt'].")\n";
$add_memo_sql = ", od_shop_memo = concat(od_shop_memo, \"$mod_history\") ";
}
$sql = " update {$g5['g5_shop_order_table']}
set od_refund_price = od_refund_price + '$cancelAmt'
$add_memo_sql
where od_id = '{$od['od_id']}'
and od_tno = '$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 {
$pg_res_cd = $result['ResultCode'];
$pg_res_msg = $result['ResultMsg'];
}
} else {
$pg_res_cd = '';
$pg_res_msg = 'curl 로 데이터를 받지 못했습니다.';
}
if ($pg_res_msg) {
alert('결제 부분취소 요청이 실패하였습니다.\\n\\n'.$pg_res_cd.' : '.$pg_res_msg);
}
+203
View File
@@ -0,0 +1,203 @@
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<script>
// 현금영수증 MAIN FUNC
function jsf__pay_cash( form )
{
jsf__show_progress(true);
if ( jsf__chk_cash( form ) == false )
{
jsf__show_progress(false);
return;
}
form.submit();
}
// 진행 바
function jsf__show_progress( show )
{
if ( show == true )
{
window.show_pay_btn.style.display = "none";
window.show_progress.style.display = "inline";
}
else
{
window.show_pay_btn.style.display = "inline";
window.show_progress.style.display = "none";
}
}
// 포맷 체크
function jsf__chk_cash( form )
{
if ( form.tr_code[0].checked )
{
if ( form.id_info.value.length != 10 &&
form.id_info.value.length != 11 &&
form.id_info.value.length != 13 )
{
alert("주민번호 또는 휴대폰번호를 정확히 입력해 주시기 바랍니다.");
form.id_info.select();
form.id_info.focus();
return false;
}
}
else if ( form.tr_code[1].checked )
{
if ( form.id_info.value.length != 10 )
{
alert("사업자번호를 정확히 입력해 주시기 바랍니다.");
form.id_info.select();
form.id_info.focus();
return false;
}
}
return true;
}
function jsf__chk_tr_code( form )
{
var span_tr_code_0 = document.getElementById( "span_tr_code_0" );
var span_tr_code_1 = document.getElementById( "span_tr_code_1" );
if ( form.tr_code[0].checked )
{
span_tr_code_0.style.display = "inline";
span_tr_code_1.style.display = "none";
}
else if (form.tr_code[1].checked )
{
span_tr_code_0.style.display = "none";
span_tr_code_1.style.display = "inline";
}
}
</script>
<div id="scash" class="new_win">
<h1 id="win_title"><?php echo $g5['title']; ?></h1>
<section>
<h2>주문정보</h2>
<div class="tbl_head01 tbl_wrap">
<table>
<colgroup>
<col class="grid_3">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">주문 번호</th>
<td><?php echo $od_id; ?></td>
</tr>
<tr>
<th scope="row">상품 정보</th>
<td><?php echo $goods_name; ?></td>
</tr>
<tr>
<th scope="row">주문자 이름</th>
<td><?php echo $od_name; ?></td>
</tr>
<tr>
<th scope="row">주문자 E-Mail</th>
<td><?php echo $od_email; ?></td>
</tr>
<tr>
<th scope="row">주문자 전화번호</th>
<td><?php echo $od_tel; ?></td>
</tr>
</tbody>
</table>
</div>
</section>
<section>
<h2>현금영수증 발급 정보</h2>
<form method="post" action="<?php echo G5_SHOP_URL; ?>/nicepay/taxsave_result.php">
<input type="hidden" name="tx" value="<?php echo $tx; ?>">
<input type="hidden" name="od_id" value="<?php echo $od_id; ?>">
<div class="tbl_head01 tbl_wrap">
<table>
<colgroup>
<col class="grid_3">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">원 거래 시각</th>
<td><?php echo $trad_time; ?></td>
</tr>
<tr>
<th scope="row">발행 용도</th>
<td>
<input type="radio" name="tr_code" value="1" id="tr_code1" onClick="jsf__chk_tr_code( this.form )" checked>
<label for="tr_code1">개인 소득공제용</label>
<input type="radio" name="tr_code" value="2" id="tr_code2" onClick="jsf__chk_tr_code( this.form )">
<label for="tr_code2">사업자 지출증빙용</label>
</td>
</tr>
<tr>
<th scope="row">
<label for="id_info">
<span id="span_tr_code_0" style="display:inline">주민(휴대폰)번호</span>
<span id="span_tr_code_1" style="display:none">사업자번호</span>
</label>
</th>
<td>
<input type="text" name="id_info" id="id_info" class="frm_input" size="16" maxlength="13"> ("-" 생략)
</td>
</tr>
<tr>
<th scope="row"><label for="buyeremail">이메일</label></th>
<td><input type="text" name="buyeremail" id="buyeremail" value="<?php echo $od_email; ?>" required class="required frm_input" size="30"></td>
</tr>
<tr>
<th scope="row"><label for="buyertel">휴대폰</label></th>
<td><input type="text" name="buyertel" id="buyertel" value="" required class="required frm_input" size="20"></td>
</tr>
<tr>
<th scope="row">거래금액 총합</th>
<td><?php echo number_format($amt_tot); ?>원</td>
</tr>
<tr>
<th scope="row">공급가액</th>
<td><?php echo number_format($amt_sup); ?>원<!-- ((거래금액 총합 * 10) / 11) --></td>
</tr>
<tr>
<th scope="row">부가가치세</th>
<td><?php echo number_format($amt_tax); ?>원<!-- 거래금액 총합 - 공급가액 - 봉사료 --></td>
</tr>
<?php if ($amt_free) { ?>
<tr>
<th scope="row">비과세공급가액</th>
<td><?php echo number_format($amt_free); ?>원</td>
</tr>
<?php } ?>
<tr>
<th scope="row">봉사료</th>
<td><?php echo number_format($amt_svc); ?>원</td>
</tr>
</tbody>
</table>
</div>
<div id="scash_apply">
<span id="show_pay_btn">
<button type="button" onclick="jsf__pay_cash( this.form )">등록요청</button>
</span>
<span id="show_progress" style="display:none">
<b>등록 진행중입니다. 잠시만 기다려주십시오</b>
</span>
</div>
</form>
</section>
</div>
+185
View File
@@ -0,0 +1,185 @@
<?php
include_once('./_common.php');
include_once(G5_SHOP_PATH.'/settle_nicepay.inc.php');
/*
*
* 현금결제(실시간 은행계좌이체, 무통장입금)에 대한 현금결제 영수증 발행 요청한다.
*
*/
if($tx == 'personalpay') {
$od = sql_fetch(" select * from {$g5['g5_shop_personalpay_table']} where pp_id = '$od_id' ");
if (!$od)
die('<p id="scash_empty">개인결제 내역이 존재하지 않습니다.</p>');
if($od['pp_cash'] == 1)
alert('이미 등록된 현금영수증 입니다.');
$buyername = $od['pp_name'];
$goodname = $od['pp_name'].'님 개인결제';
$amt_tot = (int)$od['pp_receipt_price'];
$amt_sup = (int)round(($amt_tot * 10) / 11);
$amt_svc = 0;
$amt_tax = (int)($amt_tot - $amt_sup);
} else {
$od = sql_fetch(" select * from {$g5['g5_shop_order_table']} where od_id = '$od_id' ");
if (!$od)
die('<p id="scash_empty">주문서가 존재하지 않습니다.</p>');
if($od['od_cash'] == 1)
alert('이미 등록된 현금영수증 입니다.');
$buyername = $od['od_name'];
$goods = get_goods($od['od_id']);
$goodname = $goods['full_name'];
$amt_tot = (int)$od['od_tax_mny'] + (int)$od['od_vat_mny'] + (int)$od['od_free_mny'];
$amt_tax = (int)$od['od_vat_mny'];
$amt_svc = 0;
$amt_sup = (int)$od['od_tax_mny'];
$amt_free = (int)$od['od_free_mny'];
}
$reg_num = $id_info;
$useopt = $tr_code;
$currency = 'WON';
//step1. 요청을 위한 파라미터 설정
$goodName = $goodname; // 상품명
$crPrice = $amt_tot;// 총 현금결제 금액
$supPrice = $amt_sup;// 공급가액
$tax = $amt_tax;// 부가세
$srcvPrice = $amt_svc;// 봉사료
$buyerName = $buyername;// 구매자 성명
$buyerEmail = $buyeremail;// 구매자 이메일 주소
$buyerTel = $buyertel;// 구매자 전화번호
$useOpt = $useopt;// 현금영수증 발행용도 ("1" - 소비자 소득공제용, "2" - 사업자 지출증빙용)
$regNum = $reg_num;// 현금결제자 주민등록번호
$ediDate = preg_replace('/[^0-9]/', '', G5_TIME_YMDHIS);
// 04 (현금영수증), 01 (매체구분 일반), 시간정보 (12자리), 랜덤 4자리숫자
$tid = $default['de_nicepay_mid'].'04'.'01'.substr($ediDate, 2).rand(1000, 9999);
$signData = bin2hex(hash('sha256', $default['de_nicepay_mid'].$amt_tot.$ediDate.$od['od_id'].$default['de_nicepay_key'], true));
$data = array(
'MID' => $default['de_nicepay_mid'],
'TID' => $tid,
'EdiDate' => $ediDate,
'Moid' => $od['od_id'],
'SignData' => $signData,
'GoodsName' => iconv('utf-8', 'euc-kr', $goodName),
'ReceiptAmt' => $amt_tot,
'ReceiptType' => ($useopt > 1) ? 2 : 1,
'ReceiptTypeNo' => $regNum,
'ReceiptSupplyAmt' => $supPrice,
'ReceiptVAT' => $tax,
'ReceiptServiceAmt' => $srcvPrice,
'ReceiptTaxFreeAmt' => (int)$od['od_free_mny'],
'CharSet' => 'utf-8',
);
$response = nicepay_reqPost($data, "https://pg-api.nicepay.co.kr/webapi/cash_receipt.jsp");
$result = json_decode($response, true);
if (function_exists('add_log')) add_log($result, true, 'rr');
// 성공이면
if (isset($result['ResultCode']) && $result['ResultCode'] === '7001') {
// DB 반영
$cash_no = $result['AuthCode']; // 현금영수증 승인번호
$cash = array();
$cash['TID'] = $result['TID'];
$cash['ApplNum'] = $cash_no;
$cash['AuthDate'] = $result['AuthDate'];
$cash_info = serialize($cash);
if($tx == 'personalpay') {
$sql = " update {$g5['g5_shop_personalpay_table']}
set pp_cash = '1',
pp_cash_no = '$cash_no',
pp_cash_info = '$cash_info'
where pp_id = '$od_id' ";
} else {
$sql = " update {$g5['g5_shop_order_table']}
set od_cash = '1',
od_cash_no = '$cash_no',
od_cash_info = '$cash_info'
where od_id = '$od_id' ";
}
$sql_result = sql_query($sql, false);
} else {
//2)API 요청 실패 화면처리
$msg = '현금영수증 발급 요청처리가 정상적으로 완료되지 않았습니다.';
$msg .= '\\nTX Response_code = '.$result['ResultCode'];
$msg .= '\\nTX Response_msg = '.$result['ResultMsg'];
alert($msg);
}
$g5['title'] = '현금영수증 발급';
include_once(G5_PATH.'/head.sub.php');
?>
<script>
function showreceipt() // 현금 영수증 출력
{
var showreceiptUrl = "https://npg.nicepay.co.kr/issue/IssueLoader.do?type=1&TID=<?php echo($result['TID']); ?>";
window.open(showreceiptUrl,"showreceipt","width=430,height=700, scrollbars=no,resizable=no");
}
</script>
<div id="lg_req_tx" class="new_win">
<h1 id="win_title">현금영수증 - 나이스페이</h1>
<div class="tbl_head01 tbl_wrap">
<table>
<colgroup>
<col class="grid_4">
<col>
</colgroup>
<tbody>
<tr>
<th scope="row">결과코드</th>
<td><?php echo $result['ResultCode']; ?></td>
</tr>
<tr>
<th scope="row">결과 메세지</th>
<td><?php echo $result['ResultMsg']; ?></td>
</tr>
<tr>
<th scope="row">현금영수증 거래번호</th>
<td><?php echo $result['TID']; ?></td>
</tr>
<tr>
<th scope="row">현금영수증 승인번호</th>
<td><?php echo $result['AuthCode']; ?></td>
</tr>
<tr>
<th scope="row">승인시간</th>
<td><?php echo preg_replace("/([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3 \\4:\\5:\\6", $result['AuthDate']); ?></td>
</tr>
<tr>
<th scope="row">현금영수증 URL</th>
<td>
<button type="button" name="receiptView" class="btn_frmline" onClick="javascript:showreceipt();">영수증 확인</button>
</td>
</tr>
<tr>
<td colspan="2"></td>
</tr>
</tbody>
</table>
</div>
</div>
<?php
include_once(G5_PATH.'/tail.sub.php');
+135 -11
View File
@@ -632,16 +632,41 @@ if($is_kakaopay_use) {
$multi_settle++;
if($default['de_pg_service'] === 'kcp' && isset($default['de_easy_pay_services']) && $default['de_easy_pay_services']){
if(in_array($default['de_pg_service'], array('kcp', 'nicepay')) && isset($default['de_easy_pay_services']) && $default['de_easy_pay_services']) {
$de_easy_pay_service_array = explode(',', $default['de_easy_pay_services']);
if( in_array('nhnkcp_payco', $de_easy_pay_service_array) ){
$easypay_prints['nhnkcp_payco'] = '<input type="radio" id="od_settle_nhnkcp_payco" name="od_settle_case" data-pay="payco" value="간편결제"> <label for="od_settle_nhnkcp_payco" class="PAYCO nhnkcp_payco lb_icon" title="NHN_KCP - PAYCO">PAYCO</label>';
}
if( in_array('nhnkcp_naverpay', $de_easy_pay_service_array) ){
$easypay_prints['nhnkcp_naverpay'] = '<input type="radio" id="od_settle_nhnkcp_naverpay" name="od_settle_case" data-pay="naverpay" value="간편결제" > <label for="od_settle_nhnkcp_naverpay" class="naverpay_icon nhnkcp_naverpay lb_icon" title="NHN_KCP - 네이버페이">네이버페이</label>';
}
if( in_array('nhnkcp_kakaopay', $de_easy_pay_service_array) ){
$easypay_prints['nhnkcp_kakaopay'] = '<input type="radio" id="od_settle_nhnkcp_kakaopay" name="od_settle_case" data-pay="kakaopay" value="간편결제" > <label for="od_settle_nhnkcp_kakaopay" class="kakaopay_icon nhnkcp_kakaopay lb_icon" title="NHN_KCP - 카카오페이">카카오페이</label>';
if ($default['de_pg_service'] === 'kcp') {
if( in_array('nhnkcp_payco', $de_easy_pay_service_array) ){
$easypay_prints['nhnkcp_payco'] = '<input type="radio" id="od_settle_nhnkcp_payco" name="od_settle_case" data-pay="payco" value="간편결제"> <label for="od_settle_nhnkcp_payco" class="PAYCO nhnkcp_payco lb_icon" title="NHN_KCP - PAYCO">PAYCO</label>';
}
if( in_array('nhnkcp_naverpay', $de_easy_pay_service_array) ){
$easypay_prints['nhnkcp_naverpay'] = '<input type="radio" id="od_settle_nhnkcp_naverpay" name="od_settle_case" data-pay="naverpay" value="간편결제" > <label for="od_settle_nhnkcp_naverpay" class="naverpay_icon nhnkcp_naverpay lb_icon" title="NHN_KCP - 네이버페이">네이버페이</label>';
}
if( in_array('nhnkcp_kakaopay', $de_easy_pay_service_array) ){
$easypay_prints['nhnkcp_kakaopay'] = '<input type="radio" id="od_settle_nhnkcp_kakaopay" name="od_settle_case" data-pay="kakaopay" value="간편결제" > <label for="od_settle_nhnkcp_kakaopay" class="kakaopay_icon nhnkcp_kakaopay lb_icon" title="NHN_KCP - 카카오페이">카카오페이</label>';
}
} else if ($default['de_pg_service'] === 'nicepay') {
if( in_array('nicepay_samsungpay', $de_easy_pay_service_array) ){
$easypay_prints['nicepay_samsungpay'] = '<input type="radio" id="od_settle_nicepay_samsungpay" name="od_settle_case" data-pay="nice_samsungpay" value="간편결제"> <label for="od_settle_nicepay_samsungpay" class="samsungpay_icon nicepay_samsungpay lb_icon" title="NICEPAY - 삼성페이">삼성페이</label>';
}
if( in_array('nicepay_naverpay', $de_easy_pay_service_array) ){
$easypay_prints['nicepay_naverpay'] = '<input type="radio" id="od_settle_nicepay_naverpay" name="od_settle_case" data-pay="nice_naverpay" value="간편결제" > <label for="od_settle_nicepay_naverpay" class="naverpay_icon nicepay_naverpay lb_icon" title="NICEPAY - 네이버페이">네이버페이</label>';
}
if( in_array('nicepay_kakaopay', $de_easy_pay_service_array) ){
$easypay_prints['nicepay_kakaopay'] = '<input type="radio" id="od_settle_nicepay_kakaopay" name="od_settle_case" data-pay="nice_kakaopay" value="간편결제" > <label for="od_settle_nicepay_kakaopay" class="kakaopay_icon nicepay_kakaopay lb_icon" title="NICEPAY - 카카오페이">카카오페이</label>';
}
if( in_array('nicepay_paycopay', $de_easy_pay_service_array) ){
$easypay_prints['nicepay_paycopay'] = '<input type="radio" id="od_settle_nicepay_paycopay" name="od_settle_case" data-pay="nice_paycopay" value="간편결제" > <label for="od_settle_nicepay_paycopay" class="paycopay_icon nicepay_paycopay lb_icon" title="NICEPAY - 페이코">페이코</label>';
}
if( in_array('nicepay_skpay', $de_easy_pay_service_array) ){
$easypay_prints['nicepay_skpay'] = '<input type="radio" id="od_settle_nicepay_skpay" name="od_settle_case" data-pay="nice_skpay" value="간편결제" > <label for="od_settle_nicepay_skpay" class="skpay_icon nicepay_skpay lb_icon" title="NICEPAY - SK페이">SK페이</label>';
}
if( in_array('nicepay_ssgpay', $de_easy_pay_service_array) ){
$easypay_prints['nicepay_ssgpay'] = '<input type="radio" id="od_settle_nicepay_ssgpay" name="od_settle_case" data-pay="nice_ssgpay" value="간편결제" > <label for="od_settle_nicepay_ssgpay" class="ssgpay_icon nicepay_ssgpay lb_icon" title="NICEPAY - SSGPAY">SSGPAY</label>';
}
if( in_array('nicepay_lpay', $de_easy_pay_service_array) ){
$easypay_prints['nicepay_lpay'] = '<input type="radio" id="od_settle_nicepay_lpay" name="od_settle_case" data-pay="nice_lpay" value="간편결제" > <label for="od_settle_nicepay_lpay" class="lpay_icon nicepay_lpay lb_icon" title="NICEPAY - LPAY">LPAY</label>';
}
}
} else {
$easypay_prints[strtolower($pg_easy_pay_name)] = '<input type="radio" id="od_settle_easy_pay" name="od_settle_case" value="간편결제"> <label for="od_settle_easy_pay" class="'.$pg_easy_pay_name.' lb_icon">'.$pg_easy_pay_name.'</label>';
@@ -1492,7 +1517,7 @@ function forderform_check(f)
f.LGD_CUSTOM_FIRSTPAY.value = "무통장";
break;
}
<?php } else if($default['de_pg_service'] == 'inicis') { ?>
<?php } else if($default['de_pg_service'] == 'inicis') { ?>
switch(settle_method)
{
case "계좌이체":
@@ -1523,8 +1548,67 @@ function forderform_check(f)
f.gopaymethod.value = "무통장";
break;
}
<?php } ?>
<?php } else if($default['de_pg_service'] == 'nicepay') { ?>
f.DirectShowOpt.value = ""; // 간편결제 요청 값 초기화
f.DirectEasyPay.value = ""; // 간편결제 요청 값 초기화
f.NicepayReserved.value = ""; // 간편결제 요청 값 초기화
f.EasyPayMethod.value = ""; // 간편결제 요청 값 초기화
<?php if ($default['de_escrow_use']) { // 간편결제시 에스크로값이 0이 되므로 기본설정값을 지정 ?>
f.TransType.value = "1";
<?php } ?>
switch(settle_method)
{
case "계좌이체":
f.PayMethod.value = "BANK";
break;
case "가상계좌":
f.PayMethod.value = "VBANK";
break;
case "휴대폰":
f.PayMethod.value = "CELLPHONE";
break;
case "신용카드":
f.PayMethod.value = "CARD";
break;
case "간편결제":
f.PayMethod.value = "CARD";
f.DirectShowOpt.value = "CARD";
f.TransType.value = "0"; // 간편결제의 경우 에스크로를 사용할수 없다.
var nicepay_easy_pay = jQuery("input[name='od_settle_case']:checked" ).attr("data-pay");
if(nicepay_easy_pay === "nice_naverpay"){
if(typeof f.DirectEasyPay !== "undefined") f.DirectEasyPay.value = "E020";
<?php
// * 카드 선택 시 전액 카드로 결제, 포인트 선택 시 전액 포인트로 결제.
// (카드와 포인트를 같이 사용하는 복합결제 형태의 결제는 불가함.)
// - 카드: EasyPayMethod=”E020=CARD”, 포인트: EasyPayMethod=”E020=POINT”
?>
if(typeof f.EasyPayMethod !== "undefined") f.EasyPayMethod.value = "E020=CARD";
} else if(nicepay_easy_pay === "nice_kakaopay"){
if(typeof f.NicepayReserved !== "undefined") f.NicepayReserved.value = "DirectKakao=Y";
} else if(nicepay_easy_pay === "nice_samsungpay"){
if(typeof f.DirectEasyPay !== "undefined") f.DirectEasyPay.value = "E021";
} else if(nicepay_easy_pay === "nice_paycopay"){
if(typeof f.NicepayReserved !== "undefined") f.NicepayReserved.value = "DirectPayco=Y";
} else if(nicepay_easy_pay === "nice_skpay"){
if(typeof f.NicepayReserved !== "undefined") f.NicepayReserved.value = "DirectPay11=Y";
} else if(nicepay_easy_pay === "nice_ssgpay"){
if(typeof f.DirectEasyPay !== "undefined") f.DirectEasyPay.value = "E007";
} else if(nicepay_easy_pay === "nice_lpay"){
if(typeof f.DirectEasyPay !== "undefined") f.DirectEasyPay.value = "E018";
}
break;
default:
f.PayMethod.value = "무통장";
break;
}
<?php } ?>
// 결제정보설정
<?php if($default['de_pg_service'] == 'kcp') { ?>
f.buyr_name.value = f.od_name.value;
@@ -1610,6 +1694,46 @@ function forderform_check(f)
f.submit();
}
<?php } ?>
<?php if($default['de_pg_service'] == 'nicepay') { ?>
f.Amt.value = f.good_mny.value;
<?php if($default['de_tax_flag_use']) { ?>
f.SupplyAmt.value = f.comm_tax_mny.value;
f.GoodsVat.value = f.comm_vat_mny.value;
f.TaxFreeAmt.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;
if(f.PayMethod.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(!nicepay_create_signdata(f))
return false;
nicepayStart(f);
} else {
f.submit();
}
<?php } ?>
}
}
+35 -1
View File
@@ -306,8 +306,20 @@ if ($od_temp_point)
$i_price = $i_price + $i_send_cost + $i_send_cost2 - $i_temp_point - $i_send_coupon;
$order_price = $tot_od_price + $send_cost + $send_cost2 - $tot_sc_cp_price - $od_temp_point;
// PG사의 가상계좌 또는 계좌이체의 자동 현금영수증 초기배열값
$pg_receipt_infos = array(
'od_cash' => 0,
'od_cash_no' => '',
'od_cash_info' => '',
);
$od_status = '주문';
$od_tno = '';
if (function_exists('check_payment_method')) {
check_payment_method($od_settle_case);
}
if ($od_settle_case == "무통장")
{
$od_receipt_point = $i_temp_point;
@@ -327,6 +339,9 @@ else if ($od_settle_case == "계좌이체")
case 'inicis':
include G5_SHOP_PATH.'/inicis/inistdpay_result.php';
break;
case 'nicepay':
include G5_SHOP_PATH.'/nicepay/nicepay_result.php';
break;
default:
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
$bank_name = iconv("cp949", "utf-8", $bank_name);
@@ -355,6 +370,9 @@ else if ($od_settle_case == "가상계좌")
include G5_SHOP_PATH.'/inicis/inistdpay_result.php';
$od_app_no = $app_no;
break;
case 'nicepay':
include G5_SHOP_PATH.'/nicepay/nicepay_result.php';
break;
default:
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
$bankname = iconv("cp949", "utf-8", $bankname);
@@ -379,6 +397,9 @@ else if ($od_settle_case == "휴대폰")
case 'inicis':
include G5_SHOP_PATH.'/inicis/inistdpay_result.php';
break;
case 'nicepay':
include G5_SHOP_PATH.'/nicepay/nicepay_result.php';
break;
default:
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
break;
@@ -403,6 +424,9 @@ else if ($od_settle_case == "신용카드")
case 'inicis':
include G5_SHOP_PATH.'/inicis/inistdpay_result.php';
break;
case 'nicepay':
include G5_SHOP_PATH.'/nicepay/nicepay_result.php';
break;
default:
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
$card_name = iconv("cp949", "utf-8", $card_name);
@@ -429,6 +453,9 @@ else if ($od_settle_case == "간편결제" || (($od_settle_case == "lpay" || $od
case 'inicis':
include G5_SHOP_PATH.'/inicis/inistdpay_result.php';
break;
case 'nicepay':
include G5_SHOP_PATH.'/nicepay/nicepay_result.php';
break;
default:
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
$card_name = iconv("cp949", "utf-8", $card_name);
@@ -485,6 +512,10 @@ if($tno) {
case 'inicis':
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
break;
case 'nicepay':
$cancelAmt = (int)$pg_price;
include G5_SHOP_PATH.'/nicepay/cancel_process.php';
break;
case 'KAKAOPAY':
$_REQUEST['TID'] = $tno;
$_REQUEST['Amt'] = $amount;
@@ -599,6 +630,9 @@ $sql = " insert {$g5['g5_shop_order_table']}
od_ip = '$REMOTE_ADDR',
od_settle_case = '$od_settle_case',
od_other_pay_type = '$od_other_pay_type',
od_cash = '{$pg_receipt_infos['od_cash']}',
od_cash_no = '{$pg_receipt_infos['od_cash_no']}',
od_cash_info = '{$pg_receipt_infos['od_cash_info']}',
od_test = '{$default['de_card_test']}'
";
$result = sql_query($sql, false);
@@ -780,7 +814,7 @@ if($config['cf_sms_use'] && ($default['de_sms_use2'] || $default['de_sms_use3'])
$sms_content = str_replace("{보낸분}", $od_name, $sms_content);
$sms_content = str_replace("{받는분}", $od_b_name, $sms_content);
$sms_content = str_replace("{주문번호}", $od_id, $sms_content);
$sms_content = str_replace("{주문금액}", number_format($tot_ct_price + $od_send_cost + $od_send_cost2), $sms_content);
$sms_content = str_replace("{주문금액}", number_format($tot_ct_price + $od_send_cost + (int) $od_send_cost2), $sms_content);
$sms_content = str_replace("{회원아이디}", $member['mb_id'], $sms_content);
$sms_content = str_replace("{회사명}", $default['de_admin_company_name'], $sms_content);
+30
View File
@@ -92,6 +92,36 @@ if($od['od_tno']) {
alert($res_msg.' 코드 : '.$res_cd);
}
break;
case 'nicepay':
include_once(G5_SHOP_PATH.'/settle_nicepay.inc.php');
$cancel_msg = '주문자 본인 취소-'.$cancel_memo;
$tno = $od['od_tno'];
$cancelAmt = $od['od_receipt_price'];
// 0:전체 취소, 1:부분 취소(별도 계약 필요)
$partialCancelCode = 0;
include G5_SHOP_PATH.'/nicepay/cancel_process.php';
$res_cd = '';
$res_msg = 'curl 로 데이터를 받지 못하거나 통신에 실패했습니다.';
if (isset($result['ResultCode'])) {
$res_cd = $result['ResultCode'];
// 실패했다면
if ($result['ResultCode'] !== '2001') {
$res_msg = $result['ResultMsg'];
}
}
if($res_cd != '2001') {
alert($res_msg.' 코드 : '.$res_cd);
}
break;
default:
require_once('./settle_kcp.inc.php');
+16 -5
View File
@@ -27,6 +27,11 @@ if (! (isset($od['od_id']) && $od['od_id']) || (!$is_member && md5($od['od_id'].
alert("조회하실 주문서가 없습니다.", G5_SHOP_URL);
}
// nicepay 로 주문하고 가상계좌인 경우
if ($od['od_pg'] === 'nicepay' && $od['od_settle_case'] === '가상계좌' && $od['od_deposit_name']){
$od['od_deposit_name'] .= '_NICE';
}
// 결제방법
$settle_case = $od['od_settle_case'];
@@ -289,7 +294,7 @@ if($od['od_pg'] == 'lg') {
}
// 승인번호, 휴대폰번호, 거래번호
if($app_no_subj && $app_no)
if($app_no_subj && trim($app_no))
{
?>
<tr>
@@ -331,6 +336,8 @@ if($od['od_pg'] == 'lg') {
$hp_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
} else if($od['od_pg'] == 'inicis') {
$hp_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/mCmReceipt_head.jsp?noTid='.$od['od_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
} else if($od['od_pg'] == 'nicepay') {
$hp_receipt_script = 'window.open(\'https://npg.nicepay.co.kr/issue/IssueLoader.do?type=0&TID='.$od['od_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
} else {
$hp_receipt_script = 'window.open(\''.G5_BILL_RECEIPT_URL.'mcash_bill&tno='.$od['od_tno'].'&order_no='.$od['od_id'].'&trade_mony='.$od['od_receipt_price'].'\', \'winreceipt\', \'width=500,height=690,scrollbars=yes,resizable=yes\');';
}
@@ -339,7 +346,7 @@ if($od['od_pg'] == 'lg') {
<?php
}
if($od['od_settle_case'] == '신용카드' || is_inicis_order_pay($od['od_settle_case']) || (shop_is_taxsave($od, true) && $misu_price == 0) )
if($od['od_settle_case'] == '신용카드' || $od['od_settle_case'] == '간편결제' || is_inicis_order_pay($od['od_settle_case']) || (shop_is_taxsave($od, true) && $misu_price == 0) )
{
if($od['od_pg'] == 'lg') {
require_once G5_SHOP_PATH.'/settle_lg.inc.php';
@@ -350,6 +357,8 @@ if($od['od_pg'] == 'lg') {
$card_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
} else if($od['od_pg'] == 'inicis') {
$card_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/mCmReceipt_head.jsp?noTid='.$od['od_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
} else if($od['od_pg'] == 'nicepay') {
$card_receipt_script = 'window.open(\'https://npg.nicepay.co.kr/issue/IssueLoader.do?type=0&TID='.$od['od_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
} else {
$card_receipt_script = 'window.open(\''.G5_BILL_RECEIPT_URL.'card_bill&tno='.$od['od_tno'].'&order_no='.$od['od_id'].'&trade_mony='.$od['od_receipt_price'].'\', \'winreceipt\', \'width=470,height=815,scrollbars=yes,resizable=yes\');';
}
@@ -395,9 +404,9 @@ if($od['od_pg'] == 'lg') {
}
// 현금영수증 발급을 사용하는 경우에만
if (function_exists('shop_is_taxsave') && shop_is_taxsave($od)) {
if ((function_exists('shop_is_taxsave') && shop_is_taxsave($od)) || (function_exists('is_order_cashreceipt') && is_order_cashreceipt($od))) {
// 미수금이 없고 현금일 경우에만 현금영수증을 발급 할 수 있습니다.
if ($misu_price == 0 && $od['od_receipt_price'] && ($od['od_settle_case'] == '무통장' || $od['od_settle_case'] == '계좌이체' || $od['od_settle_case'] == '가상계좌')) {
if ($misu_price == 0 && is_order_cashreceipt($od)) {
?>
<tr>
<th scope="row">현금영수증</th>
@@ -423,6 +432,8 @@ if($od['od_pg'] == 'lg') {
} else if($od['od_pg'] == 'inicis') {
$cash = unserialize($od['od_cash_info']);
$cash_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/Cash_mCmReceipt.jsp?noTid='.$cash['TID'].'&clpaymethod=22\',\'showreceipt\',\'width=380,height=540,scrollbars=no,resizable=no\');';
} else if($od['od_pg'] == 'nicepay') {
$cash_receipt_script = 'window.open(\'https://npg.nicepay.co.kr/issue/IssueLoader.do?type=1&TID='.$od['od_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
} else {
require_once G5_SHOP_PATH.'/settle_kcp.inc.php';
@@ -433,7 +444,7 @@ if($od['od_pg'] == 'lg') {
<a href="javascript:;" onclick="<?php echo $cash_receipt_script; ?>" class="btn_frmline">현금영수증 확인하기</a>
<?php
}
else
else if (shop_is_taxsave($od))
{
?>
<a href="javascript:;" onclick="window.open('<?php echo G5_SHOP_URL; ?>/taxsave.php?od_id=<?php echo $od_id; ?>', 'taxsave', 'width=550,height=400,scrollbars=1,menus=0');" class="btn_frmline">현금영수증을 발급하시려면 클릭하십시오.</a>
+2 -2
View File
@@ -10,10 +10,10 @@ $sql = " select * from {$g5['g5_shop_personalpay_table']} where pp_id = '$pp_id'
$pp = sql_fetch($sql);
if(! (isset($pp['pp_id']) && $pp['pp_id']))
alert('개인결제 정보가 존재하지 않습니다.');
alert('개인결제 정보가 존재하지 않습니다.', G5_SHOP_URL);
if($pp['pp_tno'])
alert('이미 결제하신 개인결제 내역입니다.');
alert('이미 결제하신 개인결제 내역입니다.', G5_SHOP_URL);
$pp['pp_name'] = strip_tags($pp['pp_name']);
+67 -1
View File
@@ -252,8 +252,34 @@ function forderform_check(f)
f.gopaymethod.value = "무통장";
break;
}
<?php } ?>
<?php } else if($default['de_pg_service'] == 'nicepay') { ?>
f.DirectShowOpt.value = ""; // 간편결제 요청 값 초기화
f.DirectEasyPay.value = ""; // 간편결제 요청 값 초기화
f.NicepayReserved.value = ""; // 간편결제 요청 값 초기화
f.EasyPayMethod.value = ""; // 간편결제 요청 값 초기화
<?php if ($default['de_escrow_use']) { // 간편결제시 에스크로값이 0이 되므로 기본설정값을 지정 ?>
f.TransType.value = "1";
<?php } ?>
switch(settle_method)
{
case "계좌이체":
f.PayMethod.value = "BANK";
break;
case "가상계좌":
f.PayMethod.value = "VBANK";
break;
case "휴대폰":
f.PayMethod.value = "CELLPHONE";
break;
case "신용카드":
f.PayMethod.value = "CARD";
break;
default:
f.PayMethod.value = "무통장";
break;
}
<?php } ?>
// 결제정보설정
<?php if($default['de_pg_service'] == 'kcp') { ?>
f.buyr_name.value = f.pp_name.value;
@@ -318,5 +344,45 @@ function forderform_check(f)
f.submit();
}
<?php } ?>
<?php if($default['de_pg_service'] == 'nicepay') { ?>
f.Amt.value = f.good_mny.value;
<?php if($default['de_tax_flag_use']) { ?>
f.SupplyAmt.value = f.comm_tax_mny.value;
f.GoodsVat.value = f.comm_vat_mny.value;
f.TaxFreeAmt.value = f.comm_free_mny.value;
<?php } ?>
f.BuyerName.value = f.pp_name.value;
f.BuyerEmail.value = f.pp_email.value;
f.BuyerTel.value = f.pp_hp.value;
if(f.PayMethod.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(!nicepay_create_signdata(f))
return false;
nicepayStart(f);
} else {
f.submit();
}
<?php } ?>
}
</script>
+16
View File
@@ -34,6 +34,9 @@ if ($pp_settle_case == "계좌이체")
case 'inicis':
include G5_SHOP_PATH.'/inicis/inistdpay_result.php';
break;
case 'nicepay':
include G5_SHOP_PATH.'/nicepay/nicepay_result.php';
break;
default:
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
$bank_name = iconv("cp949", "utf-8", $bank_name);
@@ -56,6 +59,9 @@ else if ($pp_settle_case == "가상계좌")
case 'inicis':
include G5_SHOP_PATH.'/inicis/inistdpay_result.php';
break;
case 'nicepay':
include G5_SHOP_PATH.'/nicepay/nicepay_result.php';
break;
default:
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
$bankname = iconv("cp949", "utf-8", $bankname);
@@ -78,6 +84,9 @@ else if ($pp_settle_case == "휴대폰")
case 'inicis':
include G5_SHOP_PATH.'/inicis/inistdpay_result.php';
break;
case 'nicepay':
include G5_SHOP_PATH.'/nicepay/nicepay_result.php';
break;
default:
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
break;
@@ -98,6 +107,9 @@ else if ($pp_settle_case == "신용카드")
case 'inicis':
include G5_SHOP_PATH.'/inicis/inistdpay_result.php';
break;
case 'nicepay':
include G5_SHOP_PATH.'/nicepay/nicepay_result.php';
break;
default:
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
$card_name = iconv("cp949", "utf-8", $card_name);
@@ -125,6 +137,10 @@ if((int)$pp['pp_price'] !== (int)$pg_price) {
case 'inicis':
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
break;
case 'nicepay':
$cancelAmt = (int)$pg_price;
include G5_SHOP_PATH.'/nicepay/cancel_process.php';
break;
default:
include G5_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php';
break;
+6
View File
@@ -151,6 +151,8 @@ if($pp['pp_pg'] == 'lg') {
$hp_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
} else if($pp['pp_pg'] == 'inicis') {
$hp_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/mCmReceipt_head.jsp?noTid='.$pp['pp_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
} else if($pp['pp_pg'] == 'nicepay') {
$hp_receipt_script = 'window.open(\'https://npg.nicepay.co.kr/issue/IssueLoader.do?type=0&TID='.$pp['pp_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
} else {
$hp_receipt_script = 'window.open(\''.G5_BILL_RECEIPT_URL.'mcash_bill&tno='.$pp['pp_tno'].'&order_no='.$pp['pp_id'].'&trade_mony='.$pp['pp_receipt_price'].'\', \'winreceipt\', \'width=500,height=690,scrollbars=yes,resizable=yes\');';
}
@@ -170,6 +172,8 @@ if($pp['pp_pg'] == 'lg') {
$card_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
} else if($pp['pp_pg'] == 'inicis') {
$card_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/mCmReceipt_head.jsp?noTid='.$pp['pp_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
} else if($pp['pp_pg'] == 'nicepay') {
$card_receipt_script = 'window.open(\'https://npg.nicepay.co.kr/issue/IssueLoader.do?type=0&TID='.$pp['pp_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
} else {
$card_receipt_script = 'window.open(\''.G5_BILL_RECEIPT_URL.'card_bill&tno='.$pp['pp_tno'].'&order_no='.$pp['pp_id'].'&trade_mony='.$pp['pp_receipt_price'].'\', \'winreceipt\', \'width=470,height=815,scrollbars=yes,resizable=yes\');';
}
@@ -224,6 +228,8 @@ if($pp['pp_pg'] == 'lg') {
} else if($pp['pp_pg'] == 'inicis') {
$cash = unserialize($pp['pp_cash_info']);
$cash_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/Cash_mCmReceipt.jsp?noTid='.$cash['TID'].'&clpaymethod=22\',\'showreceipt\',\'width=380,height=540,scrollbars=no,resizable=no\');';
} else if($pp['pp_pg'] == 'nicepay') {
$cash_receipt_script = 'window.open(\'https://npg.nicepay.co.kr/issue/IssueLoader.do?type=1&TID='.$od['od_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
} else {
require_once G5_SHOP_PATH.'/settle_kcp.inc.php';
+70
View File
@@ -0,0 +1,70 @@
<?php
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
// curl 체크
if (!function_exists('curl_init')) {
alert('cURL 모듈이 설치되어 있지 않습니다.\\n상점관리자에게 문의해 주십시오.');
}
if ($default['de_card_test']) {
// 테스트인 경우
$default['de_nicepay_mid'] = 'nicepay00m';
// $default['de_nicepay_key'] = '33F49GnCMS1mFYlGXisbUDzVf2ATWCl9k3R++d5hDd3Frmuos/XLx8XhXpe+LDYAbpGKZYSwtlyyLOtS/8aD7A==';
$default['de_nicepay_key'] = 'EYzu8jGGMfqaDEp76gSckuvnaHHu+bC4opsSN6lHv3b2lurNYkVXrZ7Z1AoqQnXI3eLuaUFyoRNC6FkrzVjceg==';
// 나이스 카카오페이 간편결제 직접 호출 테스트 아이디
// $default['de_nicepay_mid'] = 'nickakao1m';
// $default['de_nicepay_key'] = 'A2SY4ztPs6LPymgFl/5bbsLuINyvgKq5eOdDSHb31gdO4dfGr3O6hBxvRp9oXdat45VninNUySc7E/5UT01vKw==';
// 나이스 네이버페이 간편결제 직접 호출 테스트 아이디
// $default['de_nicepay_mid'] = 'nicnaver0m';
// $default['de_nicepay_key'] = 'kNuUIpYvHPGcTTlmRsFddsqp6P9JoTcEcoRB1pindAwCZ0oySNuCQX5Zv483XTU5UuRiy/VYZ9BXw1BRvEUYMg==';
// 나이스 삼성페이 간편결제 직접 호출 테스트 아이디
// $default['de_nicepay_mid'] = 'nicessp06m';
// $default['de_nicepay_key'] = '+iz0ov8wQDjOQ73GhO6QJ/kXF041yRiS+ERc3rD36Oe62onynMp0u0+ZvmKcBw2EKd2LlRcxJqbHBz313h0aJg==';
// 나이스 애플페이 간편결제 직접 호출 테스트 아이디 (애플페이는 오직 모바일에서만 됩니다)
// $default['de_nicepay_mid'] = 'nicapple1m';
// $default['de_nicepay_key'] = 'dBJ0hrJ8HtFpWHYxuyC3nRkBaEA3AXUfzZxfbRHKgrMipQmcY2m0Ga4qG0jz92VJe7BL5tK0qSVSloowdXrtqg==';
} else {
// 실결제인 경우
$default['de_nicepay_mid'] = "SR".$default['de_nicepay_mid'];
}
// 개인결제인지 아니면 쇼핑몰 일반결제인지 returnURL이 서로 다름
$nicepay_returnURL = ((isset($pp['pp_id']) && $pp['pp_id'])) ? G5_SHOP_URL.'/personalpayformupdate.php' : G5_SHOP_URL.'/orderformupdate.php';
// $ediDate = preg_replace('/[^0-9]/', '', G5_TIME_YMDHIS);
// $hashString = bin2hex(hash('sha256', $ediDate.$default['de_nicepay_mid'].$price.$default['de_nicepay_key'], true));
$NICEPAY_METHOD = array(
'CARD' => '신용카드',
'BANK' => '계좌이체',
'VBANK' => '가상계좌',
'CELLPHONE' => '휴대폰'
);
if (! function_exists('nicepay_reqPost')) {
//Post api call
function nicepay_reqPost($data, $url){
$url_data = parse_url($url);
// 나이스페이 url이 맞는지 체크하여 틀리면 false를 리턴합니다.
if (! (isset($url_data['host']) && preg_match('#\.nicepay\.co\.kr$#i', $url_data['host']))) {
return false;
}
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, 15); //connection timeout 15
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($data)); //POST data
curl_setopt($ch, CURLOPT_POST, true);
$response = curl_exec($ch);
curl_close($ch);
return $response;
}
}
+176
View File
@@ -0,0 +1,176 @@
<?php
include_once('./_common.php');
if (function_exists('add_log')) add_log($_POST, false, 'vv');
$NICEPAY_log_path = G5_DATA_PATH.'/log'; // 나이스페이 가상계좌 로그저장 경로
$NICEPAY_payLog = false; // 로그를 기록하려면 true 로 수정
//**********************************************************************************
$pg_allow_ips = array(
'121.133.126.10',
'121.133.126.11',
'211.33.136.39'
);
// PG 사에서 보냈는지 IP로 체크
if (in_array($_SERVER['REMOTE_ADDR'], $pg_allow_ips)) {
$PayMethod = isset($_POST['PayMethod']) ? clean_xss_tags($_POST['PayMethod']) : ''; //지불수단
$M_ID = isset($_POST['MID']) ? clean_xss_tags($_POST['MID']) : ''; //상점ID
$MallUserID = isset($_POST['MallUserID']) ? clean_xss_tags($_POST['MallUserID']) : ''; //회원사 ID
$Amt = isset($_POST['Amt']) ? (int) $_POST['Amt'] : 0; //금액
$name = isset($_POST['name']) ? clean_xss_tags($_POST['name']) : ''; //구매자명
$GoodsName = isset($_POST['GoodsName']) ? clean_xss_tags($_POST['GoodsName']) : ''; //상품명
$TID = isset($_POST['TID']) ? clean_xss_tags($_POST['TID']) : ''; //거래번호
$MOID = isset($_POST['MOID']) ? clean_xss_tags($_POST['MOID']) : ''; //주문번호
$AuthDate = isset($_POST['AuthDate']) ? clean_xss_tags($_POST['AuthDate']) : ''; //입금일시 (yyMMddHHmmss) 12 자리
$ResultCode = isset($_POST['ResultCode']) ? clean_xss_tags($_POST['ResultCode']) : ''; //결과코드 ('4110' 경우 입금통보)
$ResultMsg = isset($_POST['ResultMsg']) ? clean_xss_tags($_POST['ResultMsg']) : ''; //결과메시지
$VbankNum = isset($_POST['VbankNum']) ? clean_xss_tags($_POST['VbankNum']) : ''; //가상계좌번호
$FnCd = isset($_POST['FnCd']) ? clean_xss_tags($_POST['FnCd']) : ''; //가상계좌 은행코드
$VbankName = isset($_POST['VbankName']) ? clean_xss_tags($_POST['VbankName']) : ''; //가상계좌 은행명
$VbankInputName = isset($_POST['VbankInputName']) ? clean_xss_tags($_POST['VbankInputName']) : ''; //입금자 명
$CancelDate = isset($_POST['CancelDate']) ? clean_xss_tags($_POST['CancelDate']) : ''; //취소일시
//가상계좌채번시 현금영수증 자동발급신청이 되었을경우 전달되며
//RcptTID 에 값이 있는경우만 발급처리 됨
$RcptTID = isset($_POST['RcptTID']) ? clean_xss_tags($_POST['RcptTID']) : ''; //현금영수증 거래번호
$RcptType = isset($_POST['RcptType']) ? clean_xss_tags($_POST['RcptType']) : ''; //현금 영수증 구분(0:미발행, 1:소득공제용, 2:지출증빙용)
$RcptAuthCode = isset($_POST['RcptAuthCode']) ? clean_xss_tags($_POST['RcptAuthCode']) : ''; //현금영수증 승인번호
// 입금통보 코드가 4110 성공이면
if ($ResultCode === '4110') {
// 입금결과 처리
$sql = " select pp_id, od_id from {$g5['g5_shop_personalpay_table']} where pp_id = '$MOID' and pp_app_no = '$VbankNum' ";
$row = sql_fetch($sql);
$result = false;
$receipt_time = preg_replace("/([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3 \\4:\\5:\\6", $AuthDate);
if($row['pp_id']) {
// 개인결제 UPDATE
$sql = " update {$g5['g5_shop_personalpay_table']}
set pp_receipt_price = '$Amt',
pp_receipt_time = '$receipt_time'
where pp_id = '$MOID'
and pp_app_no = '$VbankNum' ";
$result = sql_query($sql, false);
if($row['od_id']) {
// 주문서 UPDATE
$sql = " update {$g5['g5_shop_order_table']}
set od_receipt_price = od_receipt_price + '$Amt',
od_receipt_time = '$receipt_time',
od_shop_memo = concat(od_shop_memo, \"\\n개인결제 ".$row['pp_id']." 로 결제완료 - ".$receipt_time."\")
where od_id = '{$row['od_id']}' ";
$result = sql_query($sql, FALSE);
}
} else {
// 주문서 UPDATE
$sql = " update {$g5['g5_shop_order_table']}
set od_receipt_price = '$Amt',
od_receipt_time = '$receipt_time'
where od_id = '$MOID'
and od_app_no = '$VbankNum' ";
$result = sql_query($sql, FALSE);
}
if($result) {
if ($row['od_id'])
$od_id = $row['od_id'];
else
$od_id = $MOID;
// 주문정보 체크
$sql = " select count(od_id) as cnt
from {$g5['g5_shop_order_table']}
where od_id = '$od_id'
and od_status = '주문' ";
$row = sql_fetch($sql);
if($row['cnt'] == 1) {
// 미수금 정보 업데이트
$info = get_order_info($od_id);
$add_update_sql = '';
// 현금영수증 발급시 1 또는 2 이면
if ($RcptType) {
$add_update_sql = "
, od_cash = '1',
od_cash_no = '".$RcptAuthCode."',
od_cash_info = '".serialize(array('TID'=>$RcptTID, 'ApplNum'=>$RcptAuthCode, 'AuthDate'=>$AuthDate))."'
";
}
$sql = " update {$g5['g5_shop_order_table']}
set od_misu = '{$info['od_misu']}' $add_update_sql ";
if($info['od_misu'] == 0)
$sql .= " , od_status = '입금' ";
$sql .= " where od_id = '$od_id' ";
sql_query($sql, FALSE);
// 장바구니 상태변경
if($info['od_misu'] == 0) {
$sql = " update {$g5['g5_shop_cart_table']}
set ct_status = '입금'
where od_id = '$od_id' ";
sql_query($sql, FALSE);
}
}
}
if($NICEPAY_payLog) {
$logfile = fopen( $NICEPAY_log_path . "/nice_vacct_noti_result.log", "a+" );
fwrite( $logfile,"************************************************\r\n");
fwrite( $logfile,"PayMethod : ".$PayMethod."\r\n");
fwrite( $logfile,"MID : ".$MID."\r\n");
fwrite( $logfile,"MallUserID : ".$MallUserID."\r\n");
fwrite( $logfile,"Amt : ".$Amt."\r\n");
fwrite( $logfile,"name : ".$name."\r\n");
fwrite( $logfile,"GoodsName : ".$GoodsName."\r\n");
fwrite( $logfile,"TID : ".$TID."\r\n");
fwrite( $logfile,"MOID : ".$MOID."\r\n");
fwrite( $logfile,"AuthDate : ".$AuthDate."\r\n");
fwrite( $logfile,"ResultCode : ".$ResultCode."\r\n");
fwrite( $logfile,"ResultMsg : ".$ResultMsg."\r\n");
fwrite( $logfile,"VbankNum : ".$VbankNum."\r\n");
fwrite( $logfile,"FnCd : ".$FnCd."\r\n");
fwrite( $logfile,"VbankName : ".$VbankName."\r\n");
fwrite( $logfile,"VbankInputName : ".$VbankInputName."\r\n");
fwrite( $logfile,"RcptTID : ".$RcptTID."\r\n");
fwrite( $logfile,"RcptType : ".$RcptType."\r\n");
fwrite( $logfile,"RcptAuthCode : ".$RcptAuthCode."\r\n");
fwrite( $logfile,"CancelDate : ".$CancelDate."\r\n");
fwrite( $logfile,"************************************************\r\n");
fclose( $logfile );
}
//************************************************************************************
//위에서 상점 데이터베이스에 등록 성공유무에 따라서 성공시에는 "OK"를 이니시스로
//리턴하셔야합니다. 아래 조건에 데이터베이스 성공시 받는 FLAG 변수를 넣으세요
//(주의) OK를 리턴하지 않으시면 이니시스 지불 서버는 "OK"를 수신할때까지 계속 재전송을 시도합니다
//기타 다른 형태의 PRINT( echo )는 하지 않으시기 바랍니다
if ($result)
{
echo "OK"; // 절대로 지우지마세요
}
else
{
echo "FAIL"; // 절대로 지우지마세요
}
//*************************************************************************************
}
}
+6
View File
@@ -48,6 +48,12 @@ if($tx == 'personalpay') {
$amt_sup = (int)$od['od_tax_mny'] + (int)$od['od_free_mny'];
$amt_tax = (int)$od['od_vat_mny'];
$amt_svc = 0;
$amt_free = 0;
if ($od['od_pg'] === 'nicepay') {
$amt_sup = (int)$od['od_tax_mny'];
$amt_free = (int)$od['od_free_mny'];
}
}
$trad_time = date("YmdHis");
+5 -2
View File
@@ -796,12 +796,15 @@ box-shadow: 1px 2px 2px #eee;}
#sod_frm_paysel legend {position:absolute;font-size:0;line-height:0;overflow:hidden}
#sod_frm_paysel .KPAY{background:url('../../../img/kpay.png') no-repeat 50% 50% #fff;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .PAYNOW{background:url('../../../img/paynow.png') no-repeat 50% 50% #fff;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .PAYCO{background:url('../../../img/payco.png') no-repeat 50% 50% #fff;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .inicis_lpay{background:url('../../../img/lpay_logo.png') no-repeat 50% 50% #fff;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .PAYCO, #sod_frm_paysel .paycopay_icon{background:url('../../../img/payco.png') no-repeat 50% 50% #fff;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .inicis_lpay, #sod_frm_paysel .lpay_icon{background:url('../../../img/lpay_logo.png') no-repeat 50% 50% #fff;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .inicis_kakaopay{position:relative;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .inicis_kakaopay em{position:absolute;top:15px;left:45px;width:70px;height:30px;background:url('../../../img/kakao.png') no-repeat 50% 50% #ffeb00;overflow:hidden;text-indent:-999px;border-radius:30px}
#sod_frm_paysel .kakaopay_icon{background:url('../../../img/kakao.png') no-repeat 50% 50% #fff;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .naverpay_icon{background:url('../../../img/ico-default-naverpay.png') no-repeat 50% 50% #fff;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .samsungpay_icon{background:url('../../../img/samsungpay.png') no-repeat 50% 50% #fff;display:inline-block;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .ssgpay_icon{background:url('../../../img/ssgpay_icon.png') no-repeat 50% 50% #fff;display:inline-block;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .skpay_icon{background:url('../../../img/skpay11_icon.png') no-repeat 50% 50% #fff; background-size: 70px;display:inline-block;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .bank_icon{background:url('../../../img/pay_icon1.png') no-repeat 15px 50% #fff}
#sod_frm_paysel .vbank_icon{background:url('../../../img/pay_icon2.png') no-repeat 15px 50% #fff}
#sod_frm_paysel .iche_icon{background:url('../../../img/pay_icon2.png') no-repeat 15px 50% #fff}
+11 -5
View File
@@ -221,13 +221,16 @@ box-shadow: 0 0 6px rgba(0,0,0,0.2);}
#m_sod_frm_paysel li {float:left;padding:5px;width:46%;height:35px}
#m_sod_frm_paysel .KPAY{background:url('../../../img/kpay.png') no-repeat;width:37px;height:15px;overflow:hidden;text-indent:-999px;display:inline-block;background-size:100%}
#m_sod_frm_paysel .PAYNOW{background:url('../../../img/paynow.png') no-repeat;width:46px;height:15px;overflow:hidden;text-indent:-999px;display:inline-block;background-size:100%;}
#m_sod_frm_paysel .PAYCO{background:url('../../../img/payco.png') no-repeat 1px;width:50px;height:15px;overflow:hidden;text-indent:-999px;display:inline-block;background-size:100%}
#m_sod_frm_paysel .inicis_lpay{background:url('../../../img/lpay_logo.png') no-repeat;width:35px;height:12px;overflow:hidden;text-indent:-999px;display:inline-block;background-size:100%;}
#m_sod_frm_paysel .PAYCO, #m_sod_frm_paysel .paycopay_icon{background:url('../../../img/payco.png') no-repeat 1px;width:50px;height:15px;overflow:hidden;text-indent:-999px;display:inline-block;background-size:100%}
#m_sod_frm_paysel .inicis_lpay, #m_sod_frm_paysel .lpay_icon{background:url('../../../img/lpay_logo.png') no-repeat;width:35px;height:12px;overflow:hidden;text-indent:-999px;display:inline-block;background-size:100%;}
#m_sod_frm_paysel .inicis_kakaopay{background:url('../../../img/kakao.png') no-repeat 50% 50% #ffeb00;border-radius:30px;height:26px;width:74px;display:inline-block;overflow:hidden;text-indent:-999px;background-size:36px auto}
#m_sod_frm_paysel .kakaopay_icon{background:url('../../../img/ico-mobile-kakaopay.png') no-repeat #fff;height:23px;width:63px;display:inline-block;overflow:hidden;text-indent:-999px;background-size:45px auto;background-position: 10% 40%}
#m_sod_frm_paysel .naverpay_icon{background:url('../../../img/ico-mobile-naverpay.png') no-repeat #fff;height:23px;width:60px;display:inline-block;overflow:hidden;text-indent:-999px;background-size:45px auto;background-position: 0% 30%}
#m_sod_frm_paysel .applepay_icon{background:url('../../../img/ico-mobile-applepay.png') no-repeat #fff;height:30px;width:60px;display:inline-block;overflow:hidden;text-indent:-999px;background-size:43px auto}
#m_sod_frm_paysel .samsung_pay{margin-left:-23px;background:url('../../../img/samsungpay.png') no-repeat 24px 3px;height:25px;width:106px;display:inline-block;overflow:hidden;text-indent:-999px}
#m_sod_frm_paysel .applepay_icon{background:url('../../../img/ico-mobile-applepay.png') no-repeat #fff;height:30px;width:60px;display:inline-block;overflow:hidden;text-indent:-999px;background-size:43px auto}
#m_sod_frm_paysel .ssgpay_icon{background:url('../../../img/ssgpay_icon.png') no-repeat 0px 3px #fff;width:55px;height:20px;background-size:100%;display:inline-block;overflow:hidden;text-indent:-999px}
#m_sod_frm_paysel .skpay_icon{background:url('../../../img/skpay11_icon.png') no-repeat 0px 3px #fff;width:55px;height:20px;background-size:100%;display:inline-block;overflow:hidden;text-indent:-999px}
#m_sod_frm_paysel .samsung_pay, #m_sod_frm_paysel .samsungpay_icon{margin-left:-23px;background:url('../../../img/samsungpay.png') no-repeat 24px 7px;height:25px;width:106px;display:inline-block;overflow:hidden;text-indent:-999px}
#sod_frm_pay{padding:10px;;border-top:1px solid #f3f3f3}
#sod_frm_pay h2{margin:10px 0;font-size:1.25em}
@@ -905,11 +908,14 @@ box-shadow:0 0 8px rgba(65,98,255,0.8)}
#sod_frm_paysel legend {position:absolute;font-size:0;line-height:0;overflow:hidden}
#sod_frm_paysel .KPAY{background:url('../../../img/kpay.png') no-repeat 50% 50% #fff;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .PAYNOW{background:url('../../../img/paynow.png') no-repeat 50% 50% #fff;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .PAYCO{background:url('../../../img/payco.png') no-repeat 50% 50% #fff;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .inicis_lpay{background:url('../../../img/lpay_logo.png') no-repeat 50% 50% #fff;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .PAYCO, #sod_frm_paysel .paycopay_icon{background:url('../../../img/payco.png') no-repeat 50% 50% #fff;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .inicis_lpay, #sod_frm_paysel .lpay_icon{background:url('../../../img/lpay_logo.png') no-repeat 50% 50% #fff;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .inicis_kakaopay{background:url('../../../img/kakao.png') no-repeat 50% 50% #f4dc34;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .kakaopay_icon{background:url('../../../img/kakao.png') no-repeat 50% 50% #f4dc34;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .naverpay_icon{background:url('../../../img/ico-default-naverpay.png') no-repeat 50% 50% #fff;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .samsungpay_icon{background:url('../../../img/samsungpay.png') no-repeat 50% 50% #fff;display:inline-block;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .ssgpay_icon{background:url('../../../img/ssgpay_icon.png') no-repeat 50% 50% #fff;display:inline-block;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .skpay_icon{background:url('../../../img/skpay11_icon.png') no-repeat 50% 50% #fff; background-size: 70px;display:inline-block;overflow:hidden;text-indent:-999px}
#sod_frm_paysel .bank_icon{background:url('../../../img/pay_icon1.png') no-repeat 15px 50% #fff}
#sod_frm_paysel .vbank_icon{background:url('../../../img/pay_icon2.png') no-repeat 15px 50% #fff}
#sod_frm_paysel .iche_icon{background:url('../../../img/pay_icon2.png') no-repeat 15px 50% #fff}
+15 -8
View File
@@ -194,6 +194,7 @@ if($od['od_pg'] == 'lg') {
$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_bank_account'];
@@ -462,7 +463,9 @@ if($od['od_pg'] == 'lg') {
$hp_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
} else if($od['od_pg'] == 'inicis') {
$hp_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/mCmReceipt_head.jsp?noTid='.$od['od_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
} else {
} else if($od['od_pg'] == 'nicepay') {
$hp_receipt_script = 'window.open(\'https://npg.nicepay.co.kr/issue/IssueLoader.do?type=0&TID='.$od['od_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
} else {
$hp_receipt_script = 'window.open(\''.G5_BILL_RECEIPT_URL.'mcash_bill&tno='.$od['od_tno'].'&order_no='.$od['od_id'].'&trade_mony='.$od['od_receipt_price'].'\', \'winreceipt\', \'width=500,height=690,scrollbars=yes,resizable=yes\');';
}
?>
@@ -470,7 +473,7 @@ if($od['od_pg'] == 'lg') {
<?php
}
if($od['od_settle_case'] == '신용카드' || is_inicis_order_pay($od['od_settle_case']) || (shop_is_taxsave($od, true) && $misu_price == 0) )
if($od['od_settle_case'] == '신용카드' || $od['od_settle_case'] == '간편결제' || is_inicis_order_pay($od['od_settle_case']) || (shop_is_taxsave($od, true) && $misu_price == 0) )
{
if($od['od_pg'] == 'lg') {
require_once G5_SHOP_PATH.'/settle_lg.inc.php';
@@ -481,7 +484,9 @@ if($od['od_pg'] == 'lg') {
$card_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
} else if($od['od_pg'] == 'inicis') {
$card_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/mCmReceipt_head.jsp?noTid='.$od['od_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
} else {
} else if($od['od_pg'] == 'nicepay') {
$card_receipt_script = 'window.open(\'https://npg.nicepay.co.kr/issue/IssueLoader.do?type=0&TID='.$od['od_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
} else {
$card_receipt_script = 'window.open(\''.G5_BILL_RECEIPT_URL.'card_bill&tno='.$od['od_tno'].'&order_no='.$od['od_id'].'&trade_mony='.$od['od_receipt_price'].'\', \'winreceipt\', \'width=470,height=815,scrollbars=yes,resizable=yes\');';
}
?>
@@ -524,10 +529,10 @@ if($od['od_pg'] == 'lg') {
<?php
}
// 현금영수증 발급을 사용하는 경우에만
if (function_exists('shop_is_taxsave') && shop_is_taxsave($od)) {
// 현금영수증 발급을 사용하는 경우 또는 현금영수증 발급을 한 주문건이면
if ((function_exists('shop_is_taxsave') && shop_is_taxsave($od)) || (function_exists('is_order_cashreceipt') && is_order_cashreceipt($od))) {
// 미수금이 없고 현금일 경우에만 현금영수증을 발급 할 수 있습니다.
if ($misu_price == 0 && $od['od_receipt_price'] && ($od['od_settle_case'] == '무통장' || $od['od_settle_case'] == '계좌이체' || $od['od_settle_case'] == '가상계좌')) {
if ($misu_price == 0 && is_order_cashreceipt($od)) {
?>
<li>
<strong class="letter-2px">현금영수증</strong>
@@ -553,7 +558,9 @@ if($od['od_pg'] == 'lg') {
} else if($od['od_pg'] == 'inicis') {
$cash = unserialize($od['od_cash_info']);
$cash_receipt_script = 'window.open(\'https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/Cash_mCmReceipt.jsp?noTid='.$cash['TID'].'&clpaymethod=22\',\'showreceipt\',\'width=380,height=540,scrollbars=no,resizable=no\');';
} else {
} else if($od['od_pg'] == 'nicepay') {
$cash_receipt_script = 'window.open(\'https://npg.nicepay.co.kr/issue/IssueLoader.do?type=1&TID='.$od['od_tno'].'&noMethod=1\',\'receipt\',\'width=430,height=700\');';
} else {
require_once G5_SHOP_PATH.'/settle_kcp.inc.php';
$cash = unserialize($od['od_cash_info']);
@@ -563,7 +570,7 @@ if($od['od_pg'] == 'lg') {
<a href="javascript:;" onclick="<?php echo $cash_receipt_script; ?>" class="btn_frmline">현금영수증 확인하기</a>
<?php
}
else
else if (shop_is_taxsave($od))
{
?>
<a href="javascript:;" onclick="window.open('<?php echo G5_SHOP_URL; ?>/taxsave.php?od_id=<?php echo $od_id; ?>', 'taxsave', 'width=550,height=400,scrollbars=1,menus=0');" class="btn_frmline is-long-text">현금영수증을 발급하시려면 클릭하십시오.</a>
+1 -1
View File
@@ -39,7 +39,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
</div>
<?php // 쇼핑몰 사용시 여기부터 ?>
<?php if ($default['de_level_sell'] == 1) { // 상품구입 권한 ?>
<?php if (isset($default['de_level_sell']) && $default['de_level_sell'] == 1) { // 상품구입 권한 ?>
<!-- 주문하기, 신청하기 -->
<?php if (preg_match("/orderform.php/", $url)) { ?>
+1 -1
View File
@@ -2,7 +2,7 @@
if (!defined('_GNUBOARD_')) exit; // 개별 페이지 접근 불가
define('G5_VERSION', '그누보드5');
define('G5_GNUBOARD_VER', '5.5.13');
define('G5_GNUBOARD_VER', '5.6.3');
// 그누보드5.4.5.5 버전과 영카트5.4.5.5.1 버전을 합쳐서 그누보드5.4.6 버전에서 시작함 (kagla-210617)
// G5_YOUNGCART_VER 이 상수를 사용하는 곳이 있으므로 주석 처리 해제함
// 그누보드5.4.6 이상 버전 부터는 영카트를 그누보드에 포함하여 배포하므로 영카트5의 버전은 의미가 없습니다.