휴대폰본인확인 lg 모듈 최근 버전으로 수정

This commit is contained in:
thisgun
2017-09-06 11:58:51 +09:00
parent 8af8e13686
commit edbefc256b
7 changed files with 249 additions and 46 deletions

View File

@ -156,7 +156,15 @@ if ($xpay->TX()) {
//인증요청 결과 실패 DB처리
//echo "인증요청 결과 실패 DB처리하시기 바랍니다.<br>";
alert_close('인증요청이 실패하였습니다.\\n\\n코드 : '.$xpay->Response_Code().' '.$xpay->Response_Msg());
if( G5_IS_MOBILE ){
echo '<script>'.PHP_EOL;
echo 'window.parent.$("#cert_info").css("display", "");'.PHP_EOL;
echo 'window.parent.$("#lgu_cert" ).css("display", "none");'.PHP_EOL;
echo 'alert("인증요청이 실패하였습니다.\\n\\n코드 : '.$xpay->Response_Code().' '.$xpay->Response_Msg().'")';
echo '</script>'.PHP_EOL;
} else {
alert_close('인증요청이 실패하였습니다.\\n\\n코드 : '.$xpay->Response_Code().' '.$xpay->Response_Msg());
}
exit;
}
} else {
@ -170,14 +178,31 @@ if ($xpay->TX()) {
echo "인증요청 결과 실패 DB처리하시기 바랍니다.<br>";
*/
alert_close('인증요청이 실패하였습니다.\\n\\n코드 : '.$xpay->Response_Code().' '.$xpay->Response_Msg());
if( G5_IS_MOBILE ){
echo '<script>'.PHP_EOL;
echo 'window.parent.$("#cert_info").css("display", "");'.PHP_EOL;
echo 'window.parent.$("#lgu_cert" ).css("display", "none");'.PHP_EOL;
echo 'alert("인증요청이 실패하였습니다.\\n\\n코드 : '.$xpay->Response_Code().' '.$xpay->Response_Msg().'")';
echo '</script>'.PHP_EOL;
} else {
alert_close('인증요청이 실패하였습니다.\\n\\n코드 : '.$xpay->Response_Code().' '.$xpay->Response_Msg());
}
exit;
}
?>
<script>
$(function() {
jQuery(function($) {
var $opener = window.opener;
var is_mobile = false;
if (typeof g5_is_mobile != "undefined" && g5_is_mobile ) {
$opener = window.parent;
is_mobile = true;
} else {
$opener = window.opener;
}
// 인증정보
$opener.$("input[name=cert_type]").val("<?php echo $cert_type; ?>");
@ -185,6 +210,11 @@ $(function() {
$opener.$("input[name=mb_hp]").val("<?php echo $phone_no; ?>").attr("readonly", true);
$opener.$("input[name=cert_no]").val("<?php echo $md5_cert_no; ?>");
if(is_mobile) {
$opener.$("#cert_info").css("display", "");
$opener.$("#lgu_cert" ).css("display", "none");
}
alert("본인의 휴대폰번호로 확인 되었습니다.");
window.close();
});
@ -192,4 +222,4 @@ $(function() {
<?php
include_once(G5_PATH.'/tail.sub.php');
?>
?>