이니시스 모듈 추가 및 모바일 결제 기능 개선
This commit is contained in:
@ -852,21 +852,20 @@ strong.sodr_nonpay {display:block;padding:5px 0;text-align:right}
|
||||
.sevice_1 h4 a{display:inline-block;height:65px;padding:10px 0 0;width:100%}
|
||||
|
||||
.svc_card{background:url('../img/service_img1.jpg') no-repeat top center;margin-right:13px;}
|
||||
.svc_card ul li{width:49%;}
|
||||
.svc_card ul li{width:33%;}
|
||||
.svc_phone {background:url('../img/service_img2.jpg') no-repeat top center;margin-right:13px;}
|
||||
.svc_phone ul li{width:33%;}
|
||||
.svc_ipin {background:url('../img/service_img3.jpg') no-repeat top center;}
|
||||
|
||||
.service_2{border-top:1px solid #ebe8e8;float:left;margin-top:30px;border-bottom:1px solid #ebe8e8;}
|
||||
.service_2{padding-top:15px;clear:both}
|
||||
.service_2 h3{font-size:14px;letter-spacing:-1px;color:#525252;margin:0 0 4px}
|
||||
.service_2 .svc_a{width:300px;float:left}
|
||||
|
||||
.service_2 .svc_a p{color:#898989;line-height:16px;letter-spacing:-1px;}
|
||||
|
||||
.svc_keyword{clear:both ;}
|
||||
.svc_keyword .svc_a{float:left;width:230px;padding:46px 0 0 15px ;height:120px; }
|
||||
|
||||
.service_2 .svc_ri{height:83px;float:left;width:479px}
|
||||
.service_2 .svc_ri .svc_a{padding:18px 0 0 22px;}
|
||||
.service_2 .svc_ri .svc_a{padding:25px 0 0 22px;}
|
||||
|
||||
.service_2 .svc_btn{float:right;}
|
||||
.service_2 .svc_btn a{display:inline-block;width:126px; height:37px;background:#ff3061;color:#fff;line-height:37px;text-align:center;margin:22px 13px 0;}
|
||||
@ -875,6 +874,7 @@ strong.sodr_nonpay {display:block;padding:5px 0;text-align:right}
|
||||
.svc_keyword .svc_btn{margin:40px 0 0 ;}
|
||||
.svc_keyword .svc_btn a{width:160px;}
|
||||
|
||||
.svc_sms{border-right:1px solid #ebe8e8}
|
||||
.svc_sms .svc_btn2{float:right}
|
||||
.svc_sms .svc_btn2 a{display:inline-block; width:150px; height:63px; background:#fbfbfb; text-align:center; padding:20px 0 0;}
|
||||
.svc_sms{border:1px solid #ebe8e8;position:relative;height:83px}
|
||||
.svc_sms:after{display:block;visibility:hidden;clear:both;content:""}
|
||||
.svc_sms .svc_btn2{position:absolute;top:0;right:0}
|
||||
.svc_sms .svc_btn2 a{display:inline-block; width:220px; height:63px; background:#fbfbfb; text-align:center; padding:20px 0 0;}
|
||||
|
||||
BIN
adm/img/svc_btn_06.jpg
Normal file
BIN
adm/img/svc_btn_06.jpg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.0 KiB |
@ -19,7 +19,9 @@ include_once('./admin.head.php');
|
||||
|
||||
<ul>
|
||||
<li><a href="http://sir.co.kr/main/service/p_pg.php" target="_blank"><img src="<?php echo G5_ADMIN_URL ?>/img/svc_btn_01.jpg" alt="KCP 신용카드 전자결제 신청하기"></a></li>
|
||||
<li class="last"><a href="http://sir.co.kr/main/service/lg_pg.php" target="_blank"><img src="<?php echo G5_ADMIN_URL ?>/img/svc_btn_02.jpg" alt="LG유플러스 신용카드 전자결제 신청하기"></a></li>
|
||||
<li ><a href="http://sir.co.kr/main/service/lg_pg.php" target="_blank"><img src="<?php echo G5_ADMIN_URL ?>/img/svc_btn_02.jpg" alt="LG유플러스 신용카드 전자결제 신청하기"></a></li>
|
||||
<li class="last"><a href="http://sir.co.kr/main/service/inicis_pg.php"><img src="<?php echo G5_ADMIN_URL ?>/img/svc_btn_06.jpg" alt="KG 이니시스 전자결제 신청하기"></a></li>
|
||||
|
||||
|
||||
</ul>
|
||||
</div>
|
||||
@ -47,17 +49,11 @@ include_once('./admin.head.php');
|
||||
<div class="svc_ri svc_sms">
|
||||
<div class="svc_a">
|
||||
<h3>SMS 문자 서비스</h3>
|
||||
<p>주문이나 배송시에 상점운영자 또는 고객에게 휴대폰으로 <br>단문메세지 (최대 한글 40자, 영문 80자)를 발송합니다.</p>
|
||||
<p>주문이나 배송시에 상점운영자 또는 고객에게 휴대폰으로 단문메세지 (최대 한글 40자, 영문 80자)를 발송합니다.</p>
|
||||
</div>
|
||||
<div class="svc_btn2"><a href="http://icodekorea.com/res/join_company_fix_a.php?sellid=sir2" target="_blank"><img src="<?php echo G5_ADMIN_URL ?>/img/svc_btn_05.jpg" alt="아이코드 SMS 서비스 신청하기"></a></div>
|
||||
</div>
|
||||
<div class="svc_ri">
|
||||
<div class="svc_a">
|
||||
<h3>디자인 소스 (아사달)</h3>
|
||||
<p>이곳을 통하여 아사달 디자인 소스, 시안, 사진등 구입하시면 <br>10% 할인 쿠폰을 매일 선착순 15분께 드립니다.</p>
|
||||
</div>
|
||||
<div class="svc_btn"><a href="http://design.sir.co.kr/event/coupon.htm" target="_blank">디자인소스 구입하기</a></div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@ -79,12 +79,22 @@ if(!isset($default['de_pg_service'])) {
|
||||
ADD `de_pg_service` varchar(255) NOT NULL DEFAULT '' AFTER `de_sms_hp` ", true);
|
||||
}
|
||||
|
||||
|
||||
// inicis 필드 추가
|
||||
if(!isset($default['de_inicis_mid'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['g5_shop_default_table']}`
|
||||
ADD `de_inicis_mid` varchar(255) NOT NULL DEFAULT '' AFTER `de_kcp_site_key`,
|
||||
ADD `de_inicis_admin_key` varchar(255) NOT NULL DEFAULT '' AFTER `de_inicis_mid` ", true);
|
||||
}
|
||||
|
||||
|
||||
// 레이아웃 파일 필드 추가
|
||||
if(!isset($default['de_include_index'])) {
|
||||
sql_query(" ALTER TABLE `{$g5['g5_shop_default_table']}`
|
||||
ADD `de_include_index` varchar(255) NOT NULL DEFAULT '' AFTER `de_admin_info_email`,
|
||||
ADD `de_include_head` varchar(255) NOT NULL DEFAULT '' AFTER `de_include_index`,
|
||||
ADD `de_include_tail` varchar(255) NOT NULL DEFAULT '' AFTER `de_include_head` ", true);
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
@ -560,12 +570,18 @@ if(!isset($default['de_include_index'])) {
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr id="kcp_vbank_url" class="pg_vbank_url">
|
||||
<th scope="row">KCP 가상계좌 입금통보 URL</th>
|
||||
<td>
|
||||
<?php echo help("KCP 가상계좌 사용시 다음 주소를 <strong><a href=\"http://admin.kcp.co.kr\" target=\"_blank\">KCP 관리자</a> > 상점정보관리 > 정보변경 > 공통URL 정보 > 공통URL 변경후</strong>에 넣으셔야 상점에 자동으로 입금 통보됩니다."); ?>
|
||||
<?php echo G5_SHOP_URL; ?>/settle_kcp_common.php</td>
|
||||
</tr>
|
||||
<tr id="inicis_vbank_url" class="pg_vbank_url">
|
||||
<th scope="row">KG이니시스 가상계좌 입금통보 URL</th>
|
||||
<td>
|
||||
<?php echo help("KG이니시스 가상계좌 사용시 다음 주소를 <strong><a href=\"https://iniweb.inicis.com/\" target=\"_blank\">KG이니시스 관리자</a> > 거래조회 > 가상계좌 > 입금통보방식선택 > URL 수신 설정</strong>에 넣으셔야 상점에 자동으로 입금 통보됩니다."); ?>
|
||||
<?php echo G5_SHOP_URL; ?>/settle_inicis_common.php</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="de_hp_use">휴대폰결제사용</label></th>
|
||||
<td>
|
||||
@ -662,13 +678,14 @@ if(!isset($default['de_include_index'])) {
|
||||
<select id="de_pg_service" name="de_pg_service">
|
||||
<option value="kcp" <?php echo get_selected($default['de_pg_service'], 'kcp'); ?>>KCP</option>
|
||||
<option value="lg" <?php echo get_selected($default['de_pg_service'], 'lg'); ?>>LG유플러스</option>
|
||||
<option value="inicis" <?php echo get_selected($default['de_pg_service'], 'inicis'); ?>>KG이니시스</option>
|
||||
</select>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="pg_info_fld kcp_info_fld">
|
||||
<th scope="row">
|
||||
<label for="de_kcp_mid">KCP SITE CODE</label><br>
|
||||
<a href="http://sir.co.kr/main/provider/p_pg.php" target="_blank" id="scf_kcpreg" class="scf_pgreg">KCP서비스신청하기</a>
|
||||
<a href="http://sir.co.kr/main/service/p_pg.php" target="_blank" id="scf_kcpreg" class="scf_pgreg">KCP서비스신청하기</a>
|
||||
</th>
|
||||
<td>
|
||||
<?php echo help("KCP 에서 받은 SR 로 시작하는 영대문자, 숫자 혼용 총 5자리 중 SR 을 제외한 나머지 3자리 SITE CODE 를 입력하세요.\n만약, 사이트코드가 SR로 시작하지 않는다면 KCP에 사이트코드 변경 요청을 하십시오. 예) SR9A3"); ?>
|
||||
@ -685,10 +702,10 @@ if(!isset($default['de_include_index'])) {
|
||||
<tr class="pg_info_fld lg_info_fld">
|
||||
<th scope="row">
|
||||
<label for="cf_lg_mid">LG유플러스 상점아이디</label><br>
|
||||
<a href="http://sir.co.kr/main/provider/lg_pg.php" target="_blank" id="scf_lgreg" class="scf_pgreg">LG유플러스 서비스신청하기</a>
|
||||
<a href="http://sir.co.kr/main/service/lg_pg.php" target="_blank" id="scf_lgreg" class="scf_pgreg">LG유플러스 서비스신청하기</a>
|
||||
</th>
|
||||
<td>
|
||||
<?php echo help("LG유플러스 에서 받은 si_ 로 시작하는 상점 ID를 입력하세요.\n만약, 상점 ID가 si_로 시작하지 않는다면 LG유플러스에 사이트코드 변경 요청을 하십시오. 예) si_lguplus\n<a href=\"".G5_ADMIN_URL."/config_form.php#anc_cf_cert\">기본환경설정 > 본인확인</a> 설정의 LG유플러스 상점아이디와 동일합니다."); ?>
|
||||
<?php echo help("LG유플러스에서 받은 si_ 로 시작하는 상점 ID를 입력하세요.\n만약, 상점 ID가 si_로 시작하지 않는다면 LG유플러스에 사이트코드 변경 요청을 하십시오. 예) si_lguplus\n<a href=\"".G5_ADMIN_URL."/config_form.php#anc_cf_cert\">기본환경설정 > 본인확인</a> 설정의 LG유플러스 상점아이디와 동일합니다."); ?>
|
||||
<span class="sitecode">si_</span> <input type="text" name="cf_lg_mid" value="<?php echo $config['cf_lg_mid']; ?>" id="cf_lg_mid" class="frm_input" size="10" maxlength="20" style="font:bold 15px Verdana;"> 영문자, 숫자 혼용
|
||||
</td>
|
||||
</tr>
|
||||
@ -699,6 +716,23 @@ if(!isset($default['de_include_index'])) {
|
||||
<input type="text" name="cf_lg_mert_key" value="<?php echo $config['cf_lg_mert_key']; ?>" id="cf_lg_mert_key" class="frm_input" size="32" maxlength="50">
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="pg_info_fld inicis_info_fld">
|
||||
<th scope="row">
|
||||
<label for="de_inicis_mid">KG이니시스 상점아이디</label><br>
|
||||
<a href="http://sir.co.kr/main/service/inicis_pg.php" target="_blank" id="scf_lgreg" class="scf_pgreg">KG이니시스 서비스신청하기</a>
|
||||
</th>
|
||||
<td>
|
||||
<?php echo help("KG이니시스로 부터 발급 받으신 상점아이디(MID) 10자리 중 SIR 을 제외한 나머지 7자리를 입력 합니다.\n만약, 상점아이디가 SIR로 시작하지 않는다면 계약담당자에게 변경 요청을 해주시기 바랍니다. (Tel. 02-3430-5858) 예) SIRpaytest"); ?>
|
||||
<span class="sitecode">SIR</span> <input type="text" name="de_inicis_mid" value="<?php echo $default['de_inicis_mid']; ?>" id="de_inicis_mid" class="frm_input" size="10" maxlength="10" style="font:bold 15px Verdana;"> 영문소문자(숫자포함 가능)
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="pg_info_fld inicis_info_fld">
|
||||
<th scope="row"><label for="de_inicis_admin_key">KG이니시스 키패스워드</label></th>
|
||||
<td>
|
||||
<?php echo help("KG이니시스에서 발급받은 4자리 상점 키패스워드를 입력합니다.\nKG이니시스 상점관리자 패스워드와 관련이 없습니다.\n키패스워드 값을 확인하시려면 상점측에 발급된 키파일 안의 readme.txt 파일을 참조해 주십시오"); ?>
|
||||
<input type="text" name="de_inicis_admin_key" value="<?php echo $default['de_inicis_admin_key']; ?>" id="de_inicis_admin_key" class="frm_input" size="5" maxlength="4">
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">에스크로 사용</th>
|
||||
<td>
|
||||
@ -1362,15 +1396,20 @@ function fconfig_check(f)
|
||||
|
||||
$(function() {
|
||||
$(".pg_info_fld").hide();
|
||||
$(".pg_vbank_url").hide();
|
||||
<?php if($default['de_pg_service']) { ?>
|
||||
$(".<?php echo $default['de_pg_service']; ?>_info_fld").show();
|
||||
$("#<?php echo $default['de_pg_service']; ?>_vbank_url").show();
|
||||
<?php } else { ?>
|
||||
$(".kcp_info_fld").show();
|
||||
$("#kcp_vbank_url").show();
|
||||
<?php } ?>
|
||||
$("#de_pg_service").on("change", function() {
|
||||
var pg = $(this).val();
|
||||
$(".pg_info_fld:visible").hide();
|
||||
$(".pg_vbank_url:visible").hide();
|
||||
$("."+pg+"_info_fld").show();
|
||||
$("#"+pg+"_vbank_url").show();
|
||||
$(".scf_cardtest").addClass("scf_cardtest_hide");
|
||||
$("."+pg+"_cardtest").removeClass("scf_cardtest_hide");
|
||||
$(".scf_cardtest_tip_adm").addClass("scf_cardtest_tip_adm_hide");
|
||||
@ -1397,6 +1436,18 @@ $(function() {
|
||||
if($default['de_iche_use'] || $default['de_vbank_use'] || $default['de_hp_use'] || $default['de_card_use']) {
|
||||
// kcp의 경우 pp_cli 체크
|
||||
if($default['de_pg_service'] == 'kcp') {
|
||||
if(!extension_loaded('openssl')) {
|
||||
echo '<script>'.PHP_EOL;
|
||||
echo 'alert("PHP openssl 확장모듈이 설치되어 있지 않습니다.\n모바일 쇼핑몰 결제 때 사용되오니 openssl 확장 모듈을 설치하여 주십시오.");'.PHP_EOL;
|
||||
echo '</script>'.PHP_EOL;
|
||||
}
|
||||
|
||||
if(!extension_loaded('soap') || !class_exists('SOAPClient')) {
|
||||
echo '<script>'.PHP_EOL;
|
||||
echo 'alert("PHP SOAP 확장모듈이 설치되어 있지 않습니다.\n모바일 쇼핑몰 결제 때 사용되오니 SOAP 확장 모듈을 설치하여 주십시오.");'.PHP_EOL;
|
||||
echo '</script>'.PHP_EOL;
|
||||
}
|
||||
|
||||
$is_linux = true;
|
||||
if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN')
|
||||
$is_linux = false;
|
||||
@ -1430,6 +1481,47 @@ if($default['de_iche_use'] || $default['de_vbank_use'] || $default['de_hp_use']
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// 이니시스의 경우 log 디렉토리 체크
|
||||
if($default['de_pg_service'] == 'inicis') {
|
||||
if (!function_exists('xml_set_element_handler')) {
|
||||
echo '<script>'.PHP_EOL;
|
||||
echo 'alert("XML 관련 함수를 사용할 수 없습니다.\n서버 관리자에게 문의해 주십시오.");'.PHP_EOL;
|
||||
echo '</script>'.PHP_EOL;
|
||||
}
|
||||
|
||||
if (!function_exists('openssl_get_publickey')) {
|
||||
echo '<script>'.PHP_EOL;
|
||||
echo 'alert("OPENSSL 관련 함수를 사용할 수 없습니다.\n서버 관리자에게 문의해 주십시오.");'.PHP_EOL;
|
||||
echo '</script>'.PHP_EOL;
|
||||
}
|
||||
|
||||
if (!function_exists('socket_create')) {
|
||||
echo '<script>'.PHP_EOL;
|
||||
echo 'alert("SOCKET 관련 함수를 사용할 수 없습니다.\n서버 관리자에게 문의해 주십시오.");'.PHP_EOL;
|
||||
echo '</script>'.PHP_EOL;
|
||||
}
|
||||
|
||||
if (!function_exists('mcrypt_cbc')) {
|
||||
echo '<script>'.PHP_EOL;
|
||||
echo 'alert("MCRYPT 관련 함수를 사용할 수 없습니다.\n서버 관리자에게 문의해 주십시오.");'.PHP_EOL;
|
||||
echo '</script>'.PHP_EOL;
|
||||
}
|
||||
|
||||
$log_path = G5_SHOP_PATH.'/inicis/log';
|
||||
|
||||
if(!is_dir($log_path)) {
|
||||
echo '<script>'.PHP_EOL;
|
||||
echo 'alert("'.str_replace(G5_PATH.'/', '', G5_SHOP_PATH).'/inicis 폴더 안에 log 폴더를 생성하신 후 쓰기권한을 부여해 주십시오.\n> mkdir log\n> chmod 707 log");'.PHP_EOL;
|
||||
echo '</script>'.PHP_EOL;
|
||||
} else {
|
||||
if(!is_writable($log_path)) {
|
||||
echo '<script>'.PHP_EOL;
|
||||
echo 'alert("'.str_replace(G5_PATH.'/', '',$log_path).' 폴더에 쓰기권한을 부여해 주십시오.\n> chmod 707 log");'.PHP_EOL;
|
||||
echo '</script>'.PHP_EOL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
include_once (G5_ADMIN_PATH.'/admin.tail.php');
|
||||
|
||||
@ -148,6 +148,8 @@ $sql = " update {$g5['g5_shop_default_table']}
|
||||
de_pg_service = '$de_pg_service',
|
||||
de_kcp_mid = '$de_kcp_mid',
|
||||
de_kcp_site_key = '$de_kcp_site_key',
|
||||
de_inicis_mid = '$de_inicis_mid',
|
||||
de_inicis_admin_key = '$de_inicis_admin_key',
|
||||
de_iche_use = '$de_iche_use',
|
||||
de_sms_cont1 = '$de_sms_cont1',
|
||||
de_sms_cont2 = '$de_sms_cont2',
|
||||
|
||||
@ -37,10 +37,8 @@ include_once(G5_PATH.'/head.sub.php');
|
||||
<label for="od_send_mail">배송안내 메일</label>
|
||||
<input type="checkbox" name="send_sms" value="1" id="od_send_sms" checked="checked">
|
||||
<label for="od_send_sms">배송안내 SMS</label>
|
||||
<?php if($default['de_pg_service'] == 'kcp') { ?>
|
||||
<input type="checkbox" name="send_escrow" value="1" id="od_send_escrow">
|
||||
<label for="od_send_escrow">에스크로배송등록</label>
|
||||
<?php } ?>
|
||||
</div>
|
||||
|
||||
<div class="btn_confirm01 btn_confirm">
|
||||
|
||||
@ -442,6 +442,10 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
||||
$pg_test .= ' 테스트 ';
|
||||
}
|
||||
break;
|
||||
case 'inicis':
|
||||
$pg_url = 'https://iniweb.inicis.com/';
|
||||
$pg_test = 'KG이니시스';
|
||||
break;
|
||||
default:
|
||||
$pg_url = 'http://admin8.kcp.co.kr';
|
||||
$pg_test = 'KCP';
|
||||
@ -543,6 +547,9 @@ add_javascript(G5_POSTCODE_JS, 0); //다음 주소 js
|
||||
break;
|
||||
}
|
||||
$cash_receipt_script = 'javascript:showCashReceipts(\''.$LGD_MID.'\',\''.$od['od_id'].'\',\''.$od['od_casseqno'].'\',\''.$trade_type.'\',\''.$CST_PLATFORM.'\');';
|
||||
} 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 {
|
||||
require G5_SHOP_PATH.'/settle_kcp.inc.php';
|
||||
|
||||
|
||||
@ -210,6 +210,49 @@ if (in_array($_POST['ct_status'], $status_cancel)) {
|
||||
$pg_res_msg = $xpay->Response_Msg();
|
||||
}
|
||||
break;
|
||||
case 'inicis':
|
||||
include_once(G5_SHOP_PATH.'/settle_inicis.inc.php');
|
||||
$cancel_msg = iconv_euckr('쇼핑몰 운영자 승인 취소');
|
||||
|
||||
/*********************
|
||||
* 3. 취소 정보 설정 *
|
||||
*********************/
|
||||
$inipay->SetField("type", "cancel"); // 고정 (절대 수정 불가)
|
||||
$inipay->SetField("mid", $default['de_inicis_mid']); // 상점아이디
|
||||
/**************************************************************************************************
|
||||
* admin 은 키패스워드 변수명입니다. 수정하시면 안됩니다. 1111의 부분만 수정해서 사용하시기 바랍니다.
|
||||
* 키패스워드는 상점관리자 페이지(https://iniweb.inicis.com)의 비밀번호가 아닙니다. 주의해 주시기 바랍니다.
|
||||
* 키패스워드는 숫자 4자리로만 구성됩니다. 이 값은 키파일 발급시 결정됩니다.
|
||||
* 키패스워드 값을 확인하시려면 상점측에 발급된 키파일 안의 readme.txt 파일을 참조해 주십시오.
|
||||
**************************************************************************************************/
|
||||
$inipay->SetField("admin", $default['de_inicis_admin_key']); //비대칭 사용키 키패스워드
|
||||
$inipay->SetField("tid", $od['od_tno']); // 취소할 거래의 거래아이디
|
||||
$inipay->SetField("cancelmsg", $cancel_msg); // 취소사유
|
||||
|
||||
/****************
|
||||
* 4. 취소 요청 *
|
||||
****************/
|
||||
$inipay->startAction();
|
||||
|
||||
/****************************************************************
|
||||
* 5. 취소 결과 *
|
||||
* *
|
||||
* 결과코드 : $inipay->getResult('ResultCode') ("00"이면 취소 성공) *
|
||||
* 결과내용 : $inipay->getResult('ResultMsg') (취소결과에 대한 설명) *
|
||||
* 취소날짜 : $inipay->getResult('CancelDate') (YYYYMMDD) *
|
||||
* 취소시각 : $inipay->getResult('CancelTime') (HHMMSS) *
|
||||
* 현금영수증 취소 승인번호 : $inipay->getResult('CSHR_CancelNum') *
|
||||
* (현금영수증 발급 취소시에만 리턴됨) *
|
||||
****************************************************************/
|
||||
|
||||
$res_cd = $inipay->getResult('ResultCode');
|
||||
$res_msg = $inipay->getResult('ResultMsg');
|
||||
|
||||
if($res_cd != '00') {
|
||||
$pg_res_cd = $res_cd;
|
||||
$pg_res_msg = iconv_utf8($res_msg);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
include_once(G5_SHOP_PATH.'/settle_kcp.inc.php');
|
||||
require_once(G5_SHOP_PATH.'/kcp/pp_ax_hub_lib.php');
|
||||
@ -313,21 +356,19 @@ if($cancel_change) {
|
||||
$sql .= " where od_id = '$od_id' ";
|
||||
sql_query($sql);
|
||||
|
||||
// 신용카드 취소 때 오류가 있으면 알림
|
||||
if($pg_cancel == 1 && $pg_res_cd && $pg_res_msg) {
|
||||
echo '<script>';
|
||||
echo 'alert("오류코드 : '.$pg_res_cd.' 오류내용 : '.$pg_res_msg.'");';
|
||||
echo '</script>';
|
||||
}
|
||||
|
||||
$qstr = "sort1=$sort1&sort2=$sort2&sel_field=$sel_field&search=$search&page=$page";
|
||||
|
||||
$url = "./orderform.php?od_id=$od_id&$qstr";
|
||||
|
||||
// 1.06.06
|
||||
$od = sql_fetch(" select od_receipt_point from {$g5['g5_shop_order_table']} where od_id = '$od_id' ");
|
||||
if ($od['od_receipt_point'])
|
||||
alert("포인트로 결제한 주문은,\\n\\n주문상태 변경으로 인해 포인트의 가감이 발생하는 경우\\n\\n회원관리 > 포인트관리에서 수작업으로 포인트를 맞추어 주셔야 합니다.", $url);
|
||||
else
|
||||
goto_url($url);
|
||||
// 신용카드 취소 때 오류가 있으면 알림
|
||||
if($pg_cancel == 1 && $pg_res_cd && $pg_res_msg) {
|
||||
alert('오류코드 : '.$pg_res_cd.' 오류내용 : '.$pg_res_msg, $url);
|
||||
} else {
|
||||
// 1.06.06
|
||||
$od = sql_fetch(" select od_receipt_point from {$g5['g5_shop_order_table']} where od_id = '$od_id' ");
|
||||
if ($od['od_receipt_point'])
|
||||
alert("포인트로 결제한 주문은,\\n\\n주문상태 변경으로 인해 포인트의 가감이 발생하는 경우\\n\\n회원관리 > 포인트관리에서 수작업으로 포인트를 맞추어 주셔야 합니다.", $url);
|
||||
else
|
||||
goto_url($url);
|
||||
}
|
||||
?>
|
||||
|
||||
@ -10,6 +10,9 @@ $od = sql_fetch($sql);
|
||||
if(!$od['od_id'])
|
||||
alert_close('주문정보가 존해하지 않습니다.');
|
||||
|
||||
if($od['od_pg'] == 'inicis' && $od['od_settle_case'] == '계좌이체')
|
||||
alert_close('KG이니시스는 신용카드만 부분취소가 가능합니다.');
|
||||
|
||||
if($od['od_settle_case'] == '계좌이체' && substr($od['od_receipt_time'], 0, 10) >= G5_TIME_YMD)
|
||||
alert_close('실시간 계좌이체건의 부분취소 요청은 결제일 익일에 가능합니다.');
|
||||
|
||||
|
||||
@ -208,6 +208,9 @@ if(!sql_query(" select pp_cash from {$g5['g5_shop_personalpay_table']} limit 1 "
|
||||
break;
|
||||
}
|
||||
$cash_receipt_script = 'javascript:showCashReceipts(\''.$LGD_MID.'\',\''.$pp['pp_id'].'\',\''.$pp['pp_casseqno'].'\',\''.$trade_type.'\',\''.$CST_PLATFORM.'\');';
|
||||
} 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 {
|
||||
require G5_SHOP_PATH.'/settle_kcp.inc.php';
|
||||
|
||||
|
||||
@ -103,7 +103,7 @@ if(!defined('G5_IS_ADMIN'))
|
||||
echo $config['cf_add_script'];
|
||||
?>
|
||||
</head>
|
||||
<body <?php echo isset($g5['body_script']) ? $g5['body_script'] : ''; ?>>
|
||||
<body<?php echo isset($g5['body_script']) ? $g5['body_script'] : ''; ?>>
|
||||
<?php
|
||||
if ($is_member) { // 회원이라면 로그인 중이라는 메세지를 출력해준다.
|
||||
$sr_admin_msg = '';
|
||||
|
||||
@ -305,6 +305,8 @@ CREATE TABLE IF NOT EXISTS `g5_shop_default` (
|
||||
`de_pg_service` varchar(255) NOT NULL DEFAULT '',
|
||||
`de_kcp_mid` varchar(255) NOT NULL DEFAULT '',
|
||||
`de_kcp_site_key` varchar(255) NOT NULL DEFAULT '',
|
||||
`de_inicis_mid` varchar(255) NOT NULL DEFAULT '',
|
||||
`de_inicis_admin_key` varchar(255) NOT NULL DEFAULT '',
|
||||
`de_iche_use` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`de_item_use_use` tinyint(4) NOT NULL DEFAULT '0',
|
||||
`de_item_use_write` tinyint(4) NOT NULL DEFAULT '0',
|
||||
@ -648,6 +650,21 @@ CREATE TABLE IF NOT EXISTS `g5_shop_order_address` (
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `g5_shop_order_data`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `g5_shop_order_data`;
|
||||
CREATE TABLE IF NOT EXISTS `g5_shop_order_data` (
|
||||
`od_id` bigint(20) unsigned NOT NULL,
|
||||
`dt_pg` varchar(255) NOT NULL DEFAULT '',
|
||||
`dt_data` text NOT NULL,
|
||||
`dt_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
KEY `od_id` (`od_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `g5_shop_order_delete`
|
||||
--
|
||||
@ -751,4 +768,25 @@ CREATE TABLE IF NOT EXISTS `g5_shop_item_stocksms` (
|
||||
`ss_datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
`ss_ip` varchar(25) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`ss_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
--
|
||||
-- Table structure for table `g5_shop_inicis_log`
|
||||
--
|
||||
|
||||
DROP TABLE IF EXISTS `g5_shop_inicis_log`;
|
||||
CREATE TABLE IF NOT EXISTS `g5_shop_inicis_log` (
|
||||
`oid` bigint(20) unsigned NOT NULL,
|
||||
`P_TID` varchar(255) NOT NULL DEFAULT '',
|
||||
`P_MID` varchar(255) NOT NULL DEFAULT '',
|
||||
`P_AUTH_DT` varchar(255) NOT NULL DEFAULT '',
|
||||
`P_STATUS` varchar(255) NOT NULL DEFAULT '',
|
||||
`P_TYPE` varchar(255) NOT NULL DEFAULT '',
|
||||
`P_OID` varchar(255) NOT NULL DEFAULT '',
|
||||
`P_FN_NM` varchar(255) NOT NULL DEFAULT '',
|
||||
`P_AMT` int(11) NOT NULL DEFAULT '0',
|
||||
`P_RMESG1` varchar(255) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`oid`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
@ -539,6 +539,8 @@ if($g5_shop_install) {
|
||||
fwrite($f, "\$g5['g5_shop_personalpay_table'] = G5_SHOP_TABLE_PREFIX.'personalpay'; // 개인결제 정보 테이블\n");
|
||||
fwrite($f, "\$g5['g5_shop_order_address_table'] = G5_SHOP_TABLE_PREFIX.'order_address'; // 배송지이력 정보 테이블\n");
|
||||
fwrite($f, "\$g5['g5_shop_item_stocksms_table'] = G5_SHOP_TABLE_PREFIX.'item_stocksms'; // 재입고SMS 알림 정보 테이블\n");
|
||||
fwrite($f, "\$g5['g5_shop_order_data_table'] = G5_SHOP_TABLE_PREFIX.'order_data'; // 모바일 결제정보 임시저장 테이블\n");
|
||||
fwrite($f, "\$g5['g5_shop_inicis_log_table'] = G5_SHOP_TABLE_PREFIX.'inicis_log'; // 이니시스 모바일 계좌이체 로그 테이블\n");
|
||||
}
|
||||
|
||||
fwrite($f, "?>");
|
||||
|
||||
@ -6,16 +6,4 @@ if(!extension_loaded('gd') || !function_exists('gd_info')) {
|
||||
echo 'alert("'.G5_VERSION.'의 정상적인 사용을 위해서는 GD 라이브러리가 필요합니다.\nGD 라이브러리가 없을 경우 자동등록방지 문자와 썸네일 기능이 작동하지 않습니다.");'.PHP_EOL;
|
||||
echo '</script>'.PHP_EOL;
|
||||
}
|
||||
|
||||
if(!extension_loaded('openssl')) {
|
||||
echo '<script>'.PHP_EOL;
|
||||
echo 'alert("PHP openssl 확장모듈이 설치되어 있지 않습니다.\n모바일 쇼핑몰 결제 때 사용되오니 openssl 확장 모듈을 설치하여 주십시오.");'.PHP_EOL;
|
||||
echo '</script>'.PHP_EOL;
|
||||
}
|
||||
|
||||
if(!extension_loaded('soap') || !class_exists('SOAPClient')) {
|
||||
echo '<script>'.PHP_EOL;
|
||||
echo 'alert("PHP SOAP 확장모듈이 설치되어 있지 않습니다.\n모바일 쇼핑몰 결제 때 사용되오니 SOAP 확장 모듈을 설치하여 주십시오.");'.PHP_EOL;
|
||||
echo '</script>'.PHP_EOL;
|
||||
}
|
||||
?>
|
||||
79
lib/json.lib.php
Normal file
79
lib/json.lib.php
Normal file
@ -0,0 +1,79 @@
|
||||
<?php
|
||||
if (!defined('_GNUBOARD_')) exit;
|
||||
|
||||
// http://tinsology.net/2011/04/php-json_encode-and-json_decode-alternatives/
|
||||
|
||||
if(!function_exists('json_encode'))
|
||||
{
|
||||
function json_encode($a=false)
|
||||
{
|
||||
// Some basic debugging to ensure we have something returned
|
||||
if (is_null($a)) return 'null';
|
||||
if ($a === false) return 'false';
|
||||
if ($a === true) return 'true';
|
||||
if (is_scalar($a))
|
||||
{
|
||||
if (is_float($a))
|
||||
{
|
||||
// Always use '.' for floats.
|
||||
return floatval(str_replace(',', '.', strval($a)));
|
||||
}
|
||||
if (is_string($a))
|
||||
{
|
||||
static $jsonReplaces = array(array('\\', '/', "\n", "\t", "\r", "\b", "\f", '"'), array('\\\\', '\\/', '\\n', '\\t', '\\r', '\\b', '\\f', '\"'));
|
||||
return '"' . str_replace($jsonReplaces[0], $jsonReplaces[1], $a) . '"';
|
||||
}
|
||||
else
|
||||
return $a;
|
||||
}
|
||||
$isList = true;
|
||||
for ($i = 0, reset($a); true; $i++) {
|
||||
if (key($a) !== $i)
|
||||
{
|
||||
$isList = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
$result = array();
|
||||
if ($isList)
|
||||
{
|
||||
foreach ($a as $v) $result[] = json_encode($v);
|
||||
return '[' . join(',', $result) . ']';
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach ($a as $k => $v) $result[] = json_encode($k).':'.json_encode($v);
|
||||
return '{' . join(',', $result) . '}';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(!function_exists('json_decode'))
|
||||
{
|
||||
function json_decode($json)
|
||||
{
|
||||
$comment = false;
|
||||
$out = '$x=';
|
||||
for ($i=0; $i<strlen($json); $i++)
|
||||
{
|
||||
if (!$comment)
|
||||
{
|
||||
if (($json[$i] == '{') || ($json[$i] == '['))
|
||||
$out .= ' array(';
|
||||
else if (($json[$i] == '}') || ($json[$i] == ']'))
|
||||
$out .= ')';
|
||||
else if ($json[$i] == ':')
|
||||
$out .= '=>';
|
||||
else
|
||||
$out .= $json[$i];
|
||||
}
|
||||
else
|
||||
$out .= $json[$i];
|
||||
if ($json[$i] == '"' && $json[($i-1)]!="\\")
|
||||
$comment = !$comment;
|
||||
}
|
||||
eval($out . ';');
|
||||
return $x;
|
||||
}
|
||||
}
|
||||
?>
|
||||
@ -72,7 +72,7 @@ else
|
||||
|
||||
<?php
|
||||
$qstr .= 'skin='.$skin.'&ev_id='.$ev_id.'&sort='.$sort.'&sortodr='.$sortodr;
|
||||
echo get_paging($config['cf_write_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page=");
|
||||
echo get_paging($config['cf_mobile_pages'], $page, $total_page, "{$_SERVER['PHP_SELF']}?$qstr&page=");
|
||||
?>
|
||||
|
||||
<?php
|
||||
|
||||
7
mobile/shop/inicis/_common.php
Normal file
7
mobile/shop/inicis/_common.php
Normal file
@ -0,0 +1,7 @@
|
||||
<?php
|
||||
include_once('../../../common.php');
|
||||
|
||||
if (!defined('G5_USE_SHOP') || !G5_USE_SHOP)
|
||||
die('<p>쇼핑몰 설치 후 이용해 주십시오.</p>');
|
||||
define('_SHOP_', true);
|
||||
?>
|
||||
26
mobile/shop/inicis/orderform.1.php
Normal file
26
mobile/shop/inicis/orderform.1.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
|
||||
<form name="sm_form" method="POST" action="" accept-charset="euc-kr">
|
||||
<input type="hidden" name="P_OID" value="<?php echo $od_id; ?>">
|
||||
<input type="hidden" name="P_GOODS" value="<?php echo $goods; ?>">
|
||||
<input type="hidden" name="P_AMT" value="<?php echo $tot_price; ?>">
|
||||
<input type="hidden" name="P_UNAME" value="">
|
||||
<input type="hidden" name="P_MOBILE" value="">
|
||||
<input type="hidden" name="P_EMAIL" value="">
|
||||
<input type="hidden" name="P_MID" value="<?php echo $default['de_inicis_mid']; ?>">
|
||||
<input type="hidden" name="P_NEXT_URL" value="<?php echo $next_url; ?>">
|
||||
<input type="hidden" name="P_NOTI_URL" value="<?php echo $noti_url; ?>">
|
||||
<input type="hidden" name="P_RETURN_URL" value="">
|
||||
<input type="hidden" name="P_HPP_METHOD" value="2">
|
||||
<input type="hidden" name="P_RESERVED" value="bank_receipt=N&twotrs_isp=Y&block_isp=Y<?php echo $useescrow; ?>">
|
||||
<input type="hidden" name="P_NOTI" value="<?php echo $od_id; ?>">
|
||||
|
||||
<input type="hidden" name="good_mny" value="<?php echo $tot_price; ?>" >
|
||||
|
||||
<?php if($default['de_tax_flag_use']) { ?>
|
||||
<input type="hidden" name="P_TAX" value="">
|
||||
<input type="hidden" name="P_TAXFREE" value="">
|
||||
<?php } ?>
|
||||
</form>
|
||||
30
mobile/shop/inicis/orderform.2.php
Normal file
30
mobile/shop/inicis/orderform.2.php
Normal file
@ -0,0 +1,30 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
|
||||
<input type="hidden" name="good_mny" value="<?php echo $tot_price ?>" >
|
||||
<input type="hidden" name="res_cd" value=""> <!-- 결과 코드 -->
|
||||
|
||||
<input type="hidden" name="P_HASH" value="">
|
||||
<input type="hidden" name="P_TYPE" value="">
|
||||
<input type="hidden" name="P_UNAME" value="">
|
||||
<input type="hidden" name="P_AUTH_DT" value="">
|
||||
<input type="hidden" name="P_AUTH_NO" value="">
|
||||
<input type="hidden" name="P_HPP_CORP" value="">
|
||||
<input type="hidden" name="P_APPL_NUM" value="">
|
||||
<input type="hidden" name="P_VACT_NUM" value="">
|
||||
<input type="hidden" name="P_VACT_NAME" value="">
|
||||
<input type="hidden" name="P_VACT_BANK" value="">
|
||||
<input type="hidden" name="P_CARD_ISSUER" value="">
|
||||
|
||||
<?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="javascript:history.go(-1);" class="btn_cancel">취소</a>
|
||||
</div>
|
||||
3
mobile/shop/inicis/orderform.3.php
Normal file
3
mobile/shop/inicis/orderform.3.php
Normal file
@ -0,0 +1,3 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
105
mobile/shop/inicis/pay_approval.php
Normal file
105
mobile/shop/inicis/pay_approval.php
Normal file
@ -0,0 +1,105 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
include_once(G5_MSHOP_PATH.'/settle_inicis.inc.php');
|
||||
|
||||
// 세션 초기화
|
||||
set_session('P_TID', '');
|
||||
set_session('P_AMT', '');
|
||||
set_session('P_HASH', '');
|
||||
|
||||
$oid = trim($_REQUEST['P_NOTI']);
|
||||
|
||||
$sql = " select * from {$g5['g5_shop_order_data_table']} where od_id = '$oid' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
$data = unserialize($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';
|
||||
}
|
||||
|
||||
if($_REQUEST['P_STATUS'] != '00') {
|
||||
alert('오류 : '.iconv_utf8($_REQUEST['P_RMESG1']).' 코드 : '.$_REQUEST['P_STATUS'], $page_return_url);
|
||||
} else {
|
||||
$post_data = array(
|
||||
'P_MID' => $default['de_inicis_mid'],
|
||||
'P_TID' => $_REQUEST['P_TID']
|
||||
);
|
||||
|
||||
$ch = curl_init();
|
||||
curl_setopt($ch, CURLOPT_URL, $_REQUEST['P_REQ_URL']);
|
||||
curl_setopt($ch, CURLOPT_POST, 1);
|
||||
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
|
||||
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
|
||||
$return = curl_exec($ch);
|
||||
|
||||
if(!$return)
|
||||
alert('KG이니시스와 통신 오류로 결제등록 요청을 완료하지 못했습니다.\\n결제등록 요청을 다시 시도해 주십시오.', $page_return_url);
|
||||
|
||||
// 결과를 배열로 변환
|
||||
parse_str($return, $ret);
|
||||
$PAY = array_map('trim', $ret);
|
||||
|
||||
if($PAY['P_STATUS'] != '00')
|
||||
alert('오류 : '.iconv_utf8($PAY['P_RMESG1']).' 코드 : '.$PAY['P_STATUS'], $page_return_url);
|
||||
|
||||
// TID, AMT 를 세션으로 주문완료 페이지 전달
|
||||
$hash = md5($PAY['P_TID'].$PAY['P_MID'].$PAY['P_AMT']);
|
||||
set_session('P_TID', $PAY['P_TID']);
|
||||
set_session('P_AMT', $PAY['P_AMT']);
|
||||
set_session('P_HASH', $hash);
|
||||
}
|
||||
|
||||
$g5['title'] = 'KG 이니시스 결제';
|
||||
$g5['body_script'] = ' onload="setPAYResult();"';
|
||||
include_once(G5_PATH.'/head.sub.php');
|
||||
|
||||
$exclude = array('res_cd', 'P_HASH', 'P_TYPE', 'P_AUTH_DT', 'P_AUTH_NO', 'P_HPP_CORP', 'P_APPL_NUM', 'P_VACT_NUM', 'P_VACT_NAME', 'P_VACT_BANK', 'P_CARD_ISSUER', 'P_UNAME');
|
||||
|
||||
echo '<form name="forderform" method="post" action="'.$order_action_url.'" autocomplete="off">'.PHP_EOL;
|
||||
|
||||
foreach($data as $key=>$value) {
|
||||
if(in_array($key, $exclude))
|
||||
continue;
|
||||
|
||||
echo '<input type="hidden" name="'.$key.'" value="'.$value.'">'.PHP_EOL;
|
||||
}
|
||||
|
||||
echo '<input type="hidden" name="res_cd" value="'.$PAY['P_STATUS'].'">'.PHP_EOL;
|
||||
echo '<input type="hidden" name="P_HASH" value="'.$hash.'">'.PHP_EOL;
|
||||
echo '<input type="hidden" name="P_TYPE" value="'.$PAY['P_TYPE'].'">'.PHP_EOL;
|
||||
echo '<input type="hidden" name="P_AUTH_DT" value="'.$PAY['P_AUTH_DT'].'">'.PHP_EOL;
|
||||
echo '<input type="hidden" name="P_AUTH_NO" value="'.$PAY['P_AUTH_NO'].'">'.PHP_EOL;
|
||||
echo '<input type="hidden" name="P_HPP_CORP" value="'.$PAY['P_HPP_CORP'].'">'.PHP_EOL;
|
||||
echo '<input type="hidden" name="P_APPL_NUM" value="'.$PAY['P_APPL_NUM'].'">'.PHP_EOL;
|
||||
echo '<input type="hidden" name="P_VACT_NUM" value="'.$PAY['P_VACT_NUM'].'">'.PHP_EOL;
|
||||
echo '<input type="hidden" name="P_VACT_NAME" value="'.iconv_utf8($PAY['P_VACT_NAME']).'">'.PHP_EOL;
|
||||
echo '<input type="hidden" name="P_VACT_BANK" value="'.$BANK_CODE[$PAY['P_VACT_BANK_CODE']].'">'.PHP_EOL;
|
||||
echo '<input type="hidden" name="P_CARD_ISSUER" value="'.$CARD_CODE[$PAY['P_CARD_ISSUER_CODE']].'">'.PHP_EOL;
|
||||
echo '<input type="hidden" name="P_UNAME" value="'.iconv_utf8($PAY['P_UNAME']).'">'.PHP_EOL;
|
||||
|
||||
echo '</form>'.PHP_EOL;
|
||||
?>
|
||||
|
||||
<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>
|
||||
|
||||
<script type="text/javascript">
|
||||
function setPAYResult() {
|
||||
setTimeout( function() {
|
||||
document.forderform.submit();
|
||||
}, 300);
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once(G5_PATH.'/tail.sub.php');
|
||||
?>
|
||||
41
mobile/shop/inicis/pay_result.php
Normal file
41
mobile/shop/inicis/pay_result.php
Normal file
@ -0,0 +1,41 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
include_once(G5_MSHOP_PATH.'/settle_inicis.inc.php');
|
||||
|
||||
// 세션비교
|
||||
$hash = md5(get_session('P_TID').$default['de_inicis_mid'].get_session('P_AMT'));
|
||||
if($hash != $_POST['P_HASH'])
|
||||
alert('결제 정보가 일치하지 않습니다. 올바른 방법으로 이용해 주십시오.');
|
||||
|
||||
//최종결제요청 결과 성공 DB처리
|
||||
$tno = get_session('P_TID');
|
||||
$amount = get_session('P_AMT');
|
||||
$app_time = $_POST['P_AUTH_DT'];
|
||||
$pay_method = $_POST['P_TYPE'];
|
||||
$pay_type = $PAY_METHOD[$pay_method];
|
||||
$depositor = $_POST['P_UNAME'];
|
||||
$commid = $_POST['P_HPP_CORP'];
|
||||
$mobile_no = $_POST['P_APPL_NUM'];
|
||||
$app_no = $_POST['P_AUTH_NO'];
|
||||
$card_name = $_POST['P_CARD_ISSUER'];
|
||||
if ($default['de_escrow_use'] == 1)
|
||||
$escw_yn = 'Y';
|
||||
switch($pay_type) {
|
||||
case '계좌이체':
|
||||
$bank_name = $_POST['P_VACT_BANK'];
|
||||
break;
|
||||
case '가상계좌':
|
||||
$bankname = $_POST['P_VACT_BANK'];
|
||||
$account = $_POST['P_VACT_NUM'].' '.$_POST['P_VACT_NAME'];
|
||||
$app_no = $_POST['P_VACT_NUM'];
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
// 세션 초기화
|
||||
set_session('P_TID', '');
|
||||
set_session('P_AMT', '');
|
||||
set_session('P_HASH', '');
|
||||
?>
|
||||
84
mobile/shop/inicis/pay_return.php
Normal file
84
mobile/shop/inicis/pay_return.php
Normal file
@ -0,0 +1,84 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
include_once(G5_MSHOP_PATH.'/settle_inicis.inc.php');
|
||||
|
||||
// 세션 초기화
|
||||
set_session('P_TID', '');
|
||||
set_session('P_AMT', '');
|
||||
set_session('P_HASH', '');
|
||||
|
||||
$sql = " select * from {$g5['g5_shop_order_data_table']} where od_id = '$oid' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
$data = unserialize($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';
|
||||
}
|
||||
|
||||
$sql = " select * from {$g5['g5_shop_inicis_log_table']} where oid = '$oid' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
if(!$row['oid'])
|
||||
alert('결제 정보가 존재하지 않습니다.\\n\\n올바른 방법으로 이용해 주십시오.', $page_return_url);
|
||||
|
||||
if($row['P_STATUS'] != '00')
|
||||
alert('오류 : '.$row['P_RMESG1'].' 코드 : '.$row['P_STATUS'], $page_return_url);
|
||||
|
||||
$PAY = array_map('trim', $row);
|
||||
|
||||
// TID, AMT 를 세션으로 주문완료 페이지 전달
|
||||
$hash = md5($PAY['P_TID'].$PAY['P_MID'].$PAY['P_AMT']);
|
||||
set_session('P_TID', $PAY['P_TID']);
|
||||
set_session('P_AMT', $PAY['P_AMT']);
|
||||
set_session('P_HASH', $hash);
|
||||
|
||||
// 로그 삭제
|
||||
@sql_query(" delete from {$g5['g5_shop_inicis_log_table']} where oid = '$oid' ");
|
||||
|
||||
$g5['title'] = 'KG 이니시스 결제';
|
||||
$g5['body_script'] = ' onload="setPAYResult();"';
|
||||
include_once(G5_PATH.'/head.sub.php');
|
||||
|
||||
$exclude = array('res_cd', 'P_HASH', 'P_TYPE', 'P_AUTH_DT', 'P_VACT_BANK');
|
||||
|
||||
echo '<form name="forderform" method="post" action="'.$order_action_url.'" autocomplete="off">'.PHP_EOL;
|
||||
|
||||
foreach($data as $key=>$value) {
|
||||
if(in_array($key, $exclude))
|
||||
continue;
|
||||
|
||||
echo '<input type="hidden" name="'.$key.'" value="'.$value.'">'.PHP_EOL;
|
||||
}
|
||||
|
||||
echo '<input type="hidden" name="res_cd" value="'.$PAY['P_STATUS'].'">'.PHP_EOL;
|
||||
echo '<input type="hidden" name="P_HASH" value="'.$hash.'">'.PHP_EOL;
|
||||
echo '<input type="hidden" name="P_TYPE" value="'.$PAY['P_TYPE'].'">'.PHP_EOL;
|
||||
echo '<input type="hidden" name="P_AUTH_DT" value="'.$PAY['P_AUTH_DT'].'">'.PHP_EOL;
|
||||
echo '<input type="hidden" name="P_VACT_BANK" value="'.$PAY['P_FN_NM'].'">'.PHP_EOL;
|
||||
|
||||
echo '</form>'.PHP_EOL;
|
||||
?>
|
||||
|
||||
<div id="pay_working" 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>
|
||||
<span style="display:block; text-align:center;margin-top:10px; font-size:14px">주문완료 중입니다. 잠시만 기다려 주십시오.</span>
|
||||
</div>
|
||||
|
||||
<script type="text/javascript">
|
||||
function setPAYResult() {
|
||||
setTimeout( function() {
|
||||
document.forderform.submit();
|
||||
}, 300);
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php
|
||||
include_once(G5_PATH.'/tail.sub.php');
|
||||
?>
|
||||
215
mobile/shop/inicis/settle_common.php
Normal file
215
mobile/shop/inicis/settle_common.php
Normal file
@ -0,0 +1,215 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
//*******************************************************************************
|
||||
// FILE NAME : mx_rnoti.php
|
||||
// FILE DESCRIPTION :
|
||||
// 이니시스 smart phone 결제 결과 수신 페이지 샘플
|
||||
// 기술문의 : ts@inicis.com
|
||||
// HISTORY
|
||||
// 2010. 02. 25 최초작성
|
||||
// 2010 06. 23 WEB 방식의 가상계좌 사용시 가상계좌 채번 결과 무시 처리 추가(APP 방식은 해당 없음!!)
|
||||
// WEB 방식일 경우 이미 P_NEXT_URL 에서 채번 결과를 전달 하였으므로,
|
||||
// 이니시스에서 전달하는 가상계좌 채번 결과 내용을 무시 하시기 바랍니다.
|
||||
//*******************************************************************************
|
||||
|
||||
$PGIP = $_SERVER['REMOTE_ADDR'];
|
||||
|
||||
if($PGIP == "211.219.96.165" || $PGIP == "118.129.210.25") //PG에서 보냈는지 IP로 체크
|
||||
{
|
||||
|
||||
// 이니시스 NOTI 서버에서 받은 Value
|
||||
$P_TID; // 거래번호
|
||||
$P_MID; // 상점아이디
|
||||
$P_AUTH_DT; // 승인일자
|
||||
$P_STATUS; // 거래상태 (00:성공, 01:실패)
|
||||
$P_TYPE; // 지불수단
|
||||
$P_OID; // 상점주문번호
|
||||
$P_FN_CD1; // 금융사코드1
|
||||
$P_FN_CD2; // 금융사코드2
|
||||
$P_FN_NM; // 금융사명 (은행명, 카드사명, 이통사명)
|
||||
$P_AMT; // 거래금액
|
||||
$P_UNAME; // 결제고객성명
|
||||
$P_RMESG1; // 결과코드
|
||||
$P_RMESG2; // 결과메시지
|
||||
$P_NOTI; // 노티메시지(상점에서 올린 메시지)
|
||||
$P_AUTH_NO; // 승인번호
|
||||
|
||||
|
||||
$P_TID = $_POST['P_TID'];
|
||||
$P_MID = $_POST['P_MID'];
|
||||
$P_AUTH_DT = $_POST['P_AUTH_DT'];
|
||||
$P_STATUS = $_POST['P_STATUS'];
|
||||
$P_TYPE = $_POST['P_TYPE'];
|
||||
$P_OID = $_POST['P_OID'];
|
||||
$P_FN_CD1 = $_POST['P_FN_CD1'];
|
||||
$P_FN_CD2 = $_POST['P_FN_CD2'];
|
||||
$P_FN_NM = $_POST['P_FN_NM'];
|
||||
$P_AMT = $_POST['P_AMT'];
|
||||
$P_UNAME = $_POST['P_UNAME'];
|
||||
$P_RMESG1 = $_POST['P_RMESG1'];
|
||||
$P_RMESG2 = $_POST['P_RMESG2'];
|
||||
$P_NOTI = $_POST['P_NOTI'];
|
||||
$P_AUTH_NO = $_POST['P_AUTH_NO'];
|
||||
|
||||
|
||||
//WEB 방식의 경우 가상계좌 채번 결과 무시 처리
|
||||
//(APP 방식의 경우 해당 내용을 삭제 또는 주석 처리 하시기 바랍니다.)
|
||||
if($P_TYPE == "VBANK") //결제수단이 가상계좌이며
|
||||
{
|
||||
if($P_STATUS != "02") //입금통보 "02" 가 아니면(가상계좌 채번 : 00 또는 01 경우)
|
||||
{
|
||||
echo "OK";
|
||||
return;
|
||||
}
|
||||
|
||||
// 입금결과 처리
|
||||
$sql = " select pp_id, od_id from {$g5['g5_shop_personalpay_table']} where pp_id = '$P_OID' and pp_tno = '$P_TID' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
$result = false;
|
||||
$receipt_time = $P_AUTH_DT;
|
||||
|
||||
if($row['pp_id']) {
|
||||
// 개인결제 UPDATE
|
||||
$sql = " update {$g5['g5_shop_personalpay_table']}
|
||||
set pp_receipt_price = '$P_AMT',
|
||||
pp_receipt_time = '$receipt_time'
|
||||
where pp_id = '$P_OID'
|
||||
and pp_tno = '$P_TID' ";
|
||||
sql_query($sql, false);
|
||||
|
||||
if($row['od_id']) {
|
||||
// 주문서 UPDATE
|
||||
$receipt_time = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3 \\4:\\5:\\6", $receipt_time);
|
||||
$sql = " update {$g5['g5_shop_order_table']}
|
||||
set od_receipt_price = od_receipt_price + '$P_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 = '$P_AMT',
|
||||
od_receipt_time = '$receipt_time'
|
||||
where od_id = '$P_OID'
|
||||
and od_tno = '$P_TID' ";
|
||||
$result = sql_query($sql, FALSE);
|
||||
}
|
||||
|
||||
if($result) {
|
||||
if($row['od_id'])
|
||||
$od_id = $row['od_id'];
|
||||
else
|
||||
$od_id = $P_OID;
|
||||
|
||||
// 주문정보 체크
|
||||
$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);
|
||||
|
||||
$sql = " update {$g5['g5_shop_order_table']}
|
||||
set od_misu = '{$info['od_misu']}' ";
|
||||
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($result) {
|
||||
echo "OK";
|
||||
return;
|
||||
} else {
|
||||
echo "FAIL";
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
$PageCall_time = date("H:i:s");
|
||||
|
||||
$value = array(
|
||||
"PageCall time" => $PageCall_time,
|
||||
"P_TID" => $P_TID,
|
||||
"P_MID" => $P_MID,
|
||||
"P_AUTH_DT" => $P_AUTH_DT,
|
||||
"P_STATUS" => $P_STATUS,
|
||||
"P_TYPE" => $P_TYPE,
|
||||
"P_OID" => $P_OID,
|
||||
"P_FN_CD1" => $P_FN_CD1,
|
||||
"P_FN_CD2" => $P_FN_CD2,
|
||||
"P_FN_NM" => $P_FN_NM,
|
||||
"P_AMT" => $P_AMT,
|
||||
"P_UNAME" => $P_UNAME,
|
||||
"P_RMESG1" => $P_RMESG1,
|
||||
"P_RMESG2" => $P_RMESG2,
|
||||
"P_NOTI" => $P_NOTI,
|
||||
"P_AUTH_NO" => $P_AUTH_NO
|
||||
);
|
||||
|
||||
// 결과 incis log 테이블 기록
|
||||
if($P_TYPE == 'BANK') {
|
||||
$sql = " insert into {$g5['g5_shop_inicis_log_table']}
|
||||
set oid = '$P_OID',
|
||||
P_TID = '$P_TID',
|
||||
P_MID = '$P_MID',
|
||||
P_AUTH_DT = '$P_AUTH_DT',
|
||||
P_STATUS = '$P_STATUS',
|
||||
P_TYPE = '$P_TYPE',
|
||||
P_OID = '$P_OID',
|
||||
P_FN_NM = '".iconv_utf8($P_FN_NM)."',
|
||||
P_AMT = '$P_AMT',
|
||||
P_RMESG1 = '".iconv_utf8($P_RMESG1)."' ";
|
||||
@sql_query($sql);
|
||||
}
|
||||
|
||||
// 결제처리에 관한 로그 기록
|
||||
//writeLog($value);
|
||||
|
||||
/***********************************************************************************
|
||||
' 위에서 상점 데이터베이스에 등록 성공유무에 따라서 성공시에는 "OK"를 이니시스로 실패시는 "FAIL" 을
|
||||
' 리턴하셔야합니다. 아래 조건에 데이터베이스 성공시 받는 FLAG 변수를 넣으세요
|
||||
' (주의) OK를 리턴하지 않으시면 이니시스 지불 서버는 "OK"를 수신할때까지 계속 재전송을 시도합니다
|
||||
' 기타 다른 형태의 echo "" 는 하지 않으시기 바랍니다
|
||||
'***********************************************************************************/
|
||||
|
||||
echo 'OK';
|
||||
|
||||
}
|
||||
|
||||
function writeLog($msg)
|
||||
{
|
||||
$file = G5_SHOP_PATH."/inicis/log/noti_input_".date("Ymd").".log";
|
||||
|
||||
if(!($fp = fopen($path.$file, "a+"))) return 0;
|
||||
|
||||
ob_start();
|
||||
print_r($msg);
|
||||
$ob_msg = ob_get_contents();
|
||||
ob_clean();
|
||||
|
||||
if(fwrite($fp, " ".$ob_msg."\n") === FALSE)
|
||||
{
|
||||
fclose($fp);
|
||||
return 0;
|
||||
}
|
||||
fclose($fp);
|
||||
return 1;
|
||||
}
|
||||
?>
|
||||
@ -89,7 +89,6 @@
|
||||
else
|
||||
{
|
||||
alert("실패 되었습니다.[" + txt[3].replace(/^\s*/,'').replace(/\s*$/,'') + "]");
|
||||
window.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -104,6 +104,14 @@
|
||||
$ActionResult = '';
|
||||
break;
|
||||
}
|
||||
|
||||
if(get_session('ss_personalpay_id') && get_session('ss_personalpay_hash')) {
|
||||
$js_return_url = G5_SHOP_URL.'/personalpayform.php?pp_id='.get_session('ss_personalpay_id');
|
||||
} else {
|
||||
$js_return_url = G5_SHOP_URL.'/orderform.php';
|
||||
if(get_session('ss_direct'))
|
||||
$js_return_url .= '?sw_direct=1';
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko">
|
||||
@ -112,7 +120,9 @@
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="Cache-Control" content="No-Cache">
|
||||
<meta http-equiv="Pragma" content="No-Cache">
|
||||
<meta name="viewport" content="width=device-width; user-scalable=<?php echo $tablet_size; ?>; initial-scale=<?php echo $tablet_size; ?>; maximum-scale=<?php echo $tablet_size; ?>; minimum-scale=<?php echo $tablet_size; ?>">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0,minimum-scale=0,maximum-scale=10">
|
||||
<meta name="HandheldFriendly" content="true">
|
||||
<meta name="format-detection" content="telephone=no">
|
||||
|
||||
<style type="text/css">
|
||||
.LINE { background-color:#afc3ff }
|
||||
@ -147,6 +157,7 @@
|
||||
{
|
||||
/* Ret_URL값은 현 페이지의 URL 입니다. */
|
||||
alert("연동시 Ret_URL을 반드시 설정하셔야 됩니다.");
|
||||
document.location.href = "<?php echo $js_return_url; ?>";
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -158,53 +169,30 @@
|
||||
function chk_pay()
|
||||
{
|
||||
/*kcp 결제서버에서 가맹점 주문페이지로 폼값을 보내기위한 설정(변경불가)*/
|
||||
self.name = "tar_opener";
|
||||
|
||||
var sm_form = document.sm_form;
|
||||
|
||||
if (sm_form.res_cd.value == "3001" )
|
||||
{
|
||||
alert("사용자가 취소하였습니다.");
|
||||
window.close();
|
||||
document.location.href = "<?php echo $js_return_url; ?>";
|
||||
return false;
|
||||
}
|
||||
else if (sm_form.res_cd.value == "3000" )
|
||||
{
|
||||
alert("30만원 이상 결제 할수 없습니다.");
|
||||
window.close();
|
||||
document.location.href = "<?php echo $js_return_url; ?>";
|
||||
return false;
|
||||
}
|
||||
|
||||
if (sm_form.enc_data.value != "" && sm_form.enc_info.value != "" && sm_form.tran_cd.value !="" )
|
||||
{
|
||||
var of = window.opener.document.forderform;
|
||||
|
||||
of.req_tx.value = "<?php echo $req_tx; ?>";
|
||||
of.res_cd.value = "<?php echo $res_cd; ?>";
|
||||
of.tran_cd.value = "<?php echo $tran_cd; ?>";
|
||||
of.ordr_idxx.value = "<?php echo $ordr_idxx; ?>";
|
||||
of.good_mny.value = "<?php echo $good_mny; ?>";
|
||||
of.good_name.value = "<?php echo $good_name; ?>";
|
||||
of.buyr_name.value = "<?php echo $buyr_name; ?>";
|
||||
of.buyr_tel1.value = "<?php echo $buyr_tel1; ?>";
|
||||
of.buyr_tel2.value = "<?php echo $buyr_tel2; ?>";
|
||||
of.buyr_mail.value = "<?php echo $buyr_mail; ?>";
|
||||
of.enc_info.value = "<?php echo $enc_info; ?>";
|
||||
of.enc_data.value = "<?php echo $enc_data; ?>";
|
||||
of.use_pay_method.value = "<?php echo $use_pay_method; ?>";
|
||||
of.rcvr_name.value = "<?php echo $rcvr_name; ?>";
|
||||
of.rcvr_tel1.value = "<?php echo $rcvr_tel1; ?>";
|
||||
of.rcvr_tel2.value = "<?php echo $rcvr_tel2; ?>";
|
||||
of.rcvr_mail.value = "<?php echo $rcvr_mail; ?>";
|
||||
of.rcvr_zipx.value = "<?php echo $rcvr_zipx; ?>";
|
||||
of.rcvr_add1.value = "<?php echo $rcvr_add1; ?>";
|
||||
of.rcvr_add2.value = "<?php echo $rcvr_add2; ?>";
|
||||
of.param_opt_1.value = "<?php echo $param_opt_1; ?>";
|
||||
of.param_opt_2.value = "<?php echo $param_opt_2; ?>";
|
||||
of.param_opt_3.value = "<?php echo $param_opt_3; ?>";
|
||||
|
||||
//alert("주문하기를 클릭하셔야 주문이 완료됩니다.");
|
||||
window.opener.forderform_check();
|
||||
window.close();
|
||||
document.getElementById("pay_fail").style.display = "none";
|
||||
document.getElementById("show_progress").style.display = "block";
|
||||
setTimeout( function() {
|
||||
document.forderform.submit();
|
||||
}, 300);
|
||||
} else {
|
||||
kcp_AJAX();
|
||||
}
|
||||
@ -216,6 +204,39 @@
|
||||
|
||||
<div id="content">
|
||||
|
||||
<?php
|
||||
if($enc_data != '' && $enc_info != '' && $tran_cd != '') {
|
||||
// 제외할 필드
|
||||
$exclude = array('req_tx', 'res_cd', 'tran_cd', 'ordr_idxx', 'good_mny', 'good_name', 'buyr_name', 'buyr_tel1', 'buyr_tel2', 'buyr_mail', 'enc_info', 'enc_data', 'use_pay_method', 'rcvr_name', 'rcvr_tel1', 'rcvr_tel2', 'rcvr_mail', 'rcvr_zipx', 'rcvr_add1', 'rcvr_add2', 'param_opt_1', 'param_opt_2', 'param_opt_3');
|
||||
|
||||
$sql = " select * from {$g5['g5_shop_order_data_table']} where od_id = '$ordr_idxx' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
$data = unserialize($row['dt_data']);
|
||||
|
||||
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';
|
||||
}
|
||||
|
||||
echo '<form name="forderform" method="post" action="'.$order_action_url.'" autocomplete="off">'.PHP_EOL;
|
||||
|
||||
foreach($data as $key=>$value) {
|
||||
if(in_array($key, $exclude))
|
||||
continue;
|
||||
|
||||
echo '<input type="hidden" name="'.$key.'" value="'.$value.'">'.PHP_EOL;
|
||||
}
|
||||
|
||||
foreach($_POST as $key=>$value) {
|
||||
echo '<input type="hidden" name="'.$key.'" value="'.$value.'">'.PHP_EOL;
|
||||
}
|
||||
|
||||
echo '</form>'.PHP_EOL;
|
||||
}
|
||||
?>
|
||||
|
||||
<form name="sm_form" method="POST" accept-charset="euc-kr">
|
||||
|
||||
<input type="hidden" name="good_name" value="<?php echo $good_name; ?>">
|
||||
@ -325,6 +346,15 @@ if($default['de_tax_flag_use']) {
|
||||
<input type="hidden" name="enc_info" value="<?php echo $enc_info; ?>"> <!-- 암호화 정보 -->
|
||||
<input type="hidden" name="enc_data" value="<?php echo $enc_data; ?>"> <!-- 암호화 데이터 -->
|
||||
</form>
|
||||
|
||||
<div id="pay_fail">
|
||||
<p>결제가 실패한 경우 아래 돌아가기 버튼을 클릭해주세요.</p>
|
||||
<a href="<?php echo $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>
|
||||
<span style="display:block; text-align:center;margin-top:10px; font-size:14px">주문완료 중입니다. 잠시만 기다려 주십시오.</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 스마트폰에서 KCP 결제창을 레이어 형태로 구현-->
|
||||
|
||||
@ -1,321 +0,0 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
/* ============================================================================== */
|
||||
/* = PAGE : 결제 요청 PAGE = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 이 페이지는 주문 페이지를 통해서 결제자가 결제 요청을 하는 페이지 = */
|
||||
/* = 입니다. 아래의 ※ 필수, ※ 옵션 부분과 매뉴얼을 참조하셔서 연동을 = */
|
||||
/* = 진행하여 주시기 바랍니다. = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 연동시 오류가 발생하는 경우 아래의 주소로 접속하셔서 확인하시기 바랍니다.= */
|
||||
/* = 접속 주소 : http://testpay.kcp.co.kr/pgsample/FAQ/search_error.jsp = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = Copyright (c) 2010.05 KCP Inc. All Rights Reserved. = */
|
||||
/* ============================================================================== */
|
||||
?>
|
||||
<?php
|
||||
/* ============================================================================== */
|
||||
/* = 환경 설정 파일 Include = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = ※ 필수 = */
|
||||
/* = 테스트 및 실결제 연동시 site_conf_inc.php파일을 수정하시기 바랍니다. = */
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
|
||||
include_once(G5_MSHOP_PATH.'/settle_kcp.inc.php'); // 환경설정 파일 include
|
||||
?>
|
||||
<?php
|
||||
/* = -------------------------------------------------------------------------- = */
|
||||
/* = 환경 설정 파일 Include END = */
|
||||
/* ============================================================================== */
|
||||
?>
|
||||
<?php
|
||||
/* kcp와 통신후 kcp 서버에서 전송되는 결제 요청 정보*/
|
||||
$req_tx = $_POST[ "req_tx" ]; // 요청 종류
|
||||
$res_cd = $_POST[ "res_cd" ]; // 응답 코드
|
||||
$tran_cd = $_POST[ "tran_cd" ]; // 트랜잭션 코드
|
||||
$ordr_idxx = $_POST[ "ordr_idxx" ]; // 쇼핑몰 주문번호
|
||||
$good_name = $_POST[ "good_name" ]; // 상품명
|
||||
$good_mny = $_POST[ "good_mny" ]; // 결제 총금액
|
||||
$buyr_name = $_POST[ "buyr_name" ]; // 주문자명
|
||||
$buyr_tel1 = $_POST[ "buyr_tel1" ]; // 주문자 전화번호
|
||||
$buyr_tel2 = $_POST[ "buyr_tel2" ]; // 주문자 핸드폰 번호
|
||||
$buyr_mail = $_POST[ "buyr_mail" ]; // 주문자 E-mail 주소
|
||||
$use_pay_method = $_POST[ "use_pay_method" ]; // 결제 방법
|
||||
$enc_info = $_POST[ "enc_info" ]; // 암호화 정보
|
||||
$enc_data = $_POST[ "enc_data" ]; // 암호화 데이터
|
||||
$rcvr_name = $_POST[ "rcvr_name" ]; // 수취인 이름
|
||||
$rcvr_tel1 = $_POST[ "rcvr_tel1" ]; // 수취인 전화번호
|
||||
$rcvr_tel2 = $_POST[ "rcvr_tel2" ]; // 수취인 휴대폰번호
|
||||
$rcvr_mail = $_POST[ "rcvr_mail" ]; // 수취인 E-Mail
|
||||
$rcvr_zipx = $_POST[ "rcvr_zipx" ]; // 수취인 우편번호
|
||||
$rcvr_add1 = $_POST[ "rcvr_add1" ]; // 수취인 주소
|
||||
$rcvr_add2 = $_POST[ "rcvr_add2" ]; // 수취인 상세주소
|
||||
|
||||
/* 주문폼에서 전송되는 정보 */
|
||||
$ipgm_date = $_POST[ "ipgm_date" ]; // 입금마감일
|
||||
$settle_method = $_POST[ "settle_method" ]; // 결제방법
|
||||
$good_info = $_POST[ "good_info" ]; // 에스크로 상품정보
|
||||
$bask_cntx = $_POST[ "bask_cntx" ]; // 장바구니 상품수
|
||||
$tablet_size = $_POST[ "tablet_size" ]; // 모바일기기 화면비율
|
||||
|
||||
$comm_tax_mny = $_POST[ "comm_tax_mny" ]; // 과세금액
|
||||
$comm_vat_mny = $_POST[ "comm_vat_mny" ]; // 부가세
|
||||
$comm_free_mny = $_POST["comm_free_mny" ]; // 비과세금액
|
||||
|
||||
/*
|
||||
* 기타 파라메터 추가 부분 - Start -
|
||||
*/
|
||||
$param_opt_1 = $_POST[ "param_opt_1" ]; // 기타 파라메터 추가 부분
|
||||
$param_opt_2 = $_POST[ "param_opt_2" ]; // 기타 파라메터 추가 부분
|
||||
$param_opt_3 = $_POST[ "param_opt_3" ]; // 기타 파라메터 추가 부분
|
||||
/*
|
||||
* 기타 파라메터 추가 부분 - End -
|
||||
*/
|
||||
|
||||
/* kcp 데이터 캐릭터셋 변환 */
|
||||
if($res_cd != '') {
|
||||
$good_name = iconv('euc-kr', 'utf-8', $good_name);
|
||||
$buyr_name = iconv('euc-kr', 'utf-8', $buyr_name);
|
||||
$rcvr_name = iconv('euc-kr', 'utf-8', $rcvr_name);
|
||||
$rcvr_add1 = iconv('euc-kr', 'utf-8', $rcvr_add1);
|
||||
$rcvr_add2 = iconv('euc-kr', 'utf-8', $rcvr_add2);
|
||||
}
|
||||
|
||||
switch($settle_method)
|
||||
{
|
||||
case '신용카드':
|
||||
$pay_method = 'CARD';
|
||||
$ActionResult = 'card';
|
||||
break;
|
||||
case '계좌이체':
|
||||
$pay_method = 'BANK';
|
||||
$ActionResult = 'acnt';
|
||||
break;
|
||||
case '휴대폰':
|
||||
$pay_method = 'MOBX';
|
||||
$ActionResult = 'mobx';
|
||||
break;
|
||||
case '가상계좌':
|
||||
$pay_method = 'VCNT';
|
||||
$ActionResult = 'vcnt';
|
||||
break;
|
||||
default:
|
||||
$pay_method = '';
|
||||
$ActionResult = '';
|
||||
break;
|
||||
}
|
||||
?>
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" lang="ko" xml:lang="ko">
|
||||
<head>
|
||||
<title>스마트폰 웹 결제창</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
|
||||
<meta http-equiv="Cache-Control" content="No-Cache">
|
||||
<meta http-equiv="Pragma" content="No-Cache">
|
||||
<meta name="viewport" content="width=device-width; user-scalable=<?php echo $tablet_size; ?>; initial-scale=<?php echo $tablet_size; ?>; maximum-scale=<?php echo $tablet_size; ?>; minimum-scale=<?php echo $tablet_size; ?>">
|
||||
|
||||
<style type="text/css">
|
||||
.LINE { background-color:#afc3ff }
|
||||
.HEAD { font-family:"굴림","굴림체"; font-size:9pt; color:#065491; background-color:#eff5ff; text-align:left; padding:3px; }
|
||||
.TEXT { font-family:"굴림","굴림체"; font-size:9pt; color:#000000; background-color:#FFFFFF; text-align:left; padding:3px; }
|
||||
B { font-family:"굴림","굴림체"; font-size:13pt; color:#065491;}
|
||||
INPUT { font-family:"굴림","굴림체"; font-size:9pt; }
|
||||
SELECT{font-size:9pt;}
|
||||
.COMMENT { font-family:"굴림","굴림체"; font-size:9pt; line-height:160% }
|
||||
</style>
|
||||
<!-- 거래등록 하는 kcp 서버와 통신을 위한 스크립트-->
|
||||
<script src="<?php echo G5_MSHOP_URL; ?>/kcp/approval_key.js"></script>
|
||||
|
||||
|
||||
<script language="javascript">
|
||||
/* kcp web 결제창 호출 (변경불가)*/
|
||||
function call_pay_form()
|
||||
{
|
||||
|
||||
var v_frm = document.sm_form;
|
||||
|
||||
layer_cont_obj = document.getElementById("content");
|
||||
layer_receipt_obj = document.getElementById("layer_receipt");
|
||||
|
||||
layer_cont_obj.style.display = "none";
|
||||
layer_receipt_obj.style.display = "block";
|
||||
|
||||
v_frm.target = "frm_receipt";
|
||||
v_frm.action = PayUrl;
|
||||
|
||||
if(v_frm.Ret_URL.value == "")
|
||||
{
|
||||
/* Ret_URL값은 현 페이지의 URL 입니다. */
|
||||
alert("연동시 Ret_URL을 반드시 설정하셔야 됩니다.");
|
||||
return false;
|
||||
}
|
||||
|
||||
v_frm.submit();
|
||||
}
|
||||
|
||||
|
||||
/* kcp 통신을 통해 받은 암호화 정보 체크 후 결제 요청*/
|
||||
function chk_pay()
|
||||
{
|
||||
/*kcp 결제서버에서 가맹점 주문페이지로 폼값을 보내기위한 설정(변경불가)*/
|
||||
|
||||
var sm_form = document.sm_form;
|
||||
|
||||
if (sm_form.res_cd.value == "3001" )
|
||||
{
|
||||
alert("사용자가 취소하였습니다.");
|
||||
window.close();
|
||||
return false;
|
||||
}
|
||||
else if (sm_form.res_cd.value == "3000" )
|
||||
{
|
||||
alert("30만원 이상 결제 할수 없습니다.");
|
||||
window.close();
|
||||
return false;
|
||||
}
|
||||
|
||||
if (sm_form.enc_data.value != "" && sm_form.enc_info.value != "" && sm_form.tran_cd.value !="" )
|
||||
{
|
||||
var of = window.opener.document.fpersonalpayform;
|
||||
|
||||
of.req_tx.value = "<?php echo $req_tx; ?>";
|
||||
of.res_cd.value = "<?php echo $res_cd; ?>";
|
||||
of.tran_cd.value = "<?php echo $tran_cd; ?>";
|
||||
of.ordr_idxx.value = "<?php echo $ordr_idxx; ?>";
|
||||
of.good_mny.value = "<?php echo $good_mny; ?>";
|
||||
of.good_name.value = "<?php echo $good_name; ?>";
|
||||
of.buyr_name.value = "<?php echo $buyr_name; ?>";
|
||||
of.buyr_tel1.value = "<?php echo $buyr_tel1; ?>";
|
||||
of.buyr_tel2.value = "<?php echo $buyr_tel2; ?>";
|
||||
of.buyr_mail.value = "<?php echo $buyr_mail; ?>";
|
||||
of.enc_info.value = "<?php echo $enc_info; ?>";
|
||||
of.enc_data.value = "<?php echo $enc_data; ?>";
|
||||
of.use_pay_method.value = "<?php echo $use_pay_method; ?>";
|
||||
of.rcvr_name.value = "<?php echo $rcvr_name; ?>";
|
||||
of.rcvr_tel1.value = "<?php echo $rcvr_tel1; ?>";
|
||||
of.rcvr_tel2.value = "<?php echo $rcvr_tel2; ?>";
|
||||
of.rcvr_mail.value = "<?php echo $rcvr_mail; ?>";
|
||||
of.rcvr_zipx.value = "<?php echo $rcvr_zipx; ?>";
|
||||
of.rcvr_add1.value = "<?php echo $rcvr_add1; ?>";
|
||||
of.rcvr_add2.value = "<?php echo $rcvr_add2; ?>";
|
||||
of.param_opt_1.value = "<?php echo $param_opt_1; ?>";
|
||||
of.param_opt_2.value = "<?php echo $param_opt_2; ?>";
|
||||
of.param_opt_3.value = "<?php echo $param_opt_3; ?>";
|
||||
|
||||
window.opener.fpersonalpayform_check();
|
||||
window.close();
|
||||
} else {
|
||||
kcp_AJAX();
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body onload="chk_pay();">
|
||||
|
||||
<div id="content">
|
||||
|
||||
<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_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="ipgm_date" value="<?php echo $ipgm_date; ?>">
|
||||
|
||||
<!-- 필수 사항 -->
|
||||
|
||||
<!-- 요청 구분 -->
|
||||
<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_key" value="<?php echo $g_conf_site_key; ?>">
|
||||
<!-- 사이트 이름 -->
|
||||
<input type="hidden" name="shop_name" value="<?php echo $g_conf_site_name; ?>">
|
||||
<!-- 결제수단-->
|
||||
<input type="hidden" name="pay_method" value="<?php echo $pay_method; ?>">
|
||||
<!-- 주문번호 -->
|
||||
<input type="hidden" name="ordr_idxx" value="<?php echo $ordr_idxx; ?>">
|
||||
<!-- 최대 할부개월수 -->
|
||||
<input type="hidden" name="quotaopt" value="12">
|
||||
<!-- 통화 코드 -->
|
||||
<input type="hidden" name="currency" value="410">
|
||||
<!-- 결제등록 키 -->
|
||||
<input type="hidden" name="approval_key" id="approval">
|
||||
<!-- 리턴 URL (kcp와 통신후 결제를 요청할 수 있는 암호화 데이터를 전송 받을 가맹점의 주문페이지 URL) -->
|
||||
<!-- 반드시 가맹점 주문페이지의 URL을 입력 해주시기 바랍니다. -->
|
||||
<input type="hidden" name="Ret_URL" value="<?php echo G5_MSHOP_URL; ?>/kcp/personalpay_approval_form.php">
|
||||
<!-- 인증시 필요한 파라미터(변경불가)-->
|
||||
<input type="hidden" name="ActionResult" value="<?php echo $ActionResult; ?>">
|
||||
<!-- 에스크로 사용유무 에스크로 사용 업체(가상계좌만 해당)는 Y로 세팅 해주시기 바랍니다.-->
|
||||
<input type="hidden" name="escw_used" value="Y">
|
||||
<!-- 에스크로 결제처리모드 -->
|
||||
<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_tel1" value="<?php echo $rcvr_tel1; ?>">
|
||||
<!-- 수취인 휴대폰 번호 -->
|
||||
<input type="hidden" name="rcvr_tel2" value="<?php echo $rcvr_tel2; ?>">
|
||||
<!-- 수취인 E-MAIL -->
|
||||
<input type="hidden" name="rcvr_add1" value="<?php echo $rcvr_add1; ?>">
|
||||
<!-- 수취인 우편번호 -->
|
||||
<input type="hidden" name="rcvr_add2" value="<?php echo $rcvr_add2; ?>">
|
||||
<!-- 수취인 주소 -->
|
||||
<input type="hidden" name="rcvr_mail" value="<?php echo $rcvr_mail; ?>">
|
||||
<!-- 수취인 상세 주소 -->
|
||||
<input type="hidden" name="rcvr_zipx" value="<?php echo $rcvr_zipx; ?>">
|
||||
<!-- 장바구니 상품 개수 -->
|
||||
<input type="hidden" name="bask_cntx" value="<?php echo $bask_cntx; ?>">
|
||||
<!-- 장바구니 정보(상단 스크립트 참조) -->
|
||||
<input type="hidden" name="good_info" value="<?php echo $good_info; ?>">
|
||||
<!-- 배송소요기간 -->
|
||||
<input type="hidden" name="deli_term" value="03">
|
||||
<!-- 기타 파라메터 추가 부분 - Start - -->
|
||||
<input type="hidden" name="param_opt_1" value="<?php echo $param_opt_1; ?>"/>
|
||||
<input type="hidden" name="param_opt_2" value="<?php echo $param_opt_2; ?>"/>
|
||||
<input type="hidden" name="param_opt_3" value="<?php echo $param_opt_3; ?>"/>
|
||||
<input type="hidden" name="disp_tax_yn" value="N">
|
||||
<!-- 기타 파라메터 추가 부분 - End - -->
|
||||
<!-- 화면 크기조정 부분 - Start - -->
|
||||
<input type="hidden" name="tablet_size" value="<?php echo $tablet_size; ?>"/>
|
||||
<!-- 화면 크기조정 부분 - End - -->
|
||||
<!--
|
||||
사용 카드 설정
|
||||
<input type="hidden" name="used_card" value="CClg:ccDI">
|
||||
/* 무이자 옵션
|
||||
※ 설정할부 (가맹점 관리자 페이지에 설정 된 무이자 설정을 따른다) - "" 로 설정
|
||||
※ 일반할부 (KCP 이벤트 이외에 설정 된 모든 무이자 설정을 무시한다) - "N" 로 설정
|
||||
※ 무이자 할부 (가맹점 관리자 페이지에 설정 된 무이자 이벤트 중 원하는 무이자 설정을 세팅한다) - "Y" 로 설정
|
||||
<input type="hidden" name="kcp_noint" value=""/> */
|
||||
|
||||
/* 무이자 설정
|
||||
※ 주의 1 : 할부는 결제금액이 50,000 원 이상일 경우에만 가능
|
||||
※ 주의 2 : 무이자 설정값은 무이자 옵션이 Y일 경우에만 결제 창에 적용
|
||||
예) 전 카드 2,3,6개월 무이자(국민,비씨,엘지,삼성,신한,현대,롯데,외환) : ALL-02:03:04
|
||||
BC 2,3,6개월, 국민 3,6개월, 삼성 6,9개월 무이자 : CCBC-02:03:06,CCKM-03:06,CCSS-03:06:04
|
||||
<input type="hidden" name="kcp_noint_quota" value="CCBC-02:03:06,CCKM-03:06,CCSS-03:06:09"/> */
|
||||
-->
|
||||
|
||||
<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; ?>"> <!-- 암호화 데이터 -->
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- 스마트폰에서 KCP 결제창을 레이어 형태로 구현-->
|
||||
<div id="layer_receipt" style="position:absolute; left:1px; top:1px; width:310;height:400; z-index:1; display:none;">
|
||||
<table width="310" border="-" cellspacing="0" cellpadding="0" style="text-align:center">
|
||||
<tr>
|
||||
<td>
|
||||
<iframe name="frm_receipt" frameborder="0" border="0" width="310" height="400" scrolling="auto"></iframe>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@ -161,7 +161,15 @@
|
||||
openwin.close();
|
||||
</script>";
|
||||
*/
|
||||
alert("$res_cd : $res_msg");
|
||||
if(isset($_POST['pp_id']) && $_POST['pp_id']) {
|
||||
$page_return_url = G5_SHOP_URL.'/personalpayform.php?pp_id='.get_session('ss_personalpay_id');
|
||||
} else {
|
||||
$page_return_url = G5_SHOP_URL.'/orderform.php';
|
||||
if(get_session('ss_direct'))
|
||||
$page_return_url .= '?sw_direct=1';
|
||||
}
|
||||
|
||||
alert("$res_cd : $res_msg", $page_return_url);
|
||||
exit;
|
||||
}
|
||||
|
||||
|
||||
@ -7,38 +7,76 @@ xpay_approval.php 에서 세션에 저장했던 파라미터 값이 유효한지
|
||||
*/
|
||||
|
||||
if(!isset($_SESSION['PAYREQ_MAP'])){
|
||||
alert_close('세션이 만료 되었거나 유효하지 않은 요청 입니다.');
|
||||
alert('세션이 만료 되었거나 유효하지 않은 요청 입니다.', G5_SHOP_URL);
|
||||
}
|
||||
|
||||
$payReqMap = $_SESSION['PAYREQ_MAP']; //결제 요청시, Session에 저장했던 파라미터 MAP
|
||||
|
||||
$g5['title'] = 'LG 유플러스 eCredit서비스 결제';
|
||||
$g5['body_script'] = 'onload="setLGDResult();"';
|
||||
$g5['body_script'] = ' onload="setLGDResult();"';
|
||||
include_once(G5_PATH.'/head.sub.php');
|
||||
|
||||
$LGD_RESPCODE = $_REQUEST['LGD_RESPCODE'];
|
||||
$LGD_RESPMSG = $_REQUEST['LGD_RESPMSG'];
|
||||
$LGD_PAYKEY = '';
|
||||
|
||||
$LGD_OID = $payReqMap['LGD_OID'];
|
||||
|
||||
$sql = " select * from {$g5['g5_shop_order_data_table']} where od_id = '$LGD_OID' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
$data = unserialize($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';
|
||||
}
|
||||
|
||||
if($LGD_RESPCODE == '0000') {
|
||||
$LGD_PAYKEY = $_REQUEST['LGD_PAYKEY'];
|
||||
$payReqMap['LGD_RESPCODE'] = $LGD_RESPCODE;
|
||||
$payReqMap['LGD_RESPMSG'] = $LGD_RESPMSG;
|
||||
$payReqMap['LGD_PAYKEY'] = $LGD_PAYKEY;
|
||||
} else {
|
||||
alert_close('LGD_RESPCODE:' . $LGD_RESPCODE . ' ,LGD_RESPMSG:' . $LGD_RESPMSG); //인증 실패에 대한 처리 로직 추가
|
||||
alert('LGD_RESPCODE:' . $LGD_RESPCODE . ' ,LGD_RESPMSG:' . $LGD_RESPMSG, $page_return_url); //인증 실패에 대한 처리 로직 추가
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
$exclude = array('res_cd', 'LGD_PAYKEY');
|
||||
|
||||
echo '<form name="forderform" method="post" action="'.$order_action_url.'" autocomplete="off">'.PHP_EOL;
|
||||
|
||||
foreach($data as $key=>$value) {
|
||||
if(in_array($key, $exclude))
|
||||
continue;
|
||||
|
||||
echo '<input type="hidden" name="'.$key.'" value="'.$value.'">'.PHP_EOL;
|
||||
}
|
||||
|
||||
echo '<input type="hidden" name="res_cd" value="'.$LGD_RESPCODE.'">'.PHP_EOL;
|
||||
echo '<input type="hidden" name="LGD_PAYKEY" value="'.$LGD_PAYKEY.'">'.PHP_EOL;
|
||||
|
||||
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 setLGDResult() {
|
||||
var of = window.opener.document.forderform;
|
||||
|
||||
of.res_cd.value = "<?php echo $LGD_RESPCODE; ?>";
|
||||
of.LGD_PAYKEY.value = "<?php echo $LGD_PAYKEY; ?>";
|
||||
|
||||
window.opener.forderform_check();
|
||||
window.close();
|
||||
setTimeout( function() {
|
||||
document.forderform.submit();
|
||||
}, 300);
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@ -24,7 +24,7 @@ $LGD_KVPMISPWAPURL = G5_MSHOP_URL.'/lg/mispwapurl.php?LGD_OID='.$LGD_OID;
|
||||
$LGD_KVPMISPCANCELURL = G5_MSHOP_URL.'/lg/cancel_url.php';
|
||||
$LGD_MTRANSFERWAPURL = G5_MSHOP_URL.'/lg/returnurl.php';
|
||||
$LGD_MTRANSFERCANCELURL = G5_MSHOP_URL.'/lg/cancel_url.php';
|
||||
$LGD_MTRANSFERNOTEURL = G5_MSHOP_URL.'/note_url.php';
|
||||
$LGD_MTRANSFERNOTEURL = G5_MSHOP_URL.'/lg/note_url.php';
|
||||
if(preg_match('/iPhone|iPad/', $_SERVER['HTTP_USER_AGENT']))
|
||||
$LGD_MTRANSFERAUTOAPPYN = 'N';
|
||||
else
|
||||
@ -130,7 +130,7 @@ $payReqMap['LGD_PAYKEY'] = "";
|
||||
$_SESSION['PAYREQ_MAP'] = $payReqMap;
|
||||
|
||||
$g5['title'] = 'LG 유플러스 eCredit서비스 결제';
|
||||
$g5['body_script'] = 'onload="launchCrossPlatform();"';
|
||||
$g5['body_script'] = ' onload="launchCrossPlatform();"';
|
||||
include_once(G5_PATH.'/head.sub.php');
|
||||
?>
|
||||
|
||||
|
||||
@ -32,6 +32,10 @@ require_once(G5_MSHOP_PATH.'/settle_'.$default['de_pg_service'].'.inc.php');
|
||||
// 결제등록 요청시 사용할 입금마감일
|
||||
$ipgm_date = date("Ymd", (G5_SERVER_TIME + 86400 * 5));
|
||||
$tablet_size = "1.0"; // 화면 사이즈 조정 - 기기화면에 맞게 수정(갤럭시탭,아이패드 - 1.85, 스마트폰 - 1.0)
|
||||
|
||||
// 개인결제번호제거
|
||||
set_session('ss_personalpay_id', '');
|
||||
set_session('ss_personalpay_hash', '');
|
||||
?>
|
||||
|
||||
<div id="sod_approval_frm">
|
||||
@ -93,7 +97,7 @@ ob_start();
|
||||
{
|
||||
//$goods = addslashes($row[it_name]);
|
||||
//$goods = get_text($row[it_name]);
|
||||
$goods = preg_replace("/\'|\"|\||\,|\&|\;/", "", $row['it_name']);
|
||||
$goods = preg_replace("/\?|\'|\"|\||\,|\&|\;/", "", $row['it_name']);
|
||||
$goods_it_id = $row['it_id'];
|
||||
}
|
||||
$goods_count++;
|
||||
@ -1194,10 +1198,61 @@ 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'] == 'inicis') { ?>
|
||||
var paymethod = "";
|
||||
var width = 330;
|
||||
var height = 480;
|
||||
var xpos = (screen.width - width) / 2;
|
||||
var ypos = (screen.width - height) / 2;
|
||||
var position = "top=" + ypos + ",left=" + xpos;
|
||||
var features = position + ", width=320, height=440";
|
||||
switch(settle_method) {
|
||||
case "계좌이체":
|
||||
paymethod = "bank";
|
||||
break;
|
||||
case "가상계좌":
|
||||
paymethod = "vbank";
|
||||
break;
|
||||
case "휴대폰":
|
||||
paymethod = "mobile";
|
||||
break;
|
||||
case "신용카드":
|
||||
paymethod = "wcard";
|
||||
break;
|
||||
}
|
||||
f.P_AMT.value = f.good_mny.value;
|
||||
f.P_UNAME.value = pf.od_name.value;
|
||||
f.P_MOBILE.value = pf.od_hp.value;
|
||||
f.P_EMAIL.value = pf.od_email.value;
|
||||
<?php if($default['de_tax_flag_use']) { ?>
|
||||
f.P_TAX.value = pf.comm_vat_mny.value;
|
||||
f.P_TAXFREE = pf.comm_free_mny.value;
|
||||
<?php } ?>
|
||||
f.P_RETURN_URL.value = "<?php echo $return_url.$od_id; ?>";
|
||||
f.action = "https://mobile.inicis.com/smart/" + paymethod + "/";
|
||||
<?php } ?>
|
||||
|
||||
var new_win = window.open("about:blank", "tar_opener", "scrollbars=yes,resizable=yes");
|
||||
f.target = "tar_opener";
|
||||
//var new_win = window.open("about:blank", "tar_opener", "scrollbars=yes,resizable=yes");
|
||||
//f.target = "tar_opener";
|
||||
|
||||
// 주문 정보 임시저장
|
||||
var order_data = $(pf).serialize();
|
||||
var save_result = "";
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: order_data,
|
||||
url: g5_url+"/shop/ajax.orderdatasave.php",
|
||||
cache: false,
|
||||
async: false,
|
||||
success: function(data) {
|
||||
save_result = data;
|
||||
}
|
||||
});
|
||||
|
||||
if(save_result) {
|
||||
alert(save_result);
|
||||
return false;
|
||||
}
|
||||
|
||||
f.submit();
|
||||
}
|
||||
|
||||
@ -2,13 +2,20 @@
|
||||
include_once('./_common.php');
|
||||
include_once(G5_LIB_PATH.'/mailer.lib.php');
|
||||
|
||||
$page_return_url = G5_SHOP_URL.'/orderform.php';
|
||||
if(get_session('ss_direct'))
|
||||
$page_return_url .= '?sw_direct=1';
|
||||
|
||||
// 결제등록 완료 체크
|
||||
if($od_settle_case != '무통장') {
|
||||
if($default['de_pg_service'] == 'kcp' && ($_POST['tran_cd'] == '' || $_POST['enc_info'] == '' || $_POST['enc_data'] == ''))
|
||||
alert('결제등록 요청 후 주문해 주십시오.');
|
||||
alert('결제등록 요청 후 주문해 주십시오.', $page_return_url);
|
||||
|
||||
if($default['de_pg_service'] == 'lg' && !$_POST['LGD_PAYKEY'])
|
||||
alert('결제등록 요청 후 주문해 주십시오.');
|
||||
alert('결제등록 요청 후 주문해 주십시오.', $page_return_url);
|
||||
|
||||
if($default['de_pg_service'] == 'inicis' && !$_POST['P_HASH'])
|
||||
alert('결제등록 요청 후 주문해 주십시오.', $page_return_url);
|
||||
}
|
||||
|
||||
// 장바구니가 비어있는가?
|
||||
@ -51,7 +58,7 @@ if($i == 0)
|
||||
if ($error != "")
|
||||
{
|
||||
$error .= "다른 고객님께서 {$od_name}님 보다 먼저 주문하신 경우입니다. 불편을 끼쳐 죄송합니다.";
|
||||
alert($error);
|
||||
alert($error, $page_return_url);
|
||||
}
|
||||
|
||||
$i_price = (int)$_POST['od_price'];
|
||||
@ -263,7 +270,7 @@ if (($i_temp_point > (int)$temp_point || $i_temp_point < 0) && $config['cf_use_p
|
||||
if ($od_temp_point)
|
||||
{
|
||||
if ($member['mb_point'] < $od_temp_point)
|
||||
alert('회원님의 포인트가 부족하여 포인트로 결제 할 수 없습니다.');
|
||||
alert('회원님의 포인트가 부족하여 포인트로 결제 할 수 없습니다.', $page_return_url);
|
||||
}
|
||||
|
||||
$i_price = $i_price + $i_send_cost + $i_send_cost2 - $i_temp_point - $i_send_coupon;
|
||||
@ -286,6 +293,9 @@ else if ($od_settle_case == "계좌이체")
|
||||
case 'lg':
|
||||
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
||||
break;
|
||||
case 'inicis':
|
||||
include G5_MSHOP_PATH.'/inicis/pay_result.php';
|
||||
break;
|
||||
default:
|
||||
include G5_MSHOP_PATH.'/kcp/pp_ax_hub.php';
|
||||
$bank_name = iconv("cp949", "utf-8", $bank_name);
|
||||
@ -310,6 +320,9 @@ else if ($od_settle_case == "가상계좌")
|
||||
case 'lg':
|
||||
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
||||
break;
|
||||
case 'inicis':
|
||||
include G5_MSHOP_PATH.'/inicis/pay_result.php';
|
||||
break;
|
||||
default:
|
||||
include G5_MSHOP_PATH.'/kcp/pp_ax_hub.php';
|
||||
$bankname = iconv("cp949", "utf-8", $bankname);
|
||||
@ -319,6 +332,7 @@ else if ($od_settle_case == "가상계좌")
|
||||
|
||||
$od_receipt_point = $i_temp_point;
|
||||
$od_tno = $tno;
|
||||
$od_app_no = $app_no;
|
||||
$od_receipt_price = 0;
|
||||
$od_bank_account = $bankname.' '.$account;
|
||||
$od_deposit_name = $depositor;
|
||||
@ -331,6 +345,9 @@ else if ($od_settle_case == "휴대폰")
|
||||
case 'lg':
|
||||
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
||||
break;
|
||||
case 'inicis':
|
||||
include G5_MSHOP_PATH.'/inicis/pay_result.php';
|
||||
break;
|
||||
default:
|
||||
include G5_MSHOP_PATH.'/kcp/pp_ax_hub.php';
|
||||
break;
|
||||
@ -352,6 +369,9 @@ else if ($od_settle_case == "신용카드")
|
||||
case 'lg':
|
||||
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
||||
break;
|
||||
case 'inicis':
|
||||
include G5_MSHOP_PATH.'/inicis/pay_result.php';
|
||||
break;
|
||||
default:
|
||||
include G5_MSHOP_PATH.'/kcp/pp_ax_hub.php';
|
||||
$card_name = iconv("cp949", "utf-8", $card_name);
|
||||
@ -382,6 +402,9 @@ if($tno) {
|
||||
case 'lg':
|
||||
include G5_SHOP_PATH.'/lg/xpay_cancel.php';
|
||||
break;
|
||||
case 'inicis':
|
||||
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
||||
break;
|
||||
default:
|
||||
include G5_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php';
|
||||
break;
|
||||
@ -498,6 +521,9 @@ if(!$result) {
|
||||
case 'lg':
|
||||
include G5_SHOP_PATH.'/lg/xpay_cancel.php';
|
||||
break;
|
||||
case 'inicis':
|
||||
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
||||
break;
|
||||
default:
|
||||
include G5_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php';
|
||||
break;
|
||||
@ -534,6 +560,9 @@ if(!$result) {
|
||||
case 'lg':
|
||||
include G5_SHOP_PATH.'/lg/xpay_cancel.php';
|
||||
break;
|
||||
case 'inicis':
|
||||
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
||||
break;
|
||||
default:
|
||||
include G5_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php';
|
||||
break;
|
||||
@ -687,6 +716,10 @@ if($config['cf_sms_use'] && ($default['de_sms_use2'] || $default['de_sms_use3'])
|
||||
$uid = md5($od_id.G5_TIME_YMDHIS.$REMOTE_ADDR);
|
||||
set_session('ss_orderview_uid', $uid);
|
||||
|
||||
// 주문 정보 임시 데이터 삭제
|
||||
$sql = " delete from {$g5['g5_shop_order_data_table']} where od_id = '$od_id' and dt_pg = '$od_pg' ";
|
||||
sql_query($sql);
|
||||
|
||||
// 주문번호제거
|
||||
set_session('ss_order_id', '');
|
||||
|
||||
|
||||
@ -332,6 +332,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'] == '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 {
|
||||
$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\');';
|
||||
}
|
||||
@ -349,6 +351,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'] == '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 {
|
||||
$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\');';
|
||||
}
|
||||
@ -410,6 +414,9 @@ 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'] == '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 {
|
||||
require_once G5_SHOP_PATH.'/settle_kcp.inc.php';
|
||||
|
||||
|
||||
@ -207,10 +207,61 @@ 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'] == 'inicis') { ?>
|
||||
var paymethod = "";
|
||||
var width = 330;
|
||||
var height = 480;
|
||||
var xpos = (screen.width - width) / 2;
|
||||
var ypos = (screen.width - height) / 2;
|
||||
var position = "top=" + ypos + ",left=" + xpos;
|
||||
var features = position + ", width=320, height=440";
|
||||
switch(settle_method) {
|
||||
case "계좌이체":
|
||||
paymethod = "bank";
|
||||
break;
|
||||
case "가상계좌":
|
||||
paymethod = "vbank";
|
||||
break;
|
||||
case "휴대폰":
|
||||
paymethod = "mobile";
|
||||
break;
|
||||
case "신용카드":
|
||||
paymethod = "wcard";
|
||||
break;
|
||||
}
|
||||
f.P_AMT.value = f.good_mny.value;
|
||||
f.P_UNAME.value = pf.pp_name.value;
|
||||
f.P_MOBILE.value = pf.pp_hp.value;
|
||||
f.P_EMAIL.value = pf.pp_email.value;
|
||||
<?php if($default['de_tax_flag_use']) { ?>
|
||||
f.P_TAX.value = pf.comm_vat_mny.value;
|
||||
f.P_TAXFREE = pf.comm_free_mny.value;
|
||||
<?php } ?>
|
||||
f.P_RETURN_URL.value = "<?php echo $return_url.$pp_id; ?>";
|
||||
f.action = "https://mobile.inicis.com/smart/" + paymethod + "/";
|
||||
<?php } ?>
|
||||
|
||||
var new_win = window.open("about:blank", "tar_opener", "scrollbars=yes,resizable=yes");
|
||||
f.target = "tar_opener";
|
||||
//var new_win = window.open("about:blank", "tar_opener", "scrollbars=yes,resizable=yes");
|
||||
//f.target = "tar_opener";
|
||||
|
||||
// 주문 정보 임시저장
|
||||
var order_data = $(pf).serialize();
|
||||
var save_result = "";
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
data: order_data,
|
||||
url: g5_url+"/shop/ajax.orderdatasave.php",
|
||||
cache: false,
|
||||
async: false,
|
||||
success: function(data) {
|
||||
save_result = data;
|
||||
}
|
||||
});
|
||||
|
||||
if(save_result) {
|
||||
alert(save_result);
|
||||
return false;
|
||||
}
|
||||
|
||||
f.submit();
|
||||
}
|
||||
|
||||
@ -2,22 +2,27 @@
|
||||
include_once('./_common.php');
|
||||
include_once(G5_LIB_PATH.'/mailer.lib.php');
|
||||
|
||||
$page_return_url = G5_SHOP_URL.'/personalpayform.php?pp_id='.get_session('ss_personalpay_id');
|
||||
|
||||
// 결제등록 완료 체크
|
||||
if($default['de_pg_service'] == 'kcp' && ($_POST['tran_cd'] == '' || $_POST['enc_info'] == '' || $_POST['enc_data'] == ''))
|
||||
alert('결제등록 요청 후 주문해 주십시오.');
|
||||
alert('결제등록 요청 후 주문해 주십시오.', $page_return_url);
|
||||
|
||||
if($default['de_pg_service'] == 'lg' && !$_POST['LGD_PAYKEY'])
|
||||
alert('결제등록 요청 후 주문해 주십시오.');
|
||||
alert('결제등록 요청 후 주문해 주십시오.', $page_return_url);
|
||||
|
||||
if($default['de_pg_service'] == 'inicis' && !$_POST['P_HASH'])
|
||||
alert('결제등록 요청 후 주문해 주십시오.', $page_return_url);
|
||||
|
||||
// 개인결제 정보
|
||||
$pp_check = false;
|
||||
$sql = " select * from {$g5['g5_shop_personalpay_table']} where pp_id = '{$_POST['pp_id']}' and pp_use = '1' ";
|
||||
$pp = sql_fetch($sql);
|
||||
if(!$pp['pp_id'])
|
||||
alert('개인결제 정보가 존재하지 않습니다.');
|
||||
alert('개인결제 정보가 존재하지 않습니다.', G5_SHOP_URL.'/personalpay.php');
|
||||
|
||||
if($pp['pp_tno'])
|
||||
alert('이미 결제하신 개인결제 내역입니다.');
|
||||
alert('이미 결제하신 개인결제 내역입니다.', G5_SHOP_URL);
|
||||
|
||||
$hash_data = md5($_POST['pp_id'].$_POST['good_mny'].$pp['pp_time']);
|
||||
if($_POST['pp_id'] != get_session('ss_personalpay_id') || $hash_data != get_session('ss_personalpay_hash'))
|
||||
@ -29,6 +34,9 @@ if ($pp_settle_case == "계좌이체")
|
||||
case 'lg':
|
||||
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
||||
break;
|
||||
case 'inicis':
|
||||
include G5_MSHOP_PATH.'/inicis/pay_result.php';
|
||||
break;
|
||||
default:
|
||||
include G5_MSHOP_PATH.'/kcp/pp_ax_hub.php';
|
||||
$bank_name = iconv("cp949", "utf-8", $bank_name);
|
||||
@ -48,6 +56,9 @@ else if ($pp_settle_case == "가상계좌")
|
||||
case 'lg':
|
||||
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
||||
break;
|
||||
case 'inicis':
|
||||
include G5_MSHOP_PATH.'/inicis/pay_result.php';
|
||||
break;
|
||||
default:
|
||||
include G5_MSHOP_PATH.'/kcp/pp_ax_hub.php';
|
||||
$bankname = iconv("cp949", "utf-8", $bankname);
|
||||
@ -56,6 +67,7 @@ else if ($pp_settle_case == "가상계좌")
|
||||
}
|
||||
|
||||
$pp_tno = $tno;
|
||||
$pp_app_no = $app_no;
|
||||
$pp_receipt_price = 0;
|
||||
$pp_bank_account = $bankname.' '.$account;
|
||||
$pp_deposit_name = $depositor;
|
||||
@ -67,6 +79,9 @@ else if ($pp_settle_case == "휴대폰")
|
||||
case 'lg':
|
||||
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
||||
break;
|
||||
case 'inicis':
|
||||
include G5_MSHOP_PATH.'/inicis/pay_result.php';
|
||||
break;
|
||||
default:
|
||||
include G5_MSHOP_PATH.'/kcp/pp_ax_hub.php';
|
||||
break;
|
||||
@ -84,6 +99,9 @@ else if ($pp_settle_case == "신용카드")
|
||||
case 'lg':
|
||||
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
||||
break;
|
||||
case 'inicis':
|
||||
include G5_MSHOP_PATH.'/inicis/pay_result.php';
|
||||
break;
|
||||
default:
|
||||
include G5_MSHOP_PATH.'/kcp/pp_ax_hub.php';
|
||||
$card_name = iconv("cp949", "utf-8", $card_name);
|
||||
@ -91,6 +109,7 @@ else if ($pp_settle_case == "신용카드")
|
||||
}
|
||||
|
||||
$pp_tno = $tno;
|
||||
$pp_app_no = $app_no;
|
||||
$pp_receipt_price = $amount;
|
||||
$pp_receipt_time = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3 \\4:\\5:\\6", $app_time);
|
||||
$pp_bank_account = $card_name;
|
||||
@ -139,6 +158,9 @@ if(!$result) {
|
||||
case 'lg':
|
||||
include G5_SHOP_PATH.'/lg/xpay_cancel.php';
|
||||
break;
|
||||
case 'inicis':
|
||||
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
||||
break;
|
||||
default:
|
||||
include G5_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php';
|
||||
break;
|
||||
@ -174,6 +196,9 @@ if($pp_receipt_price > 0 && $pp['pp_id'] && $pp['od_id']) {
|
||||
case 'lg':
|
||||
include G5_SHOP_PATH.'/lg/xpay_cancel.php';
|
||||
break;
|
||||
case 'inicis':
|
||||
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
||||
break;
|
||||
default:
|
||||
include G5_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php';
|
||||
break;
|
||||
@ -201,6 +226,10 @@ if($pp_receipt_price > 0 && $pp['pp_id'] && $pp['od_id']) {
|
||||
}
|
||||
}
|
||||
|
||||
// 주문 정보 임시 데이터 삭제
|
||||
$sql = " delete from {$g5['g5_shop_order_data_table']} where od_id = '{$pp['pp_id']}' and dt_pg = '$pp_pg' ";
|
||||
sql_query($sql);
|
||||
|
||||
// 개인결제번호제거
|
||||
set_session('ss_personalpay_id', '');
|
||||
set_session('ss_personalpay_hash', '');
|
||||
|
||||
@ -141,6 +141,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'] == '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 {
|
||||
$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\');';
|
||||
}
|
||||
@ -158,6 +160,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'] == '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 {
|
||||
$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\');';
|
||||
}
|
||||
@ -209,6 +213,9 @@ 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'] == '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 {
|
||||
require_once G5_SHOP_PATH.'/settle_kcp.inc.php';
|
||||
|
||||
|
||||
97
mobile/shop/settle_inicis.inc.php
Normal file
97
mobile/shop/settle_inicis.inc.php
Normal file
@ -0,0 +1,97 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// curl 체크
|
||||
if (!function_exists('curl_init')) {
|
||||
alert('cURL 모듈이 설치되어 있지 않습니다.\\n상점관리자에게 문의해 주십시오.');
|
||||
}
|
||||
|
||||
if ($default['de_card_test']) {
|
||||
if ($default['de_escrow_use'] == 1) {
|
||||
// 에스크로결제 테스트
|
||||
$default['de_inicis_mid'] = 'iniescrow0';
|
||||
$default['de_inicis_admin_key'] = '1111';
|
||||
}
|
||||
else {
|
||||
// 일반결제 테스트
|
||||
$default['de_inicis_mid'] = 'INIpayTest';
|
||||
$default['de_inicis_admin_key'] = '1111';
|
||||
}
|
||||
}
|
||||
else {
|
||||
$default['de_inicis_mid'] = "SIR".$default['de_inicis_mid'];
|
||||
|
||||
if ($default['de_escrow_use'] == 1) {
|
||||
// 에스크로결제 테스트
|
||||
$useescrow = '&useescrow=Y';
|
||||
}
|
||||
else {
|
||||
// 일반결제 테스트
|
||||
$useescrow = '';
|
||||
}
|
||||
}
|
||||
|
||||
$BANK_CODE = array(
|
||||
'03' => '기업은행',
|
||||
'04' => '국민은행',
|
||||
'05' => '외환은행',
|
||||
'07' => '수협중앙회',
|
||||
'11' => '농협중앙회',
|
||||
'20' => '우리은행',
|
||||
'23' => 'SC 제일은행',
|
||||
'31' => '대구은행',
|
||||
'32' => '부산은행',
|
||||
'34' => '광주은행',
|
||||
'37' => '전북은행',
|
||||
'39' => '경남은행',
|
||||
'53' => '한국씨티은행',
|
||||
'71' => '우체국',
|
||||
'81' => '하나은행',
|
||||
'88' => '신한은행',
|
||||
'D1' => '동양종합금융증권',
|
||||
'D2' => '현대증권',
|
||||
'D3' => '미래에셋증권',
|
||||
'D4' => '한국투자증권',
|
||||
'D5' => '우리투자증권',
|
||||
'D6' => '하이투자증권',
|
||||
'D7' => 'HMC 투자증권',
|
||||
'D8' => 'SK 증권',
|
||||
'D9' => '대신증권',
|
||||
'DA' => '하나대투증권',
|
||||
'DB' => '굿모닝신한증권',
|
||||
'DC' => '동부증권',
|
||||
'DD' => '유진투자증권',
|
||||
'DE' => '메리츠증권',
|
||||
'DF' => '신영증권'
|
||||
);
|
||||
|
||||
$CARD_CODE = array(
|
||||
'01' => '외환',
|
||||
'03' => '롯데',
|
||||
'04' => '현대',
|
||||
'06' => '국민',
|
||||
'11' => 'BC',
|
||||
'12' => '삼성',
|
||||
'14' => '신한',
|
||||
'15' => '한미',
|
||||
'16' => 'NH',
|
||||
'17' => '하나 SK',
|
||||
'21' => '해외비자',
|
||||
'22' => '해외마스터',
|
||||
'23' => 'JCB',
|
||||
'24' => '해외아멕스',
|
||||
'25' => '해외다이너스'
|
||||
);
|
||||
|
||||
$PAY_METHOD = array(
|
||||
'ISP' => '신용카드',
|
||||
'CARD' => '신용카드',
|
||||
'BANK' => '계좌이체',
|
||||
'MOBILE' => '휴대폰',
|
||||
'VBANK' => '가상계좌'
|
||||
);
|
||||
|
||||
$noti_url = G5_MSHOP_URL.'/inicis/settle_common.php';
|
||||
$next_url = G5_MSHOP_URL.'/inicis/pay_approval.php';
|
||||
$return_url = G5_MSHOP_URL.'/inicis/pay_return.php?oid=';
|
||||
?>
|
||||
@ -46,6 +46,23 @@ if(!sql_query(" select ct_select_time from {$g5['g5_shop_cart_table']} limit 1 "
|
||||
ADD `ct_select_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00' AFTER `ct_select` ", true);
|
||||
}
|
||||
|
||||
// 모바일 이니시스 계좌이체 결과 전달을 위한 테이블 추가
|
||||
if(!sql_query(" DESCRIBE {$g5['g5_shop_inicis_log_table']} ", false)) {
|
||||
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['g5_shop_inicis_log_table']}` (
|
||||
`oid` bigint(20) unsigned NOT NULL,
|
||||
`P_TID` varchar(255) NOT NULL DEFAULT '',
|
||||
`P_MID` varchar(255) NOT NULL DEFAULT '',
|
||||
`P_AUTH_DT` varchar(255) NOT NULL DEFAULT '',
|
||||
`P_STATUS` varchar(255) NOT NULL DEFAULT '',
|
||||
`P_TYPE` varchar(255) NOT NULL DEFAULT '',
|
||||
`P_OID` varchar(255) NOT NULL DEFAULT '',
|
||||
`P_FN_NM` varchar(255) NOT NULL DEFAULT '',
|
||||
`P_AMT` int(11) NOT NULL DEFAULT '0',
|
||||
`P_RMESG1` varchar(255) NOT NULL DEFAULT '',
|
||||
PRIMARY KEY (`oid`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ", true);
|
||||
}
|
||||
|
||||
// cart 테이블 index 추가
|
||||
if(!sql_fetch(" show keys from {$g5['g5_shop_cart_table']} where Key_name = 'ct_status' ")) {
|
||||
sql_query(" ALTER TABLE `{$g5['g5_shop_cart_table']}`
|
||||
@ -53,7 +70,18 @@ if(!sql_fetch(" show keys from {$g5['g5_shop_cart_table']} where Key_name = 'ct_
|
||||
ADD INDEX `ct_status` (`ct_status`) ", true);
|
||||
}
|
||||
|
||||
echo '<p>장바구니 테이블 업그레이드 완료!</p>';
|
||||
// 결제정보 임시저장 테이블 추가
|
||||
if(isset($g5['g5_shop_order_data_table']) && !sql_query(" DESCRIBE {$g5['g5_shop_order_data_table']} ", false)) {
|
||||
sql_query(" CREATE TABLE IF NOT EXISTS `{$g5['g5_shop_order_data_table']}` (
|
||||
`od_id` bigint(20) unsigned NOT NULL,
|
||||
`dt_pg` varchar(255) NOT NULL DEFAULT '',
|
||||
`dt_data` text NOT NULL,
|
||||
`dt_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
KEY `od_id` (`od_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;", true);
|
||||
}
|
||||
|
||||
echo '<p>테이블 업그레이드 완료!</p>';
|
||||
|
||||
include_once(G5_PATH.'/tail.sub.php');
|
||||
?>
|
||||
29
shop/ajax.orderdatasave.php
Normal file
29
shop/ajax.orderdatasave.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
if(empty($_POST))
|
||||
die('정보가 넘어오지 않았습니다.');
|
||||
|
||||
if(isset($_POST['pp_id']) && $_POST['pp_id'])
|
||||
$od_id = get_session('ss_personalpay_id');
|
||||
else
|
||||
$od_id = get_session('ss_order_id');
|
||||
|
||||
// 일정 기간이 경과된 임시 데이터 삭제
|
||||
$limit_time = date("Y-m-d H:i:s", (G5_SERVER_TIME - 86400 * 1));
|
||||
$sql = " delete from {$g5['g5_shop_order_data_table']} where dt_time < '$limit_time' ";
|
||||
sql_query($sql);
|
||||
|
||||
$_POST['sw_direct'] = get_session('ss_direct');
|
||||
|
||||
$dt_data = serialize($_POST);
|
||||
|
||||
$sql = " insert into {$g5['g5_shop_order_data_table']}
|
||||
set od_id = '$od_id',
|
||||
dt_pg = '{$default['de_pg_service']}',
|
||||
dt_data = '$dt_data',
|
||||
dt_time = '".G5_TIME_YMDHIS."' ";
|
||||
sql_query($sql);
|
||||
|
||||
die('');
|
||||
?>
|
||||
3
shop/inicis/_common.php
Normal file
3
shop/inicis/_common.php
Normal file
@ -0,0 +1,3 @@
|
||||
<?php
|
||||
include_once('../../common.php');
|
||||
?>
|
||||
65
shop/inicis/encryptdata.php
Normal file
65
shop/inicis/encryptdata.php
Normal file
@ -0,0 +1,65 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
include_once(G5_LIB_PATH.'/json.lib.php');
|
||||
include_once(G5_SHOP_PATH.'/settle_inicis.inc.php');
|
||||
|
||||
$price = trim($_POST['price']);
|
||||
|
||||
/**************************
|
||||
* 3. 암호화 대상/값 설정 *
|
||||
**************************/
|
||||
$inipay->SetField("type", "chkfake"); // 고정 (절대 수정 불가)
|
||||
$inipay->SetField("enctype","asym"); //asym:비대칭, symm:대칭(현재 asym으로 고정)
|
||||
/**************************************************************************************************
|
||||
* admin 은 키패스워드 변수명입니다. 수정하시면 안됩니다. 1111의 부분만 수정해서 사용하시기 바랍니다.
|
||||
* 키패스워드는 상점관리자 페이지(https://iniweb.inicis.com)의 비밀번호가 아닙니다. 주의해 주시기 바랍니다.
|
||||
* 키패스워드는 숫자 4자리로만 구성됩니다. 이 값은 키파일 발급시 결정됩니다.
|
||||
* 키패스워드 값을 확인하시려면 상점측에 발급된 키파일 안의 readme.txt 파일을 참조해 주십시오.
|
||||
**************************************************************************************************/
|
||||
$inipay->SetField("admin", $default['de_inicis_admin_key']); // 키패스워드(키발급시 생성, 상점관리자 패스워드와 상관없음)
|
||||
$inipay->SetField("checkopt", "false"); //base64함:false, base64안함:true(현재 false로 고정)
|
||||
|
||||
//필수항목 : mid, price, nointerest, quotabase
|
||||
//추가가능 : INIregno, oid
|
||||
//*주의* : 추가가능한 항목중 암호화 대상항목에 추가한 필드는 반드시 hidden 필드에선 제거하고
|
||||
// SESSION이나 DB를 이용해 다음페이지(INIsecureresult.php)로 전달/셋팅되어야 합니다.
|
||||
$inipay->SetField("mid", $default['de_inicis_mid']); // 상점아이디
|
||||
$inipay->SetField("price", $price); // 가격
|
||||
$inipay->SetField("nointerest", $inipay_nointerest); // 무이자여부(no:일반, yes:무이자)
|
||||
$inipay->SetField("quotabase", $inipay_quotabase);//할부기간
|
||||
|
||||
/********************************
|
||||
* 4. 암호화 대상/값을 암호화함 *
|
||||
********************************/
|
||||
$inipay->startAction();
|
||||
|
||||
/*********************
|
||||
* 5. 암호화 결과 *
|
||||
*********************/
|
||||
if( $inipay->GetResult("ResultCode") != "00" )
|
||||
{
|
||||
die('{"error":"'.$inipay->GetResult("ResultMsg").'"}');
|
||||
}
|
||||
|
||||
/*********************
|
||||
* 6. 세션정보 저장 *
|
||||
*********************/
|
||||
set_session('INI_MID', $default['de_inicis_mid']); //상점ID
|
||||
set_session('INI_ADMIN', $default['de_inicis_admin_key']); // 키패스워드(키발급시 생성, 상점관리자 패스워드와 상관없음)
|
||||
set_session('INI_PRICE', $price); //가격
|
||||
set_session('INI_RN', $inipay->GetResult("rn")); //고정 (절대 수정 불가)
|
||||
set_session('INI_ENCTYPE', $inipay->GetResult("enctype")); //고정 (절대 수정 불가)
|
||||
|
||||
$ini_encfield = $inipay->GetResult("encfield");
|
||||
$ini_certid = $inipay->GetResult("certid");
|
||||
|
||||
$result = array(
|
||||
'error' => '',
|
||||
'ini_encfield' => $ini_encfield,
|
||||
'ini_certid' => $ini_certid
|
||||
);
|
||||
|
||||
die(json_encode($result));
|
||||
|
||||
//die('{"error":"", "ini_encfield":"'.$ini_encfield.'", "ini_certid":"'.$ini_certid.'"}');
|
||||
?>
|
||||
115
shop/inicis/escrow.register.php
Normal file
115
shop/inicis/escrow.register.php
Normal file
@ -0,0 +1,115 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
if($od['od_pg'] != 'inicis') return;
|
||||
|
||||
include_once(G5_SHOP_PATH.'/settle_inicis.inc.php');
|
||||
|
||||
$oid = $od['od_id'];
|
||||
$EscrowType = 'I';
|
||||
$invoice = $escrow_numb;
|
||||
$dlv_charge = 'SH'; // 배송비 지급형태 (SH : 판매자부담, BH : 구매자부담)
|
||||
$sendName = iconv_euckr($od['od_name']);
|
||||
$sendPost = $od['od_zip1'].$od['od_zip2'];
|
||||
$sendAddr1 = iconv_euckr($od['od_addr1']);
|
||||
$sendAddr2 = iconv_euckr($od['od_addr2']);
|
||||
$sendTel = $od['od_tel'];
|
||||
$recvName = iconv_euckr($od['od_b_name']);
|
||||
$recvPost = $od['od_b_zip1'].$od['od_b_zip2'];
|
||||
$recvAddr = iconv_euckr($od['od_b_addr1'].($od['od_b_addr2'] ? ' ' : '').$od['od_b_addr2']);
|
||||
$recvTel = $od['od_b_tel'];
|
||||
$price = $od['od_receipt_price'];
|
||||
|
||||
// 택배회사 코드
|
||||
$exCode = array(
|
||||
'대한통운' => 'korex',
|
||||
'아주택배' => 'ajutb',
|
||||
'KT로지스' => 'ktlogistics',
|
||||
'현대택배' => 'hyundai',
|
||||
'CJ대한통운' => 'cjgls',
|
||||
'한진택배' => 'hanjin',
|
||||
'트라넷' => 'tranet',
|
||||
'하나로택배' => 'Hanaro',
|
||||
'사가와익스프레스' => 'Sagawa',
|
||||
'SEDEX' => 'sedex',
|
||||
'KGB택배' => 'kgbls',
|
||||
'로젠택배' => 'kgb',
|
||||
'KG옐로우캡택배' => 'yellow',
|
||||
'삼성HTH' => 'hth',
|
||||
'동부택배' => 'dongbu',
|
||||
'우체국' => 'EPOST',
|
||||
'우편등기' => 'registpost',
|
||||
'기타택배' => '9999'
|
||||
);
|
||||
|
||||
$dlv_exName = $escrow_corp;
|
||||
$dlv_exCode = $exCode[$dlv_exName];
|
||||
if(!$dlv_exCode)
|
||||
$dlv_exCode = '9999';
|
||||
|
||||
/*********************
|
||||
* 3. 지불 정보 설정 *
|
||||
*********************/
|
||||
$inipay->SetField("tid", $escrow_tno); // 거래아이디
|
||||
$inipay->SetField("mid", $default['de_inicis_mid']); // 상점아이디
|
||||
/**************************************************************************************************
|
||||
* admin 은 키패스워드 변수명입니다. 수정하시면 안됩니다. 1111의 부분만 수정해서 사용하시기 바랍니다.
|
||||
* 키패스워드는 상점관리자 페이지(https://iniweb.inicis.com)의 비밀번호가 아닙니다. 주의해 주시기 바랍니다.
|
||||
* 키패스워드는 숫자 4자리로만 구성됩니다. 이 값은 키파일 발급시 결정됩니다.
|
||||
* 키패스워드 값을 확인하시려면 상점측에 발급된 키파일 안의 readme.txt 파일을 참조해 주십시오.
|
||||
**************************************************************************************************/
|
||||
$inipay->SetField("admin", $default['de_inicis_admin_key']); // 키패스워드(상점아이디에 따라 변경)
|
||||
$inipay->SetField("type", "escrow"); // 고정 (절대 수정 불가)
|
||||
$inipay->SetField("escrowtype", "dlv"); // 고정 (절대 수정 불가)
|
||||
$inipay->SetField("dlv_ip", getenv("REMOTE_ADDR")); // 고정
|
||||
|
||||
$inipay->SetField("oid", $oid);
|
||||
$inipay->SetField("soid", "1");
|
||||
//$inipay->SetField("dlv_date", $dlv_date);
|
||||
//$inipay->SetField("dlv_time", $dlv_time);
|
||||
$inipay->SetField("dlv_report", $EscrowType);
|
||||
$inipay->SetField("dlv_invoice", $invoice);
|
||||
$inipay->SetField("dlv_name", $member['mb_id']);
|
||||
|
||||
$inipay->SetField("dlv_excode", $dlv_exCode);
|
||||
$inipay->SetField("dlv_exname", $dlv_exName);
|
||||
$inipay->SetField("dlv_charge", $dlv_charge);
|
||||
|
||||
$inipay->SetField("dlv_invoiceday", G5_TIME_YMDHIS);
|
||||
$inipay->SetField("dlv_sendname", $sendName);
|
||||
$inipay->SetField("dlv_sendpost", $sendPost);
|
||||
$inipay->SetField("dlv_sendaddr1", $sendAddr1);
|
||||
$inipay->SetField("dlv_sendaddr2", $sendAddr2);
|
||||
$inipay->SetField("dlv_sendtel", $sendTel);
|
||||
|
||||
$inipay->SetField("dlv_recvname", $recvName);
|
||||
$inipay->SetField("dlv_recvpost", $recvPost);
|
||||
$inipay->SetField("dlv_recvaddr", $recvAddr);
|
||||
$inipay->SetField("dlv_recvtel", $recvTel);
|
||||
|
||||
$inipay->SetField("dlv_goodscode", $goodsCode);
|
||||
$inipay->SetField("dlv_goods", $goods);
|
||||
$inipay->SetField("dlv_goodscnt", $goodCnt);
|
||||
$inipay->SetField("price", $price);
|
||||
$inipay->SetField("dlv_reserved1", $reserved1);
|
||||
$inipay->SetField("dlv_reserved2", $reserved2);
|
||||
$inipay->SetField("dlv_reserved3", $reserved3);
|
||||
|
||||
$inipay->SetField("pgn", $pgn);
|
||||
|
||||
/*********************
|
||||
* 3. 배송 등록 요청 *
|
||||
*********************/
|
||||
$inipay->startAction();
|
||||
|
||||
|
||||
/**********************
|
||||
* 4. 배송 등록 결과 *
|
||||
**********************/
|
||||
|
||||
$tid = $inipay->GetResult("tid"); // 거래번호
|
||||
$resultCode = $inipay->GetResult("ResultCode"); // 결과코드 ("00"이면 지불 성공)
|
||||
$resultMsg = $inipay->GetResult("ResultMsg"); // 결과내용 (지불결과에 대한 설명)
|
||||
$dlv_date = $inipay->GetResult("DLV_Date");
|
||||
$dlv_time = $inipay->GetResult("DLV_Time");
|
||||
?>
|
||||
29
shop/inicis/inipay_cancel.php
Normal file
29
shop/inicis/inipay_cancel.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
/*******************************************************************
|
||||
* 7. DB연동 실패 시 강제취소 *
|
||||
* *
|
||||
* 지불 결과를 DB 등에 저장하거나 기타 작업을 수행하다가 실패하는 *
|
||||
* 경우, 아래의 코드를 참조하여 이미 지불된 거래를 취소하는 코드를 *
|
||||
* 작성합니다. *
|
||||
*******************************************************************/
|
||||
|
||||
$cancelFlag = "true";
|
||||
|
||||
// $cancelFlag를 "ture"로 변경하는 condition 판단은 개별적으로
|
||||
// 수행하여 주십시오.
|
||||
|
||||
if($cancelFlag == "true")
|
||||
{
|
||||
$TID = $inipay->GetResult("TID");
|
||||
$inipay->SetField("type", "cancel"); // 고정
|
||||
$inipay->SetField("tid", $TID); // 고정
|
||||
$inipay->SetField("cancelmsg", "DB FAIL"); // 취소사유
|
||||
$inipay->startAction();
|
||||
if($inipay->GetResult('ResultCode') == "00")
|
||||
{
|
||||
$inipay->MakeTXErrMsg(MERCHANT_DB_ERR,"Merchant DB FAIL");
|
||||
}
|
||||
}
|
||||
?>
|
||||
216
shop/inicis/inipay_result.php
Normal file
216
shop/inicis/inipay_result.php
Normal file
@ -0,0 +1,216 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
/* INIsecureresult.php
|
||||
*
|
||||
* 이니페이 플러그인을 통해 요청된 지불을 처리한다.
|
||||
* 지불 요청을 처리한다.
|
||||
* 코드에 대한 자세한 설명은 매뉴얼을 참조하십시오.
|
||||
* <주의> 구매자의 세션을 반드시 체크하도록하여 부정거래를 방지하여 주십시요.
|
||||
*
|
||||
* http://www.inicis.com
|
||||
* Copyright (C) 2006 Inicis Co., Ltd. All rights reserved.
|
||||
*/
|
||||
|
||||
include_once(G5_SHOP_PATH.'/settle_inicis.inc.php');
|
||||
|
||||
/*********************
|
||||
* 3. 지불 정보 설정 *
|
||||
*********************/
|
||||
if($default['de_tax_flag_use']) { // 복합과세 사용 때
|
||||
$inipay->SetXPath("INIpay/GoodsInfo/Tax", $_POST['comm_vat_mny']); // 부가세 금액
|
||||
$inipay->SetXPath("INIpay/GoodsInfo/TaxFree", $_POST['comm_free_mny']); // 면세 금액
|
||||
}
|
||||
$inipay->SetField("type", "securepay"); // 고정 (절대 수정 불가)
|
||||
$inipay->SetField("pgid", "INIphp".$pgid); // 고정 (절대 수정 불가)
|
||||
$inipay->SetField("subpgip", "203.238.3.10"); // 고정 (절대 수정 불가)
|
||||
$inipay->SetField("admin", get_session('INI_ADMIN')); // 키패스워드(상점아이디에 따라 변경)
|
||||
$inipay->SetField("uid", $uid); // INIpay User ID (절대 수정 불가)
|
||||
$inipay->SetField("goodname", iconv_euckr($goodname)); // 상품명
|
||||
$inipay->SetField("currency", $currency); // 화폐단위
|
||||
|
||||
$inipay->SetField("mid", get_session('INI_MID')); // 상점아이디
|
||||
$inipay->SetField("rn", get_session('INI_RN')); // 웹페이지 위변조용 RN값
|
||||
$inipay->SetField("price", get_session('INI_PRICE')); // 가격
|
||||
$inipay->SetField("enctype", get_session('INI_ENCTYPE')); // 고정 (절대 수정 불가)
|
||||
|
||||
|
||||
/*----------------------------------------------------------------------------------------
|
||||
price 등의 중요데이터는
|
||||
브라우저상의 위변조여부를 반드시 확인하셔야 합니다.
|
||||
|
||||
결제 요청페이지에서 요청된 금액과
|
||||
실제 결제가 이루어질 금액을 반드시 비교하여 처리하십시오.
|
||||
|
||||
설치 메뉴얼 2장의 결제 처리페이지 작성부분의 보안경고 부분을 확인하시기 바랍니다.
|
||||
적용참조문서: 이니시스홈페이지->가맹점기술지원자료실->기타자료실 의
|
||||
'결제 처리 페이지 상에 결제 금액 변조 유무에 대한 체크' 문서를 참조하시기 바랍니다.
|
||||
예제)
|
||||
원 상품 가격 변수를 OriginalPrice 하고 원 가격 정보를 리턴하는 함수를 Return_OrgPrice()라 가정하면
|
||||
다음 같이 적용하여 원가격과 웹브라우저에서 Post되어 넘어온 가격을 비교 한다.
|
||||
|
||||
$OriginalPrice = Return_OrgPrice();
|
||||
$PostPrice = $_SESSION['INI_PRICE'];
|
||||
if ( $OriginalPrice != $PostPrice )
|
||||
{
|
||||
//결제 진행을 중단하고 금액 변경 가능성에 대한 메시지 출력 처리
|
||||
//처리 종료
|
||||
}
|
||||
|
||||
----------------------------------------------------------------------------------------*/
|
||||
$inipay->SetField("buyername", iconv_euckr($buyername)); // 구매자 명
|
||||
$inipay->SetField("buyertel", $buyertel); // 구매자 연락처(휴대폰 번호 또는 유선전화번호)
|
||||
$inipay->SetField("buyeremail", $buyeremail); // 구매자 이메일 주소
|
||||
$inipay->SetField("paymethod", $paymethod); // 지불방법 (절대 수정 불가)
|
||||
$inipay->SetField("encrypted", $encrypted); // 암호문
|
||||
$inipay->SetField("sessionkey", $sessionkey); // 암호문
|
||||
$inipay->SetField("url", G5_URL); // 실제 서비스되는 상점 SITE URL로 변경할것
|
||||
$inipay->SetField("cardcode", $cardcode); // 카드코드 리턴
|
||||
$inipay->SetField("parentemail", $parentemail); // 보호자 이메일 주소(핸드폰 , 전화결제시에 14세 미만의 고객이 결제하면 부모 이메일로 결제 내용통보 의무, 다른결제 수단 사용시에 삭제 가능)
|
||||
|
||||
/*-----------------------------------------------------------------*
|
||||
* 수취인 정보 * *
|
||||
*-----------------------------------------------------------------*
|
||||
* 실물배송을 하는 상점의 경우에 사용되는 필드들이며 *
|
||||
* 아래의 값들은 INIsecurepay.html 페이지에서 포스트 되도록 *
|
||||
* 필드를 만들어 주도록 하십시요. *
|
||||
* 컨텐츠 제공업체의 경우 삭제하셔도 무방합니다. *
|
||||
*-----------------------------------------------------------------*/
|
||||
$inipay->SetField("recvname", iconv_euckr($recvname)); // 수취인 명
|
||||
$inipay->SetField("recvtel", $recvtel); // 수취인 연락처
|
||||
$inipay->SetField("recvaddr", iconv_euckr($recvaddr)); // 수취인 주소
|
||||
$inipay->SetField("recvpostnum", $recvpostnum); // 수취인 우편번호
|
||||
$inipay->SetField("recvmsg", $recvmsg); // 전달 메세지
|
||||
|
||||
$inipay->SetField("joincard", $joincard); // 제휴카드코드
|
||||
$inipay->SetField("joinexpire", $joinexpire); // 제휴카드유효기간
|
||||
$inipay->SetField("id_customer", $id_customer); //user_id
|
||||
|
||||
|
||||
/****************
|
||||
* 4. 지불 요청 *
|
||||
****************/
|
||||
$inipay->startAction();
|
||||
|
||||
/****************************************************************************************************************
|
||||
* 5. 결제 결과
|
||||
*
|
||||
* 1 모든 결제 수단에 공통되는 결제 결과 데이터
|
||||
* 거래번호 : $inipay->GetResult('TID')
|
||||
* 결과코드 : $inipay->GetResult('ResultCode') ("00"이면 지불 성공)
|
||||
* 결과내용 : $inipay->GetResult('ResultMsg') (지불결과에 대한 설명)
|
||||
* 지불방법 : $inipay->GetResult('PayMethod') (매뉴얼 참조)
|
||||
* 상점주문번호 : $inipay->GetResult('MOID')
|
||||
* 결제완료금액 : $inipay->GetResult('TotPrice')
|
||||
*
|
||||
* 결제 되는 금액 =>원상품가격과 결제결과금액과 비교하여 금액이 동일하지 않다면
|
||||
* 결제 금액의 위변조가 의심됨으로 정상적인 처리가 되지않도록 처리 바랍니다. (해당 거래 취소 처리)
|
||||
*
|
||||
*
|
||||
* 2. 신용카드,ISP,핸드폰, 전화 결제, 은행계좌이체, OK CASH BAG Point 결제 결과 데이터
|
||||
* (무통장입금 , 문화 상품권 포함)
|
||||
* 이니시스 승인날짜 : $inipay->GetResult('ApplDate') (YYYYMMDD)
|
||||
* 이니시스 승인시각 : $inipay->GetResult('ApplTime') (HHMMSS)
|
||||
*
|
||||
* 3. 신용카드 결제 결과 데이터
|
||||
*
|
||||
* 신용카드 승인번호 : $inipay->GetResult('ApplNum')
|
||||
* 할부기간 : $inipay->GetResult('CARD_Quota')
|
||||
* 무이자할부 여부 : $inipay->GetResult('CARD_Interest') ("1"이면 무이자할부)
|
||||
* 신용카드사 코드 : $inipay->GetResult('CARD_Code') (매뉴얼 참조)
|
||||
* 카드발급사 코드 : $inipay->GetResult('CARD_BankCode') (매뉴얼 참조)
|
||||
* 본인인증 수행여부 : $inipay->GetResult('CARD_AuthType') ("00"이면 수행)
|
||||
* 각종 이벤트 적용 여부 : $inipay->GetResult('EventCode')
|
||||
*
|
||||
* ** 달러결제 시 통화코드와 환률 정보 **
|
||||
* 해당 통화코드 : $inipay->GetResult('OrgCurrency')
|
||||
* 환율 : $inipay->GetResult('ExchangeRate')
|
||||
*
|
||||
* 아래는 "신용카드 및 OK CASH BAG 복합결제" 또는"신용카드 지불시에 OK CASH BAG적립"시에 추가되는 데이터
|
||||
* OK Cashbag 적립 승인번호 : $inipay->GetResult('OCB_SaveApplNum')
|
||||
* OK Cashbag 사용 승인번호 : $inipay->GetResult('OCB_PayApplNum')
|
||||
* OK Cashbag 승인일시 : $inipay->GetResult('OCB_ApplDate') (YYYYMMDDHHMMSS)
|
||||
* OCB 카드번호 : $inipay->GetResult('OCB_Num')
|
||||
* OK Cashbag 복합결재시 신용카드 지불금액 : $inipay->GetResult('CARD_ApplPrice')
|
||||
* OK Cashbag 복합결재시 포인트 지불금액 : $inipay->GetResult('OCB_PayPrice')
|
||||
*
|
||||
* 4. 실시간 계좌이체 결제 결과 데이터
|
||||
*
|
||||
* 은행코드 : $inipay->GetResult('ACCT_BankCode')
|
||||
* 현금영수증 발행결과코드 : $inipay->GetResult('CSHR_ResultCode')
|
||||
* 현금영수증 발행구분코드 : $inipay->GetResult('CSHR_Type')
|
||||
* *
|
||||
* 5. OK CASH BAG 결제수단을 이용시에만 결제 결과 데이터
|
||||
* OK Cashbag 적립 승인번호 : $inipay->GetResult('OCB_SaveApplNum')
|
||||
* OK Cashbag 사용 승인번호 : $inipay->GetResult('OCB_PayApplNum')
|
||||
* OK Cashbag 승인일시 : $inipay->GetResult('OCB_ApplDate') (YYYYMMDDHHMMSS)
|
||||
* OCB 카드번호 : $inipay->GetResult('OCB_Num')
|
||||
*
|
||||
* 6. 무통장 입금 결제 결과 데이터 *
|
||||
* 가상계좌 채번에 사용된 주민번호 : $inipay->GetResult('VACT_RegNum') *
|
||||
* 가상계좌 번호 : $inipay->GetResult('VACT_Num') *
|
||||
* 입금할 은행 코드 : $inipay->GetResult('VACT_BankCode') *
|
||||
* 입금예정일 : $inipay->GetResult('VACT_Date') (YYYYMMDD) *
|
||||
* 송금자 명 : $inipay->GetResult('VACT_InputName') *
|
||||
* 예금주 명 : $inipay->GetResult('VACT_Name') *
|
||||
* *
|
||||
* 7. 핸드폰, 전화 결제 결과 데이터( "실패 내역 자세히 보기"에서 필요 , 상점에서는 필요없는 정보임) *
|
||||
* 전화결제 사업자 코드 : $inipay->GetResult('HPP_GWCode') *
|
||||
* *
|
||||
* 8. 핸드폰 결제 결과 데이터 *
|
||||
* 휴대폰 번호 : $inipay->GetResult('HPP_Num') (핸드폰 결제에 사용된 휴대폰번호) *
|
||||
* *
|
||||
* 9. 전화 결제 결과 데이터 *
|
||||
* 전화번호 : $inipay->GetResult('ARSB_Num') (전화결제에 사용된 전화번호) *
|
||||
* *
|
||||
* 10. 문화 상품권 결제 결과 데이터 *
|
||||
* 컬쳐 랜드 ID : $inipay->GetResult('CULT_UserID') *
|
||||
* *
|
||||
* 11. K-merce 상품권 결제 결과 데이터 (K-merce ID, 틴캐시 아이디 공통사용) *
|
||||
* K-merce ID : $inipay->GetResult('CULT_UserID') *
|
||||
* *
|
||||
* 12. 모든 결제 수단에 대해 결제 실패시에만 결제 결과 데이터 *
|
||||
* 에러코드 : $inipay->GetResult('ResultErrorCode') *
|
||||
* *
|
||||
* 13.현금영수증 발급 결과코드 (은행계좌이체시에만 리턴) *
|
||||
* $inipay->GetResult('CSHR_ResultCode') *
|
||||
* *
|
||||
* 14.틴캐시 잔액 데이터 *
|
||||
* $inipay->GetResult('TEEN_Remains') *
|
||||
* 틴캐시 ID : $inipay->GetResult('CULT_UserID') *
|
||||
* 15.게임문화 상품권 *
|
||||
* 사용 카드 갯수 : $inipay->GetResult('GAMG_Cnt') *
|
||||
* *
|
||||
****************************************************************************************************************/
|
||||
|
||||
if( $inipay->GetResult("ResultCode") == "00" ) {
|
||||
//최종결제요청 결과 성공 DB처리
|
||||
$tno = $inipay->GetResult('TID');
|
||||
$amount = $inipay->GetResult('TotPrice');
|
||||
$app_time = $inipay->GetResult('ApplDate').$inipay->GetResult('ApplTime');
|
||||
$pay_method = $inipay->GetResult('PayMethod');
|
||||
$pay_type = $PAY_METHOD[$pay_method];
|
||||
$depositor = iconv_utf8($inipay->GetResult('VACT_InputName'));
|
||||
$commid = '';
|
||||
$mobile_no = $inipay->GetResult('HPP_Num');
|
||||
$app_no = $inipay->GetResult('ApplNum');
|
||||
$card_name = $CARD_CODE[$inipay->GetResult('CARD_Code')];
|
||||
if ($default['de_escrow_use'] == 1)
|
||||
$escw_yn = 'Y';
|
||||
switch($pay_type) {
|
||||
case '계좌이체':
|
||||
$bank_name = $BANK_CODE[$inipay->GetResult('ACCT_BankCode')];
|
||||
break;
|
||||
case '가상계좌':
|
||||
$bankname = $BANK_CODE[$inipay->GetResult('VACT_BankCode')];
|
||||
$account = $inipay->GetResult('VACT_Num').' '.iconv_utf8($inipay->GetResult('VACT_Name'));
|
||||
$app_no = $inipay->GetResult('VACT_Num');
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
} else {
|
||||
alert(iconv_utf8($inipay->GetResult("ResultMsg")).' 코드 : '.$inipay->GetResult("ResultCode"));
|
||||
}
|
||||
|
||||
?>
|
||||
1
shop/inicis/key/INIpayTest/keypass.enc
Normal file
1
shop/inicis/key/INIpayTest/keypass.enc
Normal file
@ -0,0 +1 @@
|
||||
pm/4rSNJdLw=
|
||||
16
shop/inicis/key/INIpayTest/mcert.pem
Normal file
16
shop/inicis/key/INIpayTest/mcert.pem
Normal file
@ -0,0 +1,16 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICmzCCAgQCAQAwDQYJKoZIhvcNAQEEBQAwgZUxCzAJBgNVBAYTAktSMRUwEwYD
|
||||
VQQIDAzrjIDtlZzrr7zqta0xDTALBgNVBAcTBG51bGwxGjAYBgNVBAoMESjso7wp
|
||||
7J2064uI7Iuc7IqkMQswCQYDVQQLEwJFQzETMBEGA1UEAxMKSU5JcGF5VGVzdDEi
|
||||
MCAGCgmSJomT8ixkAQMUEmx5dGFrNzFAaW5pY2lzLmNvbTAeFw0wNDAzMTUxMDAx
|
||||
MjNaFw0wNTAzMTUxMDAxMjNaMIGVMQswCQYDVQQGEwJLUjEVMBMGA1UECAwM64yA
|
||||
7ZWc66+86rWtMQ0wCwYDVQQHEwRudWxsMRowGAYDVQQKDBEo7KO8KeydtOuLiOyL
|
||||
nOyKpDELMAkGA1UECxMCRUMxEzARBgNVBAMTCklOSXBheVRlc3QxIjAgBgoJkiaJ
|
||||
k/IsZAEDFBJseXRhazcxQGluaWNpcy5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0A
|
||||
MIGJAoGBAP6a/WaRyDMxHDgKHtahbZTnv+cayR0b052y2sCAGdgMc6CK0GxyvudV
|
||||
KR7mltKhexur/ikaPKXXApK+SlXUvwNS7pdQ13BTNCeLlEg0WLjGoVi9n96AcjR/
|
||||
QqlmkFaVAQQe9X95uwAcCoIrkErrpFJNPhppTXfsPH8YpzegogPnAgMBAAEwDQYJ
|
||||
KoZIhvcNAQEEBQADgYEAvmKuNAD7oPxOfRxj1EyBrKt2YdrhzMTvZXz7IIGCeKf0
|
||||
tsAKiuxuh20i6zWbD4N+twZvDYG23DFBsLb5Iw3pft5RK9OOVZJ8+ChAaDFHBa4a
|
||||
RzLDmsdD9NsF7UfYb0KXFUnZMTW5ZKirWUq21MdQiqVNhuLs0zy2hAqABBwhICk=
|
||||
-----END CERTIFICATE-----
|
||||
18
shop/inicis/key/INIpayTest/mpriv.pem
Normal file
18
shop/inicis/key/INIpayTest/mpriv.pem
Normal file
@ -0,0 +1,18 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
Proc-Type: 4,ENCRYPTED
|
||||
DEK-Info: DES-EDE3-CBC,1E6B60D94624128F
|
||||
|
||||
+9VjCYsbhvQIrQVWRmTV1dBc3HpHbjDrnwEu8znuxO9dgN7ZKKahSOo/iZv9tzWr
|
||||
SpEnbaGiRivO7/jTfJxgcy7wqjV+jYiwpBzL640JdOditUMoIxx3Rzxq+Dheuz13
|
||||
1dwt6f3d11zzXjIA5eQQXf1dBTjNCrxhAHqtHccWc5eP1QScQA+KdDAT+vQ6qTVq
|
||||
aZOI+7BkfWt5YMYBienXwEZSK5ZJ0GU91xSwDApIwsq7E7JGBExPIXGJeZ/RDAVN
|
||||
sKuO5Ny0JBNJN2Lym39Nb9lF0sKAedMiQNfaEnRqG37fh4H1ONo9NTYilENCIrg6
|
||||
tgYw/G9FrY8UvNLBsdUEUSV3bSqlRXZxP2TcPPrpYVbYZ1CQAH3fhVjAo9dpSNeI
|
||||
KuGv3x+JAkuJ+SjhANUU+ChOm27tF7scUxDTfwzTGfyB3P1UFHDwf0nWMU5cuJRY
|
||||
1+DLxEVL9FaZmonf5SZdf14Ln8a0cVdm+5rujFpFecSaw9K6gNFUvu6qF6CLx9/O
|
||||
UgcL90Ga+EvMG1iWyCFGvbr53r4i776JG+rVergIcgT5winvYpKiOS9AOV5NXPPI
|
||||
ev5PCXmDbnalmK6IrgrV0bAJD3d+NcN9JGFSx+GYKlw4OTrz/hxxuojPW6em4cfi
|
||||
mEIl5JIiLoC2BqM+Jcs8UMq0TOS8Pcki4O05H9Juws5nh6+d5d2p2BcvkXc+SWF7
|
||||
ClfjMZDaniMzPZr1dQj5XFZwptN6jATYL/4u1CpXYKi3N6TwHbOtQD/2l4e+DNPR
|
||||
JsSAW8ftyLAK0QJUTLhvA9Np9pzmO4hE7LfeRKBKpoU2PwKyXoO+PA==
|
||||
-----END RSA PRIVATE KEY-----
|
||||
10
shop/inicis/key/INIpayTest/readme.txt
Normal file
10
shop/inicis/key/INIpayTest/readme.txt
Normal file
@ -0,0 +1,10 @@
|
||||
Ű <20><><EFBFBD><EFBFBD> 3<><33> - mcert.pem, mpriv.pem, keypass.enc - <20><>
|
||||
"key/{<7B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̵<EFBFBD>}/" <20><> <20><><EFBFBD><EFBFBD><EFBFBD>Ͻ<EFBFBD> <20><> <20><><EFBFBD>α<CEB1> <20>ҽ<EFBFBD><D2BD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ݿ<EFBFBD><DDBF>Ͻʽÿ<CABD>(<28><EFBFBD><DEB4><EFBFBD> <20><><EFBFBD><EFBFBD>).
|
||||
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̵<EFBFBD> : INIpayTest
|
||||
Ű<EFBFBD>н<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> : 1111
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ <20>н<EFBFBD><D0BD><EFBFBD><EFBFBD><EFBFBD> : 1111
|
||||
|
||||
<EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ʈ<EFBFBD><C6AE> https://iniweb.inicis.com<6F≯<EFBFBD>,
|
||||
<EFBFBD>α<EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>̵<EFBFBD><CCB5><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>̵<EFBFBD><CCB5>Դϴ<D4B4>.
|
||||
1
shop/inicis/key/iniescrow0/keypass.enc
Normal file
1
shop/inicis/key/iniescrow0/keypass.enc
Normal file
@ -0,0 +1 @@
|
||||
pm/4rSNJdLw=
|
||||
17
shop/inicis/key/iniescrow0/mcert.pem
Normal file
17
shop/inicis/key/iniescrow0/mcert.pem
Normal file
@ -0,0 +1,17 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICnTCCAgYCAQAwDQYJKoZIhvcNAQEEBQAwgZYxCzAJBgNVBAYTAktSMRUwEwYD
|
||||
VQQIDAzrjIDtlZzrr7zqta0xDTALBgNVBAcTBG51bGwxGjAYBgNVBAoMESjso7wp
|
||||
7J2064uI7Iuc7IqkMQswCQYDVQQLEwJFQzETMBEGA1UEAxMKaW5pZXNjcm93MDEj
|
||||
MCEGCgmSJomT8ixkAQMUE2RkYWVtaXJpQGluaWNpcy5jb20wHhcNMDgwMTE2MDQ0
|
||||
MTU1WhcNMDkwMTE1MDQ0MTU1WjCBljELMAkGA1UEBhMCS1IxFTATBgNVBAgMDOuM
|
||||
gO2VnOuvvOq1rTENMAsGA1UEBxMEbnVsbDEaMBgGA1UECgwRKOyjvCnsnbTri4js
|
||||
i5zsiqQxCzAJBgNVBAsTAkVDMRMwEQYDVQQDEwppbmllc2Nyb3cwMSMwIQYKCZIm
|
||||
iZPyLGQBAxQTZGRhZW1pcmlAaW5pY2lzLmNvbTCBnzANBgkqhkiG9w0BAQEFAAOB
|
||||
jQAwgYkCgYEAxElWzHNgDFZpwNvPGbWtA0PKTDPfeP1r7xE/k2n2XMzBFQFxbjSC
|
||||
EBKbQzFRVbNJv4Jyon/OzlywSR3A1DYMm5Oy9Vh3OOrH2FiYxMXClp7MynnmFEug
|
||||
ysHuYOHlMnoEfI5k8h9hIXlYbRFDLdY7IxVzqkaYJ37HX01Apuxo8sUCAwEAATAN
|
||||
BgkqhkiG9w0BAQQFAAOBgQCPrVeBW8+anq3CORMYU5TX1tfrYeCzLFH2hkDJF0Rr
|
||||
1xWxgjhdFZxtBtYSbxr3UKFe6/EWrlv7k37LoM8ORYcNZun+Rd1jz5xwTOjLBTsd
|
||||
UGwgUpgBLB1z9GoZgaeJJOm7BFUE0Jp7laI0zWkpWeova2RUT1PODnQMvRNi2d88
|
||||
vQ==
|
||||
-----END CERTIFICATE-----
|
||||
18
shop/inicis/key/iniescrow0/mpriv.pem
Normal file
18
shop/inicis/key/iniescrow0/mpriv.pem
Normal file
@ -0,0 +1,18 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
Proc-Type: 4,ENCRYPTED
|
||||
DEK-Info: DES-EDE3-CBC,FBB268FC75417BD4
|
||||
|
||||
G4/3WRZg/9peL3ym0S2LsTWvFkSCT/Co+qcCeKBunQ1UPH/pVyQjW0oxtmjBpBfp
|
||||
YFNJmc5mEhwV30uKXLEYP6bhpHKlLDQWv926+UBIkSZ4cOkm9JNZUETlb+tlSgIN
|
||||
i5l5KLaX198rGlQAEYX+TxTaxlfXxoBiXkoqxs64Jn0RApy1SPTXKjLffXHP2Yk5
|
||||
q3jOZ4z4REdnmkH5NYuRHz6cyRr4XdmvPFMwBpzOL08go6yToYfYRvyO4hf2T1Kl
|
||||
ug1ws6e1HNSm1t3PrZP2kj1oIQef80/DQf9eu1mOP0VQD1GlQSydt2+kAdEBba4d
|
||||
FIlpO3oGCbCB1UhBOBCllFlXvd4sqj1inZhHS/g9R0vAwAPVpsssXYnWL2qnb+zj
|
||||
gfSyk+ao56sOBIwhyFXX9IdLcFKMGVQDrxZhDxVieStwk9iVK4zGZW+clS+TzFY7
|
||||
8qPDP53vXenumSnVq11Mj5gKwJzy40wGm61bQR1B5ldJJW7978Njahh0T0ZCxu48
|
||||
n5H0FbVu9wrILehWxEI5IrXAAGbRYDlurSSvHtOX1qL0WvJa4EQD9De3u8kqD3Yx
|
||||
soKJqII277UQBpPuyyE+eP1F+7i4cQdfCU31sK1LMz/wiJxRrG1CiOpV1FH22ABy
|
||||
vxAh1gpTRgYHvNVWG37P9rYbrW2UcM4cjhbgOzTLhrThxteAgosaXWowc/lcobSB
|
||||
G444RQXVPZEetqt2In2kBr7UmE2WuvM0CrC6sD336K2t0q/5HLPLntGozdadZ4F5
|
||||
OS8Oi8I9Ygiqwz95JSUaOfETGZ6RpGRJXL9ysimBeEDuQmQ2lxtkZA==
|
||||
-----END RSA PRIVATE KEY-----
|
||||
19
shop/inicis/key/iniescrow0/readme.txt
Normal file
19
shop/inicis/key/iniescrow0/readme.txt
Normal file
@ -0,0 +1,19 @@
|
||||
|
||||
please read this README.TXT file
|
||||
|
||||
ZIP file contains following 3 files.
|
||||
- mcert.pem
|
||||
- mpriv.pem
|
||||
- keypass.enc
|
||||
|
||||
Copy these 3 files to directory [key/iniescrow0].
|
||||
|
||||
Merchant ID : iniescrow0
|
||||
Key Password : 1111
|
||||
Admin Password: 1111
|
||||
|
||||
please visit https://iniweb.inicis.com
|
||||
for your Merchant Administration.
|
||||
This site provides your payment transaction details and account details by calculation period.
|
||||
|
||||
You can also log on this site using your Merchant ID(iniescrow0).
|
||||
1
shop/inicis/key/keypass.enc
Normal file
1
shop/inicis/key/keypass.enc
Normal file
@ -0,0 +1 @@
|
||||
pm/4rSNJdLw=
|
||||
17
shop/inicis/key/mcert.pem
Normal file
17
shop/inicis/key/mcert.pem
Normal file
@ -0,0 +1,17 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIICtDCCAhwCAQAwDQYJKoZIhvcNAQEEBQAwgaExCzAJBgNVBAYTAktSMRUwEwYD
|
||||
VQQIDAzrjIDtlZzrr7zqta0xDTALBgNVBAcTBG51bGwxJTAjBgNVBAoMHFNL7Luk
|
||||
666k64uI7LyA7J207IWY7KaIKOyjvCkxCzAJBgNVBAsTAkVDMRMwEQYDVQQDEwpD
|
||||
eXdvcmxkMDE0MSMwIQYKCZImiZPyLGQBAxQTc3VuZ21vY2tAaW5pY2lzLmNvbTAe
|
||||
Fw0wNzExMTIwNjExMzBaFw0wODExMTEwNjExMzBaMIGhMQswCQYDVQQGEwJLUjEV
|
||||
MBMGA1UECAwM64yA7ZWc66+86rWtMQ0wCwYDVQQHEwRudWxsMSUwIwYDVQQKDBxT
|
||||
S+y7pOuupOuLiOy8gOydtOyFmOymiCjso7wpMQswCQYDVQQLEwJFQzETMBEGA1UE
|
||||
AxMKQ3l3b3JsZDAxNDEjMCEGCgmSJomT8ixkAQMUE3N1bmdtb2NrQGluaWNpcy5j
|
||||
b20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAV0zuTBHq1SZWArRHCNz1jlU
|
||||
WUyTK3Gv6BGq3J6Tly/o6g51Nbjcu2TYMXLIhMgsqDPeJzOnXbSvnh3FWgAMcFm/
|
||||
EZEs9oKw+jkiPfIEeSc7KZThqDm1oG4FgJZrXim6Y3jlLLaW1h0WyapCV2u60759
|
||||
LX8YzmmFmUuXGZOb5s7DAgMBAAEwDQYJKoZIhvcNAQEEBQADgYIAAN4AumokztkK
|
||||
z5UBScG4Ccvu3nwcuFlCqzDUm9xnZyfy96RIjTJjVelkLwk6NFPqbDEyDLmHm6fe
|
||||
Zus+fvZBKQAyHigfuS/RVitcup52OkWCZerbcWsziX8Pzqb/MHu19Elt+y/QYe5x
|
||||
ysyIsZn47Bp+7kbQtlMjJecXGEFfmoi1
|
||||
-----END CERTIFICATE-----
|
||||
18
shop/inicis/key/mpriv.pem
Normal file
18
shop/inicis/key/mpriv.pem
Normal file
@ -0,0 +1,18 @@
|
||||
-----BEGIN RSA PRIVATE KEY-----
|
||||
Proc-Type: 4,ENCRYPTED
|
||||
DEK-Info: DES-EDE3-CBC,6B92FB59B7AB8A00
|
||||
|
||||
NSplji6yUKrk1LXAid9TcBIOSkA+oE+5b52s7GaebioGsGSMIW7RrK8VHWlTOpxs
|
||||
GnFkTNg3ALZucdhYiAdm6vzaGmmJogoPnmpevs2JIDl3rkgcQH0AVU6nkKg9EcuP
|
||||
QP/2DknfqzNO46fTMjUIRSrJ7AauDz6836Mm3GVNl7cA42ecM7xHSVK3ZvCvpTrJ
|
||||
A9ik1zWZbzCIKg/mgMJkHu8xO8K9GKQAY1OM0KxK+oqS/Txmi6RplCHlrTAR+Ahb
|
||||
J3W8vG3tCu6orlczvPYEnB0a1E/dycDPziBFm6nVAk8cb+yPbZnl/Nqfu6nvPsSx
|
||||
iJYJR9YZ6L5i/IIhBc8tjNWeDB1KLsXZY41B//D/pjr9nfFUcJex8uPpOA0+GnGz
|
||||
EhDT8j/WMylgAxKKIYjFqE7HnMQ+n+ZZqLKO6JLdu3HHNz0QC7nz/SZtEMw/of4e
|
||||
1DlFHDTLTg0vJxwuLSBHVQN3H7SiFbxc/U5UmZEEVPprwbS9m0ok9JmBdfCv8iqu
|
||||
vuJiYc3HCdJaTRu0U3fJM33yr//BrZxXw0RjABePprcQDf590Vws8tygc/L5voF6
|
||||
lw8JYXuWKuRn4soNKwhrLL9YvQ0FNy1ITS2MpKGNYRPp5l3YCKO19y1dLMwrA33k
|
||||
SL1laFxrXLDaaE7MJZ8VD9hIymnn0aivtJHelW9DNoWJdI/DgTNKRhgT2TWBqR09
|
||||
VVCCKF3RLAQMvOFq/49A68px8/xHKxd6pYis/l8BONlZBMYRyIgjZ0IU81pmvHm+
|
||||
8UphsgRGx1ZvNtP0ApnTMF9DdpPN6vkxmpDWTe93HWJTp3TV1wyZPA==
|
||||
-----END RSA PRIVATE KEY-----
|
||||
21
shop/inicis/key/pgcert.pem
Normal file
21
shop/inicis/key/pgcert.pem
Normal file
@ -0,0 +1,21 @@
|
||||
-----BEGIN CERTIFICATE-----
|
||||
MIIDcTCCAtqgAwIBAgIBHjANBgkqhkiG9w0BAQQFADCBiDELMAkGA1UEBhMCS1Ix
|
||||
DjAMBgNVBAgTBVNlb3VsMRgwFgYDVQQKEw9JbmljaXMgQ28sIEx0ZC4xDzANBgNV
|
||||
BAsTBklOSXBheTEfMB0GA1UEAxMWSU5JcGF5IFBheW1lbnQgR2F0ZXdheTEdMBsG
|
||||
CSqGSIb3DQEJARYOZGV2QGluaWNpcy5jb20wHhcNMDcwOTA2MDYxNTI0WhcNMTcw
|
||||
OTAzMDYxNTI0WjCBiDELMAkGA1UEBhMCS1IxDjAMBgNVBAgTBVNlb3VsMRgwFgYD
|
||||
VQQKEw9JbmljaXMgQ28sIEx0ZC4xDzANBgNVBAsTBklOSXBheTEfMB0GA1UEAxMW
|
||||
SU5JcGF5IFBheW1lbnQgR2F0ZXdheTEdMBsGCSqGSIb3DQEJARYOZGV2QGluaWNp
|
||||
cy5jb20wgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAOC8v1rxqoo7tonq7t4d
|
||||
c3FVfIlLyA9ku+l9+d5pUQrbiUXDe8NoJZnoSyud4WhOUrN2ZpzNmjGxuPquYrT/
|
||||
LkXoR+ib9OAhFBp7izstjHEA+oUNTVO24MRRvOHWWaLrCeTNX9PeaZl9ploojyHc
|
||||
Uxm5/gIlPEojiaWNc3HVnb55AgMBAAGjgegwgeUwHQYDVR0OBBYEFGgqMfJUMSUQ
|
||||
pjyGnurepI+NUf6JMIG1BgNVHSMEga0wgaqAFGgqMfJUMSUQpjyGnurepI+NUf6J
|
||||
oYGOpIGLMIGIMQswCQYDVQQGEwJLUjEOMAwGA1UECBMFU2VvdWwxGDAWBgNVBAoT
|
||||
D0luaWNpcyBDbywgTHRkLjEPMA0GA1UECxMGSU5JcGF5MR8wHQYDVQQDExZJTklw
|
||||
YXkgUGF5bWVudCBHYXRld2F5MR0wGwYJKoZIhvcNAQkBFg5kZXZAaW5pY2lzLmNv
|
||||
bYIBHjAMBgNVHRMEBTADAQH/MA0GCSqGSIb3DQEBBAUAA4GBANUj8vYzU2Q9pebQ
|
||||
yX+6U9e36DeO/+15iDgU2PRK63uPaEa6vMqN2ibI8twolZB2t2oqIRgO44Hf3Nyf
|
||||
1XKNzCP1eRF1XreGOnrPZtJ5UeUs3RNBqvQkIAdSW80jkXw0i/7i95BYxRIJWSIE
|
||||
2fLjemy6r8gAQgWRAPv32F0xwRRT
|
||||
-----END CERTIFICATE-----
|
||||
19
shop/inicis/key/readme.txt
Normal file
19
shop/inicis/key/readme.txt
Normal file
@ -0,0 +1,19 @@
|
||||
|
||||
please read this README.TXT file
|
||||
|
||||
ZIP file contains following 3 files.
|
||||
- mcert.pem
|
||||
- mpriv.pem
|
||||
- keypass.enc
|
||||
|
||||
Copy these 3 files to directory [key/Cyworld014].
|
||||
|
||||
Merchant ID : Cyworld014
|
||||
Key Password : 1111
|
||||
Admin Password: 1111
|
||||
|
||||
please visit https://iniweb.inicis.com
|
||||
for your Merchant Administration.
|
||||
This site provides your payment transaction details and account details by calculation period.
|
||||
|
||||
You can also log on this site using your Merchant ID(Cyworld014).
|
||||
BIN
shop/inicis/key/rndseed.binary
Normal file
BIN
shop/inicis/key/rndseed.binary
Normal file
Binary file not shown.
1339
shop/inicis/libs/INICls.php
Normal file
1339
shop/inicis/libs/INICls.php
Normal file
File diff suppressed because it is too large
Load Diff
671
shop/inicis/libs/INIDFN.php
Normal file
671
shop/inicis/libs/INIDFN.php
Normal file
@ -0,0 +1,671 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Copyright (C) 2007 INICIS Inc.
|
||||
*
|
||||
* <20>ش<EFBFBD> <20><><EFBFBD>̺귯<CCBA><EAB7AF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ǿ<C7BE><EEBCAD> <20>ȵ˴ϴ<CBB4>.
|
||||
* <20><><EFBFBD>Ƿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ڵ忡 <20><><EFBFBD><EFBFBD> å<><C3A5><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ڿ<EFBFBD><DABF><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>˷<EFBFBD><CBB7>帳<EFBFBD>ϴ<EFBFBD>.
|
||||
*
|
||||
* @version 5.0
|
||||
* @author ddaemiri
|
||||
*
|
||||
* @buildno 5000
|
||||
* @date 2007.12.27
|
||||
* @note first release
|
||||
*
|
||||
* @buildno 5001
|
||||
* @date 2008.01.15
|
||||
* @note <09><>ü<EFBFBD><C3BC><EFBFBD><EFBFBD>ũ<EFBFBD><C5A9> <20>߰<EFBFBD>, DNS Lookup Timeout <20>߰<EFBFBD>, DNS Lookup <20><><EFBFBD>н<EFBFBD> socket close<73><65><EFBFBD>ϴ<EFBFBD> <20>κ<EFBFBD> <20>߰<EFBFBD>
|
||||
* @date 2008.01.16
|
||||
* @note Encrypt,Decrypt <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>, pkcs5 padding <20>߰<EFBFBD>
|
||||
* @date 2008.01.24
|
||||
* @note non block connect immediate return check code/str
|
||||
* @date 2008.02.11
|
||||
* @note key load <20><> read<61><64><EFBFBD><EFBFBD><EFBFBD><EFBFBD><DFBB><EFBFBD> fclose <20>߰<EFBFBD>
|
||||
* @date 2008.03.03
|
||||
* @note <09><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>(passing by reference) <20><><EFBFBD><EFBFBD>
|
||||
* @date 2008.03.11
|
||||
* @note <09><><EFBFBD><EFBFBD>ũ<EFBFBD><C5A9> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Cmd <20>߰<EFBFBD>
|
||||
* @date 2008.03.12
|
||||
* @note <09><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> IP<49><50> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
* @buildno 5002
|
||||
* @note <09><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD> Sign<67>߰<EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>->5001<30><31> <20><><EFBFBD><EFBFBD><EFBFBD>ҽ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>,<2C><EFBFBD><D7B7><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ó<EFBFBD><C3B3><EFBFBD><EFBFBD> <20><>)
|
||||
* @date 2008.03.12
|
||||
* @buildno 5016
|
||||
* @note pg1ip, pg2ip <20>߰<EFBFBD>/<2F><><EFBFBD><EFBFBD> <20><><EFBFBD>ŷ<EFBFBD><C5B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> drpg<70><67> <20><><EFBFBD>õ<EFBFBD>
|
||||
* @date 2008.04.02
|
||||
* @buildno 5017
|
||||
* @note 1)chkfake<6B><65> <20>Ķ<EFBFBD><C4B6><EFBFBD><EFBFBD><EFBFBD> <20>α<EFBFBD> <20><><EFBFBD><EFBFBD>(<28>ߺ<EFBFBD>)
|
||||
* 2)call-time pass-by-reference => pass-by-value<75><65> <20><><EFBFBD><EFBFBD>
|
||||
* @date 2009.01.12
|
||||
* @buildno 5019
|
||||
* @note delete UIP
|
||||
* @date 2009.01.21
|
||||
* @note add mkey/mergelog ( for Makeshop )
|
||||
* @date 2009.02.24
|
||||
* @note 1)define MKEY deprecated 2009.02.19 ( Makeshop <20>ʱ<EFBFBD> <20>ѹ<EFBFBD><D1B9><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD>ǰ<F1BDBAB5> <20>ִ<EFBFBD><D6B4><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>)
|
||||
* 2)Makeshop PG Updrade<64><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>γ<EFBFBD><CEB3><EFBFBD> 2009.02.19 (interface<63><65><EFBFBD><EFBFBD> mkey<65><79><EFBFBD><EFBFBD> <20><EFBFBD> ó<><C3B3><EFBFBD>ϰ<EFBFBD> <20><><EFBFBD><EFBFBD>)
|
||||
* 3)Makeshop PG Updrade<64><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>γ<EFBFBD><CEB3><EFBFBD> 2009.02.24 (interface<63><65><EFBFBD><EFBFBD> mergelog<6F><67><EFBFBD><EFBFBD> <20><EFBFBD> ó<><C3B3><EFBFBD>ϰ<EFBFBD> <20><><EFBFBD><EFBFBD>)
|
||||
* @date 2009.05.07
|
||||
* @note add BUILDDATE in TXVersion
|
||||
* @date 2009.08.05
|
||||
* @buildno 5030
|
||||
* @note add vacct refund
|
||||
* @date 2009.12.16
|
||||
* @buildno 5030
|
||||
* @note add recv info
|
||||
* @date 2010.07.14
|
||||
* @note add Tax, TaxFree info(TX_TAX, TX_TAXFREE)
|
||||
* @date 2010.09.09
|
||||
* @note <09><><EFBFBD>ҿ<EFBFBD>û<EFBFBD><C3BB> PG <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>->IP, INILib.php)
|
||||
* @note BUILDDATE update(100414 -> 100909)
|
||||
* @note 2011.05.23 5030 XML ELEMENT <20><> ROOT <20><> ROOTINFO<46><4F> <20><><EFBFBD><EFBFBD>
|
||||
* @buildno 5032
|
||||
* @note 2012.07.09 <09>ŷ<EFBFBD><C5B7><EFBFBD>ȸ <20>߰<EFBFBD> (TYPE_INQUIRY)
|
||||
* @note 2012.07.09 PHP ini <20><><EFBFBD><EFBFBD> error display setting <20>߰<EFBFBD>
|
||||
* @buildno 5036
|
||||
* @note 2014.12.09 add gather parameter tid, type
|
||||
*/
|
||||
ini_set('error_reporting', E_ALL ^ E_NOTICE);
|
||||
ini_set('display_errors', 'Off');
|
||||
|
||||
/* GLOBAL */
|
||||
define("PROGRAM", "INIPHP");
|
||||
define("LANG", "PHP");
|
||||
define("VERSION", "5036");
|
||||
define("BUILDDATE", "141209");
|
||||
define("TID_LEN", 40);
|
||||
define("MAX_KEY_LEN", 24);
|
||||
define("MAX_IV_LEN", 8);
|
||||
|
||||
/* TIMEOUT */
|
||||
define("TIMEOUT_CONNECT", 5);
|
||||
define("TIMEOUT_WRITE", 2);
|
||||
define("TIMEOUT_READ", 20);
|
||||
define("G_TIMEOUT_CONNECT", 2);
|
||||
define("DNS_LOOKUP_TIMEOUT", 5);
|
||||
|
||||
/* LOG LEVEL */
|
||||
define("CRITICAL", 1);
|
||||
define("ERROR", 2);
|
||||
define("NOTICE", 3);
|
||||
define("INFO", 5);
|
||||
define("DEBUG", 7);
|
||||
|
||||
/* SERVER INFO */
|
||||
define("PG_HOST", "pg.inicis.com");
|
||||
define("DRPG_HOST", "drpg.inicis.com");
|
||||
define("PG_IP", "203.238.37.3");
|
||||
define("DRPG_IP", "211.219.96.180");
|
||||
define("PG_PORT", 34049);
|
||||
define("G_SERVER", "gthr.inicis.com");
|
||||
define("G_CGI", "/cgi-bin/g.cgi");
|
||||
define("G_PORT", 80);
|
||||
|
||||
define("OK", "0");
|
||||
|
||||
define("IV", "Initiative Tech");
|
||||
define("IMHK", "SFBQSU5JTkZPUk1BVElPTg==");
|
||||
define("IMHV", "SU5JQ0lTIENJUEhFUi4uLg==");
|
||||
define("IMJK", "UkVHSVNUX05PX1JDNEtFWQ==");
|
||||
define("IMJV", "UkVHSVNUX05PX1JDNElW");
|
||||
|
||||
//define for mkey
|
||||
//deprecated 2009.02.19 ( Makeshop <20>ʱ<EFBFBD> <20>ѹ<EFBFBD><D1B9><EFBFBD><EFBFBD><EFBFBD>. <20><><EFBFBD>ǰ<F1BDBAB5> <20>ִ<EFBFBD><D6B4><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>)
|
||||
//Makeshop PG Updrade<64><65><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD>γ<EFBFBD><CEB3><EFBFBD> 2009.02.19 (interface<63><65><EFBFBD><EFBFBD> mkey<65><79><EFBFBD><EFBFBD> <20><EFBFBD> ó<><C3B3><EFBFBD>ϰ<EFBFBD> <20><><EFBFBD><EFBFBD>)
|
||||
//define("MKEY", 1);
|
||||
//non block connect immediate return check code/str
|
||||
define("ERRSTR_INPROGRESS", "Operation now in progress");
|
||||
define("ERRCODE_INPROGRESS_LINUX", 115);
|
||||
define("ERRCODE_INPROGRESS_FREEBSD", 36);
|
||||
define("ERRCODE_INPROGRESS_WIN", 10035);
|
||||
|
||||
//------------------------------------------------------
|
||||
// IFD Header
|
||||
//------------------------------------------------------
|
||||
define("MSGHEADER_LEN", 150);
|
||||
define("BODY_LEN", 5);
|
||||
define("TAIL_LEN", 5);
|
||||
define("FLGCRYPTO_LEN", 1);
|
||||
define("FLGSIGN_LEN", 5);
|
||||
define("MPUBSN_LEN", 20);
|
||||
define("PIPGPUBSN_LEN", 20);
|
||||
define("TXPGPUBSN_LEN", 20);
|
||||
define("CMD_LEN", 4);
|
||||
define("MID_LEN", 10);
|
||||
define("TOTPRICE_LEN", 20);
|
||||
define("TID_LEN", 40);
|
||||
|
||||
|
||||
//------------------------------------------------------
|
||||
// IFD CMD
|
||||
//------------------------------------------------------
|
||||
define("CMD_REQ_PAY", "0200");
|
||||
define("CMD_RES_PAY", "0210");
|
||||
define("CMD_REQ_CAP", "0300");
|
||||
define("CMD_RES_CAP", "0310");
|
||||
define("CMD_REQ_CAN", "0420");
|
||||
define("CMD_RES_CAN", "0430");
|
||||
define("CMD_REQ_NETC", "0520");
|
||||
define("CMD_RES_NETC", "0530");
|
||||
define("CMD_REQ_PRTC", "0620");
|
||||
define("CMD_RES_PRTC", "0630");
|
||||
define("CMD_REQ_ACK", "0800");
|
||||
define("CMD_RES_ACK", "0810");
|
||||
//<2F><>ü<EFBFBD><C3BC><EFBFBD><EFBFBD>ũ<EFBFBD><C5A9>
|
||||
//added 2008.01.08
|
||||
define("CMD_REQ_DLV", "3020"); //<2F><><EFBFBD>۵<EFBFBD><DBB5><EFBFBD>
|
||||
define("CMD_REQ_CNF", "3030"); //<2F><><EFBFBD><EFBFBD>Ȯ<EFBFBD><C8AE>
|
||||
define("CMD_REQ_DNY", "3040"); //<2F><><EFBFBD>Ű<EFBFBD><C5B0><EFBFBD>
|
||||
define("CMD_REQ_DNY_CNF", "3080"); //<2F><><EFBFBD><EFBFBD>Ȯ<EFBFBD><C8AE>
|
||||
define("CMD_REQ_DLV_NETC", "3520"); //<2F><><EFBFBD>۵<EFBFBD><DBB5>ϸ<EFBFBD><CFB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
define("CMD_REQ_CNF_NETC", "3530"); //<2F><><EFBFBD><EFBFBD>Ȯ<EFBFBD>θ<EFBFBD><CEB8><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
define("CMD_REQ_DNY_NETC", "3540"); //<2F><><EFBFBD>Ű<EFBFBD><C5B0><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȯ<EFBFBD><C8AF>(09.08.05)
|
||||
define("CMD_REQ_RFD", "0421");
|
||||
define("CMD_RES_RFD", "0431");
|
||||
|
||||
//<2F>ŷ<EFBFBD><C5B7><EFBFBD>ȸ(12.04.20)
|
||||
define("CMS_REQ_INQR", "0900");
|
||||
define("CMS_RES_INQR", "0910");
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(14.03.06)
|
||||
define("CMS_REQ_OPEN_SUB", "1040");
|
||||
define("CMS_RES_OPEN_SUB", "1041");
|
||||
|
||||
//------------------------------------------------------
|
||||
// HEADER FLAGS
|
||||
//------------------------------------------------------
|
||||
define("FLAG_TEST", "T");
|
||||
define("FLAG_REAL", "R");
|
||||
define("FLAG_CRYPTO_NONE", "N");
|
||||
define("FLAG_CRYPTO_SEED", "S");
|
||||
define("FLAG_CRYPTO_RC4", "R");
|
||||
define("FLAG_CRYPTO_3DES", "D");
|
||||
define("FLAG_SIGN_SHA", "SHA");
|
||||
define("FLAG_SIGN_SHA1", "SHA1");
|
||||
define("FLAG_SIGN_MD5", "MD5");
|
||||
|
||||
//------------------------------------------------------
|
||||
//TYPE(<28><><EFBFBD><EFBFBD>)
|
||||
//------------------------------------------------------
|
||||
define("TYPE_SECUREPAY", "securepay");
|
||||
define("TYPE_CANCEL", "cancel");
|
||||
define("TYPE_FORMPAY", "formpay");
|
||||
define("TYPE_RECEIPT", "receipt");
|
||||
define("TYPE_REPAY", "repay");
|
||||
define("TYPE_ESCROW", "escrow"); //<2F><>ü<EFBFBD><C3BC><EFBFBD><EFBFBD>ũ<EFBFBD><C5A9>!
|
||||
define("TYPE_CONFIRM", "confirm");
|
||||
define("TYPE_OCBQUERY", "ocbquery");
|
||||
define("TYPE_OCBSAVE", "ocbsave");
|
||||
define("TYPE_OCBPOINT", "OCBPoint");
|
||||
define("TYPE_AUTH", "auth");
|
||||
define("TYPE_AUTHBILL", "auth_bill");
|
||||
define("TYPE_CAPTURE", "capture");
|
||||
define("TYPE_CMS", "CMS");
|
||||
define("TYPE_VBANK", "VBank");
|
||||
define("TYPE_REQREALBILL", "reqrealbill");
|
||||
define("TYPE_FORMAUTH", "formauth");
|
||||
define("TYPE_CHKFAKE", "chkfake");
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȯ<EFBFBD><C8AF>(09.08.05)
|
||||
define("TYPE_REFUND", "refund");
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ºκ<C2BA>ȯ<EFBFBD><C8AF>(12.06.05)
|
||||
define("TYPE_VACCTREPAY", "vacctrepay");
|
||||
//<2F>ŷ<EFBFBD><C5B7><EFBFBD>ȸ(12.04.20)
|
||||
define("TYPE_INQUIRY", "inquiry");
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(14.03.06)
|
||||
define("TYPE_OPENSUB", "opensub");
|
||||
//------------------------------------------------------
|
||||
//EscrowType(<28><>ü<EFBFBD><C3BC><EFBFBD><EFBFBD>ũ<EFBFBD><C5A9> Ÿ<><C5B8>)
|
||||
//added 2008.01.08
|
||||
//------------------------------------------------------
|
||||
define("TYPE_ESCROW_DLV", "dlv");
|
||||
define("TYPE_ESCROW_CNF", "confirm"); //<2F><><EFBFBD><EFBFBD>Ȯ<EFBFBD><C8AE>/<2F><><EFBFBD><EFBFBD>(<28>÷<EFBFBD><C3B7><EFBFBD><EFBFBD><EFBFBD>)
|
||||
define("TYPE_ESCROW_DNY", "deny"); //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> ó<><C3B3><EFBFBD><EFBFBD>,<2C>ǹ̾<C7B9><CCBE><EFBFBD>
|
||||
define("TYPE_ESCROW_DNY_CNF", "dcnf");
|
||||
|
||||
|
||||
//------------------------------------------------------
|
||||
//PayMethod(<28><><EFBFBD><EFBFBD>, TX)
|
||||
//------------------------------------------------------
|
||||
define("NM_TX_ISP", "VCard");
|
||||
define("NM_TX_CARD", "Card");
|
||||
define("NM_TX_HPP", "HPP");
|
||||
define("NM_TX_ACCT", "DirectBank");
|
||||
define("NM_TX_VACT", "VBank");
|
||||
define("NM_TX_OCB", "OCBPoint");
|
||||
define("NM_TX_CSHR", "CASH");
|
||||
define("NM_TX_ARSB", "Ars1588Bill");
|
||||
define("NM_TX_PHNB", "PhoneBill");
|
||||
define("NM_TX_CULT", "Culture");
|
||||
define("NM_TX_GAMG", "DGCL");
|
||||
define("NM_TX_EDUG", "EDCL");
|
||||
define("NM_TX_TEEN", "TEEN");
|
||||
define("NM_TX_ESCR", "Escrow");
|
||||
|
||||
//------------------------------------------------------
|
||||
//PayMethod(<28><><EFBFBD><EFBFBD>, PG)
|
||||
//------------------------------------------------------
|
||||
define("NM_ISP", "ISP");
|
||||
define("NM_CARD", "CARD");
|
||||
define("NM_HPP", "HPP");
|
||||
define("NM_ACCT", "ACCT");
|
||||
define("NM_VACT", "VACT");
|
||||
define("NM_OCB", "OCB");
|
||||
define("NM_CSHR", "CASH");
|
||||
define("NM_ARSB", "ARSB");
|
||||
define("NM_PHNB", "PHNB");
|
||||
define("NM_CULT", "CULT");
|
||||
define("NM_GAMG", "DGCL");
|
||||
define("NM_EDUG", "EDCL");
|
||||
define("NM_TEEN", "TEEN");
|
||||
define("NM_ESCR", "Escrow");
|
||||
|
||||
//------------------------------------------------------
|
||||
//Charset
|
||||
//------------------------------------------------------
|
||||
define("EUCKR", "EUC-KR");
|
||||
define("UTF8", "UTF-8");
|
||||
|
||||
//------------------------------------------------------
|
||||
//URL Encoding/Decoding Name
|
||||
//------------------------------------------------------
|
||||
define("URLENCODE", "urlencode");
|
||||
define("URLDECODE", "urldecode");
|
||||
|
||||
//------------------------------------------------------
|
||||
//<2F><>û<EFBFBD><C3BB><EFBFBD><EFBFBD>
|
||||
//------------------------------------------------------
|
||||
define("TX_GOOSCNT", "GoodsCnt");
|
||||
define("TX_MOID", "MOID");
|
||||
define("TX_CURRENCY", "Currency");
|
||||
define("TX_SMID", "SMID");
|
||||
define("TX_GOODSCNTS", "GoodsCnts");
|
||||
define("TX_GOODSNAME", "GoodsName");
|
||||
define("TX_GOODSPRICE", "GoodsPrice");
|
||||
define("TX_BUYERNAME", "BuyerName");
|
||||
define("TX_BUYEREMAIL", "BuyerEmail");
|
||||
define("TX_BUYERTEL", "BuyerTel");
|
||||
define("TX_PARENTEMAIL", "ParentEmail");
|
||||
define("TX_RECVNAME", "RecvName");
|
||||
define("TX_RECVTEL", "RecvTel");
|
||||
define("TX_RECVMSG", "RecvMsg");
|
||||
define("TX_RECVADDR", "RecvAddr");
|
||||
define("TX_RECVPOSTNUM", "RecvPostNum");
|
||||
define("TX_TAXFREE", "TaxFree");
|
||||
define("TX_TAX", "Tax");
|
||||
//PaymentInfo
|
||||
define("TX_PAYMETHOD", "PayMethod");
|
||||
define("TX_JOINCARD", "JoinCard");
|
||||
define("TX_JOINEXPIRE", "JoinExpire");
|
||||
define("TX_MAILORDER", "MailOrder");
|
||||
define("TX_SESSIONKEY", "SessionKey");
|
||||
define("TX_ENCRYPTED", "Encrypted");
|
||||
//ReservedInfo
|
||||
define("TX_MRESERVED1", "MReserved1");
|
||||
define("TX_MRESERVED2", "MReserved2");
|
||||
define("TX_MRESERVED3", "MReserved3");
|
||||
//ManageInfo
|
||||
define("TX_LANGUAGE", "Language");
|
||||
define("TX_URL", "URL");
|
||||
define("TX_TXVERSION", "TXVersion");
|
||||
define("TX_TXUSERIP", "TXUserIP");
|
||||
define("TX_TXUSERID", "TXUserID");
|
||||
define("TX_TXREGNUM", "TXRegNum");
|
||||
define("TX_ACK", "Ack");
|
||||
define("TX_RN", "TXRN");
|
||||
//CancelInfo
|
||||
define("TX_CANCELTID", "CancelTID");
|
||||
define("TX_CANCELMSG", "CancelMsg");
|
||||
define("TX_CANCELREASON", "CancelReason"); //2012-10-19 <20><><EFBFBD>һ<EFBFBD><D2BB><EFBFBD><EFBFBD>ڵ<EFBFBD> <20>߰<EFBFBD>
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȯ<EFBFBD><C8AF>(09.08.05)
|
||||
define("TX_REFUNDACCTNUM", "RefundAcctNum");
|
||||
define("TX_REFUNDBANKCODE", "RefundBankCode");
|
||||
define("TX_REFUNDACCTNAME", "RefundAcctName");
|
||||
//PartCancelInfo
|
||||
define("TX_PRTC_TID", "PRTC_TID");
|
||||
define("TX_PRTC_PRICE", "PRTC_Price");
|
||||
define("TX_PRTC_REMAINS", "PRTC_Remains");
|
||||
define("TX_PRTC_QUOTA", "PRTC_Quota");
|
||||
define("TX_PRTC_INTEREST", "PRTC_Interest");
|
||||
define("TX_PRTC_TAX", "Tax");
|
||||
define("TX_PRTC_TAXFREE", "TaxFree");
|
||||
|
||||
define("TX_PRTC_CURRENCY", "Currency");
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> I<><49><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ü <20>κ<EFBFBD><CEBA><EFBFBD><EFBFBD>ҽ<EFBFBD> <20><><EFBFBD>¹<EFBFBD>ȣ/<2F><><EFBFBD><EFBFBD><EFBFBD>ּ<EFBFBD><D6BC><EFBFBD><EFBFBD>߰<EFBFBD> 2011-10-06
|
||||
define("TX_PRTC_NOACCT", "PRTC_NoAcctFNBC");
|
||||
define("TX_PRTC_NMACCT", "PRTC_NmAcctFNBC");
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>κ<EFBFBD>ȯ<EFBFBD><C8AF> <20><><EFBFBD><EFBFBD> <20>߰<EFBFBD>
|
||||
define("TX_PRTC_REFUNDFLGREMIT", "PRTC_RefundFlgRemit");
|
||||
define("TX_PRTC_REFUNDBANKCODE", "PRTC_RefundBankCode");
|
||||
//CaptureInfo
|
||||
define("TX_CAPTURETID", "CaptureTID");
|
||||
//<2F><><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD><EFBFBD><EFBFBD>
|
||||
define("TX_CSHR_APPLPRICE", "CSHR_ApplPrice");
|
||||
define("TX_CSHR_SUPPLYPRICE", "CSHR_SupplyPrice");
|
||||
define("TX_CSHR_TAX", "CSHR_Tax");
|
||||
define("TX_CSHR_SERVICEPRICE", "CSHR_ServicePrice");
|
||||
define("TX_CSHR_REGNUM", "CSHR_RegNum");
|
||||
define("TX_CSHR_TYPE", "CSHR_Type");
|
||||
define("TX_CSHR_COMPANYNUM", "CSHR_CompanyNum");
|
||||
define("TX_CSHR_OPENMARKET", "CSHR_OpenMarket");
|
||||
define("TX_CSHR_SUBCNT", "CSHR_SubCnt");
|
||||
define("TX_CSHR_SUBCOMPANYNAME1", "CSHR_SubCompanyName1");
|
||||
define("TX_CSHR_SUBCOMPANYNUM1", "CSHR_SubCompanyNum1");
|
||||
define("TX_CSHR_SUBREGNUM1", "CSHR_SubRegNum1");
|
||||
define("TX_CSHR_SUBMID1", "CSHR_SubMID1");
|
||||
define("TX_CSHR_SUBAPPLPRICE1", "CSHR_SubApplPrice1");
|
||||
define("TX_CSHR_SUBSERVICEPRICE1", "CSHR_SubServicePrice1");
|
||||
//<2F>ŷ<EFBFBD><C5B7><EFBFBD>ȸ(12.04.20)
|
||||
define("TX_INQR_TID", "INQR_TID");
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(14.03.06)
|
||||
define("TX_OPENREG_TID", "OrgTID");
|
||||
define("TX_OPENREG_MID", "MID");
|
||||
define("TX_OPENREG_SUBCNT", "SubCnt");
|
||||
define("TX_OPENREG_SUBGOODS", "SubGoods");
|
||||
define("TX_OPENREG_SUBCOMPNO", "SubCompNo");
|
||||
define("TX_OPENREG_SUBCOMPNM", "SubCompNm");
|
||||
define("TX_OPENREG_SUBPRSUPPLY", "SubPrSupply");
|
||||
define("TX_OPENREG_SUBPRFREE", "SubPrFree");
|
||||
define("TX_OPENREG_SUBPRTAX", "SubPrTax");
|
||||
define("TX_OPENREG_SUBPRSERVICE", "SubPrService");
|
||||
define("TX_OPENREG_SUBPRICE", "SubPrice");
|
||||
|
||||
//------------------------------------------------------
|
||||
//
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
//
|
||||
//------------------------------------------------------
|
||||
//HEAD
|
||||
define("NM_MID", "MID");
|
||||
define("NM_TID", "TID");
|
||||
define("NM_TOTPRICE", "TotPrice");
|
||||
|
||||
//BODY
|
||||
define("NM_GOODSCNT", "GoodsCnt");
|
||||
define("NM_MOID", "MOID");
|
||||
define("NM_CURRENCY", "Currency");
|
||||
define("NM_SMID", "SMID");
|
||||
define("NM_GOODSNAME", "GoodsName");
|
||||
define("NM_GOODSPRICE", "GoodsPrice");
|
||||
define("NM_PAYMETHOD", "PayMethod");
|
||||
define("NM_RESULTCODE", "ResultCode");
|
||||
define("NM_RESULTERRORCODE", "ResultErrorCode");
|
||||
define("NM_RESULTMSG", "ResultMsg");
|
||||
define("NM_SESSIONKEY", "SessionKey");
|
||||
define("NM_ENCRYPTED", "Encrypted");
|
||||
define("NM_CANCELDATE", "CancelDate");
|
||||
define("NM_CANCELTIME", "CancelTime");
|
||||
define("NM_EVENTCODE", "EventCode");
|
||||
define("NM_ORGCURRENCY", "OrgCurrency");
|
||||
define("NM_ORGPRICE", "OrgPrice");
|
||||
define("NM_EXCHANGERATE", "ExchangeRate");
|
||||
define("NM_RESERVEDINFO", "ReservedInfo");
|
||||
define("NM_MRESERVED1", "MReserved1");
|
||||
define("NM_MRESERVED2", "MReserved2");
|
||||
define("NM_MRESERVED3", "MReserved3");
|
||||
define("PRTC_TID", "PRTC_TID");
|
||||
define("PRTC_PRICE", "PRTC_Price");
|
||||
define("PRTC_REMAINS", "PRTC_Remains");
|
||||
define("PRTC_QUOTA", "PRTC_Quota");
|
||||
define("PRTC_INTEREST", "PRTC_Interest");
|
||||
define("PRTC_TYPE", "PRTC_Type");
|
||||
define("PRTC_CNT", "PRTC_Cnt");
|
||||
define("NM_CAPTUREDATE", "CaptureDate");
|
||||
define("NM_CAPTURETIME", "CaptureTime");
|
||||
|
||||
define("NM_PGPUBKEY", "PGcertKey");
|
||||
|
||||
//RECV DATA XPATH
|
||||
//XML XPATH
|
||||
define("ROOTINFO", "INIpay");
|
||||
define("GOODSINFO", "GoodsInfo");
|
||||
define("GOODS", "Goods");
|
||||
define("BUYERINFO", "BuyerInfo");
|
||||
define("PAYMENTINFO", "PaymentInfo");
|
||||
define("PAYMENT", "Payment");
|
||||
define("MANAGEINFO", "ManageInfo");
|
||||
define("RESERVEDINFO", "ReservedInfo");
|
||||
//Cancel(NetCancel)
|
||||
define("CANCELINFO", "CancelInfo");
|
||||
//PartCancel Encrypt
|
||||
define("PARTCANCELINFO", "PartCancelInfo");
|
||||
//Capture
|
||||
define("CAPTUREINFO", "CaptureInfo");
|
||||
//<2F>ŷ<EFBFBD><C5B7><EFBFBD>ȸ(12.04.20)
|
||||
define("INQUIRYINFO", "InquiryInfo");
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(14.03.06)
|
||||
define("OPENSUBINFO", "OpenSubInfo");
|
||||
//Escrow
|
||||
//added 2008.01.09
|
||||
define("ESCROWINFO", "EscrowInfo");
|
||||
define("ESCROW_DELIVERY", "Delivery");
|
||||
define("ESCROW_CONFIRM", "Confirm");
|
||||
define("ESCROW_DENY", "Deny");
|
||||
define("ESCROW_DENYCONFIRM", "DenyConfirm");
|
||||
|
||||
|
||||
//------------------------------------------------------
|
||||
//Auth Encrypt XPATH
|
||||
//------------------------------------------------------
|
||||
//CARD COMMON
|
||||
define("APPLDATE", "ApplDate");
|
||||
define("APPLTIME", "ApplTime");
|
||||
define("APPLNUM", "ApplNum");
|
||||
//CARD
|
||||
define("CARD_NUM", "CARD_Num");
|
||||
define("CARD_EXPIRE", "CARD_Expire");
|
||||
define("CARD_CODE", "CARD_Code");
|
||||
define("CARD_APPLPRICE", "CARD_ApplPrice");
|
||||
define("CARD_BANKCODE", "CARD_BankCode");
|
||||
define("CARD_QUOTA", "CARD_Quota");
|
||||
define("CARD_INTEREST", "CARD_Interest");
|
||||
define("CARD_POINT", "CARD_Point");
|
||||
define("CARD_AUTHTYPE", "CARD_AuthType");
|
||||
define("CARD_REGNUM", "CARD_RegNum");
|
||||
define("CARD_APPLDATE", "CARD_ApplDate");
|
||||
define("CARD_APPLTIME", "CARD_ApplTime");
|
||||
define("CARD_APPLNUM", "CARD_ApplNum");
|
||||
define("CARD_RESULTCODE", "CARD_ResultCode");
|
||||
define("CARD_RESULTMSG", "CARD_ResultMsg");
|
||||
define("CARD_TERMINALNUM", "CARD_TerminalNum");
|
||||
define("CARD_MEMBERNUM", "CARD_MemberNum");
|
||||
define("CARD_PURCHASECODE", "CARD_PurchaseCode");
|
||||
//ISP
|
||||
define("ISP_BANKCODE", "ISP_BankCode");
|
||||
define("ISP_QUOTA", "ISP_Quota");
|
||||
define("ISP_INTEREST", "ISP_Interest");
|
||||
define("ISP_APPLPRICE", "ISP_ApplPrice");
|
||||
define("ISP_CARDCODE", "ISP_CardCode");
|
||||
define("ISP_CARDNUM", "ISP_CardNum");
|
||||
define("ISP_POINT", "ISP_Point");
|
||||
define("ISP_APPLDATE", "ISP_ApplDate");
|
||||
define("ISP_APPLTIME", "ISP_ApplTime");
|
||||
define("ISP_APPLNUM", "ISP_ApplNum");
|
||||
define("ISP_RESULTCODE", "ISP_ResultCode");
|
||||
define("ISP_RESULTMSG", "ISP_ResultMsg");
|
||||
define("ISP_TERMINALNUM", "ISP_TerminalNum");
|
||||
define("ISP_MEMBERNUM", "ISP_MemberNum");
|
||||
define("ISP_PURCHASECODE", "ISP_PurchaseCode");
|
||||
//ACCT
|
||||
define("ACCT_APPLDATE", "ACCT_ApplDate");
|
||||
define("ACCT_APPLTIME", "ACCT_ApplTime");
|
||||
define("ACCT_APPLNUM", "ACCT_ApplNum");
|
||||
//HPP
|
||||
define("HPP_APPLDATE", "HPP_ApplDate");
|
||||
define("HPP_APPLTIME", "HPP_ApplTime");
|
||||
define("HPP_APPLNUM", "HPP_ApplNum");
|
||||
//VACT
|
||||
define("VACT_APPLDATE", "VACT_ApplDate");
|
||||
define("VACT_APPLTIME", "VACT_ApplTime");
|
||||
//CASH
|
||||
define("CSHR_APPLDATE", "CSHR_ApplDate");
|
||||
define("CSHR_APPLTIME", "CSHR_ApplTime");
|
||||
define("CSHR_APPLNUM", "CSHR_ApplNum");
|
||||
//ARSB
|
||||
define("ARSB_APPLDATE", "ARSB_ApplDate");
|
||||
define("ARSB_APPLTIME", "ARSB_ApplTime");
|
||||
define("ARSB_APPLNUM", "ARSB_ApplNum");
|
||||
//PHNB
|
||||
define("PHNB_APPLDATE", "PHNB_ApplDate");
|
||||
define("PHNB_APPLTIME", "PHNB_ApplTime");
|
||||
define("PHNB_APPLNUM", "PHNB_ApplNum");
|
||||
//CULT
|
||||
define("CULT_APPLDATE", "CULT_ApplDate");
|
||||
define("CULT_APPLTIME", "CULT_ApplTime");
|
||||
define("CULT_APPLNUM", "CULT_ApplNum");
|
||||
//DGCL
|
||||
define("GAMG_CNT", "GAMG_Cnt");
|
||||
define("GAMG_APPLDATE", "GAMG_ApplDate");
|
||||
define("GAMG_APPLTIME", "GAMG_ApplTime");
|
||||
define("GAMG_APPLNUM", "GAMG_ApplNum");
|
||||
|
||||
function MakePathGAMG($cnt) {
|
||||
for ($i = 1; $i <= $cnt; $i++) {
|
||||
define("GAMG_NUM$i", "GAMG_Num$i");
|
||||
define("GAMG_REMAINS$i", "GAMG_Remains$i");
|
||||
define("GAMG_ERRMSG$i", "GAMG_ErrMsg$i");
|
||||
}
|
||||
}
|
||||
|
||||
//EDUG
|
||||
define("EDUG_APPLDATE", "EDUG_ApplDate");
|
||||
define("EDUG_APPLTIME", "EDUG_ApplTime");
|
||||
define("EDUG_APPLNUM", "EDUG_ApplNum");
|
||||
//TEEN
|
||||
define("TEEN_APPLDATE", "TEEN_ApplDate");
|
||||
define("TEEN_APPLTIME", "TEEN_ApplTime");
|
||||
define("TEEN_APPLNUM", "TEEN_ApplNum");
|
||||
|
||||
//----------------------------------
|
||||
//ERROR CODE
|
||||
//----------------------------------
|
||||
//!!<21><>TX<54><58> <20>߰<EFBFBD><DFB0><EFBFBD> <20><><EFBFBD><EFBFBD>!!!
|
||||
define("NULL_DIR_ERR", "TX9001");
|
||||
define("NULL_TYPE_ERR", "TX9002");
|
||||
define("NULL_NOINTEREST_ERR", "TX9003");
|
||||
define("NULL_QUOTABASE_ERR", "TX9004");
|
||||
define("DNS_LOOKUP_ERR", "TX9005");
|
||||
define("MERCHANT_DB_ERR", "TX9006");
|
||||
define("DNS_LOOKUP_TIMEOUT_ERR", "TX9007");
|
||||
define("PGPUB_UPDATE_ERR", "TX9612");
|
||||
|
||||
//<2F>Ϻ<EFBFBD>ȣȭ <20><><EFBFBD><EFBFBD>
|
||||
define("B64DECODE_UPDATE_ERR", "TX9101");
|
||||
define("B64DECODE_FINAL_ERR", "TX9102");
|
||||
define("B64DECODE_LENGTH_ERR", "TX9103");
|
||||
define("GET_KEYPW_EVP_B2K_ERR", "TX9104");
|
||||
define("GET_KEYPW_FILE_OPEN_ERR", "TX9105");
|
||||
define("GET_KEYPW_FILE_READ_ERR", "TX9106");
|
||||
define("GET_KEYPW_DECRYPT_INIT_ERR", "TX9107");
|
||||
define("GET_KEYPW_DECRYPT_UPDATE_ERR", "TX9108");
|
||||
define("GET_KEYPW_DECRYPT_FINAL_ERR", "TX9109");
|
||||
define("ENC_RAND_BYTES_ERR", "TX9110");
|
||||
define("ENC_INIT_ERR", "TX9111");
|
||||
define("ENC_UPDATE_ERR", "TX9112");
|
||||
define("ENC_FINAL_ERR", "TX9113");
|
||||
define("ENC_RSA_ERR", "TX9114");
|
||||
define("DEC_RSA_ERR", "TX9115");
|
||||
define("DEC_CIPHER_ERR", "TX9116");
|
||||
define("DEC_INIT_ERR", "TX9117");
|
||||
define("DEC_UPDATE_ERR", "TX9118");
|
||||
define("DEC_FINAL_ERR", "TX9119");
|
||||
define("SIGN_FINAL_ERR", "TX9120");
|
||||
define("SIGN_CHECK_ERR", "TX9121");
|
||||
define("ENC_NULL_F_ERR", "TX9122");
|
||||
define("ENC_INIT_RAND_ERR", "TX9123");
|
||||
define("ENC_PUTENV_ERR", "TX9124");
|
||||
//<2F>ʵ<EFBFBD>üũ
|
||||
define("NULL_KEYPW_ERR", "TX9201");
|
||||
define("NULL_MID_ERR", "TX9202");
|
||||
define("NULL_PGID_ERR", "TX9203");
|
||||
define("NULL_TID_ERR", "TX9204");
|
||||
define("NULL_UIP_ERR", "TX9205");
|
||||
define("NULL_URL_ERR", "TX9206");
|
||||
define("NULL_PRICE_ERR", "TX9207");
|
||||
define("NULL_PRICE1_ERR", "TX9208");
|
||||
define("NULL_PRICE2_ERR", "TX9209");
|
||||
define("NULL_CARDNUMBER_ERR", "TX9210");
|
||||
define("NULL_CARDEXPIRE_ERR", "TX9211");
|
||||
define("NULL_ENCRYPTED_ERR", "TX9212");
|
||||
define("NULL_CARDQUOTA_ERR", "TX9213");
|
||||
define("NULL_QUOTAINTEREST_ERR", "TX9214");
|
||||
define("NULL_AUTHENTIFICATION_ERR", "TX9215");
|
||||
define("NULL_AUTHFIELD1_ERR", "TX9216");
|
||||
define("NULL_AUTHFIELD2_ERR", "TX9217");
|
||||
define("NULL_BANKCODE_ERR", "TX9218");
|
||||
define("NULL_BANKACCOUNT_ERR", "TX9219");
|
||||
define("NULL_REGNUMBER_ERR", "TX9220");
|
||||
define("NULL_OCBCARDNUM_ERR", "TX9221");
|
||||
define("NULL_OCBPASSWD_ERR", "TX9222");
|
||||
define("NULL_PASSWD_ERR", "TX9223");
|
||||
define("NULL_CURRENCY_ERR", "TX9224");
|
||||
define("NULL_PAYMETHOD_ERR", "TX9225");
|
||||
define("NULL_GOODNAME_ERR", "TX9226");
|
||||
define("NULL_BUYERNAME_ERR", "TX9227");
|
||||
define("NULL_BUYERTEL_ERR", "TX9228");
|
||||
define("NULL_BUYEREMAIL_ERR", "TX9229");
|
||||
define("NULL_SESSIONKEY_ERR", "TX9230");
|
||||
//pg<70><67><EFBFBD><EFBFBD>Ű <20>ε<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
define("NULL_PGCERT_FP_ERR", "TX9231");
|
||||
define("NULL_X509_ERR", "TX9232");
|
||||
define("NULL_PGCERT_ERR", "TX9233");
|
||||
|
||||
define("RESULT_MSG_FORMAT_ERR", "TX9234");
|
||||
|
||||
// <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><>ü <20><><EFBFBD><EFBFBD>
|
||||
define("NULL_PERNO_ERR", "TX9235"); // <20>ֹι<D6B9>ȣ <20><><EFBFBD><EFBFBD>
|
||||
define("NULL_OID_ERR", "TX9236"); // <20>ֹ<EFBFBD><D6B9><EFBFBD>ȣ <20><><EFBFBD><EFBFBD>
|
||||
define("NULL_VCDBANK_ERR", "TX9237"); // <20><><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
define("NULL_DTINPUT_ERR", "TX9238"); // <20>Ա<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
define("NULL_NMINPUT_ERR", "TX9239"); // <20>۱<EFBFBD><DBB1><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
//<2F>ǽð<C7BD> <20><><EFBFBD><EFBFBD>
|
||||
define("NULL_BILLKEY_ERR", "TX9240"); // <20><>Ű <20><><EFBFBD><EFBFBD>
|
||||
define("NULL_CARDPASS_ERR", "TX9241"); // ī<><C4AB> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
define("NULL_BILLTYPE_ERR", "TX9242"); // <20><>Ÿ<EFBFBD><C5B8> <20><><EFBFBD><EFBFBD>
|
||||
// CMS <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ü
|
||||
define("NULL_PRICE_ORG_ERR", "TX9250"); // CMS <20><><EFBFBD><EFBFBD><EFBFBD>ѱݾ<D1B1> <20><><EFBFBD><EFBFBD>
|
||||
define("NULL_CMSDAY_ERR", "TX9251"); // CMS <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
define("NULL_CMSDATEFROM_ERR", "TX9252"); // CMS <20><><EFBFBD>ݽ<EFBFBD><DDBD>ۿ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
define("NULL_CMSDATETO_ERR", "TX9253"); // CMS <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
// <20>κ<EFBFBD><CEBA><EFBFBD><EFBFBD><EFBFBD>
|
||||
define("NULL_CONFIRM_PRICE_ERR", "TX9260"); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>û<EFBFBD>ݾ<EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
// <20><><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
define("NULL_CR_PRICE_ERR", "TX9270"); // <20><><EFBFBD>ݰ<EFBFBD><DDB0><EFBFBD> <20>ݾ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
define("NULL_SUP_PRICE_ERR", "TX9271"); // <20><><EFBFBD>ް<EFBFBD><DEB0><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
define("NULL_TAX_ERR", "TX9272"); // <20>ΰ<EFBFBD><CEB0><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
define("NULL_SRVC_PRICE_ERR", "TX9273"); // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
define("NULL_REG_NUM_ERR", "TX9274"); // <20>ֹι<D6B9>ȣ(<28><><EFBFBD><EFBFBD><EFBFBD>ڹ<EFBFBD>ȣ)
|
||||
define("NULL_USEOPT_ERR", "TX9275"); // <20><><EFBFBD>ݿ<EFBFBD><DDBF><EFBFBD><EFBFBD><EFBFBD> <20>뵵 <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
|
||||
define("PRIVKEY_FILE_OPEN_ERR", "TX9301");
|
||||
define("INVALID_KEYPASS_ERR", "TX9302");
|
||||
|
||||
define("MAKE_TID_ERR", "TX9401");
|
||||
define("ACK_CHECKSUM_ERR", "TX9402");
|
||||
define("NETCANCEL_SOCK_CREATE_ERR", "TX9403");
|
||||
define("NETCANCEL_SOCK_SEND_ERR", "TX9404");
|
||||
define("NETCANCEL_SOCK_RECV_ERR", "TX9405");
|
||||
define("LOG_OPEN_ERR", "TX9406");
|
||||
define("LOG_WRITE_ERR", "TX9407");
|
||||
|
||||
define("SOCK_MAKE_EP_ERR", "TX9501");
|
||||
define("SOCK_CONN_ERR", "TX9502");
|
||||
define("SOCK_SEND1_ERR", "TX9503");
|
||||
define("SOCK_SEND2_ERR", "TX9504");
|
||||
define("SOCK_CLOSED_BY_PEER_ERR", "TX9505");
|
||||
define("SOCK_RECV1_ERR", "TX9506");
|
||||
define("SOCK_RECV2_ERR", "TX9507");
|
||||
define("SOCK_RECV_LEN_ERR", "TX9508");
|
||||
define("SOCK_TIMEO_ERR", "TX9509");
|
||||
define("SOCK_ETC1_ERR", "TX9510");
|
||||
define("SOCK_ETC2_ERR", "TX9511");
|
||||
|
||||
define("NULL_ESCROWTYPE_ERR", "TX6000");
|
||||
define("NULL_ESCROWMSG_ERR", "TX6001");
|
||||
|
||||
define("NULL_FIELD_REFUNDACCTNUM", "TX9245");
|
||||
define("NULL_FIELD_REFUNDBANKCODE", "TX9243");
|
||||
define("NULL_FIELD_REFUNDACCTNAME", "TX9244");
|
||||
?>
|
||||
795
shop/inicis/libs/INILib.php
Normal file
795
shop/inicis/libs/INILib.php
Normal file
@ -0,0 +1,795 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2007 INICIS Inc.
|
||||
*
|
||||
* <20>ش<EFBFBD> <20><><EFBFBD>̺귯<CCBA><EAB7AF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ǿ<C7BE><EEBCAD> <20>ȵ˴ϴ<CBB4>.
|
||||
* <20><><EFBFBD>Ƿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ڵ忡 <20><><EFBFBD><EFBFBD> å<><C3A5><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ڿ<EFBFBD><DABF><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>˷<EFBFBD><CBB7>帳<EFBFBD>ϴ<EFBFBD>.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
require_once('INICls.php');
|
||||
require_once('INISoc.php');
|
||||
|
||||
class INIpay50
|
||||
{
|
||||
var $m_type; // <20>ŷ<EFBFBD> <20><><EFBFBD><EFBFBD>
|
||||
var $m_resulterrcode; // <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><DEBC><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ڵ<EFBFBD>
|
||||
var $m_connIP;
|
||||
var $m_cancelRC = 0;
|
||||
|
||||
var $m_Data;
|
||||
var $m_Log;
|
||||
var $m_Socket;
|
||||
var $m_Crypto;
|
||||
|
||||
var $m_REQUEST = array();
|
||||
var $m_REQUEST2 = array();
|
||||
var $m_RESULT = array();
|
||||
|
||||
function INIpay()
|
||||
{
|
||||
$this->UnsetField();
|
||||
}
|
||||
|
||||
function UnsetField()
|
||||
{
|
||||
unset($this->m_REQUEST);
|
||||
unset($this->m_RESULT);
|
||||
}
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
/* */
|
||||
/* <20><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD> <20><>û<EFBFBD><C3BB> Set or Add */
|
||||
/* */
|
||||
/*--------------------------------------------------*/
|
||||
function SetField( $key, $val ) //Default Entity
|
||||
{
|
||||
$this->m_REQUEST[$key] = $val;
|
||||
}
|
||||
function SetXPath( $xpath, $val ) //User Defined Entity
|
||||
{
|
||||
$this->m_REQUEST2[$xpath] = $val;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
/* */
|
||||
/* <20><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> fetch */
|
||||
/* */
|
||||
/*--------------------------------------------------*/
|
||||
function GetResult( $name ) //Default Entity
|
||||
{
|
||||
$result = $this->m_RESULT[$name];
|
||||
if( $result == "" )
|
||||
$result = $this->m_Data->GetXMLData( $name );
|
||||
if( $result == "" )
|
||||
$result = $this->m_Data->m_RESULT[$name];
|
||||
return $result;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
/* */
|
||||
/* <20><><EFBFBD><EFBFBD>/<2F><><EFBFBD><EFBFBD> ó<><C3B3> <20><><EFBFBD><EFBFBD> */
|
||||
/* */
|
||||
/*--------------------------------------------------*/
|
||||
function startAction()
|
||||
{
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
/* Overhead Operation */
|
||||
/*--------------------------------------------------*/
|
||||
$this->m_Data = new INIData( $this->m_REQUEST, $this->m_REQUEST2 );
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
/* Log Start */
|
||||
/*--------------------------------------------------*/
|
||||
$this->m_Log = new INILog( $this->m_REQUEST );
|
||||
if(!$this->m_Log->StartLog())
|
||||
{
|
||||
$this->MakeTXErrMsg( LOG_OPEN_ERR, "<EFBFBD>α<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ϴ<EFBFBD>.[".$this->m_REQUEST["inipayhome"]."]");
|
||||
return;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
/* Logging Request Parameter */
|
||||
/*--------------------------------------------------*/
|
||||
$this->m_Log->WriteLog( DEBUG, $this->m_REQUEST );
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
/* Set Type */
|
||||
/*--------------------------------------------------*/
|
||||
$this->m_type = $this->m_REQUEST["type"];
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
/* Check Field */
|
||||
/*--------------------------------------------------*/
|
||||
if( !$this->m_Data->CheckField() )
|
||||
{
|
||||
$err_msg = "<EFBFBD>ʼ<EFBFBD><EFBFBD><EFBFBD>(".$this->m_Data->m_ErrMsg.")<29><> <20><><EFBFBD><EFBFBD><EFBFBD>Ǿ<EFBFBD><C7BE><EFBFBD><EFBFBD>ϴ<EFBFBD>.";
|
||||
$this->MakeTXErrMsg( $this->m_Data->m_ErrCode, $err_msg );
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
$this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) );
|
||||
return;
|
||||
}
|
||||
$this->m_Log->WriteLog( INFO, "Check Field OK" );
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> Ű<><C5B0><EFBFBD><EFBFBD>. <20><><EFBFBD>⼭ <20><>!!
|
||||
/*--------------------------------------------------*/
|
||||
if( $this->m_type == TYPE_CHKFAKE )
|
||||
{
|
||||
return $this->MakeChkFake();
|
||||
}
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//Generate TID
|
||||
/*--------------------------------------------------*/
|
||||
if( $this->m_type == TYPE_SECUREPAY || $this->m_type == TYPE_FORMPAY || $this->m_type == TYPE_OCBSAVE ||
|
||||
$this->m_type == TYPE_AUTHBILL || $this->m_type == TYPE_FORMAUTH || $this->m_type == TYPE_REQREALBILL ||
|
||||
$this->m_type == TYPE_REPAY || $this->m_type == TYPE_VACCTREPAY || $this->m_type == TYPE_RECEIPT || $this->m_type == TYPE_AUTH
|
||||
)
|
||||
{
|
||||
if(!$this->m_Data->MakeTID())
|
||||
{
|
||||
$err_msg = "TID<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>߽<EFBFBD><DFBD>ϴ<EFBFBD>.::".$this->m_Data->m_sTID;
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
$this->MakeTXErrMsg( MAKE_TID_ERR, $err_msg );
|
||||
$this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) );
|
||||
return;
|
||||
}
|
||||
$this->m_Log->WriteLog( INFO, 'Make TID OK '.$this->m_Data->m_sTID );
|
||||
}
|
||||
|
||||
$this->m_Crypto = new INICrypto( $this->m_REQUEST );
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//PI<50><49><EFBFBD><EFBFBD>Ű <20>ε<EFBFBD>
|
||||
/*--------------------------------------------------*/
|
||||
$this->m_Data->ParsePIEncrypted();
|
||||
$this->m_Log->WriteLog( INFO, "PI PUB KEY LOAD OK [".$this->m_Data->m_PIPGPubSN."]" );
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//PG<50><47><EFBFBD><EFBFBD>Ű <20>ε<EFBFBD>
|
||||
/*--------------------------------------------------*/
|
||||
if( ($rtv = $this->m_Crypto->LoadPGPubKey( $pg_cert_SN )) != OK)
|
||||
{
|
||||
$err_msg = "PG<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ű <20>ε<EFBFBD><CEB5><EFBFBD><EFBFBD><EFBFBD>";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
$this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) );
|
||||
return;
|
||||
}
|
||||
$this->m_Data->m_TXPGPubSN = $pg_cert_SN;
|
||||
$this->m_Log->WriteLog( INFO, "PG PUB KEY LOAD OK [".$this->m_Data->m_TXPGPubSN."]" );
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ű <20>ε<EFBFBD>
|
||||
/*--------------------------------------------------*/
|
||||
if( ($rtv = $this->m_Crypto->LoadMPrivKey()) != OK )
|
||||
{
|
||||
$err_msg = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ű <20>ε<EFBFBD><CEB5><EFBFBD><EFBFBD><EFBFBD>";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
$this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) );
|
||||
$this->m_Crypto->FreePubKey();
|
||||
return;
|
||||
}
|
||||
$this->m_Log->WriteLog( INFO, "MERCHANT PRIV KEY LOAD OK" );
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ű <20>ε<EFBFBD>(SN <20><> <20>˱<EFBFBD><CBB1><EFBFBD><EFBFBD><EFBFBD>!!)
|
||||
/*--------------------------------------------------*/
|
||||
if( ($rtv = $this->m_Crypto->LoadMPubKey( $m_cert_SN )) != OK)
|
||||
{
|
||||
$err_msg = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ű <20>ε<EFBFBD><CEB5><EFBFBD><EFBFBD><EFBFBD>";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
$this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) );
|
||||
return;
|
||||
}
|
||||
$this->m_Data->m_MPubSN = $m_cert_SN;
|
||||
$this->m_Log->WriteLog( INFO, "MERCHANT PUB KEY LOAD OK [".$this->m_Data->m_MPubSN."]" );
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><>ȣȭ( formpay, cancel, repay, recept, inquiry, opensub)
|
||||
/*--------------------------------------------------*/
|
||||
if( $this->m_type == TYPE_CANCEL || $this->m_type == TYPE_REPAY || $this->m_type == TYPE_VACCTREPAY ||
|
||||
$this->m_type == TYPE_FORMPAY || $this->m_type == TYPE_RECEIPT ||
|
||||
$this->m_type == TYPE_CAPTURE || $this->m_type == TYPE_INQUIRY || $this->m_type == TYPE_OPENSUB ||
|
||||
($this->m_type == TYPE_ESCROW && $this->m_Data->m_EscrowType == TYPE_ESCROW_DLV ) ||
|
||||
($this->m_type == TYPE_ESCROW && $this->m_Data->m_EscrowType == TYPE_ESCROW_DNY_CNF ) ||
|
||||
$this->m_type == TYPE_REFUND
|
||||
)
|
||||
{
|
||||
if( ($rtv = $this->m_Data->MakeEncrypt( $this->m_Crypto )) != OK )
|
||||
{
|
||||
$err_msg = "<EFBFBD><EFBFBD>ȣȭ <20><><EFBFBD><EFBFBD>";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
$this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) );
|
||||
return;
|
||||
}
|
||||
//$this->m_Log->WriteLog( DEBUG, "MAKE ENCRYPT OK" );
|
||||
$this->m_Log->WriteLog( DEBUG, "MAKE ENCRYPT OK[".$this->m_Data->m_EncBody."]" );
|
||||
}
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(Body)
|
||||
/*--------------------------------------------------*/
|
||||
$this->m_Data->MakeBody();
|
||||
$this->m_Log->WriteLog( INFO, "MAKE BODY OK" );
|
||||
//$this->m_Log->WriteLog( INFO, "MAKE BODY OK[".$this->m_Data->m_sBody."]" );
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//<2F><><EFBFBD><EFBFBD>(sign)
|
||||
/*--------------------------------------------------*/
|
||||
if( ($rtv = $this->m_Crypto->Sign( $this->m_Data->m_sBody, $sign )) != OK )
|
||||
{
|
||||
$err_msg = "<EFBFBD><EFBFBD><EFBFBD>ν<EFBFBD><EFBFBD><EFBFBD>";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
$this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) );
|
||||
$this->m_Crypto->FreeAllKey();
|
||||
return;
|
||||
}
|
||||
$this->m_Data->m_sTail = $sign;
|
||||
$this->m_Log->WriteLog( INFO, "SIGN OK" );
|
||||
//$this->m_Log->WriteLog( INFO, "SIGN OK[".$sign."]" );
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(Head)
|
||||
/*--------------------------------------------------*/
|
||||
$this->m_Data->MakeHead();
|
||||
$this->m_Log->WriteLog( INFO, "MAKE HEAD OK" );
|
||||
//$this->m_Log->WriteLog( INFO, "MAKE HEAD OK[".$head."]" );
|
||||
|
||||
$this->m_Log->WriteLog( INFO, "MSG_TO_PG:[".$this->m_Data->m_sMsg."]" );
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//<2F><><EFBFBD>ϻ<EFBFBD><CFBB><EFBFBD>
|
||||
/*--------------------------------------------------*/
|
||||
//DRPG <20><><EFBFBD><EFBFBD>, added 07.11.15
|
||||
//<2F><><EFBFBD>ҽ<EFBFBD>-PG<50><47><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>(<28><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>->IP), edited 10.09.09
|
||||
if( $this->m_type == TYPE_SECUREPAY )
|
||||
{
|
||||
if( $this->m_REQUEST["pgn"] == "" )
|
||||
$host = $this->m_Data->m_PG1;
|
||||
else
|
||||
$host = $this->m_REQUEST["pgn"];
|
||||
}
|
||||
else
|
||||
{
|
||||
if( $this->m_REQUEST["pgn"] == "" )
|
||||
{
|
||||
if( $this->m_cancelRC == 1 )
|
||||
$host = DRPG_IP;
|
||||
else
|
||||
$host = PG_IP;
|
||||
}
|
||||
else
|
||||
$host = $this->m_REQUEST["pgn"];
|
||||
}
|
||||
|
||||
$this->m_Socket = new INISocket($host);
|
||||
if( ($rtv = $this->m_Socket->DNSLookup()) != OK )
|
||||
{
|
||||
$err_msg = "[".$host."]DNS LOOKUP <20><><EFBFBD><EFBFBD>(MAIN)".$this->m_Socket->getErr();
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
if( $this->m_type == TYPE_SECUREPAY ) //PI<50>ϰ<EFBFBD><CFB0><EFBFBD>, PI<50><49> <20><><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD> pg1ip<69><70>!
|
||||
{
|
||||
$this->m_Socket->ip = $this->m_Data->m_PG1IP;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( $this->m_cancelRC == 1 )
|
||||
$this->m_Socket->ip = DRPG_IP;
|
||||
else
|
||||
$this->m_Socket->ip = PG_IP;
|
||||
}
|
||||
}
|
||||
$this->m_Log->WriteLog( INFO, "DNS LOOKUP OK(".$this->m_Socket->host.":".$this->m_Socket->ip.":".$this->m_Socket->port.") laptime:".$this->m_Socket->dns_laptime );
|
||||
if( ($rtv = $this->m_Socket->open()) != OK )
|
||||
{
|
||||
$this->m_Socket->close();
|
||||
|
||||
//PG2<47><32> <20><>ȯ
|
||||
$err_msg = "[".$host."<EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(MAIN)::PG2<47><32> <20><>ȯ";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
if( $this->m_type == TYPE_SECUREPAY )
|
||||
{
|
||||
$host = $this->m_Data->m_PG2;
|
||||
}
|
||||
else
|
||||
{
|
||||
$host = DRPG_HOST;
|
||||
}
|
||||
$this->m_Socket = new INISocket($host);
|
||||
if( ($rtv = $this->m_Socket->DNSLookup()) != OK )
|
||||
{
|
||||
$err_msg = "[".$host."]DNS LOOKUP <20><><EFBFBD><EFBFBD>(MAIN)".$this->m_Socket->getErr();
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
if( $this->m_type == TYPE_SECUREPAY ) //PI<50>ϰ<EFBFBD><CFB0><EFBFBD>, PI<50><49> <20><><EFBFBD><EFBFBD><EFBFBD>ִ<EFBFBD> pg2ip<69><70>!
|
||||
{
|
||||
$this->m_Socket->ip = $this->m_Data->m_PG2IP;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->m_Socket->ip = DRPG_IP;
|
||||
}
|
||||
}
|
||||
$this->m_Log->WriteLog( INFO, "DNS LOOKUP OK(".$this->m_Socket->host.":".$this->m_Socket->ip.":".$this->m_Socket->port.") laptime:".$this->m_Socket->dns_laptime );
|
||||
if( ($rtv = $this->m_Socket->open()) != OK )
|
||||
{
|
||||
$err_msg = "[".$host."<EFBFBD><EFBFBD><EFBFBD>Ͽ<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(MAIN)::".$this->m_Socket->getErr();
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
$this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) );
|
||||
$this->m_Socket->close();
|
||||
$this->m_Crypto->FreeAllKey();
|
||||
return;
|
||||
}
|
||||
}
|
||||
$this->m_connIP = $this->m_Socket->ip;
|
||||
$this->m_Log->WriteLog( INFO, "SOCKET CONNECT OK" );
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD>۽<EFBFBD>
|
||||
/*--------------------------------------------------*/
|
||||
if( ($rtv = $this->m_Socket->send($this->m_Data->m_sMsg)) != OK )
|
||||
{
|
||||
$err_msg = "<EFBFBD><EFBFBD><EFBFBD>ϼ۽ſ<EFBFBD><EFBFBD><EFBFBD>(MAIN)::".$this->m_Socket->getErr();
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
$this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) );
|
||||
$this->m_Crypto->FreeAllKey();
|
||||
$this->m_Socket->close();
|
||||
return;
|
||||
}
|
||||
$this->m_Log->WriteLog( INFO, "SEND OK" );
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
/*--------------------------------------------------*/
|
||||
if( ($rtv = $this->m_Socket->recv($head, $body, $tail)) != OK )
|
||||
{
|
||||
$err_msg = "<EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD><EFBFBD>ſ<EFBFBD><EFBFBD><EFBFBD>(MAIN)::".$this->m_Socket->getErr();
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
$this->m_Socket->close();
|
||||
$this->NetCancel();
|
||||
$this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) );
|
||||
$this->m_Crypto->FreeAllKey();
|
||||
return;
|
||||
}
|
||||
$this->m_Log->WriteLog( INFO, "RECV OK" );
|
||||
$this->m_Log->WriteLog( INFO, "MSG_FROM_PG:[".$head.$body.$tail."]" );
|
||||
$this->m_Data->m_Body = $body;
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//<2F><><EFBFBD><EFBFBD>Ȯ<EFBFBD><C8AE>
|
||||
/*--------------------------------------------------*/
|
||||
if( ($rtv = $this->m_Crypto->Verify( $body, $tail )) != OK )
|
||||
{
|
||||
$err_msg = "VERIFY FAIL";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
$this->m_Socket->close();
|
||||
$this->NetCancel();
|
||||
$this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) );
|
||||
$this->m_Crypto->FreeAllKey();
|
||||
return;
|
||||
}
|
||||
$this->m_Log->WriteLog( INFO, "VERIFY OK" );
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//Head <20>Ľ<EFBFBD>
|
||||
/*--------------------------------------------------*/
|
||||
if( ($rtv = $this->m_Data->ParseHead( $head )) != OK )
|
||||
{
|
||||
$err_msg = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(HEAD) <20>Ľ<EFBFBD> <20><><EFBFBD><EFBFBD>";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
$this->m_Socket->close();
|
||||
$this->NetCancel();
|
||||
$this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) );
|
||||
$this->m_Crypto->FreeAllKey();
|
||||
return;
|
||||
}
|
||||
$this->m_Log->WriteLog( INFO, "PARSE HEAD OK" );
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//Body <20>Ľ<EFBFBD>
|
||||
/*--------------------------------------------------*/
|
||||
if( ($rtv = $this->m_Data->ParseBody( $body, $encrypted, $sessionkey )) != OK )
|
||||
{
|
||||
$err_msg = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(Body) <20>Ľ<EFBFBD> <20><><EFBFBD><EFBFBD>";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
$this->m_Socket->close();
|
||||
$this->NetCancel();
|
||||
$this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) );
|
||||
$this->m_Crypto->FreeAllKey();
|
||||
return;
|
||||
}
|
||||
$this->m_Log->WriteLog( INFO, "PARSE BODY OK" );
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//<2F><>ȣȭ
|
||||
/*--------------------------------------------------*/
|
||||
if( $this->m_type == TYPE_SECUREPAY || $this->m_type == TYPE_FORMPAY || $this->m_type == TYPE_OCBSAVE ||
|
||||
$this->m_type == TYPE_CANCEL || $this->m_type == TYPE_AUTHBILL || $this->m_type == TYPE_FORMAUTH ||
|
||||
$this->m_type == TYPE_REQREALBILL || $this->m_type == TYPE_REPAY || $this->m_type == TYPE_VACCTREPAY || $this->m_type == TYPE_RECEIPT ||
|
||||
$this->m_type == TYPE_AUTH || $this->m_type == TYPE_CAPTURE || $this->m_type == TYPE_ESCROW ||
|
||||
$this->m_type == TYPE_REFUND || $this->m_type == TYPE_INQUIRY || $this->m_type == TYPE_OPENSUB
|
||||
)
|
||||
{
|
||||
if( ($rtv = $this->m_Crypto->Decrypt( $sessionkey, $encrypted, $decrypted )) != OK )
|
||||
{
|
||||
$err_msg = "<EFBFBD><EFBFBD>ȣȭ <20><><EFBFBD><EFBFBD>[".$this->GetResult(NM_RESULTMSG)."]";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
$this->m_Socket->close();
|
||||
$this->NetCancel();
|
||||
$this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) );
|
||||
$this->m_Crypto->FreeAllKey();
|
||||
return;
|
||||
}
|
||||
$this->m_Log->WriteLog( INFO, "DECRYPT OK" );
|
||||
$this->m_Log->WriteLog( DEBUG, "DECRYPT MSG:[".$decrypted."]" );
|
||||
|
||||
//Parse Decrypt
|
||||
$this->m_Data->ParseDecrypt( $decrypted );
|
||||
$this->m_Log->WriteLog( INFO, "DECRYPT PARSE OK" );
|
||||
}
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//Assign Interface Variables
|
||||
/*--------------------------------------------------*/
|
||||
$this->m_RESULT = $this->m_Data->m_RESULT;
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//ACK
|
||||
/*--------------------------------------------------*/
|
||||
//if( $this->GetResult(NM_RESULTCODE) == "00" &&
|
||||
if( (strcmp($this->GetResult(NM_RESULTCODE),"00") == 0) &&
|
||||
( $this->m_type == TYPE_SECUREPAY || $this->m_type == TYPE_OCBSAVE ||
|
||||
$this->m_type == TYPE_FORMPAY || $this->m_type == TYPE_RECEIPT
|
||||
)
|
||||
)
|
||||
{
|
||||
$this->m_Log->WriteLog( INFO, "WAIT ACK INVOKING" );
|
||||
if( ($rtv = $this->Ack()) != OK )
|
||||
{
|
||||
//ERROR
|
||||
$err_msg = "ACK <20><><EFBFBD><EFBFBD>";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
$this->m_Socket->close();
|
||||
$this->NetCancel();
|
||||
$this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) );
|
||||
$this->m_Crypto->FreeAllKey();
|
||||
return;
|
||||
}
|
||||
$this->m_Log->WriteLog( INFO, "SUCCESS ACK INVOKING" );
|
||||
}
|
||||
/*--------------------------------------------------*/
|
||||
//PG <20><><EFBFBD><EFBFBD>Ű<EFBFBD><C5B0> <20>ٲ<EFBFBD><D9B2><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ű UPDATE
|
||||
/*--------------------------------------------------*/
|
||||
$pgpubkey = $this->m_Data->GetXMLData( NM_PGPUBKEY );
|
||||
if( $pgpubkey != "" )
|
||||
{
|
||||
if( ($rtv = $this->m_Crypto->UpdatePGPubKey( $pgpubkey )) != OK )
|
||||
{
|
||||
$err_msg = "PG<EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ű <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʈ <20><><EFBFBD><EFBFBD>";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
$this->m_Data->GTHR( $rtv, $err_msg );
|
||||
}
|
||||
else
|
||||
$this->m_Log->WriteLog( INFO, "PGPubKey UPDATED!!" );
|
||||
}
|
||||
|
||||
$this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) );
|
||||
$this->m_Crypto->FreeAllKey();
|
||||
$this->m_Socket->close();
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//<2F><><EFBFBD>ҽ<EFBFBD><D2BD><EFBFBD>-<2D><><EFBFBD>ŷ<EFBFBD><C5B7><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ÿ<EFBFBD> DRPG<50><47> <20><><EFBFBD>õ<EFBFBD>
|
||||
//2008.04.01
|
||||
/*--------------------------------------------------*/
|
||||
if( $this->GetResult(NM_RESULTCODE) == "01" && ($this->m_type == TYPE_CANCEL || $this->m_type == TYPE_INQUIRY) && $this->m_cancelRC == 0 )
|
||||
{
|
||||
if( intval($this->GetResult(NM_ERRORCODE)) > 400000 && substr( $this->GetResult(NM_ERRORCODE), 3, 3 ) == "623" )
|
||||
{
|
||||
$this->m_cancelRC = 1;
|
||||
$this->startAction();
|
||||
}
|
||||
}
|
||||
|
||||
return;
|
||||
|
||||
} // End of StartAction
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
/* */
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ÿ <20><><EFBFBD><EFBFBD> */
|
||||
/* */
|
||||
/*--------------------------------------------------*/
|
||||
function MakeChkFake()
|
||||
{
|
||||
$this->m_Crypto = new INICrypto( $this->m_REQUEST );
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ű <20>ε<EFBFBD>
|
||||
/*--------------------------------------------------*/
|
||||
if( ($rtv = $this->m_Crypto->LoadMPrivKey()) != OK )
|
||||
{
|
||||
$err_msg = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ű <20>ε<EFBFBD><CEB5><EFBFBD><EFBFBD><EFBFBD>";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
$this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) );
|
||||
$this->m_Crypto->FreePubKey();
|
||||
return;
|
||||
}
|
||||
$this->m_Log->WriteLog( INFO, "MERCHANT PRIV KEY LOAD OK" );
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>Ű <20>ε<EFBFBD>(SN <20><> <20>˱<EFBFBD><CBB1><EFBFBD><EFBFBD><EFBFBD>!!)
|
||||
/*--------------------------------------------------*/
|
||||
if( ($rtv = $this->m_Crypto->LoadMPubKey( $m_cert_SN )) != OK)
|
||||
{
|
||||
$err_msg = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ű <20>ε<EFBFBD><CEB5><EFBFBD><EFBFBD><EFBFBD>";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
$this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) );
|
||||
return;
|
||||
}
|
||||
$this->m_Log->WriteLog( INFO, "MERCHANT PUB KEY LOAD OK [".$this->m_Data->m_MPubSN."]" );
|
||||
|
||||
foreach ($this->m_REQUEST as $key => $val)
|
||||
{
|
||||
if( $key == "inipayhome" || $key == "type" || $key == "debug" ||
|
||||
$key == "admin" || $key == "checkopt" || $key == "enctype" )
|
||||
continue;
|
||||
if( $key == "mid" )
|
||||
$temp1 .= $key."=".$val."&"; //msg
|
||||
else
|
||||
$temp2 .= $key."=".$val."&"; //hashmsg
|
||||
}
|
||||
//Make RN
|
||||
$this->m_RESULT["rn"] = $this->m_Data->MakeRN();
|
||||
$temp1 .= "rn=".$this->m_RESULT["rn"]."&";
|
||||
|
||||
$checkMsg = $temp1;
|
||||
$checkHashMsg = $temp2;
|
||||
|
||||
$retHashStr = Base64Encode(sha1( $checkHashMsg, TRUE ));
|
||||
$checkMsg .= "data=".$retHashStr;
|
||||
|
||||
$HashMid = Base64Encode(sha1( $this->m_REQUEST["mid"], TRUE ));
|
||||
|
||||
$this->m_Crypto->RSAMPrivEncrypt( $checkMsg, $RSATemp );
|
||||
$this->m_RESULT["encfield"] = "enc=".$RSATemp."&src=".Base64Encode($checkHashMsg);
|
||||
$this->m_RESULT["certid"] = $HashMid.$m_cert_SN;
|
||||
|
||||
$this->m_Log->WriteLog( INFO, "CHKFAKE KEY MAKE OK:".$this->m_RESULT["rn"] );
|
||||
|
||||
$this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) );
|
||||
$this->m_Crypto->FreeAllKey();
|
||||
$this->m_RESULT[NM_RESULTCODE] = "00";
|
||||
return;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
/* */
|
||||
/* <20><><EFBFBD><EFBFBD>ó<EFBFBD><C3B3> Ȯ<><C8AE> <20><EFBFBD><DEBC><EFBFBD> <20><><EFBFBD><EFBFBD> */
|
||||
/* */
|
||||
/*--------------------------------------------------*/
|
||||
function Ack()
|
||||
{
|
||||
//ACK<43><4B> Data
|
||||
$this->m_Data->m_sBody = "";
|
||||
$this->m_Data->m_sTail = "";
|
||||
$this->m_Data->m_sCmd = CMD_REQ_ACK;
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(Head)
|
||||
$this->m_Data->MakeHead();
|
||||
$this->m_Log->WriteLog( DEBUG, "MAKE HEAD OK" );
|
||||
//$this->m_Log->WriteLog( DEBUG, "MSG_TO_PG:[".$this->m_Data->m_sMsg."]" );
|
||||
|
||||
//Send
|
||||
if( ($rtv = $this->m_Socket->send($this->m_Data->m_sMsg)) != OK )
|
||||
{
|
||||
$err_msg = "ACK <20><><EFBFBD>ۿ<EFBFBD><DBBF><EFBFBD>";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
return ACK_CHECKSUM_ERR;
|
||||
}
|
||||
//$this->m_Log->WriteLog( DEBUG, "SEND OK" );
|
||||
|
||||
if( ($rtv = $this->m_Socket->recv($head, $body, $tail)) != OK )
|
||||
{
|
||||
$err_msg = "ACK <20><><EFBFBD>ſ<EFBFBD><C5BF><EFBFBD>(ACK)";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
return ACK_CHECKSUM_ERR;
|
||||
}
|
||||
//$this->m_Log->WriteLog( DEBUG, "RECV OK" );
|
||||
//$this->m_Log->WriteLog( INFO, "MSG_FROM_PG:[".$recv."]" );
|
||||
return OK;
|
||||
}
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
/* */
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><EFBFBD><DEBC><EFBFBD> <20><><EFBFBD><EFBFBD> */
|
||||
/* */
|
||||
/*--------------------------------------------------*/
|
||||
function NetCancel()
|
||||
{
|
||||
$this->m_Log->WriteLog( INFO, "WAIT NETCANCEL INVOKING" );
|
||||
|
||||
if ( $this->m_type == TYPE_CANCEL || $this->m_type == TYPE_REPAY || $this->m_type == TYPE_VACCTREPAY || $this->m_type == TYPE_RECEIPT ||
|
||||
$this->m_type == TYPE_CONFIRM || $this->m_type == TYPE_OCBQUERY || $this->m_type == TYPE_ESCROW ||
|
||||
$this->m_type == TYPE_CAPTURE || $this->m_type == TYPE_AUTH || $this->m_type == TYPE_AUTHBILL ||
|
||||
($this->m_type == TYPE_ESCROW && $this->m_Data->m_EscrowType == TYPE_ESCROW_DNY_CNF ) ||
|
||||
$this->m_type == TYPE_NETCANCEL
|
||||
)
|
||||
{
|
||||
$this->m_Log->WriteLog( INFO, "DON'T NEED NETCANCEL" );
|
||||
return true;
|
||||
}
|
||||
|
||||
//NetCancel<65><6C> Data
|
||||
$this->m_Data->m_REQUEST["cancelmsg"] = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
|
||||
$body = "";
|
||||
$sign = "";
|
||||
|
||||
$this->m_Data->m_Type = TYPE_CANCEL; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD>.<2E><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ʋ<EFBFBD><C6B2><EFBFBD><EFBFBD>..<2E><>~
|
||||
|
||||
//added escrow netcancel, 08.03.11
|
||||
if( $this->m_type == TYPE_ESCROW && $this->m_Data->m_EscrowType == TYPE_ESCROW_DLV )
|
||||
$this->m_Data->m_sCmd = CMD_REQ_DLV_NETC;
|
||||
else if($this->m_type == TYPE_ESCROW && $this->m_Data->m_EscrowType == TYPE_ESCROW_CNF )
|
||||
$this->m_Data->m_sCmd = CMD_REQ_CNF_NETC;
|
||||
else if($this->m_type == TYPE_ESCROW && $this->m_Data->m_EscrowType == TYPE_ESCROW_DNY )
|
||||
$this->m_Data->m_sCmd = CMD_REQ_DNY_NETC;
|
||||
else
|
||||
$this->m_Data->m_sCmd = CMD_REQ_NETC;
|
||||
|
||||
$this->m_Data->m_sCrypto = FLAG_CRYPTO_3DES;
|
||||
|
||||
//<2F><>ȣȭ
|
||||
if( ($rtv = $this->m_Data->MakeEncrypt( $this->m_Crypto )) != OK )
|
||||
{
|
||||
$err_msg = "<EFBFBD><EFBFBD>ȣȭ <20><><EFBFBD><EFBFBD>";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
//$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
return;
|
||||
}
|
||||
$this->m_Log->WriteLog( DEBUG, "MAKE ENCRYPT OK[".$this->m_Data->m_EncBody."]" );
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(Body)
|
||||
$this->m_Data->MakeBody();
|
||||
$this->m_Log->WriteLog( INFO, "MAKE BODY OK" );
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD>(sign)
|
||||
if( ($rtv = $this->m_Crypto->Sign( $this->m_Data->m_sBody, $sign )) != OK )
|
||||
{
|
||||
$err_msg = "<EFBFBD><EFBFBD><EFBFBD>ν<EFBFBD><EFBFBD><EFBFBD>";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
//$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
return false;
|
||||
}
|
||||
$this->m_Data->m_sTail = $sign;
|
||||
$this->m_Log->WriteLog( INFO, "SIGN OK" );
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(Head)
|
||||
$this->m_Data->MakeHead();
|
||||
$this->m_Log->WriteLog( INFO, "MAKE HEAD OK" );
|
||||
|
||||
$this->m_Log->WriteLog( DEBUG, "MSG_TO_PG:[".$this->m_Data->m_sMsg."]" );
|
||||
|
||||
//<2F><><EFBFBD>ϻ<EFBFBD><CFBB><EFBFBD>
|
||||
$this->m_Socket = new INISocket("");
|
||||
$this->m_Socket->ip = $this->m_connIP; //<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> IP <20><><EFBFBD><EFBFBD>, 08.03.12
|
||||
if( ($rtv = $this->m_Socket->open()) != OK )
|
||||
{
|
||||
$err_msg = "[".$this->m_Socket->ip."]<5D><><EFBFBD>Ͽ<EFBFBD><CFBF><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(NETC)::".$this->m_Socket->getErr();
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
//$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
$this->m_Log->CloseLog( $this->GetResult(NM_RESULTMSG) );
|
||||
$this->m_Socket->close();
|
||||
$this->m_Crypto->FreeAllKey();
|
||||
return;
|
||||
}
|
||||
$this->m_Log->WriteLog( INFO, "SOCKET CONNECT OK::".$this->m_Socket->ip );
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD>۽<EFBFBD>
|
||||
if( ($rtv = $this->m_Socket->send($this->m_Data->m_sMsg)) != OK )
|
||||
{
|
||||
$err_msg = "<EFBFBD><EFBFBD><EFBFBD>ϼ۽ſ<EFBFBD><EFBFBD><EFBFBD>(NETC)".$this->m_Socket->getErr();
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
//$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
$this->m_Socket->close();
|
||||
return false;
|
||||
}
|
||||
$this->m_Log->WriteLog( INFO, "SEND OK" );
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
if( ($rtv = $this->m_Socket->recv($head, $body, $tail)) != OK )
|
||||
{
|
||||
$err_msg = "<EFBFBD><EFBFBD><EFBFBD>ϼ<EFBFBD><EFBFBD>ſ<EFBFBD><EFBFBD><EFBFBD>(NETC)";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
//$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
$this->m_Socket->close();
|
||||
return false;
|
||||
}
|
||||
$this->m_Log->WriteLog( INFO, "RECV OK" );
|
||||
$this->m_Log->WriteLog( DEBUG, "MSG_FROM_PG:[".$head.$body.$tail."]" );
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD>Ȯ<EFBFBD><C8AE>
|
||||
if( ($rtv = $this->m_Crypto->Verify( $body, $tail )) != OK )
|
||||
{
|
||||
$err_msg = "VERIFY FAIL";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
//$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
$this->m_Socket->close();
|
||||
return false;
|
||||
}
|
||||
$this->m_Log->WriteLog( INFO, "VERIFY OK" );
|
||||
|
||||
//<2F><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>Ľ<EFBFBD><C4BD><EFBFBD><EFBFBD><EFBFBD> <20>ʴ´<CAB4>!!!!
|
||||
//<2F>׳<EFBFBD> <20><><EFBFBD>⼭ <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ǰ<EFBFBD><C7B0>ϴ<EFBFBD>.-_-;;
|
||||
//Head <20>Ľ<EFBFBD>
|
||||
if( ($rtv = $this->m_Data->ParseHead( $head )) != OK )
|
||||
{
|
||||
$err_msg = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(HEAD) <20>Ľ<EFBFBD> <20><><EFBFBD><EFBFBD>";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
//$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
$this->m_Socket->close();
|
||||
return;
|
||||
}
|
||||
//Body <20>Ľ<EFBFBD>
|
||||
if( ($rtv = $this->m_Data->ParseBody( $body, $encrypted, $sessionkey )) != OK )
|
||||
{
|
||||
$err_msg = "<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>(Body) <20>Ľ<EFBFBD> <20><><EFBFBD><EFBFBD>";
|
||||
$this->m_Log->WriteLog( ERROR, $err_msg );
|
||||
//$this->MakeTXErrMsg( $rtv, $err_msg );
|
||||
$this->m_Socket->close();
|
||||
return;
|
||||
}
|
||||
|
||||
//if( $this->GetResult(NM_RESULTCODE) == "00" )
|
||||
if(strcmp($this->GetResult(NM_RESULTCODE),"00") == 0)
|
||||
$this->m_Log->WriteLog( INFO, "SUCCESS NETCANCEL" );
|
||||
else
|
||||
$this->m_Log->WriteLog( ERROR, "ERROR NETCANCEL[".$this->GetResult(NM_RESULTMSG)."]" );
|
||||
return true;
|
||||
}
|
||||
|
||||
function MakeIMStr($s, $t)
|
||||
{
|
||||
$this->m_Crypto = new INICrypto( $this->m_REQUEST );
|
||||
if( $t == "H" )
|
||||
return $this->m_Crypto->MakeIMStr($s, base64_decode(IMHK));
|
||||
else if( $t == "J" )
|
||||
return $this->m_Crypto->MakeIMStr($s, base64_decode(IMJK));
|
||||
}
|
||||
|
||||
/*--------------------------------------------------*/
|
||||
/* */
|
||||
/* <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><DEBC><EFBFBD> Make */
|
||||
/* */
|
||||
/*--------------------------------------------------*/
|
||||
function MakeTXErrMsg($err_code, $err_msg)
|
||||
{
|
||||
$this->m_RESULT[NM_RESULTCODE] = "01";
|
||||
$this->m_RESULT[NM_RESULTERRORCODE] = $err_code;
|
||||
$this->m_RESULT[NM_RESULTMSG] = "[".$err_code."|".$err_msg."]";
|
||||
$this->m_Data->GTHR( $err_code, $err_msg );
|
||||
return;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
?>
|
||||
251
shop/inicis/libs/INISoc.php
Normal file
251
shop/inicis/libs/INISoc.php
Normal file
@ -0,0 +1,251 @@
|
||||
<?php
|
||||
/**
|
||||
* Copyright (C) 2007 INICIS Inc.
|
||||
*
|
||||
* <20>ش<EFBFBD> <20><><EFBFBD>̺귯<CCBA><EAB7AF><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>Ǿ<C7BE><EEBCAD> <20>ȵ˴ϴ<CBB4>.
|
||||
* <20><><EFBFBD>Ƿ<EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>ڵ忡 <20><><EFBFBD><EFBFBD> å<><C3A5><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD>ڿ<EFBFBD><DABF><EFBFBD> <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD> <20>˷<EFBFBD><CBB7>帳<EFBFBD>ϴ<EFBFBD>.
|
||||
*
|
||||
*/
|
||||
|
||||
class INISocket{
|
||||
var $hnd;
|
||||
var $host;
|
||||
var $ip;
|
||||
var $port;
|
||||
var $type;
|
||||
var $family;
|
||||
var $protocol;
|
||||
var $bConnected;
|
||||
var $sBuffer;
|
||||
var $sSocErr;
|
||||
var $dns_laptime;
|
||||
|
||||
function error($msg=null)
|
||||
{
|
||||
$errCode = socket_last_error($this->hnd);
|
||||
if($errCode!=0)
|
||||
{
|
||||
//Connection reset by peer
|
||||
if($errCode==104)
|
||||
$this->bConnected = false;
|
||||
$errMsg = socket_strerror($errCode);
|
||||
$this->sSocErr = "(".$errCode.")(".$errMsg.")";
|
||||
socket_clear_error($this->hnd);
|
||||
}
|
||||
elseif (strlen($msg))
|
||||
{
|
||||
$this->sSocErr = $errMsg;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
function INISocket($host)
|
||||
{
|
||||
$this->family = AF_INET;
|
||||
$this->type = SOCK_STREAM;
|
||||
$this->protocol = SOL_TCP;
|
||||
$this->hnd = @socket_create($this->family,$this->type,$this->protocol);
|
||||
$this->error();
|
||||
$this->sBuffer = false;
|
||||
$this->ip = null;
|
||||
$this->host = $host;
|
||||
$this->port = PG_PORT;
|
||||
}
|
||||
|
||||
function DNSLookUP()
|
||||
{
|
||||
$starttime=GetMicroTime();
|
||||
$ip = @gethostbyname($this->host);
|
||||
if($ip)
|
||||
{
|
||||
$this->ip = $ip;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error("Hostname ".$this->host." could not be resolved");
|
||||
return DNS_LOOKUP_ERR;
|
||||
}
|
||||
|
||||
$this->dns_laptime=round(GetMicroTime()-$starttime, 3);
|
||||
if( $this->dns_laptime > DNS_LOOKUP_TIMEOUT )
|
||||
return DNS_LOOKUP_TIMEOUT_ERR;
|
||||
|
||||
return OK;
|
||||
}
|
||||
|
||||
function open()
|
||||
{
|
||||
//Connect timeout Trickkkkkkkkk ##2. NONBLOCKING NEED , less CPU clocking!!^^
|
||||
//modified by ddaemiri, 2007.08.30
|
||||
|
||||
socket_set_nonblock($this->hnd);
|
||||
if (!@socket_connect($this->hnd, $this->ip, $this->port))
|
||||
{
|
||||
$err = socket_last_error($this->hnd);
|
||||
$err_str = socket_strerror($err);
|
||||
if ($err == 106) //EISCONN
|
||||
{
|
||||
$this->bConnected = true;
|
||||
socket_set_block($this->hnd);
|
||||
return OK;
|
||||
}
|
||||
//EINPROGRESS( Linux:115, Window Socket:10035, FreeBSD4.10:36, <20><><EFBFBD><EFBFBD> OS üũ <20>Ұ<EFBFBD><D2B0><EFBFBD><EFBFBD>ؼ<EFBFBD> str<74><72><EFBFBD>ε<EFBFBD> <20>˻<EFBFBD> )
|
||||
if ($err != ERRCODE_INPROGRESS_LINUX && $err != ERRCODE_INPROGRESS_WIN &&
|
||||
$err != ERRCODE_INPROGRESS_FREEBSD && $err_str != ERRSTR_INPROGRESS )
|
||||
{
|
||||
$this->error();
|
||||
socket_close($this->hnd);
|
||||
return SOCK_CONN_ERR;
|
||||
}
|
||||
}
|
||||
|
||||
$read = array($this->hnd);
|
||||
$write = array($this->hnd);
|
||||
$rtv = @socket_select($read,$write,$except=NULL,TIMEOUT_CONNECT);
|
||||
if( $rtv == 0 ) //TIMEOUT
|
||||
{
|
||||
$this->error();
|
||||
socket_close($this->hnd);
|
||||
return SOCK_TIMEO_ERR;
|
||||
}
|
||||
else if ( $rtv === FALSE )
|
||||
{
|
||||
$this->error();
|
||||
socket_close($this->hnd);
|
||||
return SOCK_ETC1_ERR;
|
||||
}
|
||||
if( in_array($this->hnd,$read) || in_array($this->hnd,$write))
|
||||
{
|
||||
if(@socket_get_option($this->hnd, SOL_SOCKET, SO_ERROR) === FALSE)
|
||||
{
|
||||
$this->error();
|
||||
socket_close($this->hnd);
|
||||
return SOCK_ETC2_ERR;
|
||||
}
|
||||
}
|
||||
$this->bConnected = true;
|
||||
socket_set_block($this->hnd);
|
||||
return OK;
|
||||
}
|
||||
function close()
|
||||
{
|
||||
//if(!$this->bConnected) return;
|
||||
@socket_shutdown($this->hnd,2);
|
||||
@socket_close($this->hnd);
|
||||
}
|
||||
|
||||
function send($sBuf)
|
||||
{
|
||||
if(!$this->bConnected)
|
||||
{
|
||||
$this->error("Socket error. Cannot send data on a closed socket.");
|
||||
return SOCK_SEND1_ERR;
|
||||
}
|
||||
|
||||
$vWrite = array($this->hnd);
|
||||
|
||||
while(($rtv = @socket_select($vRead = null,$vWrite ,$vExcept = null, TIMEOUT_WRITE)) === FALSE);
|
||||
|
||||
if( $rtv == 0 )
|
||||
{
|
||||
$this->error();
|
||||
//return SOCK_TIMEO_ERR;
|
||||
return SOCK_CONN_ERR; //modify 2008.04.01
|
||||
}
|
||||
if( $rtv === FALSE )
|
||||
{
|
||||
$this->error();
|
||||
return SOCK_SEND2_ERR;
|
||||
}
|
||||
|
||||
$tmpBuf = strlen($sBuf) ? $sBuf : $this->sBuffer;
|
||||
$iBufLen = strlen($tmpBuf);
|
||||
$res = @socket_send($this->hnd,$tmpBuf,$iBufLen,0);
|
||||
|
||||
if($res === FALSE)
|
||||
{
|
||||
$this->error();
|
||||
return SOCK_SEND2_ERR;
|
||||
}
|
||||
elseif ($res < $iBufLen)
|
||||
{
|
||||
$tmpBuf = substr($tmpBuf,$res);
|
||||
$this->send($tmpBuf);
|
||||
}
|
||||
return OK;
|
||||
}
|
||||
function WaitRecv( &$recv_buf, $nleft )
|
||||
{
|
||||
$recv_buf = null;
|
||||
$read = array($this->hnd);
|
||||
$buf = null;
|
||||
while( $nleft > 0 )
|
||||
{
|
||||
$rtv = @socket_select($read,$write=NULL,$except=NULL,TIMEOUT_READ);
|
||||
if( $rtv == 0 )
|
||||
{
|
||||
$this->error();
|
||||
return SOCK_TIMEO_ERR;
|
||||
}
|
||||
else if ( $rtv === FALSE )
|
||||
{
|
||||
$this->error();
|
||||
return SOCK_ETC1_ERR;
|
||||
}
|
||||
|
||||
if(!in_array($this->hnd,$read))
|
||||
{
|
||||
$this->error();
|
||||
return SOCK_RECV1_ERR;
|
||||
}
|
||||
if($buf = @socket_read($this->hnd, $nleft))
|
||||
{
|
||||
$recv_buf .= $buf;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error();
|
||||
return SOCK_RECV1_ERR;
|
||||
}
|
||||
$nleft -= strlen( $buf );
|
||||
}
|
||||
return OK;
|
||||
}
|
||||
function recv(&$head, &$body, &$tail)
|
||||
{
|
||||
if(!$this->bConnected)
|
||||
{
|
||||
$this->error("Socket error. Cannot read any data on a closed socket.");
|
||||
return SOCK_RECV1_ERR;
|
||||
}
|
||||
|
||||
//------------------------------------------------------
|
||||
//head
|
||||
//------------------------------------------------------
|
||||
if( ($rtv = $this->WaitRecv( $head, MSGHEADER_LEN)) != OK ) return $rtv;
|
||||
|
||||
if( $head == "" ) return SOCK_RECV2_ERR;
|
||||
$body_len = intval(substr( $head, 0, BODY_LEN ));
|
||||
$tail_len = intval(substr( $head, BODY_LEN, TAIL_LEN ));
|
||||
|
||||
//------------------------------------------------------
|
||||
//body
|
||||
//------------------------------------------------------
|
||||
if( ($rtv = $this->WaitRecv( $body, $body_len)) != OK ) return $rtv;
|
||||
|
||||
//------------------------------------------------------
|
||||
//tail
|
||||
//------------------------------------------------------
|
||||
if( ($rtv = $this->WaitRecv( $tail, $tail_len)) != OK ) return $rtv;
|
||||
|
||||
return OK;
|
||||
}
|
||||
function getErr()
|
||||
{
|
||||
return $this->sSocErr;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
3495
shop/inicis/libs/INIXml.php
Normal file
3495
shop/inicis/libs/INIXml.php
Normal file
File diff suppressed because it is too large
Load Diff
127
shop/inicis/orderform.1.php
Normal file
127
shop/inicis/orderform.1.php
Normal file
@ -0,0 +1,127 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 전자결제를 사용할 때만 실행
|
||||
if($default['de_iche_use'] || $default['de_vbank_use'] || $default['de_hp_use'] || $default['de_card_use']) {
|
||||
?>
|
||||
|
||||
<script language=javascript src="<?php echo $ini_js_url; ?>"></script>
|
||||
<script language=javascript>
|
||||
StartSmartUpdate();
|
||||
</script>
|
||||
|
||||
<script language=javascript>
|
||||
var openwin;
|
||||
|
||||
function set_encrypt_data(frm)
|
||||
{
|
||||
// 데이터 암호화 처리
|
||||
var result = true;
|
||||
$.ajax({
|
||||
url: g5_url+"/shop/inicis/encryptdata.php",
|
||||
type: "POST",
|
||||
data: {
|
||||
price : frm.good_mny.value
|
||||
},
|
||||
dataType: "json",
|
||||
async: false,
|
||||
cache: false,
|
||||
success: function(data) {
|
||||
if(data.error == "") {
|
||||
frm.ini_encfield.value = data.ini_encfield;
|
||||
frm.ini_certid.value = data.ini_certid;
|
||||
} else {
|
||||
alert(data.error);
|
||||
result = false;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
function pay(frm)
|
||||
{
|
||||
// MakePayMessage()를 호출함으로써 플러그인이 화면에 나타나며, Hidden Field
|
||||
// 에 값들이 채워지게 됩니다. 일반적인 경우, 플러그인은 결제처리를 직접하는 것이
|
||||
// 아니라, 중요한 정보를 암호화 하여 Hidden Field의 값들을 채우고 종료하며,
|
||||
// 다음 페이지인 INIsecureresult.php로 데이터가 포스트 되어 결제 처리됨을 유의하시기 바랍니다.
|
||||
|
||||
if(document.forderform.clickcontrol.value == "enable")
|
||||
{
|
||||
|
||||
if(document.forderform.goodname.value == "") // 필수항목 체크 (상품명, 상품가격, 구매자명, 구매자 이메일주소, 구매자 전화번호)
|
||||
{
|
||||
alert("상품명이 빠졌습니다. 필수항목입니다.");
|
||||
return false;
|
||||
}
|
||||
else if(document.forderform.buyername.value == "")
|
||||
{
|
||||
alert("구매자명이 빠졌습니다. 필수항목입니다.");
|
||||
return false;
|
||||
}
|
||||
else if(document.forderform.buyeremail.value == "")
|
||||
{
|
||||
alert("구매자 이메일주소가 빠졌습니다. 필수항목입니다.");
|
||||
return false;
|
||||
}
|
||||
else if(document.forderform.buyertel.value == "")
|
||||
{
|
||||
alert("구매자 전화번호가 빠졌습니다. 필수항목입니다.");
|
||||
return false;
|
||||
}
|
||||
else if( ( navigator.userAgent.indexOf("MSIE") >= 0 || navigator.appName == 'Microsoft Internet Explorer' ) && (document.INIpay == null || document.INIpay.object == null) ) // 플러그인 설치유무 체크
|
||||
{
|
||||
alert("\n이니페이 플러그인 128이 설치되지 않았습니다. \n\n안전한 결제를 위하여 이니페이 플러그인 128의 설치가 필요합니다. \n\n다시 설치하시려면 Ctrl + F5키를 누르시거나 메뉴의 [보기/새로고침]을 선택하여 주십시오.");
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
/******
|
||||
* 플러그인이 참조하는 각종 결제옵션을 이곳에서 수행할 수 있습니다.
|
||||
* (자바스크립트를 이용한 동적 옵션처리)
|
||||
*/
|
||||
|
||||
|
||||
if (MakePayMessage(frm))
|
||||
{
|
||||
disable_click();
|
||||
document.getElementById("display_pay_button").style.display = "none";
|
||||
document.getElementById('display_pay_process').style.display = '';
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
if( IsPluginModule() ) //plugin타입 체크
|
||||
{
|
||||
alert("결제를 취소하셨습니다.");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function enable_click()
|
||||
{
|
||||
document.forderform.clickcontrol.value = "enable"
|
||||
}
|
||||
|
||||
function disable_click()
|
||||
{
|
||||
document.forderform.clickcontrol.value = "disable"
|
||||
}
|
||||
|
||||
function focus_control()
|
||||
{
|
||||
if(document.forderform.clickcontrol.value == "disable")
|
||||
openwin.focus();
|
||||
}
|
||||
</script>
|
||||
|
||||
<?php } ?>
|
||||
86
shop/inicis/orderform.2.php
Normal file
86
shop/inicis/orderform.2.php
Normal file
@ -0,0 +1,86 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
|
||||
<?php /* 주문폼 자바스크립트 에러 방지를 위해 추가함 */ ?>
|
||||
<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
|
||||
}
|
||||
?>
|
||||
|
||||
<input type="hidden" name="goodname" value="<?php echo $goods; ?>">
|
||||
<input type="hidden" name="buyername" value="">
|
||||
<input type="hidden" name="buyeremail" value="">
|
||||
<input type="hidden" name="parentemail" value="">
|
||||
<input type="hidden" name="buyertel" value="">
|
||||
<input type="hidden" name="recvname" value="">
|
||||
<input type="hidden" name="recvtel" value="">
|
||||
<input type="hidden" name="recvaddr" value="">
|
||||
<input type="hidden" name="recvpostnum" value="">
|
||||
|
||||
<!-- 기타설정 -->
|
||||
<input type="hidden" name="currency" value="WON">
|
||||
|
||||
<!-- 결제방법 -->
|
||||
<input type="hidden" name="gopaymethod" value="">
|
||||
|
||||
<!--
|
||||
SKIN : 플러그인 스킨 칼라 변경 기능 - 6가지 칼라(ORIGINAL, GREEN, ORANGE, BLUE, KAKKI, GRAY)
|
||||
HPP : 컨텐츠 또는 실물 결제 여부에 따라 HPP(1)과 HPP(2)중 선택 적용(HPP(1):컨텐츠, HPP(2):실물).
|
||||
Card(0): 신용카드 지불시에 이니시스 대표 가맹점인 경우에 필수적으로 세팅 필요 ( 자체 가맹점인 경우에는 카드사의 계약에 따라 설정) - 자세한 내용은 메뉴얼 참조.
|
||||
OCB : OK CASH BAG 가맹점으로 신용카드 결제시에 OK CASH BAG 적립을 적용하시기 원하시면 "OCB" 세팅 필요 그 외에 경우에는 삭제해야 정상적인 결제 이루어짐.
|
||||
no_receipt : 은행계좌이체시 현금영수증 발행여부 체크박스 비활성화 (현금영수증 발급 계약이 되어 있어야 사용가능)
|
||||
-->
|
||||
<input type="hidden" name="acceptmethod" value="HPP(2):Card(0):no_receipt:cardpoint<?php echo $useescrow; ?>">
|
||||
|
||||
|
||||
<!--
|
||||
상점 주문번호 : 무통장입금 예약(가상계좌 이체),전화결재 관련 필수필드로 반드시 상점의 주문번호를 페이지에 추가해야 합니다.
|
||||
결제수단 중에 은행 계좌이체 이용 시에는 주문 번호가 결제결과를 조회하는 기준 필드가 됩니다.
|
||||
상점 주문번호는 최대 40 BYTE 길이입니다.
|
||||
주의:절대 한글값을 입력하시면 안됩니다.
|
||||
-->
|
||||
<input type="hidden" name="oid" value="<?php echo $od_id; ?>">
|
||||
|
||||
|
||||
<!--
|
||||
플러그인 좌측 상단 상점 로고 이미지 사용
|
||||
이미지의 크기 : 90 X 34 pixels
|
||||
플러그인 좌측 상단에 상점 로고 이미지를 사용하실 수 있으며,
|
||||
주석을 풀고 이미지가 있는 URL을 입력하시면 플러그인 상단 부분에 상점 이미지를 삽입할수 있습니다.
|
||||
-->
|
||||
<!--input type="hidden" name="ini_logoimage_url" value="http://[사용할 이미지주소]"-->
|
||||
|
||||
<!--
|
||||
좌측 결제메뉴 위치에 이미지 추가
|
||||
이미지의 크기 : 단일 결제 수단 - 91 X 148 pixels, 신용카드/ISP/계좌이체/가상계좌 - 91 X 96 pixels
|
||||
좌측 결제메뉴 위치에 미미지를 추가하시 위해서는 담당 영업대표에게 사용여부 계약을 하신 후
|
||||
주석을 풀고 이미지가 있는 URL을 입력하시면 플러그인 좌측 결제메뉴 부분에 이미지를 삽입할수 있습니다.
|
||||
-->
|
||||
<!--input type="hidden" name="ini_menuarea_url" value="http://[사용할 이미지주소]"-->
|
||||
|
||||
<!--
|
||||
플러그인에 의해서 값이 채워지거나, 플러그인이 참조하는 필드들
|
||||
삭제/수정 불가
|
||||
uid 필드에 절대로 임의의 값을 넣지 않도록 하시기 바랍니다.
|
||||
-->
|
||||
<input type="hidden" name="ini_encfield" value="">
|
||||
<input type="hidden" name="ini_certid" value="">
|
||||
<input type="hidden" name="quotainterest" value="">
|
||||
<input type="hidden" name="paymethod" value="">
|
||||
<input type="hidden" name="cardcode" value="">
|
||||
<input type="hidden" name="cardquota" value="">
|
||||
<input type="hidden" name="rbankcode" value="">
|
||||
<input type="hidden" name="reqsign" value="DONE">
|
||||
<input type="hidden" name="encrypted" value="">
|
||||
<input type="hidden" name="sessionkey" value="">
|
||||
<input type="hidden" name="uid" value="">
|
||||
<input type="hidden" name="sid" value="">
|
||||
<input type="hidden" name="version" value="4000">
|
||||
<input type="hidden" name="clickcontrol" value="">
|
||||
20
shop/inicis/orderform.3.php
Normal file
20
shop/inicis/orderform.3.php
Normal file
@ -0,0 +1,20 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
// 전자결제를 사용할 때만 실행
|
||||
if($default['de_iche_use'] || $default['de_vbank_use'] || $default['de_hp_use'] || $default['de_card_use']) {
|
||||
?>
|
||||
|
||||
<div id="display_pay_button" class="btn_confirm" style="display:none">
|
||||
<input type="submit" value="주문하기" 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>
|
||||
<?php } ?>
|
||||
|
||||
<script>
|
||||
document.getElementById("display_pay_button").style.display = "" ;
|
||||
</script>
|
||||
3
shop/inicis/orderform.4.php
Normal file
3
shop/inicis/orderform.4.php
Normal file
@ -0,0 +1,3 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
3
shop/inicis/orderform.5.php
Normal file
3
shop/inicis/orderform.5.php
Normal file
@ -0,0 +1,3 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
?>
|
||||
79
shop/inicis/orderpartcancel.inc.php
Normal file
79
shop/inicis/orderpartcancel.inc.php
Normal file
@ -0,0 +1,79 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
if($od['od_pg'] != 'inicis') return;
|
||||
|
||||
include_once(G5_SHOP_PATH.'/settle_inicis.inc.php');
|
||||
|
||||
$od_tax_mny = round((int)$mod_tax_mny / 1.1);
|
||||
|
||||
$currency = 'WON';
|
||||
$oldtid = $od['od_tno'];
|
||||
$price = (int)$mod_tax_mny + (int)$mod_free_mny;
|
||||
$confirm_price = (int)$od['od_receipt_price'] - (int)$od['od_refund_price'] - $price;
|
||||
$buyeremail = $od['od_email'];
|
||||
$tax = (int)$mod_tax_mny - $od_tax_mny;
|
||||
$taxfree = (int)$mod_free_mny;
|
||||
|
||||
/***********************
|
||||
* 3. 재승인 정보 설정 *
|
||||
***********************/
|
||||
$inipay->SetField("type", "repay"); // 고정 (절대 수정 불가)
|
||||
$inipay->SetField("pgid", "INIphpRPAY"); // 고정 (절대 수정 불가)
|
||||
$inipay->SetField("subpgip", "203.238.3.10"); // 고정
|
||||
$inipay->SetField("mid", $default['de_inicis_mid']); // 상점아이디
|
||||
$inipay->SetField("admin", $default['de_inicis_admin_key']); //비대칭 사용키 키패스워드
|
||||
$inipay->SetField("oldtid", $oldtid); // 취소할 거래의 거래아이디
|
||||
$inipay->SetField("currency", $currency); // 화폐단위
|
||||
$inipay->SetField("price", $price); // 취소금액
|
||||
$inipay->SetField("confirm_price", $confirm_price); // 승인요청금액
|
||||
$inipay->SetField("buyeremail", $buyeremail); // 구매자 이메일 주소
|
||||
$inipay->SetField("tax", $tax); // 부가세금액
|
||||
$inipay->SetField("taxfree", $taxfree); // 비과세금액
|
||||
|
||||
/******************
|
||||
* 4. 재승인 요청 *
|
||||
******************/
|
||||
$inipay->startAction();
|
||||
|
||||
|
||||
/*******************************************************************
|
||||
* 5. 재승인 결과 *
|
||||
* *
|
||||
* 신거래번호 : $inipay->getResult('TID') *
|
||||
* 결과코드 : $inipay->getResult('ResultCode') ("00"이면 재승인 성공) *
|
||||
* 결과내용 : $inipay->getResult('ResultMsg') (재승인결과에 대한 설명) *
|
||||
* 원거래 번호 : $inipay->getResult('PRTC_TID') *
|
||||
* 최종결제 금액 : $inipay->getResult('PRTC_Remains') *
|
||||
* 부분취소 금액 : $inipay->getResult('PRTC_Price') *
|
||||
* 부분취소,재승인 구분값 : $inipay->getResult('PRTC_Type') *
|
||||
* ("0" : 재승인, "1" : 부분취소) *
|
||||
* 부분취소(재승인) 요청횟수 : $inipay->getResult('PRTC_Cnt') *
|
||||
*******************************************************************/
|
||||
|
||||
if($inipay->getResult('ResultCode') == '00') {
|
||||
// 환불금액기록
|
||||
$tno = $inipay->getResult('PRTC_TID');
|
||||
$re_price = $inipay->getResult('PRTC_Price');
|
||||
|
||||
$sql = " update {$g5['g5_shop_order_table']}
|
||||
set od_refund_price = od_refund_price + '$re_price',
|
||||
od_shop_memo = concat(od_shop_memo, \"$mod_memo\")
|
||||
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 {
|
||||
alert(iconv_utf8($inipay->GetResult("ResultMsg")).' 코드 : '.$inipay->GetResult("ResultCode"));
|
||||
}
|
||||
?>
|
||||
197
shop/inicis/taxsave_form.php
Normal file
197
shop/inicis/taxsave_form.php
Normal file
@ -0,0 +1,197 @@
|
||||
<?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; ?>/inicis/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_svc); ?>원</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">부가가치세</th>
|
||||
<td><?php echo number_format($amt_tax); ?>원<!-- 거래금액 총합 - 공급가액 - 봉사료 --></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>
|
||||
193
shop/inicis/taxsave_result.php
Normal file
193
shop/inicis/taxsave_result.php
Normal file
@ -0,0 +1,193 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
include_once(G5_SHOP_PATH.'/settle_inicis.inc.php');
|
||||
|
||||
/* INIreceipt.php
|
||||
*
|
||||
* 현금결제(실시간 은행계좌이체, 무통장입금)에 대한 현금결제 영수증 발행 요청한다.
|
||||
*
|
||||
*
|
||||
* http://www.inicis.com
|
||||
* http://support.inicis.com
|
||||
* Copyright (C) 2006 Inicis, Co. All rights reserved.
|
||||
*/
|
||||
|
||||
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_sup = (int)$od['od_tax_mny'] + (int)$od['od_free_mny'];
|
||||
$amt_tax = (int)$od['od_vat_mny'];
|
||||
$amt_svc = 0;
|
||||
}
|
||||
|
||||
|
||||
$reg_num = $id_info;
|
||||
$useopt = $tr_code;
|
||||
$currency = 'WON';
|
||||
|
||||
/*********************
|
||||
* 3. 발급 정보 설정 *
|
||||
*********************/
|
||||
$inipay->SetField("type" ,"receipt"); // 고정
|
||||
$inipay->SetField("pgid" ,"INIphpRECP"); // 고정
|
||||
$inipay->SetField("paymethod" ,"CASH"); // 고정 (요청분류)
|
||||
$inipay->SetField("currency" ,$currency); // 화폐단위 (고정)
|
||||
/**************************************************************************************************
|
||||
* admin 은 키패스워드 변수명입니다. 수정하시면 안됩니다. 1111의 부분만 수정해서 사용하시기 바랍니다.
|
||||
* 키패스워드는 상점관리자 페이지(https://iniweb.inicis.com)의 비밀번호가 아닙니다. 주의해 주시기 바랍니다.
|
||||
* 키패스워드는 숫자 4자리로만 구성됩니다. 이 값은 키파일 발급시 결정됩니다.
|
||||
* 키패스워드 값을 확인하시려면 상점측에 발급된 키파일 안의 readme.txt 파일을 참조해 주십시오.
|
||||
**************************************************************************************************/
|
||||
$inipay->SetField("admin" ,$default['de_inicis_admin_key']); // 키패스워드(상점아이디에 따라 변경)
|
||||
$inipay->SetField("mid" ,$default['de_inicis_mid']); // 상점아이디
|
||||
$inipay->SetField("goodname" ,iconv_euckr($goodname)); // 상품명
|
||||
$inipay->SetField("cr_price" ,$amt_tot); // 총 현금결제 금액
|
||||
$inipay->SetField("sup_price" ,$amt_sup); // 공급가액
|
||||
$inipay->SetField("tax" ,$amt_tax); // 부가세
|
||||
$inipay->SetField("srvc_price" ,$amt_svc); // 봉사료
|
||||
$inipay->SetField("buyername" ,iconv_euckr($buyername)); // 구매자 성명
|
||||
$inipay->SetField("buyeremail" ,$buyeremail); // 구매자 이메일 주소
|
||||
$inipay->SetField("buyertel" ,$buyertel); // 구매자 전화번호
|
||||
$inipay->SetField("reg_num" ,$reg_num); // 현금결제자 주민등록번호
|
||||
$inipay->SetField("useopt" ,$useopt); // 현금영수증 발행용도 ("1" - 소비자 소득공제용, "2" - 사업자 지출증빙용)
|
||||
$inipay->SetField("companynumber" ,$companynumber); // 서브몰 사업자번호
|
||||
|
||||
|
||||
/****************
|
||||
* 4. 발급 요청 *
|
||||
****************/
|
||||
$inipay->startAction();
|
||||
|
||||
|
||||
/********************************************************************************
|
||||
* 5. 발급 결과 *
|
||||
* *
|
||||
* 결과코드 : $inipay->GetResult('ResultCode') ("00" 이면 발행 성공) *
|
||||
* 승인번호 : $inipay->GetResult('ApplNum') (현금영수증 발행 승인번호) *
|
||||
* 승인날짜 : $inipay->GetResult('ApplDate') (YYYYMMDD) *
|
||||
* 승인시각 : $inipay->GetResult('ApplTime') (HHMMSS) *
|
||||
* 거래번호 : $inipay->GetResult('TID') *
|
||||
* 총현금결제 금액 : $inipay->GetResult('CSHR_ApplPrice') *
|
||||
* 공급가액 : $inipay->GetResult('CSHR_SupplyPrice') *
|
||||
* 부가세 : $inipay->GetResult('CSHR_Tax') *
|
||||
* 봉사료 : $inipay->GetResult('CSHR_ServicePrice') *
|
||||
* 사용구분 : $inipay->GetResult('CSHR_Type') *
|
||||
********************************************************************************/
|
||||
|
||||
|
||||
// DB 반영
|
||||
if($inipay->GetResult('ResultCode') == '00') {
|
||||
$cash_no = $inipay->GetResult('ApplNum');
|
||||
|
||||
$cash = array();
|
||||
$cash['TID'] = $inipay->GetResult('TID');
|
||||
$cash['ApplNum'] = $inipay->GetResult('ApplNum');
|
||||
$cash['ApplDate'] = $inipay->GetResult('ApplDate');
|
||||
$cash['ApplTime'] = $inipay->GetResult('ApplTime');
|
||||
$cash['CSHR_Type'] = $inipay->GetResult('CSHR_Type');
|
||||
$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' ";
|
||||
}
|
||||
|
||||
$result = sql_query($sql, false);
|
||||
|
||||
if(!$result)
|
||||
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
||||
}
|
||||
|
||||
$g5['title'] = '현금영수증 발급';
|
||||
include_once(G5_PATH.'/head.sub.php');
|
||||
?>
|
||||
|
||||
<script>
|
||||
function showreceipt() // 현금 영수증 출력
|
||||
{
|
||||
var showreceiptUrl = "https://iniweb.inicis.com/DefaultWebApp/mall/cr/cm/Cash_mCmReceipt.jsp?noTid=<?php echo($inipay->GetResult('TID')); ?>" + "&clpaymethod=22";
|
||||
window.open(showreceiptUrl,"showreceipt","width=380,height=540, scrollbars=no,resizable=no");
|
||||
}
|
||||
</script>
|
||||
|
||||
<div id="lg_req_tx" class="new_win">
|
||||
<h1 id="win_title">현금영수증 - KG이니시스</h1>
|
||||
|
||||
<div class="tbl_head01 tbl_wrap">
|
||||
<table>
|
||||
<colgroup>
|
||||
<col class="grid_4">
|
||||
<col>
|
||||
</colgroup>
|
||||
<tbody>
|
||||
<tr>
|
||||
<th scope="row">결과코드</th>
|
||||
<td><?php echo $inipay->GetResult('ResultCode'); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">결과 메세지</th>
|
||||
<td><?php echo iconv_utf8($inipay->GetResult('ResultMsg')); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">현금영수증 거래번호</th>
|
||||
<td><?php echo $inipay->GetResult('TID'); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">현금영수증 승인번호</th>
|
||||
<td><?php echo $inipay->GetResult('ApplNum'); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">승인시간</th>
|
||||
<td><?php echo preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3 \\4:\\5:\\6",$inipay->GetResult('ApplDate').$inipay->GetResult('ApplTime')); ?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row">현금영수증 URL</th>
|
||||
<td>
|
||||
<button type="button" name="receiptView" class="btn_frmline" onClick="javascript:showreceipt();">영수증 확인</button>
|
||||
<p>영수증 확인은 실 등록의 경우에만 가능합니다.</p>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<?php
|
||||
include_once(G5_PATH.'/tail.sub.php');
|
||||
?>
|
||||
@ -90,7 +90,19 @@ if ($xpay->TX()) {
|
||||
//최종결제요청 결과 실패 DB처리
|
||||
//echo "최종결제요청 결과 실패 DB처리하시기 바랍니다.<br>";
|
||||
|
||||
alert($xpay->Response_Msg().' 코드 : '.$xpay->Response_Code());
|
||||
if(G5_IS_MOBILE) {
|
||||
if(isset($_POST['pp_id']) && $_POST['pp_id']) {
|
||||
$page_return_url = G5_SHOP_URL.'/personalpayform.php?pp_id='.get_session('ss_personalpay_id');
|
||||
} else {
|
||||
$page_return_url = G5_SHOP_URL.'/orderform.php';
|
||||
if(get_session('ss_direct'))
|
||||
$page_return_url .= '?sw_direct=1';
|
||||
}
|
||||
|
||||
alert($xpay->Response_Msg().' 코드 : '.$xpay->Response_Code(), $page_return_url);
|
||||
} else {
|
||||
alert($xpay->Response_Msg().' 코드 : '.$xpay->Response_Code());
|
||||
}
|
||||
}
|
||||
} else {
|
||||
//2)API 요청실패 화면처리
|
||||
|
||||
@ -30,10 +30,13 @@ $g5['title'] = '주문서 작성';
|
||||
if($default['de_iche_use'] || $default['de_vbank_use'] || $default['de_hp_use'] || $default['de_card_use']) {
|
||||
switch($default['de_pg_service']) {
|
||||
case 'lg':
|
||||
$g5['body_script'] = 'onload="isActiveXOK();"';
|
||||
$g5['body_script'] = ' onload="isActiveXOK();"';
|
||||
break;
|
||||
case 'inicis':
|
||||
$g5['body_script'] = ' onload="javascript:enable_click()"';
|
||||
break;
|
||||
default:
|
||||
$g5['body_script'] = 'onload="CheckPayplusInstall();"';
|
||||
$g5['body_script'] = ' onload="CheckPayplusInstall();"';
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -1355,6 +1358,25 @@ function forderform_check(f)
|
||||
f.LGD_CUSTOM_FIRSTPAY.value = "무통장";
|
||||
break;
|
||||
}
|
||||
<?php } else if($default['de_pg_service'] == 'inicis') { ?>
|
||||
switch(settle_method)
|
||||
{
|
||||
case "계좌이체":
|
||||
f.gopaymethod.value = "onlydbank";
|
||||
break;
|
||||
case "가상계좌":
|
||||
f.gopaymethod.value = "onlyvbank";
|
||||
break;
|
||||
case "휴대폰":
|
||||
f.gopaymethod.value = "onlyhpp";
|
||||
break;
|
||||
case "신용카드":
|
||||
f.gopaymethod.value = "onlycard";
|
||||
break;
|
||||
default:
|
||||
f.gopaymethod.value = "무통장";
|
||||
break;
|
||||
}
|
||||
<?php } ?>
|
||||
|
||||
// 결제정보설정
|
||||
@ -1380,7 +1402,8 @@ function forderform_check(f)
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
<?php } if($default['de_pg_service'] == 'lg') { ?>
|
||||
<?php } ?>
|
||||
<?php if($default['de_pg_service'] == 'lg') { ?>
|
||||
f.LGD_BUYER.value = f.od_name.value;
|
||||
f.LGD_BUYEREMAIL.value = f.od_email.value;
|
||||
f.LGD_BUYERPHONE.value = f.od_hp.value;
|
||||
@ -1403,6 +1426,24 @@ function forderform_check(f)
|
||||
f.submit();
|
||||
}
|
||||
<?php } ?>
|
||||
<?php if($default['de_pg_service'] == 'inicis') { ?>
|
||||
f.buyername.value = f.od_name.value;
|
||||
f.buyeremail.value = f.od_email.value;
|
||||
f.buyertel.value = f.od_hp.value ? f.od_hp.value : f.od_tel.value;
|
||||
f.recvname.value = f.od_b_name.value;
|
||||
f.recvtel.value = f.od_b_hp.value ? f.od_b_hp.value : f.od_b_tel.value;
|
||||
f.recvpostnum.value = f.od_b_zip1.value + f.od_b_zip2.value;
|
||||
f.recvaddr.value = f.od_b_addr1.value + " " +f.od_b_addr2.value;
|
||||
|
||||
if(f.gopaymethod.value != "무통장") {
|
||||
if(!set_encrypt_data(f))
|
||||
return false;
|
||||
|
||||
return pay(f);
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
<?php } ?>
|
||||
}
|
||||
|
||||
// 구매자 정보와 동일합니다.
|
||||
|
||||
@ -280,6 +280,9 @@ else if ($od_settle_case == "계좌이체")
|
||||
case 'lg':
|
||||
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
||||
break;
|
||||
case 'inicis':
|
||||
include G5_SHOP_PATH.'/inicis/inipay_result.php';
|
||||
break;
|
||||
default:
|
||||
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
|
||||
$bank_name = iconv("cp949", "utf-8", $bank_name);
|
||||
@ -304,6 +307,10 @@ else if ($od_settle_case == "가상계좌")
|
||||
case 'lg':
|
||||
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
||||
break;
|
||||
case 'inicis':
|
||||
include G5_SHOP_PATH.'/inicis/inipay_result.php';
|
||||
$od_app_no = $app_no;
|
||||
break;
|
||||
default:
|
||||
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
|
||||
$bankname = iconv("cp949", "utf-8", $bankname);
|
||||
@ -325,6 +332,9 @@ else if ($od_settle_case == "휴대폰")
|
||||
case 'lg':
|
||||
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
||||
break;
|
||||
case 'inicis':
|
||||
include G5_SHOP_PATH.'/inicis/inipay_result.php';
|
||||
break;
|
||||
default:
|
||||
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
|
||||
break;
|
||||
@ -334,7 +344,7 @@ else if ($od_settle_case == "휴대폰")
|
||||
$od_receipt_price = $amount;
|
||||
$od_receipt_point = $i_temp_point;
|
||||
$od_receipt_time = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3 \\4:\\5:\\6", $app_time);
|
||||
$od_bank_account = $commid.' '.$mobile_no;
|
||||
$od_bank_account = $commid . ($commid ? ' ' : '').$mobile_no;
|
||||
$pg_price = $amount;
|
||||
$od_misu = $i_price - $od_receipt_price;
|
||||
if($od_misu == 0)
|
||||
@ -346,6 +356,9 @@ else if ($od_settle_case == "신용카드")
|
||||
case 'lg':
|
||||
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
||||
break;
|
||||
case 'inicis':
|
||||
include G5_SHOP_PATH.'/inicis/inipay_result.php';
|
||||
break;
|
||||
default:
|
||||
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
|
||||
$card_name = iconv("cp949", "utf-8", $card_name);
|
||||
@ -376,6 +389,9 @@ if($tno) {
|
||||
case 'lg':
|
||||
include G5_SHOP_PATH.'/lg/xpay_cancel.php';
|
||||
break;
|
||||
case 'inicis':
|
||||
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
||||
break;
|
||||
default:
|
||||
include G5_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php';
|
||||
break;
|
||||
@ -491,6 +507,9 @@ if(!$result) {
|
||||
case 'lg':
|
||||
include G5_SHOP_PATH.'/lg/xpay_cancel.php';
|
||||
break;
|
||||
case 'inicis':
|
||||
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
||||
break;
|
||||
default:
|
||||
include G5_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php';
|
||||
break;
|
||||
@ -527,6 +546,9 @@ if(!$result) {
|
||||
case 'lg':
|
||||
include G5_SHOP_PATH.'/lg/xpay_cancel.php';
|
||||
break;
|
||||
case 'inicis':
|
||||
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
||||
break;
|
||||
default:
|
||||
include G5_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php';
|
||||
break;
|
||||
|
||||
@ -61,6 +61,48 @@ if($od['od_tno']) {
|
||||
alert($msg);
|
||||
}
|
||||
break;
|
||||
case 'inicis':
|
||||
include_once(G5_SHOP_PATH.'/settle_inicis.inc.php');
|
||||
$cancel_msg = iconv_euckr('주문자 본인 취소-'.$cancel_memo);
|
||||
|
||||
/*********************
|
||||
* 3. 취소 정보 설정 *
|
||||
*********************/
|
||||
$inipay->SetField("type", "cancel"); // 고정 (절대 수정 불가)
|
||||
$inipay->SetField("mid", $default['de_inicis_mid']); // 상점아이디
|
||||
/**************************************************************************************************
|
||||
* admin 은 키패스워드 변수명입니다. 수정하시면 안됩니다. 1111의 부분만 수정해서 사용하시기 바랍니다.
|
||||
* 키패스워드는 상점관리자 페이지(https://iniweb.inicis.com)의 비밀번호가 아닙니다. 주의해 주시기 바랍니다.
|
||||
* 키패스워드는 숫자 4자리로만 구성됩니다. 이 값은 키파일 발급시 결정됩니다.
|
||||
* 키패스워드 값을 확인하시려면 상점측에 발급된 키파일 안의 readme.txt 파일을 참조해 주십시오.
|
||||
**************************************************************************************************/
|
||||
$inipay->SetField("admin", $default['de_inicis_admin_key']); //비대칭 사용키 키패스워드
|
||||
$inipay->SetField("tid", $od['od_tno']); // 취소할 거래의 거래아이디
|
||||
$inipay->SetField("cancelmsg", $cancel_msg); // 취소사유
|
||||
|
||||
/****************
|
||||
* 4. 취소 요청 *
|
||||
****************/
|
||||
$inipay->startAction();
|
||||
|
||||
/****************************************************************
|
||||
* 5. 취소 결과 *
|
||||
* *
|
||||
* 결과코드 : $inipay->getResult('ResultCode') ("00"이면 취소 성공) *
|
||||
* 결과내용 : $inipay->getResult('ResultMsg') (취소결과에 대한 설명) *
|
||||
* 취소날짜 : $inipay->getResult('CancelDate') (YYYYMMDD) *
|
||||
* 취소시각 : $inipay->getResult('CancelTime') (HHMMSS) *
|
||||
* 현금영수증 취소 승인번호 : $inipay->getResult('CSHR_CancelNum') *
|
||||
* (현금영수증 발급 취소시에만 리턴됨) *
|
||||
****************************************************************/
|
||||
|
||||
$res_cd = $inipay->getResult('ResultCode');
|
||||
$res_msg = $inipay->getResult('ResultMsg');
|
||||
|
||||
if($res_cd != '00') {
|
||||
alert(iconv_utf8($res_msg).' 코드 : '.$res_cd);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
require_once('./settle_kcp.inc.php');
|
||||
|
||||
|
||||
@ -349,6 +349,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'] == '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 {
|
||||
$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\');';
|
||||
}
|
||||
@ -366,6 +368,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'] == '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 {
|
||||
$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\');';
|
||||
}
|
||||
@ -427,6 +431,9 @@ 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'] == '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 {
|
||||
require_once G5_SHOP_PATH.'/settle_kcp.inc.php';
|
||||
|
||||
|
||||
@ -21,10 +21,13 @@ $g5['title'] = $pp['pp_name'].'님 개인결제';
|
||||
if($default['de_iche_use'] || $default['de_vbank_use'] || $default['de_hp_use'] || $default['de_card_use']) {
|
||||
switch($default['de_pg_service']) {
|
||||
case 'lg':
|
||||
$g5['body_script'] = 'onload="isActiveXOK();"';
|
||||
$g5['body_script'] = ' onload="isActiveXOK();"';
|
||||
break;
|
||||
case 'inicis':
|
||||
$g5['body_script'] = ' onload="javascript:enable_click()"';
|
||||
break;
|
||||
default:
|
||||
$g5['body_script'] = 'onload="CheckPayplusInstall();"';
|
||||
$g5['body_script'] = ' onload="CheckPayplusInstall();"';
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -92,7 +95,7 @@ require_once('./'.$default['de_pg_service'].'/orderform.1.php');
|
||||
</tr>
|
||||
<tr>
|
||||
<th scope="row"><label for="pp_hp">휴대폰</label></th>
|
||||
<td><input type="text" name="pp_hp" value="<?php echo $member['mb_hp']; ?>" id="pp_hp" class="frm_input"></td>
|
||||
<td><input type="text" name="pp_hp" value="<?php echo $member['mb_hp']; ?>" id="pp_hp" required class="required frm_input"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
@ -257,6 +260,25 @@ function forderform_check(f)
|
||||
f.LGD_CUSTOM_FIRSTPAY.value = "무통장";
|
||||
break;
|
||||
}
|
||||
<?php } else if($default['de_pg_service'] == 'inicis') { ?>
|
||||
switch(settle_method)
|
||||
{
|
||||
case "계좌이체":
|
||||
f.gopaymethod.value = "onlydbank";
|
||||
break;
|
||||
case "가상계좌":
|
||||
f.gopaymethod.value = "onlyvbank";
|
||||
break;
|
||||
case "휴대폰":
|
||||
f.gopaymethod.value = "onlyhpp";
|
||||
break;
|
||||
case "신용카드":
|
||||
f.gopaymethod.value = "onlycard";
|
||||
break;
|
||||
default:
|
||||
f.gopaymethod.value = "무통장";
|
||||
break;
|
||||
}
|
||||
<?php } ?>
|
||||
|
||||
// 결제정보설정
|
||||
@ -279,7 +301,8 @@ function forderform_check(f)
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
<?php } if($default['de_pg_service'] == 'lg') { ?>
|
||||
<?php } ?>
|
||||
<?php if($default['de_pg_service'] == 'lg') { ?>
|
||||
f.LGD_BUYER.value = f.pp_name.value;
|
||||
f.LGD_BUYEREMAIL.value = f.pp_email.value;
|
||||
f.LGD_BUYERPHONE.value = f.pp_hp.value;
|
||||
@ -292,6 +315,20 @@ function forderform_check(f)
|
||||
f.submit();
|
||||
}
|
||||
<?php } ?>
|
||||
<?php if($default['de_pg_service'] == 'inicis') { ?>
|
||||
f.buyername.value = f.pp_name.value;
|
||||
f.buyeremail.value = f.pp_email.value;
|
||||
f.buyertel.value = f.pp_hp.value;
|
||||
|
||||
if(f.gopaymethod.value != "무통장") {
|
||||
if(!set_encrypt_data(f))
|
||||
return false;
|
||||
|
||||
return pay(f);
|
||||
} else {
|
||||
return true;
|
||||
}
|
||||
<?php } ?>
|
||||
}
|
||||
</script>
|
||||
|
||||
|
||||
@ -3,7 +3,10 @@ include_once('./_common.php');
|
||||
include_once(G5_LIB_PATH.'/mailer.lib.php');
|
||||
|
||||
if($default['de_pg_service'] == 'lg' && !$_POST['LGD_PAYKEY'])
|
||||
alert('결제등록 요청 후 주문해 주십시오.');
|
||||
alert('결제등록 요청 후 결제해 주십시오.');
|
||||
|
||||
if($default['de_pg_service'] == 'inicis' && !$_POST['P_HASH'])
|
||||
alert('결제등록 요청 후 결제해 주십시오.');
|
||||
|
||||
// 개인결제 정보
|
||||
$pp_check = false;
|
||||
@ -26,6 +29,9 @@ if ($pp_settle_case == "계좌이체")
|
||||
case 'lg':
|
||||
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
||||
break;
|
||||
case 'inicis':
|
||||
include G5_SHOP_PATH.'/inicis/inipay_result.php';
|
||||
break;
|
||||
default:
|
||||
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
|
||||
$bank_name = iconv("cp949", "utf-8", $bank_name);
|
||||
@ -45,6 +51,9 @@ else if ($pp_settle_case == "가상계좌")
|
||||
case 'lg':
|
||||
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
||||
break;
|
||||
case 'inicis':
|
||||
include G5_SHOP_PATH.'/inicis/inipay_result.php';
|
||||
break;
|
||||
default:
|
||||
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
|
||||
$bankname = iconv("cp949", "utf-8", $bankname);
|
||||
@ -64,6 +73,9 @@ else if ($pp_settle_case == "휴대폰")
|
||||
case 'lg':
|
||||
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
||||
break;
|
||||
case 'inicis':
|
||||
include G5_SHOP_PATH.'/inicis/inipay_result.php';
|
||||
break;
|
||||
default:
|
||||
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
|
||||
break;
|
||||
@ -81,6 +93,9 @@ else if ($pp_settle_case == "신용카드")
|
||||
case 'lg':
|
||||
include G5_SHOP_PATH.'/lg/xpay_result.php';
|
||||
break;
|
||||
case 'inicis':
|
||||
include G5_SHOP_PATH.'/inicis/inipay_result.php';
|
||||
break;
|
||||
default:
|
||||
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
|
||||
$card_name = iconv("cp949", "utf-8", $card_name);
|
||||
@ -105,6 +120,9 @@ if((int)$pp['pp_price'] !== (int)$pg_price) {
|
||||
case 'lg':
|
||||
include G5_SHOP_PATH.'/lg/xpay_cancel.php';
|
||||
break;
|
||||
case 'inicis':
|
||||
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
||||
break;
|
||||
default:
|
||||
include G5_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php';
|
||||
break;
|
||||
@ -139,6 +157,9 @@ if(!$result) {
|
||||
case 'lg':
|
||||
include G5_SHOP_PATH.'/lg/xpay_cancel.php';
|
||||
break;
|
||||
case 'inicis':
|
||||
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
||||
break;
|
||||
default:
|
||||
include G5_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php';
|
||||
break;
|
||||
@ -174,6 +195,9 @@ if($pp_receipt_price > 0 && $pp['pp_id'] && $pp['od_id']) {
|
||||
case 'lg':
|
||||
include G5_SHOP_PATH.'/lg/xpay_cancel.php';
|
||||
break;
|
||||
case 'inicis':
|
||||
include G5_SHOP_PATH.'/inicis/inipay_cancel.php';
|
||||
break;
|
||||
default:
|
||||
include G5_SHOP_PATH.'/kcp/pp_ax_hub_cancel.php';
|
||||
break;
|
||||
|
||||
@ -147,6 +147,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'] == '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 {
|
||||
$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'] == '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 {
|
||||
$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\');';
|
||||
}
|
||||
@ -215,6 +219,9 @@ 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'] == '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 {
|
||||
require_once G5_SHOP_PATH.'/settle_kcp.inc.php';
|
||||
|
||||
|
||||
@ -164,7 +164,7 @@ HEREDOC;
|
||||
$point = get_item_point($row, $row2['io_id']);
|
||||
|
||||
if($delivery) {
|
||||
$deliv = $delivery;
|
||||
$deliv = 1;
|
||||
$deliv2 = $delivery.'원';
|
||||
} else {
|
||||
$deliv = 0;
|
||||
|
||||
111
shop/settle_inicis.inc.php
Normal file
111
shop/settle_inicis.inc.php
Normal file
@ -0,0 +1,111 @@
|
||||
<?php
|
||||
if (!defined("_GNUBOARD_")) exit; // 개별 페이지 접근 불가
|
||||
|
||||
if ($default['de_card_test']) {
|
||||
if ($default['de_escrow_use'] == 1) {
|
||||
// 에스크로결제 테스트
|
||||
$default['de_inicis_mid'] = 'iniescrow0';
|
||||
$default['de_inicis_admin_key'] = '1111';
|
||||
}
|
||||
else {
|
||||
// 일반결제 테스트
|
||||
$default['de_inicis_mid'] = 'INIpayTest';
|
||||
$default['de_inicis_admin_key'] = '1111';
|
||||
}
|
||||
}
|
||||
else {
|
||||
$default['de_inicis_mid'] = "SIR".$default['de_inicis_mid'];
|
||||
|
||||
if ($default['de_escrow_use'] == 1) {
|
||||
// 에스크로결제 테스트
|
||||
$useescrow = ':useescrow';
|
||||
}
|
||||
else {
|
||||
// 일반결제 테스트
|
||||
$useescrow = '';
|
||||
}
|
||||
}
|
||||
|
||||
/**************************
|
||||
* 1. 라이브러리 인클루드 *
|
||||
**************************/
|
||||
require(G5_SHOP_PATH.'/inicis/libs/INILib.php');
|
||||
|
||||
/***************************************
|
||||
* 2. INIpay50 클래스의 인스턴스 생성 *
|
||||
***************************************/
|
||||
$inipay = new INIpay50;
|
||||
|
||||
$inipay->SetField("inipayhome", G5_SHOP_PATH.'/inicis'); // 이니페이 홈디렉터리(상점수정 필요)
|
||||
$inipay->SetField("debug", "false"); // 로그모드("true"로 설정하면 상세로그가 생성됨.)
|
||||
|
||||
$inipay_nointerest = 'no'; //무이자여부(no:일반, yes:무이자)
|
||||
$inipay_quotabase = '선택:일시불:2개월:3개월:4개월:5개월:6개월:7개월:8개월:9개월:10개월:11개월:12개월'; // 할부기간
|
||||
|
||||
$BANK_CODE = array(
|
||||
'03' => '기업은행',
|
||||
'04' => '국민은행',
|
||||
'05' => '외환은행',
|
||||
'07' => '수협중앙회',
|
||||
'11' => '농협중앙회',
|
||||
'20' => '우리은행',
|
||||
'23' => 'SC 제일은행',
|
||||
'31' => '대구은행',
|
||||
'32' => '부산은행',
|
||||
'34' => '광주은행',
|
||||
'37' => '전북은행',
|
||||
'39' => '경남은행',
|
||||
'53' => '한국씨티은행',
|
||||
'71' => '우체국',
|
||||
'81' => '하나은행',
|
||||
'88' => '신한은행',
|
||||
'D1' => '동양종합금융증권',
|
||||
'D2' => '현대증권',
|
||||
'D3' => '미래에셋증권',
|
||||
'D4' => '한국투자증권',
|
||||
'D5' => '우리투자증권',
|
||||
'D6' => '하이투자증권',
|
||||
'D7' => 'HMC 투자증권',
|
||||
'D8' => 'SK 증권',
|
||||
'D9' => '대신증권',
|
||||
'DA' => '하나대투증권',
|
||||
'DB' => '굿모닝신한증권',
|
||||
'DC' => '동부증권',
|
||||
'DD' => '유진투자증권',
|
||||
'DE' => '메리츠증권',
|
||||
'DF' => '신영증권'
|
||||
);
|
||||
|
||||
$CARD_CODE = array(
|
||||
'01' => '외환',
|
||||
'03' => '롯데',
|
||||
'04' => '현대',
|
||||
'06' => '국민',
|
||||
'11' => 'BC',
|
||||
'12' => '삼성',
|
||||
'14' => '신한',
|
||||
'15' => '한미',
|
||||
'16' => 'NH',
|
||||
'17' => '하나 SK',
|
||||
'21' => '해외비자',
|
||||
'22' => '해외마스터',
|
||||
'23' => 'JCB',
|
||||
'24' => '해외아멕스',
|
||||
'25' => '해외다이너스'
|
||||
);
|
||||
|
||||
$PAY_METHOD = array(
|
||||
'VCard' => '신용카드',
|
||||
'Card' => '신용카드',
|
||||
'DirectBank' => '계좌이체',
|
||||
'HPP' => '휴대폰',
|
||||
'VBank' => '가상계좌'
|
||||
);
|
||||
|
||||
// 플러그인 호출 URL
|
||||
if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS']=='on') {
|
||||
$ini_js_url = 'https://plugin.inicis.com/pay61_secunissl_crossl.js';
|
||||
} else {
|
||||
$ini_js_url = 'http://plugin.inicis.com/pay61_secuni_cross.js';
|
||||
}
|
||||
?>
|
||||
183
shop/settle_inicis_common.php
Normal file
183
shop/settle_inicis_common.php
Normal file
@ -0,0 +1,183 @@
|
||||
<?php
|
||||
include_once('./_common.php');
|
||||
|
||||
//**********************************************************************************
|
||||
//이니시스가 전달하는 가상계좌이체의 결과를 수신하여 DB 처리 하는 부분 입니다.
|
||||
//필요한 파라메터에 대한 DB 작업을 수행하십시오.
|
||||
//**********************************************************************************
|
||||
|
||||
//**********************************************************************************
|
||||
// 이부분에 로그파일 경로를 수정해주세요.
|
||||
|
||||
$INIpayHome = G5_SHOP_PATH.'/inicis'; // 이니페이 홈디렉터리
|
||||
$INIpayLog = false; // 로그를 기록하려면 true 로 수정
|
||||
|
||||
//**********************************************************************************
|
||||
|
||||
$TEMP_IP = getenv("REMOTE_ADDR");
|
||||
$PG_IP = substr($TEMP_IP,0, 10);
|
||||
|
||||
if( $PG_IP == "203.238.37" || $PG_IP == "210.98.138" ) //PG에서 보냈는지 IP로 체크
|
||||
{
|
||||
$msg_id = $msg_id; //메세지 타입
|
||||
$no_tid = $no_tid; //거래번호
|
||||
$no_oid = $no_oid; //상점 주문번호
|
||||
$id_merchant = $id_merchant; //상점 아이디
|
||||
$cd_bank = $cd_bank; //거래 발생 기관 코드
|
||||
$cd_deal = $cd_deal; //취급 기관 코드
|
||||
$dt_trans = $dt_trans; //거래 일자
|
||||
$tm_trans = $tm_trans; //거래 시간
|
||||
$no_msgseq = $no_msgseq; //전문 일련 번호
|
||||
$cd_joinorg = $cd_joinorg; //제휴 기관 코드
|
||||
|
||||
$dt_transbase = $dt_transbase; //거래 기준 일자
|
||||
$no_transeq = $no_transeq; //거래 일련 번호
|
||||
$type_msg = $type_msg; //거래 구분 코드
|
||||
$cl_close = $cl_close; //마감 구분코드
|
||||
$cl_kor = $cl_kor; //한글 구분 코드
|
||||
$no_msgmanage = $no_msgmanage; //전문 관리 번호
|
||||
$no_vacct = $no_vacct; //가상계좌번호
|
||||
$amt_input = $amt_input; //입금금액
|
||||
$amt_check = $amt_check; //미결제 타점권 금액
|
||||
$nm_inputbank = $nm_inputbank; //입금 금융기관명
|
||||
$nm_input = $nm_input; //입금 의뢰인
|
||||
$dt_inputstd = $dt_inputstd; //입금 기준 일자
|
||||
$dt_calculstd = $dt_calculstd; //정산 기준 일자
|
||||
$flg_close = $flg_close; //마감 전화
|
||||
|
||||
//가상계좌채번시 현금영수증 자동발급신청시에만 전달
|
||||
$dt_cshr = $dt_cshr; //현금영수증 발급일자
|
||||
$tm_cshr = $tm_cshr; //현금영수증 발급시간
|
||||
$no_cshr_appl = $no_cshr_appl; //현금영수증 발급번호
|
||||
$no_cshr_tid = $no_cshr_tid; //현금영수증 발급TID
|
||||
|
||||
// 입금결과 처리
|
||||
$sql = " select pp_id, od_id from {$g5['g5_shop_personalpay_table']} where pp_id = '$no_oid' and pp_app_no = '$no_vacct' ";
|
||||
$row = sql_fetch($sql);
|
||||
|
||||
$result = false;
|
||||
$receipt_time = $dt_trans.$tm_trans;
|
||||
|
||||
if($row['pp_id']) {
|
||||
// 개인결제 UPDATE
|
||||
$sql = " update {$g5['g5_shop_personalpay_table']}
|
||||
set pp_receipt_price = '$amt_input',
|
||||
pp_receipt_time = '$receipt_time'
|
||||
where pp_id = '$no_oid'
|
||||
and pp_app_no = '$no_vacct' ";
|
||||
sql_query($sql, false);
|
||||
|
||||
if($row['od_id']) {
|
||||
// 주문서 UPDATE
|
||||
$receipt_time = preg_replace("/([0-9]{4})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})([0-9]{2})/", "\\1-\\2-\\3 \\4:\\5:\\6", $receipt_time);
|
||||
$sql = " update {$g5['g5_shop_order_table']}
|
||||
set od_receipt_price = od_receipt_price + '$amt_input',
|
||||
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_input',
|
||||
od_receipt_time = '$receipt_time'
|
||||
where od_id = '$no_oid'
|
||||
and od_app_no = '$no_vacct' ";
|
||||
$result = sql_query($sql, FALSE);
|
||||
}
|
||||
|
||||
if($result) {
|
||||
if($row['od_id'])
|
||||
$od_id = $row['od_id'];
|
||||
else
|
||||
$od_id = $no_oid;
|
||||
|
||||
// 주문정보 체크
|
||||
$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);
|
||||
|
||||
$sql = " update {$g5['g5_shop_order_table']}
|
||||
set od_misu = '{$info['od_misu']}' ";
|
||||
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($INIpayLog) {
|
||||
$logfile = fopen( $INIpayHome . "/log/result.log", "a+" );
|
||||
|
||||
fwrite( $logfile,"************************************************");
|
||||
fwrite( $logfile,"ID_MERCHANT : ".$id_merchant."\r\n");
|
||||
fwrite( $logfile,"NO_TID : ".$no_tid."\r\n");
|
||||
fwrite( $logfile,"NO_OID : ".$no_oid."\r\n");
|
||||
fwrite( $logfile,"NO_VACCT : ".$no_vacct."\r\n");
|
||||
fwrite( $logfile,"AMT_INPUT : ".$amt_input."\r\n");
|
||||
fwrite( $logfile,"NM_INPUTBANK : ".$nm_inputbank."\r\n");
|
||||
fwrite( $logfile,"NM_INPUT : ".$nm_input."\r\n");
|
||||
fwrite( $logfile,"************************************************");
|
||||
|
||||
fwrite( $logfile,"전체 결과값"."\r\n");
|
||||
fwrite( $logfile, $msg_id."\r\n");
|
||||
fwrite( $logfile, $no_tid."\r\n");
|
||||
fwrite( $logfile, $no_oid."\r\n");
|
||||
fwrite( $logfile, $id_merchant."\r\n");
|
||||
fwrite( $logfile, $cd_bank."\r\n");
|
||||
fwrite( $logfile, $dt_trans."\r\n");
|
||||
fwrite( $logfile, $tm_trans."\r\n");
|
||||
fwrite( $logfile, $no_msgseq."\r\n");
|
||||
fwrite( $logfile, $type_msg."\r\n");
|
||||
fwrite( $logfile, $cl_close."\r\n");
|
||||
fwrite( $logfile, $cl_kor."\r\n");
|
||||
fwrite( $logfile, $no_msgmanage."\r\n");
|
||||
fwrite( $logfile, $no_vacct."\r\n");
|
||||
fwrite( $logfile, $amt_input."\r\n");
|
||||
fwrite( $logfile, $amt_check."\r\n");
|
||||
fwrite( $logfile, $nm_inputbank."\r\n");
|
||||
fwrite( $logfile, $nm_input."\r\n");
|
||||
fwrite( $logfile, $dt_inputstd."\r\n");
|
||||
fwrite( $logfile, $dt_calculstd."\r\n");
|
||||
fwrite( $logfile, $flg_close."\r\n");
|
||||
fwrite( $logfile, "\r\n");
|
||||
|
||||
fclose( $logfile );
|
||||
}
|
||||
|
||||
|
||||
//************************************************************************************
|
||||
|
||||
//위에서 상점 데이터베이스에 등록 성공유무에 따라서 성공시에는 "OK"를 이니시스로
|
||||
//리턴하셔야합니다. 아래 조건에 데이터베이스 성공시 받는 FLAG 변수를 넣으세요
|
||||
//(주의) OK를 리턴하지 않으시면 이니시스 지불 서버는 "OK"를 수신할때까지 계속 재전송을 시도합니다
|
||||
//기타 다른 형태의 PRINT( echo )는 하지 않으시기 바랍니다
|
||||
|
||||
if ($result)
|
||||
{
|
||||
echo "OK"; // 절대로 지우지마세요
|
||||
}
|
||||
else
|
||||
{
|
||||
echo "DB Error";
|
||||
}
|
||||
|
||||
//*************************************************************************************
|
||||
|
||||
}
|
||||
?>
|
||||
Reference in New Issue
Block a user