공통: #370 현금영수증 처리 화면

This commit is contained in:
whitedot
2014-03-25 13:41:14 +09:00
parent 221bba8026
commit a470dffd70
3 changed files with 162 additions and 203 deletions

View File

@ -172,7 +172,7 @@ a.btn_admin:focus, a.btn_admin:hover {text-decoration:none}
.tbl_head01 thead a {color:#383838}
.tbl_head01 thead th input {vertical-align:top} /* middle 로 하면 게시판 읽기에서 목록 사용시 체크박스 라인 깨짐 */
.tbl_head01 tfoot th, .tbl_head01 tfoot td {padding:10px 0;border-top:1px solid #c1d1d5;border-bottom:1px solid #c1d1d5;background:#d7e0e2;text-align:center}
.tbl_head01 tbody th {border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9}
.tbl_head01 tbody th {padding:8px 0;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9}
.tbl_head01 td {padding:8px 5px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9;line-height:1.5em;word-break:break-all}
.tbl_head01 a {}
@ -182,7 +182,7 @@ a.btn_admin:focus, a.btn_admin:hover {text-decoration:none}
.tbl_head02 thead a {color:#383838}
.tbl_head02 thead th input {vertical-align:top} /* middle 로 하면 게시판 읽기에서 목록 사용시 체크박스 라인 깨짐 */
.tbl_head02 tfoot th, .tbl_head02 tfoot td {padding:10px 0;border-top:1px solid #c1d1d5;border-bottom:1px solid #c1d1d5;background:#d7e0e2;text-align:center}
.tbl_head02 tbody th {border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9}
.tbl_head02 tbody th {padding:5px 0;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9}
.tbl_head02 td {padding:5px 3px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9;line-height:1.4em;word-break:break-all}
.tbl_head02 a {}

View File

@ -495,7 +495,7 @@ a.btn_admin:focus, a.btn_admin:hover {text-decoration:none}
.tbl_head01 thead th input {vertical-align:top} /* middle 로 하면 게시판 읽기에서 목록 사용시 체크박스 라인 깨짐 */
.tbl_head01 tfoot th {border-top:1px solid #666;border-bottom:1px solid #666;background:#484848;color:#fff}
.tbl_head01 tfoot td {border-color:#666;background:#484848;color:#fff;font-weight:bold;text-align:center}
.tbl_head01 tbody th {border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9}
.tbl_head01 tbody th {padding:5px 0;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9}
.tbl_head01 td {padding:5px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9;line-height:1.5em;word-break:break-all}
.tbl_head02 {}
@ -505,7 +505,7 @@ a.btn_admin:focus, a.btn_admin:hover {text-decoration:none}
.tbl_head02 thead th input {vertical-align:top} /* middle 로 하면 게시판 읽기에서 목록 사용시 체크박스 라인 깨짐 */
.tbl_head02 tfoot th {border-top:1px solid #666;border-bottom:1px solid #666;background:#484848;color:#fff}
.tbl_head02 tfoot td {border-color:#666;background:#484848;color:#fff;font-weight:bold;text-align:center}
.tbl_head02 tbody th {border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9}
.tbl_head02 tbody th {padding:5px 0;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9}
.tbl_head02 td {padding:5px 3px;border-top:1px solid #e9e9e9;border-bottom:1px solid #e9e9e9;line-height:1.4em;word-break:break-all}
/* 폼 테이블 */

View File

@ -9,7 +9,7 @@ require G5_SHOP_PATH.'/settle_kcp.inc.php';
/* ============================================================================== */
?>
<?php
/* ============================================================================== */
/* ============================================================================== */
/* = 01. KCP 지불 서버 정보 설정 = */
/* = -------------------------------------------------------------------------- = */
$g_conf_home_dir = G5_SHOP_PATH.'/kcp'; // ※ 쇼핑몰 모듈 설치 절대 경로 bin전까지
@ -32,7 +32,7 @@ require G5_SHOP_PATH.'/settle_kcp.inc.php';
/* ============================================================================== */
/* ============================================================================== */
/* ============================================================================== */
/* = 지불 결과 = */
/* = -------------------------------------------------------------------------- = */
$req_tx = $_POST[ "req_tx" ]; // 요청 종류
@ -43,16 +43,16 @@ require G5_SHOP_PATH.'/settle_kcp.inc.php';
$buyr_name = $_POST[ "buyr_name" ]; // 주문자 이름
$buyr_tel1 = $_POST[ "buyr_tel1" ]; // 주문자 전화번호
$buyr_mail = $_POST[ "buyr_mail" ]; // 주문자 메일
$good_name = $_POST[ "good_name" ]; // 주문상품명
$good_name = $_POST[ "good_name" ]; // 주문상품명
$comment = $_POST[ "comment" ]; // 비고
/* = -------------------------------------------------------------------------- = */
$corp_type = $_POST[ "corp_type" ]; // 사업장 구분
$corp_tax_type = $_POST[ "corp_tax_type" ]; // 과세/면세 구분
$corp_tax_no = $_POST[ "corp_tax_no" ]; // 발행 사업자 번호
$corp_nm = $_POST[ "corp_nm" ]; // 상호
$corp_owner_nm = $_POST[ "corp_owner_nm" ]; // 대표자명
$corp_addr = $_POST[ "corp_addr" ]; // 사업장 주소
$corp_telno = $_POST[ "corp_telno" ]; // 사업장 대표 연락처
$corp_type = $_POST[ "corp_type" ]; // 사업장 구분
$corp_tax_type = $_POST[ "corp_tax_type" ]; // 과세/면세 구분
$corp_tax_no = $_POST[ "corp_tax_no" ]; // 발행 사업자 번호
$corp_nm = $_POST[ "corp_nm" ]; // 상호
$corp_owner_nm = $_POST[ "corp_owner_nm" ]; // 대표자명
$corp_addr = $_POST[ "corp_addr" ]; // 사업장 주소
$corp_telno = $_POST[ "corp_telno" ]; // 사업장 대표 연락처
/* = -------------------------------------------------------------------------- = */
$tr_code = $_POST[ "tr_code" ]; // 발행용도
$id_info = $_POST[ "id_info" ]; // 신분확인 ID
@ -61,16 +61,16 @@ require G5_SHOP_PATH.'/settle_kcp.inc.php';
$amt_svc = $_POST[ "amt_svc" ]; // 봉사료
$amt_tax = $_POST[ "amt_tax" ]; // 부가가치세
/* = -------------------------------------------------------------------------- = */
$pay_type = $_POST[ "pay_type" ]; // 결제 서비스 구분
$pay_trade_no = $_POST[ "pay_trade_no" ]; // 결제 거래번호
$pay_type = $_POST[ "pay_type" ]; // 결제 서비스 구분
$pay_trade_no = $_POST[ "pay_trade_no" ]; // 결제 거래번호
/* = -------------------------------------------------------------------------- = */
$mod_type = $_POST[ "mod_type" ]; // 변경 타입
$mod_type = $_POST[ "mod_type" ]; // 변경 타입
$mod_value = $_POST[ "mod_value" ]; // 변경 요청 거래번호
$mod_gubn = $_POST[ "mod_gubn" ]; // 변경 요청 거래번호 구분
$mod_mny = $_POST[ "mod_mny" ]; // 변경 요청 금액
$rem_mny = $_POST[ "rem_mny" ]; // 변경처리 이전 금액
/* = -------------------------------------------------------------------------- = */
$res_cd = $_POST[ "res_cd" ]; // 응답코드
$res_cd = $_POST[ "res_cd" ]; // 응답코드
$res_msg = $_POST[ "res_msg" ]; // 응답메시지
$cash_no = $_POST[ "cash_no" ]; // 현금영수증 거래번호
$receipt_no = $_POST[ "receipt_no" ]; // 현금영수증 승인번호
@ -90,43 +90,39 @@ require G5_SHOP_PATH.'/settle_kcp.inc.php';
$req_tx_name = "변경/조회";
}
?>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8>">
<link href="css/sample.css" rel="stylesheet" type="text/css">
<script language="javascript">
//현금영수증 연동 스크립트
function receiptView(auth_no)
{
var receiptWin = "<?php echo G5_CASH_RECEIPT_URL.$default['de_kcp_mid'].'&orderid='.$ordr_idxx.'&bill_yn=Y&authno='; ?>"+auth_no;
window.open(receiptWin , "" , "width=360, height=647")
}
</script>
</head>
<body>
<center>
<table border="0" cellpadding="0" cellspacing="1" width="500" align="center">
<tr>
<td align="left" height="25"><img src="./img/KcpLogo.jpg" border="0" width="65" height="50"></td>
<td align="right" class="txt_main">KCP Online Payment System</td>
</tr>
<tr>
<td bgcolor="CFCFCF" height="3" colspan="2"></td>
</tr>
<tr>
<td colspan="2">
<br>
<table width="90%" align="center">
<tr>
<td bgcolor="CFCFCF" height="2"></td>
</tr>
<tr>
<td align="center">결과 페이지(현금영수증 <?php echo $req_tx_name; ?>)</td>
</tr>
<tr>
<td bgcolor="CFCFCF" height="2"></td>
</tr>
</table>
<!doctype html>
<html lang="ko">
<head>
<meta charset="utf-8">
<title>현금영수증발급 <?php echo $req_tx_name; ?> | <?php echo $config['cf_title']; ?></title>
<?php
echo '<link rel="stylesheet" href="'.G5_CSS_URL.'/'.(G5_IS_MOBILE?'mobile':'default').'_shop.css">'.PHP_EOL;
?>
<style>
.tbl_head01 tbody th {padding-right:10px;text-align:right}
</style>
<script>
//현금영수증 연동 스크립트
function receiptView(auth_no)
{
var receiptWin = "<?php echo G5_CASH_RECEIPT_URL.$default['de_kcp_mid'].'&amp;orderid='.$ordr_idxx.'&amp;bill_yn=Y&amp;authno='; ?>"+auth_no;
window.open(receiptWin , "" , "width=360, height=647")
}
</script>
</head>
<body>
<div id="kcp_req_rx" class="new_win">
<h1 id="win_title">현금영수증 <?php echo $req_tx_name; ?> - KCP Online Payment System</h1>
<div class="tbl_head01 tbl_wrap">
<table>
<colgroup>
<col class="grid_4">
<col>
</colgroup>
<tbody>
<?php
if ($req_tx == "pay") // 거래 구분 : 등록
{
@ -135,67 +131,57 @@ require G5_SHOP_PATH.'/settle_kcp.inc.php';
if ($res_cd == "0000") // 정상 승인
{
?>
<table width="85%" align="center" border="0" cellpadding="0" cellspacing="1">
<tr>
<td>결과코드</td>
<td><?php echo $res_cd; ?></td>
</tr>
<tr><td colspan="2"><IMG SRC="./img/dot_line.gif" width="100%"></td></tr>
<tr>
<td>결과 메세지</td>
<td><?php echo $res_msg; ?></td>
</tr>
<tr><td colspan="2"><IMG SRC="./img/dot_line.gif" width="100%"></td></tr>
<tr>
<td>현금영수증 거래번호</td>
<td><?php echo $cash_no; ?></td>
</tr>
<tr><td colspan="2"><IMG SRC="./img/dot_line.gif" width="100%"></td></tr>
<tr>
<td>현금영수증 승인번호</td>
<td><?php echo $receipt_no; ?></td>
</tr>
<tr><td colspan="2"><IMG SRC="./img/dot_line.gif" width="100%"></td></tr>
<tr>
<td>등록 상태 코드</td>
<td><?php echo $reg_stat; ?></td>
</tr>
<tr><td colspan="2"><IMG SRC="./img/dot_line.gif" width="100%"></td></tr>
<tr>
<td>등록 상태 설명</td>
<td><?php echo $reg_desc; ?></td>
</tr>
<tr><td colspan="2"><IMG SRC="./img/dot_line.gif" width="100%"></td></tr>
<tr>
<td>승인시간</td>
<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",$app_time); ?></td>
</tr>
<tr><td colspan="2"><IMG SRC="./img/dot_line.gif" width="100%"></td></tr>
<tr>
<td>현금영수증 URL</td>
<td><input type="button" name="receiptView" value="영수증 확인" class="box" onClick="javascript:receiptView('<?php echo $receipt_no; ?>')"></td>
</tr>
<tr><td colspan="2"><IMG SRC="./img/dot_line.gif" width="100%"></td></tr>
<tr>
<td colspan="2">※ 영수증 확인은 실 등록의 경우에만 가능합니다.</td>
</tr>
</table>
<tr>
<th scope="row">결과코드</th>
<td><?php echo $res_cd; ?></td>
</tr>
<tr>
<th scope="row">결과 메세지</th>
<td><?php echo $res_msg; ?></td>
</tr>
<tr>
<th scope="row">현금영수증 거래번호</th>
<td><?php echo $cash_no; ?></td>
</tr>
<tr>
<th scope="row">현금영수증 승인번호</th>
<td><?php echo $receipt_no; ?></td>
</tr>
<tr>
<th scope="row">등록 상태 코드</th>
<td><?php echo $reg_stat; ?></td>
</tr>
<tr>
<th scope="row">등록 상태 설명</th>
<td><?php echo $reg_desc; ?></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",$app_time); ?></td>
</tr>
<tr>
<th scope="row">현금영수증 URL</th>
<td>
<button type="button" name="receiptView" class="btn_frmline" onClick="javascript:receiptView('<?php echo $receipt_no; ?>')">영수증 확인</button>
<p>영수증 확인은 실 등록의 경우에만 가능합니다.</p>
</td>
</tr>
<tr>
<td colspan="2"></td>
</tr>
<?php
}
else // 승인 실패
{
?>
<table width="85%" align="center" border="0" cellpadding="0" cellspacing="1">
<tr>
<td>결과코드</td>
<td><?php echo $res_cd; ?></td>
</tr>
<tr><td colspan="2"><IMG SRC="./img/dot_line.gif" width="100%"></td></tr>
<tr>
<td>결과 메세지</td>
<td><?php echo $res_msg; ?></td>
</tr>
</table>
<tr>
<th scope="row">결과코드</th>
<td><?php echo $res_cd; ?></td>
</tr>
<tr>
<th scope="row">결과 메세지</th>
<td><?php echo $res_msg; ?></td>
</tr>
<?php
}
@ -203,20 +189,17 @@ require G5_SHOP_PATH.'/settle_kcp.inc.php';
else // 업체 DB 처리 실패
{
?>
<table width="85%" align="center" border="0" cellpadding="0" cellspacing="1">
<tr>
<td nowrap>취소 결과코드</td>
<td><?php echo $res_cd; ?></td>
</tr>
<tr><td colspan="2"><IMG SRC="./img/dot_line.gif" width="100%"></td></tr>
<tr>
<td nowrap>취소 결과 메세지</td>
<td><?php echo $res_msg; ?></td>
</tr>
<tr><td colspan="2"><IMG SRC="./img/dot_line.gif" width="100%"></td></tr>
<tr>
<td nowrap>상세메세지</td>
<td>
<tr>
<th scope="row">취소 결과코드</th>
<td><?php echo $res_cd; ?></td>
</tr>
<tr>
<td scope="row">취소 결과 메세지</th>
<td><?php echo $res_msg; ?></td>
</tr>
<tr>
<th scope="row">상세메세지</th>
<td>
<?php
if ($res_cd == "0000")
{
@ -227,9 +210,8 @@ require G5_SHOP_PATH.'/settle_kcp.inc.php';
echo "결제는 정상적으로 이루어졌지만 쇼핑몰에서 결제 결과를 처리하는 중 오류가 발생하여 시스템에서 자동으로 취소 요청을 하였으나, <br> <b>취소가 실패 되었습니다.</b><br> 쇼핑몰로 전화하여 확인하시기 바랍니다.";
}
?>
</td>
</tr>
</table>
</td>
</tr>
<?php
}
@ -239,86 +221,63 @@ require G5_SHOP_PATH.'/settle_kcp.inc.php';
if ($res_cd == "0000")
{
?>
<table width="85%" align="center" border="0" cellpadding="0" cellspacing="1">
<tr>
<td>결과코드</td>
<td><?php echo $res_cd; ?></td>
</tr>
<tr><td colspan="2"><IMG SRC="./img/dot_line.gif" width="100%"></td></tr>
<tr>
<td>결과 메세지</td>
<td><?php echo $res_msg; ?></td>
</tr>
<tr><td colspan="2"><IMG SRC="./img/dot_line.gif" width="100%"></td></tr>
<tr>
<td>현금영수증 거래번호</td>
<td><?php echo $cash_no; ?></td>
</tr>
<tr><td colspan="2"><IMG SRC="./img/dot_line.gif" width="100%"></td></tr>
<tr>
<td>현금영수증 승인번호</td>
<td><?php echo $receipt_no; ?></td>
</tr>
<tr><td colspan="2"><IMG SRC="./img/dot_line.gif" width="100%"></td></tr>
<tr>
<td>등록 상태 코드</td>
<td><?php echo $reg_stat; ?></td>
</tr>
<tr><td colspan="2"><IMG SRC="./img/dot_line.gif" width="100%"></td></tr>
<tr>
<td>등록 상태 설명</td>
<td><?php echo $reg_desc; ?></td>
</tr>
<tr><td colspan="2"><IMG SRC="./img/dot_line.gif" width="100%"></td></tr>
<tr>
<td>승인시간</td>
<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", $app_time); ?></td>
</tr>
<tr><td colspan="2"><IMG SRC="./img/dot_line.gif" width="100%"></td></tr>
<tr>
<td>현금영수증 URL</td>
<td><input type="button" name="receiptView" value="영수증 확인" class="box" onClick="javascript:receiptView('<?php echo $receipt_no; ?>')"></td>
</tr>
<tr><td colspan="2"><IMG SRC="./img/dot_line.gif" width="100%"></td></tr>
<tr>
<td colspan="2">※ 영수증 확인은 실 등록의 경우에만 가능합니다.</td>
</tr>
</table>
<tr>
<th scope="row">결과코드</th>
<td><?php echo $res_cd; ?></td>
</tr>
<tr>
<th scope="row">결과 메세지</th>
<td><?php echo $res_msg; ?></td>
</tr>
<tr>
<th scope="row">현금영수증 거래번호</th>
<td><?php echo $cash_no; ?></td>
</tr>
<tr>
<th scope="row">현금영수증 승인번호</th>
<td><?php echo $receipt_no; ?></td>
</tr>
<tr>
<th scope="row">등록 상태 코드</th>
<td><?php echo $reg_stat; ?></td>
</tr>
<tr>
<th scope="row">등록 상태 설명</th>
<td><?php echo $reg_desc; ?></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", $app_time); ?></td>
</tr>
<tr>
<th scope="row">현금영수증 URL</th>
<td>
<input type="button" name="receiptView" value="영수증 확인" class="box" onClick="javascript:receiptView('<?php echo $receipt_no; ?>')">
<p>영수증 확인은 실 등록의 경우에만 가능합니다.</p>
</td>
</tr>
<?php
}
else
else
{
?>
<table width="85%" align="center" border="0" cellpadding="0" cellspacing="1">
<tr>
<td>결과코드</td>
<td><?php echo $res_cd; ?></td>
</tr>
<tr><td colspan="2"><IMG SRC="./img/dot_line.gif" width="100%"></td></tr>
<tr>
<td>결과 메세지</td>
<td><?php echo $res_msg; ?></td>
</tr>
</table>
<tr>
<th scope="row">결과코드</th>
<td><?php echo $res_cd; ?></td>
</tr>
<tr>
<th scope="row">결과 메세지</th>
<td><?php echo $res_msg; ?></td>
</tr>
<?php
}
}
?>
<table width="90%" align="center">
<tr>
<td bgcolor="CFCFCF" height="2"></td>
</tr>
<tr>
<td height="2">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr>
<td bgcolor="CFCFCF" height="3" colspan="2"></td>
</tr>
</table>
</center>
</body>
</html>
</tbody>
</table>
</div>
</div>
</body>
</html>