NHN_KCP 간편결제-네이버페이,카카오페이 적용
This commit is contained in:
@ -8,6 +8,10 @@ if( is_inicis_simple_pay() ){ //이니시스 삼성페이 또는 Lpay 사용
|
||||
require_once(G5_MSHOP_PATH.'/samsungpay/incSamsungpayCommon.php');
|
||||
}
|
||||
|
||||
if(function_exists('is_use_easypay') && is_use_easypay('global_nhnkcp')){ // 타 PG 사용시 NHN KCP 네이버페이 사용이 설정되어 있다면
|
||||
require_once(G5_MSHOP_PATH.'/kcp/global_m_nhn_kcp.php');
|
||||
}
|
||||
|
||||
$tablet_size = "1.0"; // 화면 사이즈 조정 - 기기화면에 맞게 수정(갤럭시탭,아이패드 - 1.85, 스마트폰 - 1.0)
|
||||
|
||||
// 개인결제번호제거
|
||||
@ -252,6 +256,10 @@ require_once(G5_MSHOP_PATH.'/'.$default['de_pg_service'].'/orderform.1.php');
|
||||
if( is_inicis_simple_pay() ){ //이니시스 삼성페이 또는 lpay 사용시
|
||||
require_once(G5_MSHOP_PATH.'/samsungpay/orderform.1.php');
|
||||
}
|
||||
|
||||
if(function_exists('is_use_easypay') && is_use_easypay('global_nhnkcp')){ // 타 PG 사용시 NHN KCP 네이버페이 사용이 설정되어 있다면
|
||||
require_once(G5_MSHOP_PATH.'/kcp/easypay_form.1.php');
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
|
||||
@ -586,6 +594,8 @@ if($is_kakaopay_use) {
|
||||
echo '<li><input type="radio" id="od_settle_card" name="od_settle_case" value="신용카드" '.$checked.'> <label for="od_settle_card" class="lb_icon card_icon">신용카드</label></li>'.PHP_EOL;
|
||||
$checked = '';
|
||||
}
|
||||
|
||||
$easypay_prints = array();
|
||||
|
||||
// PG 간편결제
|
||||
if($default['de_easy_pay_use']) {
|
||||
@ -602,8 +612,30 @@ if($is_kakaopay_use) {
|
||||
}
|
||||
|
||||
$multi_settle++;
|
||||
echo '<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>'.PHP_EOL;
|
||||
$checked = '';
|
||||
|
||||
if($default['de_pg_service'] === 'kcp' && 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( 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 {
|
||||
$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>';
|
||||
}
|
||||
}
|
||||
|
||||
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($easypay_prints) {
|
||||
$multi_settle++;
|
||||
echo run_replace('shop_orderform_easypay_buttons', implode(PHP_EOL, $easypay_prints), $easypay_prints, $multi_settle);
|
||||
}
|
||||
|
||||
//이니시스 삼성페이
|
||||
@ -696,6 +728,10 @@ if($is_kakaopay_use) {
|
||||
require_once(G5_MSHOP_PATH.'/samsungpay/orderform.2.php');
|
||||
}
|
||||
|
||||
if(function_exists('is_use_easypay') && is_use_easypay('global_nhnkcp')){ // 타 PG 사용시 NHN KCP 네이버페이 사용이 설정되어 있다면
|
||||
require_once(G5_MSHOP_PATH.'/kcp/easypay_form.2.php');
|
||||
}
|
||||
|
||||
if($is_kakaopay_use) {
|
||||
require_once(G5_SHOP_PATH.'/kakaopay/orderform.2.php');
|
||||
}
|
||||
@ -730,6 +766,10 @@ if($is_kakaopay_use) {
|
||||
if( is_inicis_simple_pay() ){ //삼성페이 사용시
|
||||
require_once(G5_MSHOP_PATH.'/samsungpay/order.script.php');
|
||||
}
|
||||
|
||||
if(function_exists('is_use_easypay') && is_use_easypay('global_nhnkcp')){ // 타 PG 사용시 NHN KCP 네이버페이 사용이 설정되어 있다면
|
||||
require_once(G5_MSHOP_PATH.'/kcp/m_order.script.php');
|
||||
}
|
||||
?>
|
||||
<script>
|
||||
var zipcode = "";
|
||||
@ -1160,7 +1200,7 @@ function calculate_tax()
|
||||
});
|
||||
|
||||
if($("input[name=od_temp_point]").size())
|
||||
temp_point = parseInt($("input[name=od_temp_point]").val());
|
||||
temp_point = parseInt($("input[name=od_temp_point]").val()) || 0;
|
||||
|
||||
tot_mny += (send_cost + send_cost2 - od_coupon - send_coupon - temp_point);
|
||||
if(tot_mny < 0) {
|
||||
@ -1223,6 +1263,10 @@ function pay_approval()
|
||||
|
||||
if( settle_method == "삼성페이" || settle_method == "lpay" || settle_method == "inicis_kakaopay" ){
|
||||
form_order_method = 'samsungpay';
|
||||
} else if(settle_method == "간편결제") {
|
||||
if(jQuery("input[name='od_settle_case']:checked" ).attr("data-pay") === "naverpay"){
|
||||
form_order_method = 'nhnkcp_naverpay';
|
||||
}
|
||||
}
|
||||
|
||||
if( jQuery(pf).triggerHandler("form_sumbit_order_"+form_order_method) !== false ) {
|
||||
@ -1239,10 +1283,31 @@ function pay_approval()
|
||||
f.rcvr_add1.value = pf.od_b_addr1.value;
|
||||
f.rcvr_add2.value = pf.od_b_addr2.value;
|
||||
f.settle_method.value = settle_method;
|
||||
if(settle_method == "간편결제")
|
||||
f.payco_direct.value = "Y";
|
||||
else
|
||||
f.payco_direct.value = "";
|
||||
|
||||
if(typeof f.payco_direct !== "undefined") f.payco_direct.value = "";
|
||||
if(typeof f.naverpay_direct !== "undefined") f.naverpay_direct.value = "A";
|
||||
if(typeof f.kakaopay_direct !== "undefined") f.kakaopay_direct.value = "A";
|
||||
if(typeof f.ActionResult !== "undefined") f.ActionResult.value = "";
|
||||
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");
|
||||
|
||||
if(nhnkcp_easy_pay === "naverpay"){
|
||||
if(typeof f.naverpay_direct !== "undefined"){
|
||||
f.naverpay_direct.value = "Y";
|
||||
}
|
||||
} else if(nhnkcp_easy_pay === "kakaopay"){
|
||||
if(typeof f.kakaopay_direct !== "undefined") f.kakaopay_direct.value = "Y";
|
||||
} else {
|
||||
if(typeof f.payco_direct !== "undefined") f.payco_direct.value = "Y";
|
||||
}
|
||||
|
||||
if(typeof f.ActionResult !== "undefined") f.ActionResult.value = "CARD"; // 대소문자 구분
|
||||
if(typeof f.pay_method !== "undefined") f.pay_method.value = "card"; // 대소문자 구분
|
||||
|
||||
}
|
||||
|
||||
<?php } else if($default['de_pg_service'] == 'lg') { ?>
|
||||
var pay_method = "";
|
||||
var easy_pay = "";
|
||||
@ -1472,7 +1537,7 @@ function payment_check(f)
|
||||
if (f.od_temp_point.value)
|
||||
{
|
||||
var point_unit = parseInt(<?php echo $default['de_settle_point_unit']; ?>);
|
||||
temp_point = parseInt(f.od_temp_point.value);
|
||||
temp_point = parseInt(f.od_temp_point.value) || 0;
|
||||
|
||||
if (temp_point < 0) {
|
||||
alert("포인트를 0 이상 입력하세요.");
|
||||
|
||||
Reference in New Issue
Block a user