192 lines
7.6 KiB
Plaintext
192 lines
7.6 KiB
Plaintext
<%
|
|
DIM pResultcd : pResultcd = Request("Resultcd") '0000: 인증성공
|
|
DIM pResultmsg : pResultmsg = Request("Resultmsg") '결과메시지:한글(euc-kr)(평문)
|
|
DIM pCryptyn : pCryptyn = Request("Cryptyn") '"Y"
|
|
DIM pKeygb : pKeygb = Request("Keygb") '"0", "1", "2"
|
|
DIM pSvcid : pSvcid = Request("Svcid")
|
|
DIM pMobilid : pMobilid = Request("Mobilid")
|
|
DIM pSigndate : pSigndate = Request("Signdate")
|
|
DIM pTradeid : pTradeid = Request("Tradeid")
|
|
DIM pName : pName = Request("Name") '이름:한글(euc-kr)(암호문)
|
|
DIM pNo : pNo = Request("No") '휴대폰번호(암호문)
|
|
DIM pCommid : pCommid = Request("Commid") '통신사(암호문)
|
|
DIM pSocialno : pSocialno = Request("Socialno") '생년월일(암호문)
|
|
DIM pSex : pSex = Request("Sex") '성별(암호문)
|
|
DIM pForeigner : pForeigner = Request("Foreigner") '외국인여부(암호문)
|
|
DIM pCi : pCi = Request("Ci") 'CI(암호문)
|
|
DIM pDi : pDi = Request("Di") 'DI(암호문)
|
|
DIM pCI_Mode : pCI_Mode = Request("CI_Mode")
|
|
DIM pMSTR : pMSTR = Request("MSTR")
|
|
DIM pMac : pMac = Request("Mac") '위변조검증용
|
|
|
|
'DLL 설치해야 함
|
|
Set McashCipher = Server.CreateObject("McashCipher.Confirm.1")
|
|
|
|
McashCipher.TradeId = "KriPol2424022614"
|
|
McashCipher.InputData = pName
|
|
retval = McashCipher.decodeString
|
|
pName = McashCipher.outputData
|
|
|
|
McashCipher.TradeId = "KriPol2424022614"
|
|
McashCipher.InputData = pNo
|
|
retval = McashCipher.decodeString
|
|
pNo = McashCipher.outputData
|
|
|
|
McashCipher.TradeId = "KriPol2424022614"
|
|
McashCipher.InputData = pCommid
|
|
retval = McashCipher.decodeString
|
|
pCommid = McashCipher.outputData
|
|
|
|
McashCipher.TradeId = "KriPol2424022614"
|
|
McashCipher.InputData = pSocialno
|
|
retval = McashCipher.decodeString
|
|
pSocialno = McashCipher.outputData
|
|
|
|
McashCipher.TradeId = "KriPol2424022614"
|
|
McashCipher.InputData = pSex
|
|
retval = McashCipher.decodeString
|
|
pSex = McashCipher.outputData
|
|
|
|
McashCipher.TradeId = "KriPol2424022614"
|
|
McashCipher.InputData = pForeigner
|
|
retval = McashCipher.decodeString
|
|
pForeigner = McashCipher.outputData
|
|
|
|
McashCipher.TradeId = "KriPol2424022614"
|
|
McashCipher.InputData = pCi
|
|
retval = McashCipher.decodeString
|
|
pCi = McashCipher.outputData
|
|
|
|
McashCipher.TradeId = "KriPol2424022614"
|
|
McashCipher.InputData = pDi
|
|
retval = McashCipher.decodeString
|
|
pDi = McashCipher.outputData
|
|
|
|
'####################################################################################
|
|
' 아래는 결과를 단순히 출력하는 샘플입니다.
|
|
' 가맹점에서는 부모창 전환등 스크립트 처리등을 하시면 됩니다.
|
|
'####################################################################################
|
|
%>
|
|
|
|
<%
|
|
dim source
|
|
source = Request.QueryString("source")
|
|
%>
|
|
|
|
<html>
|
|
<head>
|
|
<meta charset="euc-kr">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>KG모빌리언스</title>
|
|
</head>
|
|
<body>
|
|
<!--#include virtual="/Include/js.asp"-->
|
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/encoding-japanese/1.0.30/encoding.min.js"></script>
|
|
<script charset='euc-kr'>
|
|
var pResultcd = "<%=pResultcd%>";
|
|
var pResultmsg = "<%=pResultmsg%>";
|
|
var pCryptyn = "<%=pCryptyn%>";
|
|
var pKeygb = "<%=pKeygb%>";
|
|
var pSvcid = "<%=pSvcid%>";
|
|
var pMobilid = "<%=pMobilid%>";
|
|
var pSigndate = "<%=pSigndate%>";
|
|
var pTradeid = "<%=pTradeid%>";
|
|
var pName = "<%=pName%>";
|
|
var pNo = "<%=pNo%>";
|
|
var pCommid = "<%=pCommid%>";
|
|
var pSocialno = "<%=pSocialno%>";
|
|
var pSex = "<%=pSex%>";
|
|
var pForeigner = "<%=pForeigner%>";
|
|
var pCi = "<%=pCi%>";
|
|
var pDi = "<%=pDi%>";
|
|
var pCI_Mode = "<%=pCI_Mode%>";
|
|
var pMSTR = "<%=pMSTR%>";
|
|
var pMac = "<%=pMac%>";
|
|
|
|
if (pResultcd == "0000") {
|
|
/*
|
|
console.log('Resultcd : ' + pResultcd);
|
|
console.log('Resultmsg : ' + pResultmsg);
|
|
console.log('Cryptyn : ' + pCryptyn);
|
|
console.log('Keygb : ' + pKeygb);
|
|
console.log('Mobilid : ' + pMobilid);
|
|
console.log('Signdate : ' + pSigndate);
|
|
console.log('Tradeid : ' + pTradeid);
|
|
console.log('Name : ' + pName);
|
|
console.log('No : ' + pNo);
|
|
console.log('Commid : ' + pCommid);
|
|
console.log('Socialno : ' + pSocialno);
|
|
console.log('Sex : ' + pSex);
|
|
console.log('Foreigner : ' + pForeigner);
|
|
console.log('Ci : ' + pCi);
|
|
console.log('Di : ' + pDi);
|
|
console.log('CI_Mode : ' + pCI_Mode);
|
|
console.log('MSTR : ' + pMSTR);
|
|
console.log('Mac : ' + pMac);
|
|
*/
|
|
//console.log('myMac : ' + myMac);
|
|
//console.log('-----------------------------------------');
|
|
|
|
// 인증 성공 시 부모창 폼에 값 세팅
|
|
$("#r_phone", opener.document).val(pNo);
|
|
$("#r_name", opener.document).val(pName);
|
|
$("#r_gender", opener.document).val(pSex == "M" ? "1" : "2");
|
|
|
|
if (pSex == "M") {
|
|
$("a[data-toggle='r_gender'][data-title='1']", opener.document).removeClass("notActive").addClass("active");
|
|
$("a[data-toggle='r_gender'][data-title='2']", opener.document).removeClass("active").addClass("notActive");
|
|
} else {
|
|
$("a[data-toggle='r_gender'][data-title='1']", opener.document).removeClass("active").addClass("notActive");
|
|
$("a[data-toggle='r_gender'][data-title='2']", opener.document).removeClass("notActive").addClass("active"); // 오타 수정: "Active" → "active"
|
|
}
|
|
|
|
$("#r_birth", opener.document).val(pSocialno);
|
|
$("#chk", opener.document).val("1");
|
|
$("#r_chk", opener.document).hide();
|
|
|
|
<% If source = "signin" Then %>
|
|
// source가 signin인 경우 DB와 대조
|
|
$.ajax({
|
|
url: "/Ajax/AjaxMobileCheck.asp",
|
|
type: "POST",
|
|
data: {
|
|
"gubun": "check",
|
|
"r_name": pName,
|
|
"r_phone": pNo,
|
|
"chk": "on"
|
|
},
|
|
success: function (res) {
|
|
if (res === "nouser") {
|
|
alert("휴대폰 본인인증 결과와 일치하지 않는 정보입니다.\n다시 입력해주세요.");
|
|
window.open("about:blank", "_self").close();
|
|
} else if (res === "complete") {
|
|
if (window.opener && !window.opener.closed) {
|
|
window.opener.document.getElementById("mobileVerified").value = "Y";
|
|
window.opener.document.getElementById("LoginOk").disabled = false;
|
|
}
|
|
alert("본인인증이 완료되었습니다.");
|
|
window.open("about:blank", "_self").close();
|
|
} else {
|
|
alert("System Error\n관리자 문의");
|
|
window.open("about:blank", "_self").close();
|
|
}
|
|
},
|
|
error: function () {
|
|
alert("System Error\n관리자 문의");
|
|
window.open("about:blank", "_self").close();
|
|
}
|
|
});
|
|
<% Else %>
|
|
// source가 signup 등인 경우
|
|
alert("본인인증이 완료되었습니다.");
|
|
window.open("about:blank", "_self").close();
|
|
<% End If %>
|
|
|
|
} else {
|
|
// 인증 실패 시 처리
|
|
alert("본인인증에 실패했습니다.\n사유: " + pResultmsg);
|
|
window.open("about:blank", "_self").close();
|
|
}
|
|
</script>
|
|
</body>
|
|
</html> |