영카트 [YC5] 올더게이트 연동
페이지 정보
첨부파일
-
allthegate.zip (124.4K)
133회 다운로드 | DATE : 2014-10-15 21:52:13 -
lib.zip (22.5K)
48회 다운로드 | DATE : 2014-10-15 21:52:13
본문
1. / shop / allthegate / 파일업로드
2. / shop / lib / AGSLib.php , settle_althegate_aegis_Func.php 업로드
3-1. / adm / shop_admin / configform.php 82~86줄
// lg 결제관련 필드 추가
if(!isset($default['de_pg_service'])) {
sql_query(" ALTER TABLE `{$g5['g5_shop_default_table']}`
ADD `de_pg_service` varchar(255) NOT NULL DEFAULT '' AFTER `de_sms_hp` ", true);
}
를 아래와 같이 변경
// lg 결제관련 필드 추가
if(!isset($default['de_pg_service'])) {
sql_query(" ALTER TABLE `{$g5['g5_shop_default_table']}`
ADD `de_pg_service` varchar(255) NOT NULL DEFAULT '' AFTER `de_sms_hp` ", true);
}
// 올더게이트 몰ID 필드 추가
if(!isset($default['de_allthegate_mid'])) {
sql_query(" ALTER TABLE `{$g5['g5_shop_default_table']}`
ADD `de_allthegate_mid` varchar(255) NOT NULL DEFAULT '' AFTER `de_member_reg_coupon_minimum` ", true);
}
// 올더게이트 CP아이디 필드 추가
if(!isset($default['de_allthegate_HP_ID'])) {
sql_query(" ALTER TABLE `{$g5['g5_shop_default_table']}`
ADD `de_allthegate_HP_ID` varchar(255) NOT NULL DEFAULT '' AFTER `de_allthegate_mid`,
ADD `de_allthegate_HP_PWD` varchar(255) NOT NULL DEFAULT '' AFTER `de_allthegate_HP_ID`,
ADD `de_allthegate_HP_SUBID` varchar(255) NOT NULL DEFAULT '' AFTER `de_allthegate_HP_PWD`
", true);
}
3-2. / adm / shop_admin / configform.php 607줄
<option value="lg" <?php echo get_selected($default['de_pg_service'], 'lg'); ?>>LG유플러스</option>
를 아래와 같이 변경
<option value="lg" <?php echo get_selected($default['de_pg_service'], 'lg'); ?>>LG유플러스</option>
<option value="allthegate" <?php echo get_selected($default['de_pg_service'], 'allthegate'); ?>>올더게이트</option>
3-3. / adm / shop_admin / configform.php 645~651줄
<tr class="pg_info_fld lg_info_fld">
<th scope="row"><label for="cf_lg_mert_key">LG유플러스 MERT KEY</label></th>
<td>
<?php echo help("LG유플러스 상점MertKey는 상점관리자 -> 계약정보 -> 상점정보관리에서 확인하실 수 있습니다.\n예) 95160cce09854ef44d2edb2bfb05f9f3\n<a href=\"".G5_ADMIN_URL."/config_form.php#anc_cf_cert\">기본환경설정 > 본인확인</a> 설정의 LG유플러스 MERT KEY와 동일합니다."); ?>
<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 lg_info_fld">
<th scope="row"><label for="cf_lg_mert_key">LG유플러스 MERT KEY</label></th>
<td>
<?php echo help("LG유플러스 상점MertKey는 상점관리자 -> 계약정보 -> 상점정보관리에서 확인하실 수 있습니다.\n예) 95160cce09854ef44d2edb2bfb05f9f3\n<a href=\"".G5_ADMIN_URL."/config_form.php#anc_cf_cert\">기본환경설정 > 본인확인</a> 설정의 LG유플러스 MERT KEY와 동일합니다."); ?>
<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 allthegate_info_fld">
<th scope="row"><label for="de_allthegate_mid">올더게이트 몰ID</label></th>
<td>
<input type="text" name="de_allthegate_mid" value="<?php echo $default['de_allthegate_mid']; ?>" id="de_allthegate_mid" class="frm_input" size="32" maxlength="50">
</td>
</tr>
<tr class="pg_info_fld allthegate_info_fld">
<th scope="row"><label for="de_allthegate_HP_ID">올더게이트 CP아이디</label></th>
<td>
<input type="text" name="de_allthegate_HP_ID" value="<?php echo $default['de_allthegate_HP_ID']; ?>" id="de_allthegate_HP_ID" class="frm_input" size="32" maxlength="50">
</td>
</tr>
<tr class="pg_info_fld allthegate_info_fld">
<th scope="row"><label for="de_allthegate_HP_PWD">올더게이트 CP비밀번호</label></th>
<td>
<input type="text" name="de_allthegate_HP_PWD" value="<?php echo $default['de_allthegate_HP_PWD']; ?>" id="de_allthegate_HP_PWD" class="frm_input" size="32" maxlength="50">
</td>
</tr>
<tr class="pg_info_fld allthegate_info_fld">
<th scope="row"><label for="de_allthegate_HP_SUBID">올더게이트 SUB-CPID</label></th>
<td>
<input type="text" name="de_allthegate_HP_SUBID" value="<?php echo $default['de_allthegate_HP_SUBID']; ?>" id="de_allthegate_HP_SUBID" class="frm_input" size="32" maxlength="50">
</td>
</tr>
4. / adm / shop_admin / configformupdate.php 169~171줄
de_member_reg_coupon_minimum = '$de_member_reg_coupon_minimum'
";
sql_query($sql);
를 다음과 같이 변경
de_member_reg_coupon_minimum = '$de_member_reg_coupon_minimum',
de_allthegate_mid = '$de_allthegate_mid',
de_allthegate_HP_ID = '$de_allthegate_HP_ID',
de_allthegate_HP_PWD = '$de_allthegate_HP_PWD',
de_allthegate_HP_SUBID = '$de_allthegate_HP_SUBID'
";
sql_query($sql);
3-1. / shop / orderform.php 616~621줄
// 신용카드 사용
if ($default['de_card_use']) {
$multi_settle++;
echo '<input type="radio" id="od_settle_card" name="od_settle_case" value="신용카드" '.$checked.'> <label for="od_settle_card">신용카드</label>'.PHP_EOL;
$checked = '';
}
를 다음과 같이 변경
if($default['de_pg_service'] == 'allthegate') {
// 신용카드 사용
if ($default['de_card_use']) {
$multi_settle++;
echo '<input type="radio" id="od_settle_allthegate" name="od_settle_case" value="신용카드" '.$checked.'> <label for="od_settle_allthegate">신용카드</label>'.PHP_EOL;
$checked = '';
}
} else {
// 신용카드 사용
if ($default['de_card_use']) {
$multi_settle++;
echo '<input type="radio" id="od_settle_card" name="od_settle_case" value="신용카드" '.$checked.'> <label for="od_settle_card">신용카드</label>'.PHP_EOL;
$checked = '';
}
}
3-1. / shop / orderform.php 951~953줄
$("#od_settle_iche,#od_settle_card,#od_settle_vbank,#od_settle_hp").bind("click", function() {
$("#settle_bank").hide();
});
를 다음과 같이 변경
$("#od_settle_iche,#od_settle_card,#od_settle_vbank,#od_settle_hp").bind("click", function() {
$("#settle_bank").hide();
});
$("#od_settle_allthegate").bind("click", function() {
$("#settle_bank").hide();
});
3-2. / shop / orderform.php 1281~1284줄
// pg 결제 금액에서 포인트 금액 차감
if(settle_method != "무통장") {
f.good_mny.value = od_price + send_cost + send_cost2 - send_coupon - temp_point;
}
를 다음과 같이 변경
<?php if($default['de_pg_service'] != 'allthegate') { ?>
// pg 결제 금액에서 포인트 금액 차감
if(settle_method != "무통장") {
f.good_mny.value = od_price + send_cost + send_cost2 - send_coupon - temp_point;
}
<?php } ?>
3-3. / shop / orderform.php 1390~1391줄
<?php } if($default['de_pg_service'] == 'lg') { ?>
를 아래와 같이 변경
<?php } if($default['de_pg_service'] == 'allthegate') { ?>
f.submit();
<?php } if($default['de_pg_service'] == 'lg') { ?>
4-1. / shop / orderformupdate.php 273~286줄
else if ($od_settle_case == "계좌이체")
{
switch($default['de_pg_service']) {
case 'lg':
include G5_SHOP_PATH.'/lg/xpay_result.php';
break;
default:
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
$bank_name = iconv("cp949", "utf-8", $bank_name);
break;
}
를 아래와 같이 변경
else if ($od_settle_case == "계좌이체")
{
switch($default['de_pg_service']) {
case 'allthegate':
include G5_SHOP_PATH.'/settle_allthegate.inc.php';
break;
case 'lg':
include G5_SHOP_PATH.'/lg/xpay_result.php';
break;
default:
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
$bank_name = iconv("cp949", "utf-8", $bank_name);
break;
}
4-2. shop / orderformupdate.php 300~311줄
else if ($od_settle_case == "가상계좌")
{
switch($default['de_pg_service']) {
case 'lg':
include G5_SHOP_PATH.'/lg/xpay_result.php';
break;
default:
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
$bankname = iconv("cp949", "utf-8", $bankname);
$depositor = iconv("cp949", "utf-8", $depositor);
break;
}
를 다음과 같이 변경
else if ($od_settle_case == "가상계좌")
{
switch($default['de_pg_service']) {
case 'allthegate':
include G5_SHOP_PATH.'/settle_allthegate.inc.php';
break;
case 'lg':
include G5_SHOP_PATH.'/lg/xpay_result.php';
break;
default:
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
$bankname = iconv("cp949", "utf-8", $bankname);
$depositor = iconv("cp949", "utf-8", $depositor);
break;
}
4-3. shop / orderformupdate.php 324~333줄
else if ($od_settle_case == "휴대폰")
{
switch($default['de_pg_service']) {
case 'lg':
include G5_SHOP_PATH.'/lg/xpay_result.php';
break;
default:
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
break;
}
를 다음과 같이 변경
else if ($od_settle_case == "휴대폰")
{
switch($default['de_pg_service']) {
case 'allthegate':
include G5_SHOP_PATH.'/settle_allthegate.inc.php';
break;
case 'lg':
include G5_SHOP_PATH.'/lg/xpay_result.php';
break;
default:
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
break;
}
4-4. shop / orderformupdate.php 348~358줄
else if ($od_settle_case == "신용카드")
{
switch($default['de_pg_service']) {
case 'lg':
include G5_SHOP_PATH.'/lg/xpay_result.php';
break;
default:
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
$card_name = iconv("cp949", "utf-8", $card_name);
break;
}
를 다음과 같이 변경
4-5. shop / orderformupdate.php 705줄
goto_url(G5_SHOP_URL.'/orderinquiryview.php?od_id='.$od_id.'&uid='.$uid);
를 다음과 같이 변경
if($default['de_pg_service'] == 'allthegate' && $od_settle_case != '무통장') {
goto_url(G5_SHOP_URL.'/orderconfirm_allthegate.php?od_id='.$od_id.'&uid='.$uid);
} else {
goto_url(G5_SHOP_URL.'/orderinquiryview.php?od_id='.$od_id.'&uid='.$uid);
}
5-1. / shop / orderinquirycancel.php 33줄
switch($od['od_pg']) {
를 다음과 같이 변경
if($od['od_pg'] == 'allthegate') {
goto_url(G5_SHOP_URL."/orderinquiryview_cancel.php?od_id=$od_id&uid=$uid");
} else {
goto_url(G5_SHOP_URL."/orderinquiryview.php?od_id=$od_id&uid=$uid");
}
5-2. / shop / orderinquirycancel.php 119 줄
goto_url(G5_SHOP_URL."/orderinquiryview.php?od_id=$od_id&uid=$uid");
를 다음과 같이 변경
6-1. / shop / orderinquiryview.php 30~31줄
// LG 현금영수증 JS
if($od['od_pg'] == 'lg') {
를 다음과 같이 변경
// 올더게이트 현금영수증 JS
if($od['od_pg'] == 'allthegate') { ?>
<script language=javascript>
<!--
/***********************************************************************************
* ◈ 영수증 출력을 위한 자바스크립트
*
* 영수증 출력은 [카드결제]시에만 사용하실 수 있습니다.
*
* ※당일 결제건에 한해서 영수증 출력이 가능합니다.
* 당일 이후에는 아래의 주소를 팝업(630X510)으로 띄워 내역 조회 후 출력하시기 바랍니다.
* ▷ 팝업용 결제내역조회 패이지 주소 :
* http://www.allthegate.com/support/card_search.html
* → (반드시 스크롤바를 'yes' 상태로 하여 팝업을 띄우시기 바랍니다.) ←
*
***********************************************************************************/
function show_receipt()
{
var send_dt = appr_tm.value;
url="http://www.allthegate.com/customer/receiptLast3.jsp"
url=url+"?sRetailer_id="+sRetailer_id.value;
url=url+"&approve="+approve.value;
url=url+"&send_no="+send_no.value;
url=url+"&send_dt="+send_dt.substring(0,8);
window.open(url, "window","toolbar=no,location=no,directories=no,status=,menubar=no,scrollbars=no,resizable=no,width=420,height=700,top=0,left=150");
}
-->
</script>
<?php
// LG 현금영수증 JS
} else if($od['od_pg'] == 'lg') {
6-2. / shop / orderinquiryview.php 372~412줄
<tr>
<th scope="row">영수증</th>
<td>
<?php
if($od['od_settle_case'] == '휴대폰')
{
if($od['od_pg'] == 'lg') {
require_once G5_SHOP_PATH.'/settle_lg.inc.php';
$LGD_TID = $od['od_tno'];
$LGD_MERTKEY = $config['cf_lg_mert_key'];
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
$hp_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
} 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\');';
}
?>
<a href="javascript:;" onclick="<?php echo $hp_receipt_script; ?>">영수증 출력</a>
<?php
}
if($od['od_settle_case'] == '신용카드')
{
if($od['od_pg'] == 'lg') {
require_once G5_SHOP_PATH.'/settle_lg.inc.php';
$LGD_TID = $od['od_tno'];
$LGD_MERTKEY = $config['cf_lg_mert_key'];
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
$card_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
} 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\');';
}
?>
<a href="javascript:;" onclick="<?php echo $card_receipt_script; ?>">영수증 출력</a>
<?php
}
?>
<td>
</td>
</tr>
를 다음과 같이 변경
<tr>
<th scope="row">영수증</th>
<td>
<?php
if($od['od_settle_case'] == '휴대폰')
{
if($od['od_pg'] == 'allthegate') { ?>
<?php
if($default['de_card_test']) {
$default['de_allthegate_mid'] = 'aegis';
} else {
$default['de_allthegate_mid'] = $default['de_allthegate_mid'];
}
?>
<input type=hidden name=sRetailer_id value="<?php echo $default['de_allthegate_mid']?>"><!--상점아이디-->
<input type=hidden name=approve value="<?php echo $app_no?>"><!---승인번호-->
<input type=hidden name=send_no value="<?php echo $od['od_tno']?>"><!--거래고유번호-->
<input type=hidden name=appr_tm value="<?php echo $od['od_receipt_time']; ?>"><!--승인시각-->
<input type="button" value="영수증 출력" onclick="javascript:show_receipt();" class='btn_submit'>
<?
} else if($od['od_pg'] == 'lg') {
require_once G5_SHOP_PATH.'/settle_lg.inc.php';
$LGD_TID = $od['od_tno'];
$LGD_MERTKEY = $config['cf_lg_mert_key'];
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
$hp_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
} 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\');';
}
?>
<?php if($od['od_pg'] != 'allthegate') { ?>
<a href="javascript:;" onclick="<?php echo $hp_receipt_script; ?>">영수증 출력</a>
<? } ?>
<?php
}
if($od['od_settle_case'] == '신용카드')
{
if($od['od_pg'] == 'allthegate') { ?>
<?php
if($default['de_card_test']) {
$default['de_allthegate_mid'] = 'aegis';
} else {
$default['de_allthegate_mid'] = $default['de_allthegate_mid'];
}
?>
<input type=hidden name=sRetailer_id value="<?php echo $default['de_allthegate_mid']?>"><!--상점아이디-->
<input type=hidden name=approve value="<?php echo $app_no?>"><!---승인번호-->
<input type=hidden name=send_no value="<?php echo $od['od_tno']?>"><!--거래고유번호-->
<input type=hidden name=appr_tm value="<?php echo $od['od_receipt_time']; ?>"><!--승인시각-->
<input type="button" value="영수증 출력" onclick="javascript:show_receipt();" class='btn_submit'>
<?
} else if($od['od_pg'] == 'lg') {
require_once G5_SHOP_PATH.'/settle_lg.inc.php';
$LGD_TID = $od['od_tno'];
$LGD_MERTKEY = $config['cf_lg_mert_key'];
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
$card_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
} 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\');';
}
?>
<?php if($od['od_pg'] != 'allthegate') { ?>
<a href="javascript:;" onclick="<?php echo $card_receipt_script; ?>">영수증 출력</a>
<? } ?>
<?php
}
?>
<td>
</td>
</tr>
6-3. / shop / orderinquiryview.php 474~512줄
<tr>
<th scope="row">현금영수증</th>
<td>
<?php
if ($od['od_cash'])
{
if($od['od_pg'] == 'lg') {
require_once G5_SHOP_PATH.'/settle_lg.inc.php';
switch($od['od_settle_case']) {
case '계좌이체':
$trade_type = 'BANK';
break;
case '가상계좌':
$trade_type = 'CAS';
break;
default:
$trade_type = 'CR';
break;
}
$cash_receipt_script = 'javascript:showCashReceipts(\''.$LGD_MID.'\',\''.$od['od_id'].'\',\''.$od['od_casseqno'].'\',\''.$trade_type.'\',\''.$CST_PLATFORM.'\');';
} else {
require_once G5_SHOP_PATH.'/settle_kcp.inc.php';
$cash = unserialize($od['od_cash_info']);
$cash_receipt_script = 'window.open(\''.G5_CASH_RECEIPT_URL.$default['de_kcp_mid'].'&orderid='.$od_id.'&bill_yn=Y&authno='.$cash['receipt_no'].'\', \'taxsave_receipt\', \'width=360,height=647,scrollbars=0,menus=0\');';
}
?>
<a href="javascript:;" onclick="<?php echo $cash_receipt_script; ?>" class="btn_frmline">현금영수증 확인하기</a>
<?php
}
else
{
?>
<a href="javascript:;" onclick="window.open('<?php echo G5_SHOP_URL; ?>/taxsave.php?od_id=<?php echo $od_id; ?>', 'taxsave', 'width=550,height=400,scrollbars=1,menus=0');" class="btn_frmline">현금영수증을 발급하시려면 클릭하십시오.</a>
<?php } ?>
</td>
</tr>
를 다음과 같이 변경
................ 확인중 ................
7. / shop / personalpayform.php 291줄
<?php } ?>
를 아래와 같이 변경
<?php } if($default['de_pg_service'] == 'allthegate') { ?>
f.submit();
<?php } ?>
8. / shop / personalpayformupdate.php
8-3. / shop / personalpayformupdate.php 217줄
goto_url(G5_SHOP_URL.'/personalpayresult.php?pp_id='.$pp['pp_id'].'&uid='.$uid);
를 다음과 같이 변경
if($default['de_pg_service'] == 'allthegate' && $od_settle_case != '무통장') {
goto_url(G5_SHOP_URL.'/personalpayresult_allthegate.php?pp_id='.$pp['pp_id'].'&uid='.$uid);
} else {
goto_url(G5_SHOP_URL.'/personalpayresult.php?pp_id='.$pp['pp_id'].'&uid='.$uid);
}
9-1. / shop / personalpayresult.php 28줄
}
?>
를 아래와 같이 변경
else if($pp['pp_pg'] == 'allthegate') { ?>
<script language=javascript>
<!--
/***********************************************************************************
* ◈ 영수증 출력을 위한 자바스크립트
*
* 영수증 출력은 [카드결제]시에만 사용하실 수 있습니다.
*
* ※당일 결제건에 한해서 영수증 출력이 가능합니다.
* 당일 이후에는 아래의 주소를 팝업(630X510)으로 띄워 내역 조회 후 출력하시기 바랍니다.
* ▷ 팝업용 결제내역조회 패이지 주소 :
* http://www.allthegate.com/support/card_search.html
* → (반드시 스크롤바를 'yes' 상태로 하여 팝업을 띄우시기 바랍니다.) ←
*
***********************************************************************************/
function show_receipt()
{
var send_dt = appr_tm.value;
url="http://www.allthegate.com/customer/receiptLast3.jsp"
url=url+"?sRetailer_id="+sRetailer_id.value;
url=url+"&approve="+approve.value;
url=url+"&send_no="+send_no.value;
url=url+"&send_dt="+send_dt.substring(0,8);
window.open(url, "window","toolbar=no,location=no,directories=no,status=,menubar=no,scrollbars=no,resizable=no,width=420,height=700,top=0,left=150");
}
-->
</script>
<?php } ?>
9-2. / shop / personalpayresult.php 166~207줄
<tr>
<th scope="row">영수증</th>
<td>
<?php
if($pp['pp_settle_case'] == '휴대폰')
{
if($pp['pp_pg'] == 'lg') {
require_once G5_SHOP_PATH.'/settle_lg.inc.php';
$LGD_TID = $pp['pp_tno'];
$LGD_MERTKEY = $config['cf_lg_mert_key'];
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
$hp_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
} 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\');';
}
?>
<a href="javascript:;" onclick="<?php echo $hp_receipt_script; ?>">영수증 출력</a>
<?php
}
if($pp['pp_settle_case'] == '신용카드')
{
if($pp['pp_pg'] == 'lg') {
require_once G5_SHOP_PATH.'/settle_lg.inc.php';
$LGD_TID = $pp['pp_tno'];
$LGD_MERTKEY = $config['cf_lg_mert_key'];
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
$card_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
} 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\');';
}
?>
<a href="javascript:;" onclick="<?php echo $card_receipt_script; ?>">영수증 출력</a>
<?php
}
?>
<td>
</td>
</tr>
를 아래와 같이 변경
<tr>
<th scope="row">영수증</th>
<td>
<?php
if($pp['pp_settle_case'] == '휴대폰')
{
if($pp['pp_pg'] == 'allthegate') {
?>
<?php
if($default['de_card_test']) {
$default['de_allthegate_mid'] = 'aegis';
} else {
$default['de_allthegate_mid'] = $default['de_allthegate_mid'];
}
?>
<input type=hidden name=sRetailer_id value="<?php echo $default['de_allthegate_mid']?>"><!--상점아이디-->
<input type=hidden name=approve value="<?php echo $app_no?>"><!---승인번호-->
<input type=hidden name=send_no value="<?php echo $pp['pp_tno']?>"><!--거래고유번호-->
<input type=hidden name=appr_tm value="<?php echo $pp['pp_receipt_time']; ?>"><!--승인시각-->
<input type="button" value="영수증 출력" onclick="javascript:show_receipt();" class='btn_submit'>
<?
} else if($pp['pp_pg'] == 'lg') {
require_once G5_SHOP_PATH.'/settle_lg.inc.php';
$LGD_TID = $pp['pp_tno'];
$LGD_MERTKEY = $config['cf_lg_mert_key'];
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
$hp_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
} 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\');';
}
?>
<?php if($pp['pp_pg'] != 'allthegate') { ?>
<a href="javascript:;" onclick="<?php echo $hp_receipt_script; ?>">영수증 출력</a>
<? } ?>
<?php
}
if($pp['pp_settle_case'] == '신용카드')
{
if($pp['pp_pg'] == 'allthegate') {
?>
<?php
if($default['de_card_test']) {
$default['de_allthegate_mid'] = 'aegis';
} else {
$default['de_allthegate_mid'] = $default['de_allthegate_mid'];
}
?>
<input type=hidden name=sRetailer_id value="<?php echo $default['de_allthegate_mid']?>"><!--상점아이디-->
<input type=hidden name=approve value="<?php echo $app_no?>"><!---승인번호-->
<input type=hidden name=send_no value="<?php echo $pp['pp_tno']?>"><!--거래고유번호-->
<input type=hidden name=appr_tm value="<?php echo $pp['pp_receipt_time']; ?>"><!--승인시각-->
<input type="button" value="영수증 출력" onclick="javascript:show_receipt();" class='btn_submit'>
<?
} else if($pp['pp_pg'] == 'lg') {
require_once G5_SHOP_PATH.'/settle_lg.inc.php';
$LGD_TID = $pp['pp_tno'];
$LGD_MERTKEY = $config['cf_lg_mert_key'];
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
$card_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
} 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\');';
}
?>
<?php if($pp['pp_pg'] != 'allthegate') { ?>
<a href="javascript:;" onclick="<?php echo $card_receipt_script; ?>">영수증 출력</a>
<? } ?>
<?php
}
?>
<td>
</td>
</tr>
2. / shop / lib / AGSLib.php , settle_althegate_aegis_Func.php 업로드
3-1. / adm / shop_admin / configform.php 82~86줄
// lg 결제관련 필드 추가
if(!isset($default['de_pg_service'])) {
sql_query(" ALTER TABLE `{$g5['g5_shop_default_table']}`
ADD `de_pg_service` varchar(255) NOT NULL DEFAULT '' AFTER `de_sms_hp` ", true);
}
를 아래와 같이 변경
// lg 결제관련 필드 추가
if(!isset($default['de_pg_service'])) {
sql_query(" ALTER TABLE `{$g5['g5_shop_default_table']}`
ADD `de_pg_service` varchar(255) NOT NULL DEFAULT '' AFTER `de_sms_hp` ", true);
}
// 올더게이트 몰ID 필드 추가
if(!isset($default['de_allthegate_mid'])) {
sql_query(" ALTER TABLE `{$g5['g5_shop_default_table']}`
ADD `de_allthegate_mid` varchar(255) NOT NULL DEFAULT '' AFTER `de_member_reg_coupon_minimum` ", true);
}
// 올더게이트 CP아이디 필드 추가
if(!isset($default['de_allthegate_HP_ID'])) {
sql_query(" ALTER TABLE `{$g5['g5_shop_default_table']}`
ADD `de_allthegate_HP_ID` varchar(255) NOT NULL DEFAULT '' AFTER `de_allthegate_mid`,
ADD `de_allthegate_HP_PWD` varchar(255) NOT NULL DEFAULT '' AFTER `de_allthegate_HP_ID`,
ADD `de_allthegate_HP_SUBID` varchar(255) NOT NULL DEFAULT '' AFTER `de_allthegate_HP_PWD`
", true);
}
3-2. / adm / shop_admin / configform.php 607줄
<option value="lg" <?php echo get_selected($default['de_pg_service'], 'lg'); ?>>LG유플러스</option>
를 아래와 같이 변경
<option value="lg" <?php echo get_selected($default['de_pg_service'], 'lg'); ?>>LG유플러스</option>
<option value="allthegate" <?php echo get_selected($default['de_pg_service'], 'allthegate'); ?>>올더게이트</option>
3-3. / adm / shop_admin / configform.php 645~651줄
<tr class="pg_info_fld lg_info_fld">
<th scope="row"><label for="cf_lg_mert_key">LG유플러스 MERT KEY</label></th>
<td>
<?php echo help("LG유플러스 상점MertKey는 상점관리자 -> 계약정보 -> 상점정보관리에서 확인하실 수 있습니다.\n예) 95160cce09854ef44d2edb2bfb05f9f3\n<a href=\"".G5_ADMIN_URL."/config_form.php#anc_cf_cert\">기본환경설정 > 본인확인</a> 설정의 LG유플러스 MERT KEY와 동일합니다."); ?>
<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 lg_info_fld">
<th scope="row"><label for="cf_lg_mert_key">LG유플러스 MERT KEY</label></th>
<td>
<?php echo help("LG유플러스 상점MertKey는 상점관리자 -> 계약정보 -> 상점정보관리에서 확인하실 수 있습니다.\n예) 95160cce09854ef44d2edb2bfb05f9f3\n<a href=\"".G5_ADMIN_URL."/config_form.php#anc_cf_cert\">기본환경설정 > 본인확인</a> 설정의 LG유플러스 MERT KEY와 동일합니다."); ?>
<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 allthegate_info_fld">
<th scope="row"><label for="de_allthegate_mid">올더게이트 몰ID</label></th>
<td>
<input type="text" name="de_allthegate_mid" value="<?php echo $default['de_allthegate_mid']; ?>" id="de_allthegate_mid" class="frm_input" size="32" maxlength="50">
</td>
</tr>
<tr class="pg_info_fld allthegate_info_fld">
<th scope="row"><label for="de_allthegate_HP_ID">올더게이트 CP아이디</label></th>
<td>
<input type="text" name="de_allthegate_HP_ID" value="<?php echo $default['de_allthegate_HP_ID']; ?>" id="de_allthegate_HP_ID" class="frm_input" size="32" maxlength="50">
</td>
</tr>
<tr class="pg_info_fld allthegate_info_fld">
<th scope="row"><label for="de_allthegate_HP_PWD">올더게이트 CP비밀번호</label></th>
<td>
<input type="text" name="de_allthegate_HP_PWD" value="<?php echo $default['de_allthegate_HP_PWD']; ?>" id="de_allthegate_HP_PWD" class="frm_input" size="32" maxlength="50">
</td>
</tr>
<tr class="pg_info_fld allthegate_info_fld">
<th scope="row"><label for="de_allthegate_HP_SUBID">올더게이트 SUB-CPID</label></th>
<td>
<input type="text" name="de_allthegate_HP_SUBID" value="<?php echo $default['de_allthegate_HP_SUBID']; ?>" id="de_allthegate_HP_SUBID" class="frm_input" size="32" maxlength="50">
</td>
</tr>
4. / adm / shop_admin / configformupdate.php 169~171줄
de_member_reg_coupon_minimum = '$de_member_reg_coupon_minimum'
";
sql_query($sql);
를 다음과 같이 변경
de_member_reg_coupon_minimum = '$de_member_reg_coupon_minimum',
de_allthegate_mid = '$de_allthegate_mid',
de_allthegate_HP_ID = '$de_allthegate_HP_ID',
de_allthegate_HP_PWD = '$de_allthegate_HP_PWD',
de_allthegate_HP_SUBID = '$de_allthegate_HP_SUBID'
";
sql_query($sql);
3-1. / shop / orderform.php 616~621줄
// 신용카드 사용
if ($default['de_card_use']) {
$multi_settle++;
echo '<input type="radio" id="od_settle_card" name="od_settle_case" value="신용카드" '.$checked.'> <label for="od_settle_card">신용카드</label>'.PHP_EOL;
$checked = '';
}
를 다음과 같이 변경
if($default['de_pg_service'] == 'allthegate') {
// 신용카드 사용
if ($default['de_card_use']) {
$multi_settle++;
echo '<input type="radio" id="od_settle_allthegate" name="od_settle_case" value="신용카드" '.$checked.'> <label for="od_settle_allthegate">신용카드</label>'.PHP_EOL;
$checked = '';
}
} else {
// 신용카드 사용
if ($default['de_card_use']) {
$multi_settle++;
echo '<input type="radio" id="od_settle_card" name="od_settle_case" value="신용카드" '.$checked.'> <label for="od_settle_card">신용카드</label>'.PHP_EOL;
$checked = '';
}
}
3-1. / shop / orderform.php 951~953줄
$("#od_settle_iche,#od_settle_card,#od_settle_vbank,#od_settle_hp").bind("click", function() {
$("#settle_bank").hide();
});
를 다음과 같이 변경
$("#od_settle_iche,#od_settle_card,#od_settle_vbank,#od_settle_hp").bind("click", function() {
$("#settle_bank").hide();
});
$("#od_settle_allthegate").bind("click", function() {
$("#settle_bank").hide();
});
3-2. / shop / orderform.php 1281~1284줄
// pg 결제 금액에서 포인트 금액 차감
if(settle_method != "무통장") {
f.good_mny.value = od_price + send_cost + send_cost2 - send_coupon - temp_point;
}
를 다음과 같이 변경
<?php if($default['de_pg_service'] != 'allthegate') { ?>
// pg 결제 금액에서 포인트 금액 차감
if(settle_method != "무통장") {
f.good_mny.value = od_price + send_cost + send_cost2 - send_coupon - temp_point;
}
<?php } ?>
3-3. / shop / orderform.php 1390~1391줄
<?php } if($default['de_pg_service'] == 'lg') { ?>
를 아래와 같이 변경
<?php } if($default['de_pg_service'] == 'allthegate') { ?>
f.submit();
<?php } if($default['de_pg_service'] == 'lg') { ?>
4-1. / shop / orderformupdate.php 273~286줄
else if ($od_settle_case == "계좌이체")
{
switch($default['de_pg_service']) {
case 'lg':
include G5_SHOP_PATH.'/lg/xpay_result.php';
break;
default:
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
$bank_name = iconv("cp949", "utf-8", $bank_name);
break;
}
를 아래와 같이 변경
else if ($od_settle_case == "계좌이체")
{
switch($default['de_pg_service']) {
case 'allthegate':
include G5_SHOP_PATH.'/settle_allthegate.inc.php';
break;
case 'lg':
include G5_SHOP_PATH.'/lg/xpay_result.php';
break;
default:
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
$bank_name = iconv("cp949", "utf-8", $bank_name);
break;
}
4-2. shop / orderformupdate.php 300~311줄
else if ($od_settle_case == "가상계좌")
{
switch($default['de_pg_service']) {
case 'lg':
include G5_SHOP_PATH.'/lg/xpay_result.php';
break;
default:
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
$bankname = iconv("cp949", "utf-8", $bankname);
$depositor = iconv("cp949", "utf-8", $depositor);
break;
}
를 다음과 같이 변경
else if ($od_settle_case == "가상계좌")
{
switch($default['de_pg_service']) {
case 'allthegate':
include G5_SHOP_PATH.'/settle_allthegate.inc.php';
break;
case 'lg':
include G5_SHOP_PATH.'/lg/xpay_result.php';
break;
default:
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
$bankname = iconv("cp949", "utf-8", $bankname);
$depositor = iconv("cp949", "utf-8", $depositor);
break;
}
4-3. shop / orderformupdate.php 324~333줄
else if ($od_settle_case == "휴대폰")
{
switch($default['de_pg_service']) {
case 'lg':
include G5_SHOP_PATH.'/lg/xpay_result.php';
break;
default:
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
break;
}
를 다음과 같이 변경
else if ($od_settle_case == "휴대폰")
{
switch($default['de_pg_service']) {
case 'allthegate':
include G5_SHOP_PATH.'/settle_allthegate.inc.php';
break;
case 'lg':
include G5_SHOP_PATH.'/lg/xpay_result.php';
break;
default:
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
break;
}
4-4. shop / orderformupdate.php 348~358줄
else if ($od_settle_case == "신용카드")
{
switch($default['de_pg_service']) {
case 'lg':
include G5_SHOP_PATH.'/lg/xpay_result.php';
break;
default:
include G5_SHOP_PATH.'/kcp/pp_ax_hub.php';
$card_name = iconv("cp949", "utf-8", $card_name);
break;
}
를 다음과 같이 변경
4-5. shop / orderformupdate.php 705줄
goto_url(G5_SHOP_URL.'/orderinquiryview.php?od_id='.$od_id.'&uid='.$uid);
를 다음과 같이 변경
if($default['de_pg_service'] == 'allthegate' && $od_settle_case != '무통장') {
goto_url(G5_SHOP_URL.'/orderconfirm_allthegate.php?od_id='.$od_id.'&uid='.$uid);
} else {
goto_url(G5_SHOP_URL.'/orderinquiryview.php?od_id='.$od_id.'&uid='.$uid);
}
5-1. / shop / orderinquirycancel.php 33줄
switch($od['od_pg']) {
를 다음과 같이 변경
if($od['od_pg'] == 'allthegate') {
goto_url(G5_SHOP_URL."/orderinquiryview_cancel.php?od_id=$od_id&uid=$uid");
} else {
goto_url(G5_SHOP_URL."/orderinquiryview.php?od_id=$od_id&uid=$uid");
}
5-2. / shop / orderinquirycancel.php 119 줄
goto_url(G5_SHOP_URL."/orderinquiryview.php?od_id=$od_id&uid=$uid");
를 다음과 같이 변경
6-1. / shop / orderinquiryview.php 30~31줄
// LG 현금영수증 JS
if($od['od_pg'] == 'lg') {
를 다음과 같이 변경
// 올더게이트 현금영수증 JS
if($od['od_pg'] == 'allthegate') { ?>
<script language=javascript>
<!--
/***********************************************************************************
* ◈ 영수증 출력을 위한 자바스크립트
*
* 영수증 출력은 [카드결제]시에만 사용하실 수 있습니다.
*
* ※당일 결제건에 한해서 영수증 출력이 가능합니다.
* 당일 이후에는 아래의 주소를 팝업(630X510)으로 띄워 내역 조회 후 출력하시기 바랍니다.
* ▷ 팝업용 결제내역조회 패이지 주소 :
* http://www.allthegate.com/support/card_search.html
* → (반드시 스크롤바를 'yes' 상태로 하여 팝업을 띄우시기 바랍니다.) ←
*
***********************************************************************************/
function show_receipt()
{
var send_dt = appr_tm.value;
url="http://www.allthegate.com/customer/receiptLast3.jsp"
url=url+"?sRetailer_id="+sRetailer_id.value;
url=url+"&approve="+approve.value;
url=url+"&send_no="+send_no.value;
url=url+"&send_dt="+send_dt.substring(0,8);
window.open(url, "window","toolbar=no,location=no,directories=no,status=,menubar=no,scrollbars=no,resizable=no,width=420,height=700,top=0,left=150");
}
-->
</script>
<?php
// LG 현금영수증 JS
} else if($od['od_pg'] == 'lg') {
6-2. / shop / orderinquiryview.php 372~412줄
<tr>
<th scope="row">영수증</th>
<td>
<?php
if($od['od_settle_case'] == '휴대폰')
{
if($od['od_pg'] == 'lg') {
require_once G5_SHOP_PATH.'/settle_lg.inc.php';
$LGD_TID = $od['od_tno'];
$LGD_MERTKEY = $config['cf_lg_mert_key'];
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
$hp_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
} 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\');';
}
?>
<a href="javascript:;" onclick="<?php echo $hp_receipt_script; ?>">영수증 출력</a>
<?php
}
if($od['od_settle_case'] == '신용카드')
{
if($od['od_pg'] == 'lg') {
require_once G5_SHOP_PATH.'/settle_lg.inc.php';
$LGD_TID = $od['od_tno'];
$LGD_MERTKEY = $config['cf_lg_mert_key'];
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
$card_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
} 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\');';
}
?>
<a href="javascript:;" onclick="<?php echo $card_receipt_script; ?>">영수증 출력</a>
<?php
}
?>
<td>
</td>
</tr>
를 다음과 같이 변경
<tr>
<th scope="row">영수증</th>
<td>
<?php
if($od['od_settle_case'] == '휴대폰')
{
if($od['od_pg'] == 'allthegate') { ?>
<?php
if($default['de_card_test']) {
$default['de_allthegate_mid'] = 'aegis';
} else {
$default['de_allthegate_mid'] = $default['de_allthegate_mid'];
}
?>
<input type=hidden name=sRetailer_id value="<?php echo $default['de_allthegate_mid']?>"><!--상점아이디-->
<input type=hidden name=approve value="<?php echo $app_no?>"><!---승인번호-->
<input type=hidden name=send_no value="<?php echo $od['od_tno']?>"><!--거래고유번호-->
<input type=hidden name=appr_tm value="<?php echo $od['od_receipt_time']; ?>"><!--승인시각-->
<input type="button" value="영수증 출력" onclick="javascript:show_receipt();" class='btn_submit'>
<?
} else if($od['od_pg'] == 'lg') {
require_once G5_SHOP_PATH.'/settle_lg.inc.php';
$LGD_TID = $od['od_tno'];
$LGD_MERTKEY = $config['cf_lg_mert_key'];
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
$hp_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
} 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\');';
}
?>
<?php if($od['od_pg'] != 'allthegate') { ?>
<a href="javascript:;" onclick="<?php echo $hp_receipt_script; ?>">영수증 출력</a>
<? } ?>
<?php
}
if($od['od_settle_case'] == '신용카드')
{
if($od['od_pg'] == 'allthegate') { ?>
<?php
if($default['de_card_test']) {
$default['de_allthegate_mid'] = 'aegis';
} else {
$default['de_allthegate_mid'] = $default['de_allthegate_mid'];
}
?>
<input type=hidden name=sRetailer_id value="<?php echo $default['de_allthegate_mid']?>"><!--상점아이디-->
<input type=hidden name=approve value="<?php echo $app_no?>"><!---승인번호-->
<input type=hidden name=send_no value="<?php echo $od['od_tno']?>"><!--거래고유번호-->
<input type=hidden name=appr_tm value="<?php echo $od['od_receipt_time']; ?>"><!--승인시각-->
<input type="button" value="영수증 출력" onclick="javascript:show_receipt();" class='btn_submit'>
<?
} else if($od['od_pg'] == 'lg') {
require_once G5_SHOP_PATH.'/settle_lg.inc.php';
$LGD_TID = $od['od_tno'];
$LGD_MERTKEY = $config['cf_lg_mert_key'];
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
$card_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
} 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\');';
}
?>
<?php if($od['od_pg'] != 'allthegate') { ?>
<a href="javascript:;" onclick="<?php echo $card_receipt_script; ?>">영수증 출력</a>
<? } ?>
<?php
}
?>
<td>
</td>
</tr>
6-3. / shop / orderinquiryview.php 474~512줄
<tr>
<th scope="row">현금영수증</th>
<td>
<?php
if ($od['od_cash'])
{
if($od['od_pg'] == 'lg') {
require_once G5_SHOP_PATH.'/settle_lg.inc.php';
switch($od['od_settle_case']) {
case '계좌이체':
$trade_type = 'BANK';
break;
case '가상계좌':
$trade_type = 'CAS';
break;
default:
$trade_type = 'CR';
break;
}
$cash_receipt_script = 'javascript:showCashReceipts(\''.$LGD_MID.'\',\''.$od['od_id'].'\',\''.$od['od_casseqno'].'\',\''.$trade_type.'\',\''.$CST_PLATFORM.'\');';
} else {
require_once G5_SHOP_PATH.'/settle_kcp.inc.php';
$cash = unserialize($od['od_cash_info']);
$cash_receipt_script = 'window.open(\''.G5_CASH_RECEIPT_URL.$default['de_kcp_mid'].'&orderid='.$od_id.'&bill_yn=Y&authno='.$cash['receipt_no'].'\', \'taxsave_receipt\', \'width=360,height=647,scrollbars=0,menus=0\');';
}
?>
<a href="javascript:;" onclick="<?php echo $cash_receipt_script; ?>" class="btn_frmline">현금영수증 확인하기</a>
<?php
}
else
{
?>
<a href="javascript:;" onclick="window.open('<?php echo G5_SHOP_URL; ?>/taxsave.php?od_id=<?php echo $od_id; ?>', 'taxsave', 'width=550,height=400,scrollbars=1,menus=0');" class="btn_frmline">현금영수증을 발급하시려면 클릭하십시오.</a>
<?php } ?>
</td>
</tr>
를 다음과 같이 변경
................ 확인중 ................
7. / shop / personalpayform.php 291줄
<?php } ?>
를 아래와 같이 변경
<?php } if($default['de_pg_service'] == 'allthegate') { ?>
f.submit();
<?php } ?>
8. / shop / personalpayformupdate.php
8-3. / shop / personalpayformupdate.php 217줄
goto_url(G5_SHOP_URL.'/personalpayresult.php?pp_id='.$pp['pp_id'].'&uid='.$uid);
를 다음과 같이 변경
if($default['de_pg_service'] == 'allthegate' && $od_settle_case != '무통장') {
goto_url(G5_SHOP_URL.'/personalpayresult_allthegate.php?pp_id='.$pp['pp_id'].'&uid='.$uid);
} else {
goto_url(G5_SHOP_URL.'/personalpayresult.php?pp_id='.$pp['pp_id'].'&uid='.$uid);
}
9-1. / shop / personalpayresult.php 28줄
}
?>
를 아래와 같이 변경
else if($pp['pp_pg'] == 'allthegate') { ?>
<script language=javascript>
<!--
/***********************************************************************************
* ◈ 영수증 출력을 위한 자바스크립트
*
* 영수증 출력은 [카드결제]시에만 사용하실 수 있습니다.
*
* ※당일 결제건에 한해서 영수증 출력이 가능합니다.
* 당일 이후에는 아래의 주소를 팝업(630X510)으로 띄워 내역 조회 후 출력하시기 바랍니다.
* ▷ 팝업용 결제내역조회 패이지 주소 :
* http://www.allthegate.com/support/card_search.html
* → (반드시 스크롤바를 'yes' 상태로 하여 팝업을 띄우시기 바랍니다.) ←
*
***********************************************************************************/
function show_receipt()
{
var send_dt = appr_tm.value;
url="http://www.allthegate.com/customer/receiptLast3.jsp"
url=url+"?sRetailer_id="+sRetailer_id.value;
url=url+"&approve="+approve.value;
url=url+"&send_no="+send_no.value;
url=url+"&send_dt="+send_dt.substring(0,8);
window.open(url, "window","toolbar=no,location=no,directories=no,status=,menubar=no,scrollbars=no,resizable=no,width=420,height=700,top=0,left=150");
}
-->
</script>
<?php } ?>
9-2. / shop / personalpayresult.php 166~207줄
<tr>
<th scope="row">영수증</th>
<td>
<?php
if($pp['pp_settle_case'] == '휴대폰')
{
if($pp['pp_pg'] == 'lg') {
require_once G5_SHOP_PATH.'/settle_lg.inc.php';
$LGD_TID = $pp['pp_tno'];
$LGD_MERTKEY = $config['cf_lg_mert_key'];
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
$hp_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
} 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\');';
}
?>
<a href="javascript:;" onclick="<?php echo $hp_receipt_script; ?>">영수증 출력</a>
<?php
}
if($pp['pp_settle_case'] == '신용카드')
{
if($pp['pp_pg'] == 'lg') {
require_once G5_SHOP_PATH.'/settle_lg.inc.php';
$LGD_TID = $pp['pp_tno'];
$LGD_MERTKEY = $config['cf_lg_mert_key'];
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
$card_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
} 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\');';
}
?>
<a href="javascript:;" onclick="<?php echo $card_receipt_script; ?>">영수증 출력</a>
<?php
}
?>
<td>
</td>
</tr>
를 아래와 같이 변경
<tr>
<th scope="row">영수증</th>
<td>
<?php
if($pp['pp_settle_case'] == '휴대폰')
{
if($pp['pp_pg'] == 'allthegate') {
?>
<?php
if($default['de_card_test']) {
$default['de_allthegate_mid'] = 'aegis';
} else {
$default['de_allthegate_mid'] = $default['de_allthegate_mid'];
}
?>
<input type=hidden name=sRetailer_id value="<?php echo $default['de_allthegate_mid']?>"><!--상점아이디-->
<input type=hidden name=approve value="<?php echo $app_no?>"><!---승인번호-->
<input type=hidden name=send_no value="<?php echo $pp['pp_tno']?>"><!--거래고유번호-->
<input type=hidden name=appr_tm value="<?php echo $pp['pp_receipt_time']; ?>"><!--승인시각-->
<input type="button" value="영수증 출력" onclick="javascript:show_receipt();" class='btn_submit'>
<?
} else if($pp['pp_pg'] == 'lg') {
require_once G5_SHOP_PATH.'/settle_lg.inc.php';
$LGD_TID = $pp['pp_tno'];
$LGD_MERTKEY = $config['cf_lg_mert_key'];
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
$hp_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
} 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\');';
}
?>
<?php if($pp['pp_pg'] != 'allthegate') { ?>
<a href="javascript:;" onclick="<?php echo $hp_receipt_script; ?>">영수증 출력</a>
<? } ?>
<?php
}
if($pp['pp_settle_case'] == '신용카드')
{
if($pp['pp_pg'] == 'allthegate') {
?>
<?php
if($default['de_card_test']) {
$default['de_allthegate_mid'] = 'aegis';
} else {
$default['de_allthegate_mid'] = $default['de_allthegate_mid'];
}
?>
<input type=hidden name=sRetailer_id value="<?php echo $default['de_allthegate_mid']?>"><!--상점아이디-->
<input type=hidden name=approve value="<?php echo $app_no?>"><!---승인번호-->
<input type=hidden name=send_no value="<?php echo $pp['pp_tno']?>"><!--거래고유번호-->
<input type=hidden name=appr_tm value="<?php echo $pp['pp_receipt_time']; ?>"><!--승인시각-->
<input type="button" value="영수증 출력" onclick="javascript:show_receipt();" class='btn_submit'>
<?
} else if($pp['pp_pg'] == 'lg') {
require_once G5_SHOP_PATH.'/settle_lg.inc.php';
$LGD_TID = $pp['pp_tno'];
$LGD_MERTKEY = $config['cf_lg_mert_key'];
$LGD_HASHDATA = md5($LGD_MID.$LGD_TID.$LGD_MERTKEY);
$card_receipt_script = 'showReceiptByTID(\''.$LGD_MID.'\', \''.$LGD_TID.'\', \''.$LGD_HASHDATA.'\');';
} 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\');';
}
?>
<?php if($pp['pp_pg'] != 'allthegate') { ?>
<a href="javascript:;" onclick="<?php echo $card_receipt_script; ?>">영수증 출력</a>
<? } ?>
<?php
}
?>
<td>
</td>
</tr>
댓글목록
등록된 댓글이 없습니다.