Merge remote-tracking branch '그누보드/master'

# Conflicts:
#	adm/shop_admin/orderform.php
#	bbs/register_form_update.php
#	lib/common.lib.php
#	mobile/shop/personalpayform.sub.php
#	plugin/htmlpurifier/extend.video.php
#	plugin/kcaptcha/kcaptcha.lib.php
#	shop/orderformupdate.php
#	skin/social/social_register_member.skin.php
#	version.php
This commit is contained in:
2025-11-25 16:06:26 +09:00
119 changed files with 7445 additions and 368 deletions

View File

@ -23,6 +23,14 @@ jQuery(function($){
if( nhnkcp_settle_case == "naverpay" ){
if(typeof nhnkcp_pay_form.naverpay_direct !== "undefined") nhnkcp_pay_form.naverpay_direct.value = "Y";
var is_money = jQuery("input[name='od_settle_case']:checked" ).attr("data-money");
if (is_money) { // 머니/포인트 결제
jQuery(nhnkcp_pay_form).find("input[name='naverpay_point_direct']").val("Y");
} else { // 카드 결제
jQuery(nhnkcp_pay_form).find("input[name='naverpay_point_direct']").val("");
}
}
if( ! jQuery("form[name='sm_form']").length ){

View File

@ -37,7 +37,7 @@ include_once('./_common.php');
$tran_cd = isset($_POST["tran_cd"]) ? $_POST["tran_cd"] : ''; // 트랜잭션 코드
$ordr_idxx = isset($_POST["ordr_idxx"]) ? $_POST["ordr_idxx"] : ''; // 쇼핑몰 주문번호
$good_name = isset($_POST["good_name"]) ? $_POST["good_name"] : ''; // 상품명
$good_mny = isset($_POST["good_mny"]) ? $_POST["good_mny"] : ''; // 결제 총금액
$good_mny = isset($_POST["good_mny"]) ? (int) $_POST["good_mny"] : ''; // 결제 총금액
$buyr_name = isset($_POST["buyr_name"]) ? $_POST["buyr_name"] : ''; // 주문자명
$buyr_tel1 = isset($_POST["buyr_tel1"]) ? $_POST["buyr_tel1"] : ''; // 주문자 전화번호
$buyr_tel2 = isset($_POST["buyr_tel2"]) ? $_POST["buyr_tel2"] : ''; // 주문자 핸드폰 번호
@ -60,9 +60,9 @@ include_once('./_common.php');
$bask_cntx = isset($_POST["bask_cntx"]) ? $_POST["bask_cntx"] : ''; // 장바구니 상품수
$tablet_size = isset($_POST["tablet_size"]) ? $_POST["tablet_size"] : ''; // 모바일기기 화면비율
$comm_tax_mny = isset($_POST["comm_tax_mny"]) ? $_POST["comm_tax_mny"] : ''; // 과세금액
$comm_vat_mny = isset($_POST["comm_vat_mny"]) ? $_POST["comm_vat_mny"] : ''; // 부가세
$comm_free_mny = isset($_POST["comm_free_mny"]) ? $_POST["comm_free_mny"] : ''; // 비과세금액
$comm_tax_mny = isset($_POST["comm_tax_mny"]) ? (int) $_POST["comm_tax_mny"] : ''; // 과세금액
$comm_vat_mny = isset($_POST["comm_vat_mny"]) ? (int) $_POST["comm_vat_mny"] : ''; // 부가세
$comm_free_mny = isset($_POST["comm_free_mny"]) ? (int) $_POST["comm_free_mny"] : ''; // 비과세금액
$payco_direct = isset($_POST["payco_direct"]) ? $_POST["payco_direct"] : ''; // PAYCO 결제창 호출
$naverpay_direct = isset($_POST["naverpay_direct"]) ? $_POST["naverpay_direct"] : ''; // NAVERPAY 결제창 호출
@ -253,7 +253,7 @@ if($enc_data != '' && $enc_info != '' && $tran_cd != '') {
echo make_order_field($data, $exclude);
foreach($_POST as $key=>$value) {
echo '<input type="hidden" name="'.$key.'" value="'.$value.'">'.PHP_EOL;
echo '<input type="hidden" name="'.get_text($key).'" value="'.get_text($value).'">'.PHP_EOL;
}
echo '</form>'.PHP_EOL;
@ -262,12 +262,12 @@ if($enc_data != '' && $enc_info != '' && $tran_cd != '') {
<form name="sm_form" method="POST" accept-charset="euc-kr">
<input type="hidden" name="good_name" value="<?php echo $good_name; ?>">
<input type="hidden" name="good_name" value="<?php echo get_text($good_name); ?>">
<input type="hidden" name="good_mny" value="<?php echo $good_mny; ?>" >
<input type="hidden" name='buyr_name' value="<?php echo $buyr_name; ?>">
<input type="hidden" name="buyr_tel1" value="<?php echo $buyr_tel1; ?>">
<input type="hidden" name="buyr_tel2" value="<?php echo $buyr_tel2; ?>">
<input type="hidden" name="buyr_mail" value="<?php echo $buyr_mail; ?>">
<input type="hidden" name='buyr_name' value="<?php echo get_text($buyr_name); ?>">
<input type="hidden" name="buyr_tel1" value="<?php echo get_text($buyr_tel1); ?>">
<input type="hidden" name="buyr_tel2" value="<?php echo get_text($buyr_tel2); ?>">
<input type="hidden" name="buyr_mail" value="<?php echo get_text($buyr_mail); ?>">
<?php
// 가상계좌 입금 마감일을 설정하려면 아래 주석을 풀어서 사용해 주세요.
//$ipgm_date = date("Ymd", (G5_SERVER_TIME + 86400 * 5));
@ -279,7 +279,7 @@ if($enc_data != '' && $enc_info != '' && $tran_cd != '') {
<?php } ?>
<?php if($naverpay_direct){ ?>
<input type="hidden" name="naverpay_direct" value="<?php echo get_text($naverpay_direct); ?>"> <!-- 네이버페이 결제창 호출 -->
<?php if(isset($default['de_easy_pay_services']) && in_array('used_nhnkcp_naverpay_point', explode(',', $default['de_easy_pay_services'])) ){ // 네이버페이 포인트 결제 옵션 ?>
<?php if(isset($_POST['naverpay_point_direct']) && $_POST['naverpay_point_direct'] && isset($default['de_easy_pay_services']) && in_array('used_nhnkcp_naverpay_point', explode(',', $default['de_easy_pay_services'])) ){ // 네이버페이 포인트 결제 옵션 ?>
<input type="hidden" name="naverpay_point_direct" value="Y"> <!-- 네이버페이 포인트 결제를 하려면 naverpay_point_direct 를 Y -->
<?php } ?>
<?php } ?>
@ -294,13 +294,13 @@ if($enc_data != '' && $enc_info != '' && $tran_cd != '') {
<!-- 요청 구분 -->
<input type="hidden" name="req_tx" value="pay">
<!-- 사이트 코드 -->
<input type="hidden" name="site_cd" value="<?php echo $g_conf_site_cd; ?>">
<input type="hidden" name="site_cd" value="<?php echo get_text($g_conf_site_cd); ?>">
<!-- 사이트 이름 -->
<input type="hidden" name="shop_name" value="<?php echo $g_conf_site_name; ?>">
<input type="hidden" name="shop_name" value="<?php echo get_text($g_conf_site_name); ?>">
<!-- 결제수단-->
<input type="hidden" name="pay_method" value="<?php echo $pay_method; ?>">
<input type="hidden" name="pay_method" value="<?php echo get_text($pay_method); ?>">
<!-- 주문번호 -->
<input type="hidden" name="ordr_idxx" value="<?php echo $ordr_idxx; ?>">
<input type="hidden" name="ordr_idxx" value="<?php echo get_text($ordr_idxx); ?>">
<!-- 최대 할부개월수 -->
<input type="hidden" name="quotaopt" value="12">
<!-- 통화 코드 -->
@ -311,29 +311,29 @@ if($enc_data != '' && $enc_info != '' && $tran_cd != '') {
<!-- 반드시 가맹점 주문페이지의 URL을 입력 해주시기 바랍니다. -->
<input type="hidden" name="Ret_URL" value="<?php echo G5_MSHOP_URL; ?>/kcp/order_approval_form.php">
<!-- 인증시 필요한 파라미터(변경불가)-->
<input type="hidden" name="ActionResult" value="<?php echo $ActionResult; ?>">
<input type="hidden" name="ActionResult" value="<?php echo get_text($ActionResult); ?>">
<!-- 에스크로 사용유무 에스크로 사용 업체(가상계좌만 해당)는 Y로 세팅 해주시기 바랍니다.-->
<input type="hidden" name="escw_used" value="<?php echo $escw_used; ?>">
<input type="hidden" name="escw_used" value="<?php echo get_text($escw_used); ?>">
<!-- 에스크로 결제처리모드 -->
<input type="hidden" name="pay_mod" value="<?php echo ($default['de_escrow_use']?'O':'N'); ?>">
<!-- 수취인이름 -->
<input type="hidden" name="rcvr_name" value="<?php echo $rcvr_name; ?>">
<input type="hidden" name="rcvr_name" value="<?php echo get_text($rcvr_name); ?>">
<!-- 수취인 연락처 -->
<input type="hidden" name="rcvr_tel1" value="<?php echo $rcvr_tel1; ?>">
<input type="hidden" name="rcvr_tel1" value="<?php echo get_text($rcvr_tel1); ?>">
<!-- 수취인 휴대폰 번호 -->
<input type="hidden" name="rcvr_tel2" value="<?php echo $rcvr_tel2; ?>">
<input type="hidden" name="rcvr_tel2" value="<?php echo get_text($rcvr_tel2); ?>">
<!-- 수취인 E-MAIL -->
<input type="hidden" name="rcvr_add1" value="<?php echo $rcvr_add1; ?>">
<input type="hidden" name="rcvr_add1" value="<?php echo get_text($rcvr_add1); ?>">
<!-- 수취인 우편번호 -->
<input type="hidden" name="rcvr_add2" value="<?php echo $rcvr_add2; ?>">
<input type="hidden" name="rcvr_add2" value="<?php echo get_text($rcvr_add2); ?>">
<!-- 수취인 주소 -->
<input type="hidden" name="rcvr_mail" value="<?php echo $rcvr_mail; ?>">
<input type="hidden" name="rcvr_mail" value="<?php echo get_text($rcvr_mail); ?>">
<!-- 수취인 상세 주소 -->
<input type="hidden" name="rcvr_zipx" value="<?php echo $rcvr_zipx; ?>">
<input type="hidden" name="rcvr_zipx" value="<?php echo get_text($rcvr_zipx); ?>">
<!-- 장바구니 상품 개수 -->
<input type="hidden" name="bask_cntx" value="<?php echo $bask_cntx; ?>">
<input type="hidden" name="bask_cntx" value="<?php echo get_text($bask_cntx); ?>">
<!-- 장바구니 정보(상단 스크립트 참조) -->
<input type="hidden" name="good_info" value="<?php echo $good_info; ?>">
<input type="hidden" name="good_info" value="<?php echo get_text($good_info); ?>">
<!-- 배송소요기간 -->
<input type="hidden" name="deli_term" value="03">
<!-- 기타 파라메터 추가 부분 - Start - -->
@ -343,7 +343,7 @@ if($enc_data != '' && $enc_info != '' && $tran_cd != '') {
<input type="hidden" name="disp_tax_yn" value="N">
<!-- 기타 파라메터 추가 부분 - End - -->
<!-- 화면 크기조정 부분 - Start - -->
<input type="hidden" name="tablet_size" value="<?php echo $tablet_size; ?>"/>
<input type="hidden" name="tablet_size" value="<?php echo get_text($tablet_size); ?>"/>
<!-- 화면 크기조정 부분 - End - -->
<!--
사용 카드 설정
@ -383,15 +383,15 @@ if($default['de_tax_flag_use']) {
}
?>
<input type="hidden" name="res_cd" value="<?php echo $res_cd; ?>"> <!-- 결과 코드 -->
<input type="hidden" name="tran_cd" value="<?php echo $tran_cd; ?>"> <!-- 트랜잭션 코드 -->
<input type="hidden" name="enc_info" value="<?php echo $enc_info; ?>"> <!-- 암호화 정보 -->
<input type="hidden" name="enc_data" value="<?php echo $enc_data; ?>"> <!-- 암호화 데이터 -->
<input type="hidden" name="res_cd" value="<?php echo get_text($res_cd); ?>"> <!-- 결과 코드 -->
<input type="hidden" name="tran_cd" value="<?php echo get_text($tran_cd); ?>"> <!-- 트랜잭션 코드 -->
<input type="hidden" name="enc_info" value="<?php echo get_text($enc_info); ?>"> <!-- 암호화 정보 -->
<input type="hidden" name="enc_data" value="<?php echo get_text($enc_data); ?>"> <!-- 암호화 데이터 -->
</form>
<div id="pay_fail">
<p>결제가 실패한 경우 아래 돌아가기 버튼을 클릭해주세요.</p>
<a href="<?php echo $js_return_url; ?>">돌아가기</a>
<a href="<?php echo get_text($js_return_url); ?>">돌아가기</a>
</div>
<div id="show_progress" style="display:none;">
<span style="display:block; text-align:center;margin-top:120px"><img src="<?php echo G5_MOBILE_URL; ?>/shop/img/loading.gif" alt="" ></span>

View File

@ -23,6 +23,9 @@ $param_opt_3 = isset($_REQUEST['param_opt_3']) ? clean_xss_tags($_REQUEST['param
<input type="hidden" name="settle_method" value="">
<input type="hidden" name="payco_direct" value=""> <!-- PAYCO 결제창 호출 -->
<input type="hidden" name="naverpay_direct" value="A" > <!-- NAVERPAY 결제창 호출 -->
<?php if(isset($default['de_easy_pay_services']) && in_array('used_nhnkcp_naverpay_point', explode(',', $default['de_easy_pay_services'])) ){ // 네이버페이 포인트 결제 옵션 ?>
<input type="hidden" name="naverpay_point_direct" value="Y"> <!-- 네이버페이 포인트 결제를 하려면 naverpay_point_direct 를 Y -->
<?php } ?>
<input type="hidden" name="kakaopay_direct" value="A" > <!-- KAKAOPAY 결제창 호출 -->
<input type="hidden" name="applepay_direct" value="A" > <!-- APPLEPAY 결제창 호출 -->
<!-- 주문번호 -->

View File

@ -223,11 +223,14 @@
$kcp_pay_method = $c_PayPlus->mf_get_res_data( "pay_method" ); // 카카오페이 결제수단
// 카드 코드는 PACA, 카카오머니 코드는 PAKM
// https://developer.kcp.co.kr/page/document/directpay
if( $kcp_pay_method == "PAKM" ){ // 카카오머니
$card_mny = $kakaomny_mny = $c_PayPlus->mf_get_res_data( "kakaomny_mny" );
$app_time = $app_kakaomny_time = $c_PayPlus->mf_get_res_data( "app_kakaomny_time" );
$od_other_pay_type = 'NHNKCP_KAKAOMONEY';
} else if( $kcp_pay_method == "PANP" ){ // 네이버페이머니
$od_other_pay_type = 'NHNKCP_NAVERMONEY';
}
}

View File

@ -62,6 +62,9 @@ ob_start();
$comm_free_mny = 0; // 면세금액
$tot_tax_mny = 0;
// 토스페이먼츠 escrowProducts 배열 생성
$escrow_products = array();
for ($i=0; $row=sql_fetch_array($result); $i++)
{
@ -129,6 +132,15 @@ ob_start();
$point = $sum['point'];
$sell_price = $sum['price'];
// 토스페이먼츠 escrowProducts 배열에 상품 정보 추가
$escrow_products[] = array(
'id' => $row['ct_id'],
'name' => $row['it_name'],
'code' => $row['it_id'],
'unitPrice' => (int) $row['ct_price'],
'quantity' => (int) $row['ct_qty']
);
$cp_button = '';
// 쿠폰
@ -632,7 +644,7 @@ if($is_kakaopay_use) {
// 계좌이체 사용
if ($default['de_iche_use']) {
$multi_settle++;
echo '<li><input type="radio" id="od_settle_iche" name="od_settle_case" value="계좌이체" '.$checked.'> <label for="od_settle_iche" class="lb_icon iche_icon">'.$escrow_title.'계좌이체</label></li>'.PHP_EOL;
echo '<li><input type="radio" id="od_settle_iche" name="od_settle_case" value="계좌이체" '.$checked.'> <label for="od_settle_iche" class="lb_icon iche_icon">'.$escrow_title. ($default['de_pg_service'] == 'toss' ? '퀵계좌이체' :'계좌이체') . '</label></li>'.PHP_EOL;
$checked = '';
}
@ -676,7 +688,13 @@ if($is_kakaopay_use) {
$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(isset($default['de_easy_pay_services']) && in_array('used_nhnkcp_naverpay_point', explode(',', $default['de_easy_pay_services'])) ){
$easypay_prints['nhnkcp_naverpay_card'] = '<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 nhnkcp_icon nhnkcp_card" title="NHN_KCP - 네이버페이 카드결제">카드</label></li>';
$easypay_prints['nhnkcp_naverpay_money'] = '<li><input type="radio" id="od_settle_nhnkcp_naverpay_money" name="od_settle_case" data-pay="naverpay" data-money="1" value="간편결제" > <label for="od_settle_nhnkcp_naverpay_money" class="naverpay_icon nhnkcp_naverpay lb_icon nhnkcp_icon nhnkcp_money" title="NHN_KCP - 네이버페이 머니/포인트 결제">머니</label></li>';
} else {
$easypay_prints['nhnkcp_naverpay_card'] = '<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>';
@ -718,7 +736,14 @@ if($is_kakaopay_use) {
}
if( ! isset($easypay_prints['nhnkcp_naverpay']) && function_exists('is_use_easypay') && is_use_easypay('global_nhnkcp') ){
$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(isset($default['de_easy_pay_services']) && in_array('used_nhnkcp_naverpay_point', explode(',', $default['de_easy_pay_services'])) ){
$easypay_prints['nhnkcp_naverpay_card'] = '<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 nhnkcp_icon nhnkcp_card" title="NHN_KCP - 네이버페이 카드결제">카드</label></li>';
$easypay_prints['nhnkcp_naverpay_money'] = '<li><input type="radio" id="od_settle_nhnkcp_naverpay_money" name="od_settle_case" data-pay="naverpay" data-money="1" value="간편결제" > <label for="od_settle_nhnkcp_naverpay_money" class="naverpay_icon nhnkcp_naverpay lb_icon nhnkcp_icon nhnkcp_money" title="NHN_KCP - 네이버페이 머니/포인트 결제">머니</label></li>';
} else {
$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($easypay_prints) {
@ -1113,7 +1138,7 @@ $(function() {
$("#show_pay_btn").css("display", "inline");
});
$("#od_settle_iche,#od_settle_card,#od_settle_vbank,#od_settle_hp,#od_settle_easy_pay,#od_settle_kakaopay,#od_settle_samsungpay,#od_settle_nhnkcp_payco,#od_settle_nhnkcp_naverpay,#od_settle_nhnkcp_kakaopay,#od_settle_inicislpay,#od_settle_inicis_kakaopay").bind("click", function() {
$("#od_settle_iche,#od_settle_card,#od_settle_vbank,#od_settle_hp,#od_settle_easy_pay,#od_settle_kakaopay,#od_settle_samsungpay,#od_settle_nhnkcp_payco,#od_settle_nhnkcp_naverpay,#od_settle_nhnkcp_naverpay_money,#od_settle_nhnkcp_kakaopay,#od_settle_inicislpay,#od_settle_inicis_kakaopay").bind("click", function() {
$("#settle_bank").hide();
$("#show_req_btn").css("display", "inline");
$("#show_pay_btn").css("display", "none");
@ -1393,12 +1418,21 @@ function pay_approval()
if(typeof f.pay_method !== "undefined") f.pay_method.value = "";
if(settle_method == "간편결제"){
var nhnkcp_easy_pay = jQuery("input[name='od_settle_case']:checked" ).attr("data-pay");
var nhnkcp_easy_pay = jQuery("input[name='od_settle_case']:checked").attr("data-pay");
if(nhnkcp_easy_pay === "naverpay"){
if(typeof f.naverpay_direct !== "undefined"){
f.naverpay_direct.value = "Y";
}
var is_money = jQuery("input[name='od_settle_case']:checked").attr("data-money");
if (is_money) { // 머니/포인트 결제
jQuery(f).find("input[name='naverpay_point_direct']").val("Y");
} else { // 카드 결제
jQuery(f).find("input[name='naverpay_point_direct']").val("");
}
} else if(nhnkcp_easy_pay === "kakaopay"){
if(typeof f.kakaopay_direct !== "undefined") f.kakaopay_direct.value = "Y";
} else if(nhnkcp_easy_pay === "applepay"){
@ -1445,6 +1479,55 @@ function pay_approval()
<?php if($default['de_tax_flag_use']) { ?>
f.LGD_TAXFREEAMOUNT.value = pf.comm_free_mny.value;
<?php } ?>
<?php } else if($default['de_pg_service'] == 'toss') { ?>
var pay_method = "";
switch(settle_method) {
case "계좌이체":
pay_method = "TRANSFER";
break;
case "가상계좌":
pay_method = "VIRTUAL_ACCOUNT";
break;
case "휴대폰":
pay_method = "MOBILE_PHONE";
break;
case "신용카드":
pay_method = "CARD";
break;
case "간편결제":
pay_method = "CARD";
break;
}
f.method.value = pay_method;
f.orderId.value = '<?=$od_id?>';
f.orderName.value = '<?=$goods?>';
f.customerName.value = pf.od_name.value;
f.customerEmail.value = pf.od_email.value;
f.customerMobilePhone.value = pf.od_hp.value.replace(/[^0-9]/g, '');
if (f.customerMobilePhone.value == '') {
f.customerMobilePhone.value = pf.od_tel.value.replace(/[^0-9]/g, '');
}
f.cardUseCardPoint.value = false;
f.cardUseAppCardOnly.value = false;
<?php if($default['de_escrow_use']) { ?>
f.cardUseEscrow.value = 'true';
f.escrowProducts.value = JSON.stringify(<?php echo json_encode($escrow_products, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); ?>);
<?php } ?>
if(settle_method == "간편결제") {
f.cardflowMode.value = 'DIRECT';
}
f.amountCurrency.value = 'KRW';
f.amountValue.value = f.good_mny.value;
<?php if($default['de_tax_flag_use']) { ?>
f.taxFreeAmount.value = pf.comm_free_mny.value;
<?php } ?>
f.windowTarget.value = 'self';
<?php } else if($default['de_pg_service'] == 'inicis') { ?>
var paymethod = "";
var width = 330;

View File

@ -7,6 +7,7 @@ $post_enc_data = isset($_POST['enc_data']) ? $_POST['enc_data'] : '';
$post_enc_info = isset($_POST['enc_info']) ? $_POST['enc_info'] : '';
$post_tran_cd = isset($_POST['tran_cd']) ? $_POST['tran_cd'] : '';
$post_lgd_paykey = isset($_POST['LGD_PAYKEY']) ? $_POST['LGD_PAYKEY'] : '';
$paymentKey = isset($_POST['paymentKey']) ? $_POST['paymentKey'] : '';
//삼성페이 또는 lpay 또는 이니시스 카카오페이 요청으로 왔다면 현재 삼성페이 또는 lpay 또는 이니시스 카카오페이는 이니시스 밖에 없으므로 $default['de_pg_service'] 값을 이니시스로 변경한다.
if( is_inicis_order_pay($od_settle_case) && !empty($_POST['P_HASH']) ){
@ -41,6 +42,9 @@ if($od_settle_case != '무통장' && $od_settle_case != 'KAKAOPAY') {
if($default['de_pg_service'] == 'lg' && ! $post_lgd_paykey)
alert('결제등록 요청 후 주문해 주십시오.', $page_return_url);
if($default['de_pg_service'] == 'toss' && ! $paymentKey)
alert('결제등록 요청 후 주문해 주십시오.', $page_return_url);
if($default['de_pg_service'] == 'inicis' && ! $post_p_hash)
alert('결제등록 요청 후 주문해 주십시오.', $page_return_url);
}
@ -383,6 +387,9 @@ else if ($od_settle_case == "계좌이체")
case 'lg':
include G5_SHOP_PATH.'/lg/xpay_result.php';
break;
case 'toss':
include G5_SHOP_PATH.'/toss/toss_result.php';
break;
case 'inicis':
include G5_MSHOP_PATH.'/inicis/pay_result.php';
break;
@ -412,6 +419,9 @@ else if ($od_settle_case == "가상계좌")
case 'lg':
include G5_SHOP_PATH.'/lg/xpay_result.php';
break;
case 'toss':
include G5_SHOP_PATH.'/toss/toss_result.php';
break;
case 'inicis':
include G5_MSHOP_PATH.'/inicis/pay_result.php';
break;
@ -441,6 +451,9 @@ else if ($od_settle_case == "휴대폰")
case 'lg':
include G5_SHOP_PATH.'/lg/xpay_result.php';
break;
case 'toss':
include G5_SHOP_PATH.'/toss/toss_result.php';
break;
case 'inicis':
include G5_MSHOP_PATH.'/inicis/pay_result.php';
break;
@ -468,6 +481,9 @@ else if ($od_settle_case == "신용카드")
case 'lg':
include G5_SHOP_PATH.'/lg/xpay_result.php';
break;
case 'toss':
include G5_SHOP_PATH.'/toss/toss_result.php';
break;
case 'inicis':
include G5_MSHOP_PATH.'/inicis/pay_result.php';
break;
@ -497,6 +513,9 @@ else if ($od_settle_case == "간편결제")
case 'lg':
include G5_SHOP_PATH.'/lg/xpay_result.php';
break;
case 'toss':
include G5_SHOP_PATH.'/toss/toss_result.php';
break;
case 'inicis':
include G5_MSHOP_PATH.'/inicis/pay_result.php';
break;
@ -568,6 +587,9 @@ if($tno) {
case 'lg':
include G5_SHOP_PATH.'/lg/xpay_cancel.php';
break;
case 'toss':
include G5_SHOP_PATH.'/toss/toss_cancel.php';
break;
case 'inicis':
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
break;
@ -723,6 +745,9 @@ if(! $result || ! (isset($exists_order['od_id']) && $od_id && $exists_order['od_
case 'lg':
include G5_SHOP_PATH.'/lg/xpay_cancel.php';
break;
case 'toss':
include G5_SHOP_PATH.'/toss/toss_cancel.php';
break;
case 'inicis':
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
break;
@ -785,6 +810,9 @@ if(!$result) {
case 'lg':
include G5_SHOP_PATH.'/lg/xpay_cancel.php';
break;
case 'toss':
include G5_SHOP_PATH.'/toss/toss_cancel.php';
break;
case 'inicis':
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
break;

View File

@ -338,6 +338,8 @@ if($od['od_pg'] == 'lg') {
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
$hp_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
} else if($od['od_pg'] == 'toss') {
$hp_receipt_script = 'window.open(\'https://dashboard.tosspayments.com/receipt/phone?transactionId='.$od['od_tno'].'&ref=PX\',\'receipt\',\'width=430,height=700\');';
} 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') {
@ -359,6 +361,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'] == 'toss') {
$card_receipt_script = 'window.open(\'https://dashboard.tosspayments.com/receipt/redirection?transactionId='.$od['od_tno'].'&ref=PX\',\'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 if($od['od_pg'] == 'inicis') {
@ -432,6 +436,8 @@ if($od['od_pg'] == 'lg') {
break;
}
$cash_receipt_script = 'javascript:showCashReceipts(\''.$LGD_MID.'\',\''.$od['od_id'].'\',\''.$od['od_casseqno'].'\',\''.$trade_type.'\',\''.$CST_PLATFORM.'\');';
} else if($od['od_pg'] == 'toss') {
$cash_receipt_script = 'window.open(\'https://dashboard.tosspayments.com/receipt/mids/si_'.$config['cf_lg_mid'].'/orders/'.$od['od_id'].'/cash-receipt?ref=dashboard\',\'receipt\',\'width=430,height=700\');';
} 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\');';

View File

@ -76,8 +76,18 @@ $tablet_size = "1.0"; // 화면 사이즈 조정 - 기기화면에 맞게 수정
$checked = '';
$escrow_title = "";
$escrow_products = array(); // 토스페이먼츠 escrowProducts 배열 생성
if ($default['de_escrow_use']) {
$escrow_title = "에스크로 ";
// 토스페이먼츠 escrowProducts 배열에 상품 정보 추가
$escrow_products[] = array(
'id' => $pp['pp_id'],
'name' => $pp['pp_name'].'님 개인결제',
'code' => $pp['pp_id'],
'unitPrice' => (int) $pp['pp_price'],
'quantity' => (int) 1
);
}
if ($default['de_vbank_use'] || $default['de_iche_use'] || $default['de_card_use'] || $default['de_hp_use']) {
@ -96,7 +106,7 @@ $tablet_size = "1.0"; // 화면 사이즈 조정 - 기기화면에 맞게 수정
// 계좌이체 사용
if ($default['de_iche_use']) {
$multi_settle++;
echo '<li><input type="radio" id="pp_settle_iche" name="pp_settle_case" value="계좌이체" '.$checked.'> <label for="pp_settle_iche">'.$escrow_title.'계좌이체</label></li>'.PHP_EOL;
echo '<li><input type="radio" id="pp_settle_iche" name="pp_settle_case" value="계좌이체" '.$checked.'> <label for="pp_settle_iche"><span></span>'.$escrow_title. ($default['de_pg_service'] == 'toss' ? '퀵계좌이체' :'계좌이체') . '</label></li>'.PHP_EOL;
$checked = '';
}
@ -201,6 +211,51 @@ function pay_approval()
<?php if($default['de_tax_flag_use']) { ?>
f.LGD_TAXFREEAMOUNT.value = pf.comm_free_mny.value;
<?php } ?>
<?php } else if($default['de_pg_service'] == 'toss') { ?>
var pay_method = "";
switch(settle_method) {
case "계좌이체":
pay_method = "TRANSFER";
break;
case "가상계좌":
pay_method = "VIRTUAL_ACCOUNT";
break;
case "휴대폰":
pay_method = "MOBILE_PHONE";
break;
case "신용카드":
pay_method = "CARD";
break;
case "간편결제":
pay_method = "CARD";
break;
}
f.method.value = pay_method;
f.orderId.value = '<?=$od_id?>';
f.orderName.value = '<?=$goods?>';
f.customerName.value = pf.pp_name.value;
f.customerEmail.value = pf.pp_email.value;
f.customerMobilePhone.value = pf.pp_hp.value.replace(/[^0-9]/g, '');
f.cardUseCardPoint.value = false;
f.cardUseAppCardOnly.value = false;
<?php if($default['de_escrow_use']) { ?>
f.cardUseEscrow.value = 'true';
f.escrowProducts.value = JSON.stringify(<?php echo json_encode($escrow_products, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES); ?>);
<?php } ?>
if(settle_method == "간편결제") {
f.cardflowMode.value = 'DIRECT';
}
f.amountCurrency.value = 'KRW';
f.amountValue.value = f.good_mny.value;
<?php if($default['de_tax_flag_use']) { ?>
f.taxFreeAmount.value = pf.comm_free_mny.value;
<?php } ?>
f.windowTarget.value = 'self';
<?php } else if($default['de_pg_service'] == 'inicis') { ?>
var paymethod = "";
var width = 330;

View File

@ -9,6 +9,7 @@ $post_enc_info = isset($_POST['enc_info']) ? $_POST['enc_info'] : '';
$post_enc_data = isset($_POST['enc_data']) ? $_POST['enc_data'] : '';
$post_lgd_paykey = isset($_POST['LGD_PAYKEY']) ? $_POST['LGD_PAYKEY'] : '';
$paymentKey = isset($_POST['paymentKey']) ? $_POST['paymentKey'] : '';
$post_p_hash = isset($_POST['P_HASH']) ? $_POST['P_HASH'] : '';
@ -22,6 +23,9 @@ if($default['de_pg_service'] == 'kcp' && ($post_tran_cd === '' || $post_enc_info
if($default['de_pg_service'] == 'lg' && ! $post_lgd_paykey)
alert('결제등록 요청 후 주문해 주십시오.', $page_return_url);
if($default['de_pg_service'] == 'toss' && ! $paymentKey)
alert('결제등록 요청 후 주문해 주십시오.', $page_return_url);
if($default['de_pg_service'] == 'inicis' && ! $post_p_hash)
alert('결제등록 요청 후 주문해 주십시오.', $page_return_url);
@ -32,6 +36,13 @@ $pp = sql_fetch($sql);
if(! (isset($pp['pp_id']) && $pp['pp_id']))
alert('개인결제 정보가 존재하지 않습니다.', G5_SHOP_URL.'/personalpay.php');
// PG사의 가상계좌 또는 계좌이체의 자동 현금영수증 초기배열값
$pg_receipt_infos = array(
'od_cash' => 0,
'od_cash_no' => '',
'od_cash_info' => '',
);
$hash_data = md5($pp_id.$good_mny.$pp['pp_time']);
if($pp['pp_tno']){
@ -54,6 +65,9 @@ if ($pp_settle_case == "계좌이체")
case 'lg':
include G5_SHOP_PATH.'/lg/xpay_result.php';
break;
case 'toss':
include G5_SHOP_PATH.'/toss/toss_result.php';
break;
case 'inicis':
include G5_MSHOP_PATH.'/inicis/pay_result.php';
break;
@ -79,6 +93,9 @@ else if ($pp_settle_case == "가상계좌")
case 'lg':
include G5_SHOP_PATH.'/lg/xpay_result.php';
break;
case 'toss':
include G5_SHOP_PATH.'/toss/toss_result.php';
break;
case 'inicis':
include G5_MSHOP_PATH.'/inicis/pay_result.php';
break;
@ -105,6 +122,9 @@ else if ($pp_settle_case == "휴대폰")
case 'lg':
include G5_SHOP_PATH.'/lg/xpay_result.php';
break;
case 'toss':
include G5_SHOP_PATH.'/toss/toss_result.php';
break;
case 'inicis':
include G5_MSHOP_PATH.'/inicis/pay_result.php';
break;
@ -128,6 +148,9 @@ else if ($pp_settle_case == "신용카드")
case 'lg':
include G5_SHOP_PATH.'/lg/xpay_result.php';
break;
case 'toss':
include G5_SHOP_PATH.'/toss/toss_result.php';
break;
case 'inicis':
include G5_MSHOP_PATH.'/inicis/pay_result.php';
break;
@ -159,6 +182,9 @@ if((int)$pp['pp_price'] !== (int)$pg_price) {
case 'lg':
include G5_SHOP_PATH.'/lg/xpay_cancel.php';
break;
case 'toss':
include G5_SHOP_PATH.'/toss/toss_result.php';
break;
case 'inicis':
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
break;
@ -186,7 +212,10 @@ $sql = " update {$g5['g5_shop_personalpay_table']}
pp_bank_account = '$pp_bank_account',
pp_deposit_name = '$pp_deposit_name',
pp_receipt_time = '$pp_receipt_time',
pp_receipt_ip = '{$_SERVER['REMOTE_ADDR']}'
pp_receipt_ip = '{$_SERVER['REMOTE_ADDR']}',
pp_cash = '{$pg_receipt_infos['od_cash']}',
pp_cash_no = '{$pg_receipt_infos['od_cash_no']}',
pp_cash_info = '{$pg_receipt_infos['od_cash_info']}'
where pp_id = '{$pp['pp_id']}' ";
$result = sql_query($sql, false);
@ -197,6 +226,9 @@ if(!$result) {
case 'lg':
include G5_SHOP_PATH.'/lg/xpay_cancel.php';
break;
case 'toss':
include G5_SHOP_PATH.'/toss/toss_cancel.php';
break;
case 'inicis':
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
break;
@ -224,6 +256,9 @@ if($pp_receipt_price > 0 && $pp['pp_id'] && $pp['od_id']) {
od_settle_case = '$pp_settle_case',
od_deposit_name = '$pp_deposit_name',
od_bank_account = '$pp_bank_account',
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_shop_memo = concat(od_shop_memo, \"\\n개인결제 ".$pp['pp_id']." 로 결제완료 - ".$pp_receipt_time."\")
where od_id = '{$pp['od_id']}' ";
$result = sql_query($sql, false);
@ -235,6 +270,9 @@ if($pp_receipt_price > 0 && $pp['pp_id'] && $pp['od_id']) {
case 'lg':
include G5_SHOP_PATH.'/lg/xpay_cancel.php';
break;
case 'toss':
include G5_SHOP_PATH.'/toss/toss_result.php';
break;
case 'inicis':
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
break;

View File

@ -145,6 +145,8 @@ if($pp['pp_pg'] == 'lg') {
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
$hp_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
} else if($pp['pp_pg'] == 'toss') {
$hp_receipt_script = 'window.open(\'https://dashboard.tosspayments.com/receipt/phone?transactionId='.$pp['pp_tno'].'&ref=PX\',\'receipt\',\'width=430,height=700\');';
} 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') {
@ -166,6 +168,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'] == 'toss') {
$card_receipt_script = 'window.open(\'https://dashboard.tosspayments.com/receipt/redirection?transactionId='.$pp['pp_tno'].'&ref=PX\',\'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 if($pp['pp_pg'] == 'inicis') {
@ -221,6 +225,8 @@ if($pp['pp_pg'] == 'lg') {
break;
}
$cash_receipt_script = 'javascript:showCashReceipts(\''.$LGD_MID.'\',\''.$pp['pp_id'].'\',\''.$pp['pp_casseqno'].'\',\''.$trade_type.'\',\''.$CST_PLATFORM.'\');';
} else if($pp['pp_pg'] == 'toss') {
$cash_receipt_script = 'window.open(\'https://dashboard.tosspayments.com/receipt/mids/si_'.$config['cf_lg_mid'].'/orders/'.$pp['pp_id'].'/cash-receipt?ref=dashboard\',\'receipt\',\'width=430,height=700\');';
} 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\');';

View File

@ -0,0 +1,15 @@
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
require_once(G5_SHOP_PATH.'/toss/toss.inc.php');
// var_dump($default['cf_toss_client_key']);
$toss = new TossPayments(
$config['cf_toss_client_key'],
$config['cf_toss_secret_key'],
$config['cf_lg_mid']
);
$toss->setPaymentHeader();
?>

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);

View File

@ -0,0 +1,33 @@
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<form name="sm_form" method="POST" action="<?php echo G5_MSHOP_URL; ?>/toss/toss_approval.php">
<input type="hidden" name="method" value="">
<input type="hidden" name="orderId" value="<?php echo isset($od_id) ? $od_id : ''; ?>">
<input type="hidden" name="orderName" value="<?php echo isset($goods) ? $goods : ''; ?>">
<input type="hidden" name="customerName" value="<?php echo isset($od_name) ? $od_name : ''; ?>">
<input type="hidden" name="customerEmail" value="<?php echo isset($od_email) ? $od_email : ''; ?>">
<input type="hidden" name="customerMobilePhone" value="<?php echo isset($od_hp) ? $od_hp : ''; ?>">
<input type="hidden" name="cardUseEscrow" value="false">
<input type="hidden" name="escrowProducts" value=''>
<input type="hidden" name="cardflowMode" value="DEFAULT">
<input type="hidden" name="cardeasyPay" value="PAYCO">
<input type="hidden" name="cardUseCardPoint" value="false">
<input type="hidden" name="cardUseAppCardOnly" value="false">
<input type="hidden" name="amountCurrency" value="KRW">
<input type="hidden" name="amountValue" value="<?php echo isset($tot_price) ? $tot_price : 0; ?>">
<input type="hidden" name="taxFreeAmount" value="<?php echo isset($comm_free_mny) ? $comm_free_mny : 0; ?>">
<input type="hidden" name="windowTarget" value="iframe">
<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 isset($comm_tax_mny) ? $comm_tax_mny : 0; ?>"> <!-- 과세금액 -->
<input type="hidden" name="comm_vat_mny" value="<?php echo isset($comm_vat_mny) ? $comm_vat_mny : 0; ?>"> <!-- 부가세 -->
<input type="hidden" name="comm_free_mny" value="<?php echo isset($comm_free_mny) ? $comm_free_mny : 0; ?>"> <!-- 비과세 금액 -->
<?php
}
?>
</form>

View File

@ -0,0 +1,37 @@
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>
<input type="hidden" name="method" value="">
<input type="hidden" name="orderId" value="<?php echo isset($od_id) ? $od_id : ''; ?>">
<input type="hidden" name="orderName" value="<?php echo isset($goods) ? $goods : ''; ?>">
<input type="hidden" name="customerName" value="<?php echo isset($od_name) ? $od_name : ''; ?>">
<input type="hidden" name="customerEmail" value="<?php echo isset($od_email) ? $od_email : ''; ?>">
<input type="hidden" name="customerMobilePhone" value="<?php echo isset($od_hp) ? $od_hp : ''; ?>">
<input type="hidden" name="cardUseEscrow" value="false">
<input type="hidden" name="escrowProducts" value=''>
<input type="hidden" name="cardflowMode" value="DEFAULT">
<input type="hidden" name="cardeasyPay" value="PAYCO">
<input type="hidden" name="cardUseCardPoint" value="false">
<input type="hidden" name="cardUseAppCardOnly" value="false">
<input type="hidden" name="amountCurrency" value="KRW">
<input type="hidden" name="amountValue" value="<?php echo isset($tot_price) ? $tot_price : 0; ?>">
<input type="hidden" name="taxFreeAmount" value="<?php echo isset($comm_free_mny) ? $comm_free_mny : 0; ?>">
<input type="hidden" name="windowTarget" value="iframe">
<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 isset($comm_tax_mny) ? $comm_tax_mny : 0; ?>"> <!-- 과세금액 -->
<input type="hidden" name="comm_vat_mny" value="<?php echo isset($comm_vat_mny) ? $comm_vat_mny : 0; ?>"> <!-- 부가세 -->
<input type="hidden" name="comm_free_mny" value="<?php echo isset($comm_free_mny) ? $comm_free_mny : 0; ?>"> <!-- 비과세 금액 -->
<?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>

View File

@ -0,0 +1,3 @@
<?php
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
?>

View File

@ -0,0 +1,77 @@
<?php
include_once('./_common.php');
// 결제 실패 처리인 경우
if (isset($_REQUEST['mode']) && $_REQUEST['mode'] === 'fail') {
$code = isset($_REQUEST['code']) ? trim($_REQUEST['code']) : '';
$message = isset($_REQUEST['message']) ? trim($_REQUEST['message']) : '';
alert('결제에 실패하였습니다.\\n\\n[' . $code . '] ' . $message, G5_SHOP_URL . '/orderform.php');
exit;
}
if(!isset($_SESSION['PAYREQ_MAP'])){
alert('세션이 만료 되었거나 유효하지 않은 요청 입니다.', G5_MSHOP_URL);
}
$payReqMap = $_SESSION['PAYREQ_MAP']; //결제 요청시, Session에 저장했던 파라미터 MAP
$g5['title'] = '토스페이먼츠 결제인증 완료처리';
$g5['body_script'] = ' onload="setTossResult();"';
include_once(G5_PATH.'/head.sub.php');
// 토스페이먼츠 결제인증 성공시 인증키 주문 임시데이터에 업데이트
$paymentKey = isset($_REQUEST['paymentKey']) ? trim($_REQUEST['paymentKey']) : '';
$orderId = isset($_REQUEST['orderId']) ? trim($_REQUEST['orderId']) : '';
$amount = isset($_REQUEST['amount']) ? trim($_REQUEST['amount']) : '';
if (empty($paymentKey) || empty($orderId)) {
alert('결제정보가 올바르지 않습니다.', G5_MSHOP_URL);
exit;
}
$sql = " select * from {$g5['g5_shop_order_data_table']} where od_id = '$orderId' ";
$row = sql_fetch($sql);
$data = isset($row['dt_data']) ? unserialize(base64_decode($row['dt_data'])) : array();
// 주문 임시데이터에 paymentKey 업데이트
$data['paymentKey'] = $paymentKey;
$data_new = base64_encode(serialize($data));
$sql = " update {$g5['g5_shop_order_data_table']} set dt_data = '$data_new' where od_id = '$orderId' limit 1 ";
sql_query($sql);
if(isset($data['pp_id']) && $data['pp_id']) {
$order_action_url = G5_HTTPS_MSHOP_URL.'/personalpayformupdate.php';
} else {
$order_action_url = G5_HTTPS_MSHOP_URL.'/orderformupdate.php';
}
?>
<?php
$exclude = array();
echo '<form name="forderform" method="post" action="'.$order_action_url.'" autocomplete="off">'.PHP_EOL;
echo make_order_field($data, $exclude);
echo '</form>'.PHP_EOL;
?>
<div>
<div id="show_progress">
<span style="display:block; text-align:center;margin-top:120px"><img src="<?php echo G5_MOBILE_URL; ?>/shop/img/loading.gif" alt=""></span>
<span style="display:block; text-align:center;margin-top:10px; font-size:14px">주문완료 중입니다. 잠시만 기다려 주십시오.</span>
</div>
</div>
<script type="text/javascript">
function setTossResult() {
setTimeout( function() {
document.forderform.submit();
}, 300);
}
</script>
<?php
include_once(G5_PATH.'/tail.sub.php');

View File

@ -0,0 +1,192 @@
<?php
include_once('./_common.php');
// 토스페이먼츠 class
require_once(G5_SHOP_PATH.'/toss/toss.inc.php');
// 개인결제 ID와 주문 ID 설정
$ss_order_id = isset($_REQUEST['orderId']) ? $_REQUEST['orderId'] : '';
$ss_personalpay_id = get_session('ss_personalpay_id');
// 장바구니 ID 설정 (바로구매 여부 확인)
$ss_cart_id = get_session('ss_direct') ? get_session('ss_cart_direct') : get_session('ss_cart_id');
// WHERE 조건 추가용 변수
$addQuery = "";
if (!empty($ss_order_id)) {
$addQuery .= " AND od_id = '{$ss_order_id}'";
}
if (isset($member['mb_id']) && $member['mb_id'] !== '') {
$addQuery .= " AND mb_id = '{$member['mb_id']}'";
}
// 개인결제가 아닌 경우 장바구니 ID 조건 추가
if (empty($ss_personalpay_id)) {
if (!empty($ss_cart_id)) {
$addQuery .= " AND cart_id = '{$ss_cart_id}'";
}
}
// 최종 검증 (원래 로직 유지)
if (empty($ss_order_id) || (empty($ss_personalpay_id) && empty($ss_cart_id))) {
alert('주문정보가 올바르지 않습니다.');
exit;
}
// 기존 dt_data 가져오기
$sql = "
SELECT * FROM {$g5['g5_shop_order_data_table']}
WHERE 1=1
{$addQuery}
";
$res = sql_fetch($sql);
$dt_data = [];
if (isset($res['dt_data'])) {
$dt_data = unserialize(base64_decode($res['dt_data']));
}
$payReqMap = $dt_data;
$_SESSION['PAYREQ_MAP'] = $payReqMap;
if(isset($payReqMap['pp_id']) && $payReqMap['pp_id']) {
$page_return_url = G5_SHOP_URL.'/personalpayform.php?pp_id='.$payReqMap['pp_id'];
} else {
$page_return_url = G5_SHOP_URL.'/orderform.php';
if ($_SESSION['ss_direct']) {
$page_return_url .= '?sw_direct=1';
}
}
$g5['title'] = '토스페이먼츠 eCredit서비스 결제';
$g5['body_script'] = ' onload="launchCrossPlatform(frm);"';
include_once(G5_PATH.'/head.sub.php');
?>
<form name="forderform">
<?php
foreach($payReqMap as $key => $value) {
if (isset($_REQUEST[$key]) && $_REQUEST[$key]) {
$value = $_REQUEST[$key];
}
if (is_array($value)) {
$value = implode(',', $value);
}
if ($key === 'escrowProducts') {
$value = str_replace("\\", "", $value);
echo '<input type="hidden" name="'.$key.'" value=\''.$value.'\'>'.PHP_EOL;
} else {
echo '<input type="hidden" name="'.$key.'" value="'.$value.'">'.PHP_EOL;
}
}
?>
</form>
<script language="javascript" src="https://js.tosspayments.com/v2/standard"></script>
<script type="text/javascript">
/*
* 수정불가.
*/
const clientKey = "<?php echo $config['cf_toss_client_key']; ?>";
const customerKey = "<?php echo isset($member['mb_id']) ? $member['mb_id'] : ''; ?>";
const tossPayments = TossPayments(clientKey);
const payment = tossPayments.payment({ customerKey });
const frm = document.forderform;
/*
* 수정불가
*/
async function launchCrossPlatform(frm) {
// 필수 값들 체크
if (!frm.amountValue || !frm.amountValue.value) {
alert('결제 금액이 설정되지 않았습니다.');
return;
}
const amount = parseInt(frm.amountValue.value);
if (isNaN(amount) || amount <= 0) {
alert('올바른 결제 금액을 입력해주세요.');
return;
}
// 기본 결제 옵션
const paymentOptions = {
method: frm.method.value,
amount: {
currency: "KRW",
value: parseInt(frm.amountValue.value),
},
taxFreeAmount: parseInt(frm.taxFreeAmount.value),
orderId: frm.orderId.value, // 고유 주문번호
orderName: frm.orderName.value,
successUrl: "<?php echo G5_MSHOP_URL;?>/toss/returnurl.php", // 결제 요청이 성공하면 리다이렉트되는 URL
failUrl: "<?php echo G5_MSHOP_URL;?>/toss/returnurl.php?mode=fail", // 결제 요청이 실패하면 리다이렉트되는 URL
customerEmail: frm.customerEmail.value,
customerName: frm.customerName.value,
customerMobilePhone: frm.customerMobilePhone.value,
};
// escrowProducts 추가 함수
function addEscrowProducts(paymentMethodOptions) {
if (frm.cardUseEscrow.value === "true") {
if (frm.escrowProducts && frm.escrowProducts.value) {
paymentMethodOptions.escrowProducts = JSON.parse(frm.escrowProducts.value);
}
}
}
// 결제 방법에 따른 추가 옵션
if (frm.method.value == 'CARD') {
// 신용카드
paymentOptions.card = {
flowMode: frm.cardflowMode.value, // 통합결제창 여는 옵션
easyPay: frm.cardeasyPay.value,
useCardPoint: frm.cardUseCardPoint.value == "true" ? true : false,
useAppCardOnly: frm.cardUseAppCardOnly.value == "true" ? true : false,
useEscrow: frm.cardUseEscrow.value == "true" ? true : false,
};
// escrowProducts 추가
addEscrowProducts(paymentOptions.card);
} else if (frm.method.value == 'VIRTUAL_ACCOUNT') {
// 가상계좌
paymentOptions.virtualAccount = {
cashReceipt: {
type: "소득공제",
},
useEscrow: frm.cardUseEscrow.value == "true" ? true : false,
validHours: 168,
};
// escrowProducts 추가
addEscrowProducts(paymentOptions.virtualAccount);
} else if (frm.method.value == 'TRANSFER') {
// 계좌이체
paymentOptions.transfer = {
cashReceipt: {
type: "소득공제",
},
useEscrow: frm.cardUseEscrow.value == "true" ? true : false,
};
// escrowProducts 추가
addEscrowProducts(paymentOptions.transfer);
}
await payment.requestPayment(paymentOptions);
}
/*
* FORM 명만 수정 가능
*/
function getFormObject() {
return document.getElementById("forderform");
}
</script>
<?php
include_once(G5_PATH.'/tail.sub.php');

View File

@ -0,0 +1,85 @@
<!-- HTML -->
<?php if (!defined('_GNUBOARD_')) exit; ?>
<dialog id="consentDialog" aria-labelledby="consentDialogTitle" aria-describedby="consentDialogBody">
<form method="dialog" class="cd-card">
<header class="cd-head">
<h3 id="consentDialogTitle" class="cd-title">안내</h3>
</header>
<div id="consentDialogBody" class="cd-body"></div>
<footer class="cd-actions">
<button type="button" class="cd-agree">동의합니다</button>
<button value="close" class="cd-close">닫기</button>
</footer>
</form>
</dialog>
<!-- 스타일 -->
<style>
#consentDialog { padding:0; border:none; border-radius:12px; }
#consentDialog::backdrop { background: rgba(0,0,0,.45); backdrop-filter: blur(5px);}
.cd-card { max-width: 560px; background:#fff; border-radius:12px; }
.cd-head { display:flex; align-items:center; justify-content:space-between; padding:16px; }
.cd-title { margin:0; font-size:18px; font-weight:bold; word-break:keep-all; }
.cd-body { max-height:500px; overflow-y:auto; padding:16px; border-top:1px solid #e6e6e9; border-bottom:1px solid #e6e6e9; line-height:1.6; font-size:14px; color:#222; }
.cd-actions { display:flex; gap:8px; justify-content:flex-end; padding:12px 16px 16px; }
.cd-actions .cd-agree { padding:8px 14px; border:1px solid #3a8afd; background:#3a8afd; color:#fff; border-radius:8px; }
.cd-actions .cd-close { padding:8px 14px; border:1px solid #ccc; background:#fff; color:#111; border-radius:8px; }
</style>
<!-- JS -->
<script>
(function(){
const dlg = document.getElementById('consentDialog');
if (!dlg) return;
const body = document.getElementById('consentDialogBody');
const titleE = document.getElementById('consentDialogTitle');
let opener = null;
const openFrom = (btn) => {
opener = btn;
const tplSel = btn.getAttribute('data-template');
const title = btn.getAttribute('data-title') || '안내';
const tpl = tplSel ? document.querySelector(tplSel) : null;
titleE.textContent = title;
body.innerHTML = tpl ? tpl.innerHTML : '';
dlg.dataset.check = btn.getAttribute('data-check') || '';
dlg.dataset.checkGroup = btn.getAttribute('data-check-group') || '';
if (dlg.showModal) dlg.showModal(); else dlg.setAttribute('open','');
};
const closeDialog = () => {
if (dlg.close) dlg.close(); else dlg.removeAttribute('open');
if (opener) opener.focus();
};
document.addEventListener('click', (e)=>{
const trigger = e.target.closest('.js-open-consent');
if (trigger) { openFrom(trigger); return; }
if (e.target.classList.contains('cd-agree')) {
const sel = dlg.dataset.check;
const groupSel = dlg.dataset.checkGroup;
if (groupSel) {
document.querySelectorAll(groupSel).forEach(cb => {
cb.checked = true;
cb.dispatchEvent(new Event('change', {bubbles:true}));
});
}
if (sel) {
const cb = document.querySelector(sel);
if (cb) { cb.checked = true; cb.dispatchEvent(new Event('change', {bubbles:true})); }
}
closeDialog();
e.preventDefault();
return;
}
});
dlg.addEventListener('cancel', (e)=>{ e.preventDefault(); closeDialog(); });
})();
</script>

View File

@ -22,7 +22,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
</div>
<section id="fregister_term">
<h2>회원가입약관</h2>
<h2>(필수) 회원가입약관</h2>
<textarea readonly><?php echo get_text($config['cf_stipulation']) ?></textarea>
<fieldset class="fregister_agree">
<input type="checkbox" name="agree" value="1" id="agree11" class="selec_chk">
@ -31,7 +31,7 @@ add_stylesheet('<link rel="stylesheet" href="'.$member_skin_url.'/style.css">',
</section>
<section id="fregister_private">
<h2>개인정보 수집 및 이용</h2>
<h2>(필수) 개인정보 수집 및 이용</h2>
<div class="tbl_head01 tbl_wrap">
<table>
<caption>개인정보 수집 및 이용</caption>

View File

@ -45,8 +45,7 @@ if ($config['cf_cert_use'] && ($config['cf_cert_simple'] || $config['cf_cert_ipi
<div class="form_01">
<h2>개인정보 입력</h2>
<ul>
<li>
<?php
<?php
$desc_name = '';
$desc_phone = '';
if ($config['cf_cert_use']) {
@ -56,7 +55,9 @@ if ($config['cf_cert_use'] && ($config['cf_cert_simple'] || $config['cf_cert_ipi
if (!$config['cf_cert_simple'] && !$config['cf_cert_hp'] && $config['cf_cert_ipin']) {
$desc_phone = '';
}
?>
<li>
<?php
if($config['cf_cert_simple']) {
echo '<button type="button" id="win_sa_kakao_cert" class="btn_frmline btn win_sa_cert" data-type="">간편인증</button>'.PHP_EOL;
}
@ -67,11 +68,10 @@ if ($config['cf_cert_use'] && ($config['cf_cert_simple'] || $config['cf_cert_ipi
echo '<span class="cert_req">(필수)</span>';
echo '<noscript>본인확인을 위해서는 자바스크립트 사용이 가능해야합니다.</noscript>'.PHP_EOL;
}
?>
<?php
if ($config['cf_cert_use'] && $member['mb_certify']) {
switch ($member['mb_certify']) {
if ($member['mb_certify']) {
switch ($member['mb_certify']) {
case "simple":
$mb_cert = "간편인증";
break;
@ -86,8 +86,9 @@ if ($config['cf_cert_use'] && ($config['cf_cert_simple'] || $config['cf_cert_ipi
<div id="msg_certify">
<strong><?php echo $mb_cert; ?> 본인확인</strong><?php if ($member['mb_adult']) { ?> 및 <strong>성인인증</strong><?php } ?> 완료
</div>
<?php } ?>
<?php } ?>
</li>
<?php } ?>
<li class="rgs_name_li">
<label for="reg_mb_name" class="sound_only">이름 (필수)<?php echo $desc_name ?></label>
<input type="text" id="reg_mb_name" name="mb_name" value="<?php echo get_text($member['mb_name']) ?>" <?php echo $required ?> <?php echo $name_readonly; ?> class="frm_input full_input <?php echo $required ?> <?php echo $name_readonly ?>" placeholder="이름 (필수)<?php echo $desc_name ?>">
@ -129,7 +130,7 @@ if ($config['cf_cert_use'] && ($config['cf_cert_simple'] || $config['cf_cert_ipi
<?php if ($config['cf_use_tel']) { ?>
<li>
<label for="reg_mb_tel" class="sound_only">전화번호<?php if ($config['cf_req_tel']) { ?> (필수)<?php } ?></label>
<input type="text" name="mb_tel" value="<?php echo get_text($member['mb_tel']) ?>" id="reg_mb_tel" class="frm_input full_input <?php echo $config['cf_req_tel']?"required":""; ?>" <?php if ($config['cf_cert_use'] && ($config['cf_cert_hp'] || $config['cf_cert_simple']) && $member['mb_certify']) { echo "readonly"; } ?> maxlength="20" <?php echo $config['cf_req_tel']?"required":""; ?> placeholder="전화번호<?php if ($config['cf_req_tel']) { ?> (필수)<?php } ?>">
<input type="text" name="mb_tel" value="<?php echo get_text($member['mb_tel']) ?>" id="reg_mb_tel" class="frm_input full_input <?php echo $config['cf_req_tel']?"required":""; ?>" maxlength="20" <?php echo $config['cf_req_tel']?"required":""; ?> placeholder="전화번호<?php if ($config['cf_req_tel']) { ?> (필수)<?php } ?>">
</li>
<?php } ?>
@ -218,26 +219,6 @@ if ($config['cf_cert_use'] && ($config['cf_cert_simple'] || $config['cf_cert_ipi
</li>
<?php } ?>
<li class="chk_box">
<input type="checkbox" name="mb_mailling" value="1" id="reg_mb_mailling" <?php echo ($w=='' || $member['mb_mailling'])?'checked':''; ?> class="selec_chk">
<label for="reg_mb_mailling">
<span></span>
<b class="sound_only">메일링서비스</b>
</label>
<span class="chk_li">정보 메일을 받겠습니다.</span>
</li>
<?php if ($config['cf_use_hp']) { ?>
<li class="chk_box">
<input type="checkbox" name="mb_sms" value="1" id="reg_mb_sms" <?php echo ($w=='' || $member['mb_sms'])?'checked':''; ?> class="selec_chk">
<label for="reg_mb_sms">
<span></span>
<b class="sound_only">SMS 수신여부</b>
</label>
<span class="chk_li">휴대폰 문자메세지를 받겠습니다.</span>
</li>
<?php } ?>
<?php if (isset($member['mb_open_date']) && $member['mb_open_date'] <= date("Y-m-d", G5_SERVER_TIME - ($config['cf_open_modify'] * 86400)) || empty($member['mb_open_date'])) { // 정보공개 수정일이 지났다면 수정가능 ?>
<li class="chk_box">
<input type="checkbox" name="mb_open" value="1" id="reg_mb_open" <?php echo ($w=='' || $member['mb_open'])?'checked':''; ?> class="selec_chk">
@ -246,7 +227,7 @@ if ($config['cf_cert_use'] && ($config['cf_cert_simple'] || $config['cf_cert_ipi
<b class="sound_only">정보공개</b>
</label>
<span class="chk_li">다른분들이 나의 정보를 볼 수 있도록 합니다.</span>
<span class="frm_info">
<span class="frm_info add_info">
정보공개를 바꾸시면 앞으로 <?php echo (int)$config['cf_open_modify'] ?>일 이내에는 변경이 안됩니다.
</span>
<input type="hidden" name="mb_open_default" value="<?php echo $member['mb_open'] ?>">
@ -276,20 +257,129 @@ if ($config['cf_cert_use'] && ($config['cf_cert_simple'] || $config['cf_cert_ipi
<input type="text" name="mb_recommend" id="reg_mb_recommend" class="frm_input full_input" placeholder="추천인아이디">
</li>
<?php } ?>
<li class="is_captcha_use">
<span class="frm_label">자동등록방지</span>
<?php echo captcha_html(); ?>
</li>
</ul>
</div>
<!-- 회원가입 약관 동의에 광고성 정보 수신 동의 표시 여부가 사용시에만 -->
<?php if($config['cf_use_promotion'] == 1) { ?>
<div class="form_01">
<h2>수신설정</h2>
<!-- 수신설정만 팝업 및 체크박스 관련 class 적용 -->
<ul>
<!-- (선택) 마케팅 목적의 개인정보 수집 및 이용 -->
<li class="chk_box">
<div class="consent-line">
<input type="checkbox" name="mb_marketing_agree" value="1" id="reg_mb_marketing_agree" aria-describedby="desc_marketing" <?php echo $member['mb_marketing_agree'] ? 'checked' : ''; ?> class="selec_chk marketing-sync">
<label for="reg_mb_marketing_agree"><span></span><b class="sound_only">(선택) 마케팅 목적의 개인정보 수집 및 이용</b></label>
<span class="chk_li">(선택) 마케팅 목적의 개인정보 수집 및 이용</span>
<button type="button" class="js-open-consent" data-title="마케팅 목적의 개인정보 수집 및 이용" data-template="#tpl_marketing" data-check="#reg_mb_marketing_agree" aria-controls="consentDialog">자세히보기</button>
</div>
<input type="hidden" name="mb_marketing_agree_default" value="<?php echo $member['mb_marketing_agree'] ?>">
<div id="desc_marketing" class="sound_only">마케팅 목적의 개인정보 수집·이용에 대한 안내입니다. 자세히보기를 눌러 전문을 확인할 수 있습니다.</div>
<div class="consent-date"><?php if ($member['mb_marketing_agree'] == 1 && $member['mb_marketing_date'] != "0000-00-00 00:00:00") echo "(동의일자: ".$member['mb_marketing_date'].")"; ?></div>
<template id="tpl_marketing">
* 목적: 서비스 마케팅 및 프로모션<br>
* 항목: 이름, 이메일<?php echo ($config['cf_use_hp'] || ($config["cf_cert_use"] && ($config['cf_cert_hp'] || $config['cf_cert_simple']))) ? ", 휴대폰 번호" : "";?><br>
* 보유기간: 회원 탈퇴 시까지<br>
동의를 거부하셔도 서비스 기본 이용은 가능하나, 맞춤형 혜택 제공은 제한될 수 있습니다.
</template>
</li>
<!-- (선택) 광고성 정보 수신 동의 (상위) -->
<li class="chk_box consent-group">
<div class="consent-line">
<input type="checkbox" name="mb_promotion_agree" value="1" id="reg_mb_promotion_agree" aria-describedby="desc_promotion" class="selec_chk marketing-sync parent-promo">
<label for="reg_mb_promotion_agree"><span></span><b class="sound_only">(선택) 광고성 정보 수신 동의</b></label>
<span class="chk_li">(선택) 광고성 정보 수신 동의</span>
<button type="button" class="js-open-consent" data-title="광고성 정보 수신 동의" data-template="#tpl_promotion" data-check="#reg_mb_promotion_agree" data-check-group=".child-promo" aria-controls="consentDialog">자세히보기</button>
</div>
<div id="desc_promotion" class="sound_only">광고성 정보(이메일/SMS·카카오톡) 수신 동의의 상위 항목입니다. 자세히보기를 눌러 전문을 확인할 수 있습니다.</div>
<!-- 하위 채널(이메일/SMS) -->
<ul class="sub-consents">
<li class="chk_box is-inline">
<input type="checkbox" name="mb_mailling" value="1" id="reg_mb_mailling" <?php echo $member['mb_mailling'] ? 'checked' : ''; ?> class="selec_chk child-promo">
<label for="reg_mb_mailling"><span></span><b class="sound_only">광고성 이메일 수신 동의</b></label>
<span class="chk_li">광고성 이메일 수신 동의</span>
<input type="hidden" name="mb_mailling_default" value="<?php echo $member['mb_mailling']; ?>">
<div class="consent-date"><?php if ($w == 'u' && $member['mb_mailling'] == 1 && $member['mb_mailling_date'] != "0000-00-00 00:00:00") echo "(동의일자: ".$member['mb_mailling_date'].")"; ?></div>
</li>
<!-- 휴대폰번호 입력 보이기 or 필수입력일 경우에만 -->
<?php if ($config['cf_use_hp'] || $config['cf_req_hp']) { ?>
<li class="chk_box is-inline">
<input type="checkbox" name="mb_sms" value="1" id="reg_mb_sms" <?php echo $member['mb_sms'] ? 'checked' : ''; ?> class="selec_chk child-promo">
<label for="reg_mb_sms"><span></span><b class="sound_only">광고성 SMS/카카오톡 수신 동의</b></label>
<span class="chk_li">광고성 SMS/카카오톡 수신 동의</span>
<input type="hidden" name="mb_sms_default" value="<?php echo $member['mb_sms']; ?>">
<div class="consent-date"><?php if ($w == 'u' && $member['mb_sms'] == 1 && $member['mb_sms_date'] != "0000-00-00 00:00:00") echo "(동의일자: ".$member['mb_sms_date'].")"; ?></div>
</li>
<?php } ?>
</ul>
<template id="tpl_promotion">
수집·이용에 동의한 개인정보를 이용하여 이메일/SMS/카카오톡 등으로 오전 8시~오후 9시에 광고성 정보를 전송할 수 있습니다.<br>
동의는 언제든지 마이페이지에서 철회할 수 있습니다.
</template>
</li>
<!-- (선택) 개인정보 제3자 제공 동의 -->
<!-- SMS 사용시에만 -->
<?php
$configKeys = ['cf_sms_use'];
$companies = ['icode' => '아이코드'];
$usedCompanies = [];
foreach ($configKeys as $key) {
if (!empty($config[$key]) && isset($companies[$config[$key]])) {
$usedCompanies[] = $companies[$config[$key]];
}
}
?>
<?php if (!empty($usedCompanies)) { ?>
<li class="chk_box">
<div class="consent-line">
<input type="checkbox" name="mb_thirdparty_agree" value="1" id="reg_mb_thirdparty_agree" aria-describedby="desc_thirdparty" <?php echo $member['mb_thirdparty_agree'] ? 'checked' : ''; ?> class="selec_chk marketing-sync">
<label for="reg_mb_thirdparty_agree"><span></span><b class="sound_only">(선택) 개인정보 제3자 제공 동의</b></label>
<span class="chk_li">(선택) 개인정보 제3자 제공 동의</span>
<button type="button" class="js-open-consent" data-title="개인정보 제3자 제공 동의" data-template="#tpl_thirdparty" data-check="#reg_mb_thirdparty_agree" aria-controls="consentDialog">자세히보기</button>
</div>
<input type="hidden" name="mb_thirdparty_agree_default" value="<?php echo $member['mb_thirdparty_agree'] ?>">
<div id="desc_thirdparty" class="sound_only">개인정보 제3자 제공 동의에 대한 안내입니다. 자세히보기를 눌러 전문을 확인할 수 있습니다.</div>
<div class="consent-date"><?php if ($member['mb_thirdparty_agree'] == 1 && $member['mb_thirdparty_date'] != "0000-00-00 00:00:00") echo "(동의일자: ".$member['mb_thirdparty_date'].")"; ?></div>
<template id="tpl_thirdparty">
* 목적: 상품/서비스, 사은/판촉행사, 이벤트 등의 마케팅 안내(카카오톡 등)<br>
* 항목: 이름, 휴대폰 번호<br>
* 제공받는 자: <?php echo implode(', ', $usedCompanies);?><br>
* 보유기간: 제공 목적 서비스 기간 또는 동의 철회 시까지
</template>
</li>
<?php } ?>
</ul>
</div>
<?php } ?>
<div class="form_01">
<h2>자동등록방지</h2>
<ul>
<li class="is_captcha_use">
<span class="frm_label">자동등록방지</span>
<?php echo captcha_html(); ?>
</li>
</ul>
</div>
<div class="btn_confirm">
<a href="<?php echo G5_URL; ?>/" class="btn_cancel">취소</a>
<button type="submit" id="btn_submit" class="btn_submit" accesskey="s"><?php echo $w==''?'회원가입':'정보수정'; ?></button>
</div>
</form>
<?php include_once(__DIR__ . '/consent_modal.inc.php'); ?>
<script>
$(function() {
$("#reg_zip_find").css("display", "inline-block");
@ -513,5 +603,29 @@ if ($config['cf_cert_use'] && ($config['cf_cert_simple'] || $config['cf_cert_ipi
}
$(this).siblings('.fileName').val(filename);
});
document.addEventListener('DOMContentLoaded', function () {
const parentPromo = document.getElementById('reg_mb_promotion_agree');
const childPromo = Array.from(document.querySelectorAll('.child-promo'));
if (!parentPromo || childPromo.length === 0) return;
const syncParentFromChildren = () => {
const anyChecked = childPromo.some(cb => cb.checked);
parentPromo.checked = anyChecked; // 하나라도 체크되면 부모 체크
};
const syncChildrenFromParent = () => {
const isChecked = parentPromo.checked;
childPromo.forEach(cb => {
cb.checked = isChecked;
cb.dispatchEvent(new Event('change', { bubbles: true }));
});
};
syncParentFromChildren();
parentPromo.addEventListener('change', syncChildrenFromParent);
childPromo.forEach(cb => cb.addEventListener('change', syncParentFromChildren));
});
</script>
</div>

View File

@ -5,6 +5,8 @@
.mbskin h1 {font-size:1.75em;margin:40px 0 25px}
.mbskin p {padding-bottom:20px;border-bottom:1px solid #c8c8c8}
.mbskin p strong {color:#4162ff;padding-bottom:5px;display:block;font-size:1.083em}
/* 버튼 */
.mbskin .btn_submit {display:block;width:100%;height:40px;line-height:40px;padding:0 10px;border:0;font-weight:bold;background:#3a8afd;color:#fff;border-radius:3px}
/* ### 기본 스타일 커스터마이징 끝 ### */
@ -68,7 +70,10 @@
.fregister_agree input[type="checkbox"]:checked + label {color:#000}
.fregister_agree input[type="checkbox"]:checked + label span {background:url('./img/chk.png') no-repeat 50% 50% #3a8afd;border-color:#1471f6;border-radius:3px}
.fregister_agree.chk_all input[type="checkbox"] + label span {top:15px}
#fregisterform .consent-line {display: flex; align-items: baseline;}
#fregisterform .consent-date { margin: 5px 0 0 20px !important; }
#fregisterform .consent-group .sub-consents {padding: 10px 20px 0;}
#fregisterform .js-open-consent {flex:1 0 auto; margin-left: 10px; text-align: right; font-size: 12px; color: #3f51b5; background: none; border: none; cursor: pointer; text-decoration: underline; }
/* 회원가입 완료 */
#reg_result {padding:20px 10px 10px}
@ -135,8 +140,9 @@
#flogin {background:#fff;margin:20px 0}
#mb_login_notmb {background:#fff;border-bottom:1px solid #ccc;padding:20px}
#mb_login_notmb .chk_box input[type="checkbox"] + label{padding-left:20px}
#mb_login_notmb h2 {font-size:1.25em;padding:10px;background:#f3f3f3}
#mb_login_notmb p {border:0;padding:0;margin:10px;color:#}
#mb_login_notmb p {border:0;padding:0;margin:10px;}
#guest_privacy {border:1px solid #ccc;text-align:left;line-height:1.6em;color:#666;background:#fafafa;padding:10px;height:200px;margin:10px 0;overflow-y:auto}
#mb_login_notmb .btn_submit {width:100%;display:block;height:40px;line-height:40px}
@ -154,7 +160,6 @@
#mb_login #sns_login .sns-icon:nth-child(odd) {margin-right:2%}
#mb_login #sns_login .txt {font-size:0.95em;padding-left:5px !important;border-left:0 !important}
/* 쪽지 */
.memo_list {border-top:1px solid #ececec;}
.memo_list li {border-bottom:1px solid #ececec;background:#fff;padding:10px 15px;list-style:none;position:relative}
@ -198,7 +203,7 @@
.memo_from li.memo_view_date {display:block;color:#555;line-height:24px}
.memo_from li.memo_op_btn {position:absolute}
.memo_from li.list_btn {right:53px;}
.memo_from li.del_btn {right:15px;padding}
.memo_from li.del_btn {right:15px;}
.memo_from:after {display:block;visibility:hidden;clear:both;content:""}
.memo_btn {width:100%}
@ -292,7 +297,6 @@
.chk_box input[type="radio"]:checked + label span {border-color:#3a8afd}
.chk_box input[type="radio"]:checked + label span:before {width:7px;height:7px;background:#3a8afd;content:'';position:absolute;top:3px;left:3px;border-radius:50%}
/* 자기소개 */
#profile section {margin:10px}
#profile h2 {margin:0}

View File

@ -0,0 +1,85 @@
<!-- HTML -->
<?php if (!defined('_GNUBOARD_')) exit; ?>
<dialog id="consentDialog" aria-labelledby="consentDialogTitle" aria-describedby="consentDialogBody">
<form method="dialog" class="cd-card">
<header class="cd-head">
<h3 id="consentDialogTitle" class="cd-title">안내</h3>
</header>
<div id="consentDialogBody" class="cd-body"></div>
<footer class="cd-actions">
<button type="button" class="cd-agree">동의합니다</button>
<button value="close" class="cd-close">닫기</button>
</footer>
</form>
</dialog>
<!-- 스타일 -->
<style>
#consentDialog { padding:0; border:none; border-radius:12px; }
#consentDialog::backdrop { background: rgba(0,0,0,.45); backdrop-filter: blur(5px);}
.cd-card { max-width: 560px; background:#fff; border-radius:12px; }
.cd-head { display:flex; align-items:center; justify-content:space-between; padding:16px; }
.cd-title { margin:0; font-size:18px; font-weight:bold; word-break:keep-all; }
.cd-body { max-height:500px; overflow-y:auto; padding:16px; border-top:1px solid #e6e6e9; border-bottom:1px solid #e6e6e9; line-height:1.6; font-size:14px; color:#222; }
.cd-actions { display:flex; gap:8px; justify-content:flex-end; padding:12px 16px 16px; }
.cd-actions .cd-agree { padding:8px 14px; border:1px solid #3a8afd; background:#3a8afd; color:#fff; border-radius:8px; }
.cd-actions .cd-close { padding:8px 14px; border:1px solid #ccc; background:#fff; color:#111; border-radius:8px; }
</style>
<!-- JS -->
<script>
(function(){
const dlg = document.getElementById('consentDialog');
if (!dlg) return;
const body = document.getElementById('consentDialogBody');
const titleE = document.getElementById('consentDialogTitle');
let opener = null;
const openFrom = (btn) => {
opener = btn;
const tplSel = btn.getAttribute('data-template');
const title = btn.getAttribute('data-title') || '안내';
const tpl = tplSel ? document.querySelector(tplSel) : null;
titleE.textContent = title;
body.innerHTML = tpl ? tpl.innerHTML : '';
dlg.dataset.check = btn.getAttribute('data-check') || '';
dlg.dataset.checkGroup = btn.getAttribute('data-check-group') || '';
if (dlg.showModal) dlg.showModal(); else dlg.setAttribute('open','');
};
const closeDialog = () => {
if (dlg.close) dlg.close(); else dlg.removeAttribute('open');
if (opener) opener.focus();
};
document.addEventListener('click', (e)=>{
const trigger = e.target.closest('.js-open-consent');
if (trigger) { openFrom(trigger); return; }
if (e.target.classList.contains('cd-agree')) {
const sel = dlg.dataset.check;
const groupSel = dlg.dataset.checkGroup;
if (groupSel) {
document.querySelectorAll(groupSel).forEach(cb => {
cb.checked = true;
cb.dispatchEvent(new Event('change', {bubbles:true}));
});
}
if (sel) {
const cb = document.querySelector(sel);
if (cb) { cb.checked = true; cb.dispatchEvent(new Event('change', {bubbles:true})); }
}
closeDialog();
e.preventDefault();
return;
}
});
dlg.addEventListener('cancel', (e)=>{ e.preventDefault(); closeDialog(); });
})();
</script>

View File

@ -145,6 +145,108 @@ $email_msg = $is_exists_email ? '등록할 이메일이 중복되었습니다.
</ul>
</div>
<!-- 회원가입 약관 동의에 광고성 정보 수신 동의 표시 여부가 사용시에만 -->
<?php if($config['cf_use_promotion'] == 1) { ?>
<div class="form_01">
<h2>수신설정</h2>
<!-- 수신설정만 팝업 및 체크박스 관련 class 적용 -->
<ul>
<!-- (선택) 마케팅 목적의 개인정보 수집 및 이용 -->
<li class="chk_box">
<div class="consent-line">
<input type="checkbox" name="mb_marketing_agree" value="1" id="reg_mb_marketing_agree" aria-describedby="desc_marketing" <?php echo $member['mb_marketing_agree'] ? 'checked' : ''; ?> class="selec_chk marketing-sync">
<label for="reg_mb_marketing_agree"><span></span><b class="sound_only">(선택) 마케팅 목적의 개인정보 수집 및 이용</b></label>
<span class="chk_li">(선택) 마케팅 목적의 개인정보 수집 및 이용</span>
<button type="button" class="js-open-consent" data-title="마케팅 목적의 개인정보 수집 및 이용" data-template="#tpl_marketing" data-check="#reg_mb_marketing_agree" aria-controls="consentDialog">자세히보기</button>
</div>
<input type="hidden" name="mb_marketing_agree_default" value="<?php echo $member['mb_marketing_agree'] ?>">
<div id="desc_marketing" class="sound_only">마케팅 목적의 개인정보 수집·이용에 대한 안내입니다. 자세히보기를 눌러 전문을 확인할 수 있습니다.</div>
<?php if ($member['mb_marketing_agree'] == 1 && $member['mb_marketing_date'] != "0000-00-00 00:00:00") echo "<br>(동의일자: ".$member['mb_marketing_date'].")"; ?>
<template id="tpl_marketing">
* 목적: 서비스 마케팅 및 프로모션<br>
* 항목: 이름, 이메일<?php echo ($config['cf_use_hp'] || ($config["cf_cert_use"] && ($config['cf_cert_hp'] || $config['cf_cert_simple']))) ? ", 휴대폰 번호" : "";?><br>
* 보유기간: 회원 탈퇴 시까지<br>
동의를 거부하셔도 서비스 기본 이용은 가능하나, 맞춤형 혜택 제공은 제한될 수 있습니다.
</template>
</li>
<!-- (선택) 광고성 정보 수신 동의 (상위) -->
<li class="chk_box consent-group">
<div class="consent-line">
<input type="checkbox" name="mb_promotion_agree" value="1" id="reg_mb_promotion_agree" aria-describedby="desc_promotion" class="selec_chk marketing-sync parent-promo">
<label for="reg_mb_promotion_agree"><span></span><b class="sound_only">(선택) 광고성 정보 수신 동의</b></label>
<span class="chk_li">(선택) 광고성 정보 수신 동의</span>
<button type="button" class="js-open-consent" data-title="광고성 정보 수신 동의" data-template="#tpl_promotion" data-check="#reg_mb_promotion_agree" data-check-group=".child-promo" aria-controls="consentDialog">자세히보기</button>
</div>
<div id="desc_promotion" class="sound_only">광고성 정보(이메일/SMS·카카오톡) 수신 동의의 상위 항목입니다. 자세히보기를 눌러 전문을 확인할 수 있습니다.</div>
<!-- 하위 채널(이메일/SMS) -->
<ul class="sub-consents">
<li class="chk_box is-inline">
<input type="checkbox" name="mb_mailling" value="1" id="reg_mb_mailling" <?php echo $member['mb_mailling'] ? 'checked' : ''; ?> class="selec_chk child-promo">
<label for="reg_mb_mailling"><span></span><b class="sound_only">광고성 이메일 수신 동의</b></label>
<span class="chk_li">광고성 이메일 수신 동의</span>
<input type="hidden" name="mb_mailling_default" value="<?php echo $member['mb_mailling']; ?>">
<?php if ($w == 'u' && $member['mb_mailling'] == 1 && $member['mb_mailling_date'] != "0000-00-00 00:00:00") echo "<br>(동의일자: ".$member['mb_mailling_date'].")"; ?>
</li>
<!-- 휴대폰번호 입력 보이기 or 필수입력일 경우에만 -->
<?php if ($config['cf_use_hp'] || $config['cf_req_hp']) { ?>
<li class="chk_box is-inline">
<input type="checkbox" name="mb_sms" value="1" id="reg_mb_sms" <?php echo $member['mb_sms'] ? 'checked' : ''; ?> class="selec_chk child-promo">
<label for="reg_mb_sms"><span></span><b class="sound_only">광고성 SMS/카카오톡 수신 동의</b></label>
<span class="chk_li">광고성 SMS/카카오톡 수신 동의</span>
<input type="hidden" name="mb_sms_default" value="<?php echo $member['mb_sms']; ?>">
<?php if ($w == 'u' && $member['mb_sms'] == 1 && $member['mb_sms_date'] != "0000-00-00 00:00:00") echo "<br>(동의일자: ".$member['mb_sms_date'].")"; ?>
</li>
<?php } ?>
</ul>
<template id="tpl_promotion">
수집·이용에 동의한 개인정보를 이용하여 이메일/SMS/카카오톡 등으로 오전 8시~오후 9시에 광고성 정보를 전송할 수 있습니다.<br>
동의는 언제든지 마이페이지에서 철회할 수 있습니다.
</template>
</li>
<!-- (선택) 개인정보 제3자 제공 동의 -->
<!-- SMS 사용시에만 -->
<?php
$configKeys = ['cf_sms_use'];
$companies = ['icode' => '아이코드'];
$usedCompanies = [];
foreach ($configKeys as $key) {
if (!empty($config[$key]) && isset($companies[$config[$key]])) {
$usedCompanies[] = $companies[$config[$key]];
}
}
?>
<?php if (!empty($usedCompanies)) { ?>
<li class="chk_box">
<div class="consent-line">
<input type="checkbox" name="mb_thirdparty_agree" value="1" id="reg_mb_thirdparty_agree" aria-describedby="desc_thirdparty" <?php echo $member['mb_thirdparty_agree'] ? 'checked' : ''; ?> class="selec_chk marketing-sync">
<label for="reg_mb_thirdparty_agree"><span></span><b class="sound_only">(선택) 개인정보 제3자 제공 동의</b></label>
<span class="chk_li">(선택) 개인정보 제3자 제공 동의</span>
<button type="button" class="js-open-consent" data-title="개인정보 제3자 제공 동의" data-template="#tpl_thirdparty" data-check="#reg_mb_thirdparty_agree" aria-controls="consentDialog">자세히보기</button>
</div>
<input type="hidden" name="mb_thirdparty_agree_default" value="<?php echo $member['mb_thirdparty_agree'] ?>">
<div id="desc_thirdparty" class="sound_only">개인정보 제3자 제공 동의에 대한 안내입니다. 자세히보기를 눌러 전문을 확인할 수 있습니다.</div>
<?php if ($member['mb_thirdparty_agree'] == 1 && $member['mb_thirdparty_date'] != "0000-00-00 00:00:00") echo "<br>(동의일자: ".$member['mb_thirdparty_date'].")"; ?>
<template id="tpl_thirdparty">
* 목적: 상품/서비스, 사은/판촉행사, 이벤트 등의 마케팅 안내(카카오톡 등)<br>
* 항목: 이름, 휴대폰 번호<br>
* 제공받는 자: <?php echo implode(', ', $usedCompanies);?><br>
* 보유기간: 제공 목적 서비스 기간 또는 동의 철회 시까지
</template>
</li>
<?php } ?>
</ul>
</div>
<?php } ?>
<div class="btn_confirm">
<a href="<?php echo G5_URL ?>" class="btn_cancel">취소</a>
<button type="submit" id="btn_submit" class="btn_submit" accesskey="s"><?php echo $w == '' ? '회원가입' : '정보수정'; ?></button>
@ -196,6 +298,8 @@ $email_msg = $is_exists_email ? '등록할 이메일이 중복되었습니다.
</div>
</div>
<?php include_once(__DIR__ . '/consent_modal.inc.php'); ?>
<script>
$(function() {
// 모두선택
@ -335,6 +439,30 @@ $email_msg = $is_exists_email ? '등록할 이메일이 중복되었습니다.
return true;
}
document.addEventListener('DOMContentLoaded', function () {
const parentPromo = document.getElementById('reg_mb_promotion_agree');
const childPromo = Array.from(document.querySelectorAll('.child-promo'));
if (!parentPromo || childPromo.length === 0) return;
const syncParentFromChildren = () => {
const anyChecked = childPromo.some(cb => cb.checked);
parentPromo.checked = anyChecked; // 하나라도 체크되면 부모 체크
};
const syncChildrenFromParent = () => {
const isChecked = parentPromo.checked;
childPromo.forEach(cb => {
cb.checked = isChecked;
cb.dispatchEvent(new Event('change', { bubbles: true }));
});
};
syncParentFromChildren();
parentPromo.addEventListener('change', syncChildrenFromParent);
childPromo.forEach(cb => cb.addEventListener('change', syncParentFromChildren));
});
</script>
<!-- } 회원정보 입력/수정 끝 -->

View File

@ -130,6 +130,9 @@
#fregisterform .rgs_name_li button {margin:5px 0 0;width:auto}
#fregisterform .reg_mb_img_file {margin-bottom:30px}
#fregisterform .reg_mb_img_file img {max-width:100%;height:auto}
#fregisterform .consent-line {display: flex; align-items: baseline;}
#fregisterform .consent-group .sub-consents {padding: 10px 20px 0;}
#fregisterform .js-open-consent {flex:1 0 auto; margin-left: 10px; text-align: right; font-size: 12px; color: #3f51b5; background: none; border: none; cursor: pointer; text-decoration: underline; }
.filebox .fileName {display:inline-block;position:relative;width:100%;height:45px;padding-left:10px;margin-right:5px;line-height:30px;border: 1px solid #d0d3db;background-color:#fff;color:red;vertical-align:middle}
.filebox .btn_file {display:inline-block;position:absolute;right:8px;top:8px;border:1px solid #3a8afd;border-radius:3px;width:70px;height:30px;color:#3a8afd;font-size:1em;line-height:30px;font-weight:bold;text-align:center;vertical-align:middle}