회원정보찾기 : 이니시스통합인증 관련 수정
This commit is contained in:
@ -1,65 +0,0 @@
|
|||||||
<?php
|
|
||||||
include_once('./_common.php');
|
|
||||||
global $g5;
|
|
||||||
|
|
||||||
$sql = "select MAX(cr_id) as max_cr_id from {$g5['cert_history_table']} limit 1";
|
|
||||||
$res = sql_fetch($sql);
|
|
||||||
$max_cr_id = $res['max_cr_id'];
|
|
||||||
if(empty($max_cr_id)) $max_cr_id = 0;
|
|
||||||
|
|
||||||
if($config['cf_cert_use'] == 2) { // 테스트 일때
|
|
||||||
$mid = "INIiasTest";
|
|
||||||
$apiKey = "TGdxb2l3enJDWFRTbTgvREU3MGYwUT09";
|
|
||||||
$mTxId ='test_'.$max_cr_id;
|
|
||||||
} else {
|
|
||||||
$mid = 'SRA'.$config['cf_cert_kg_mid']; // 부여받은 MID(상점ID) 입력(영업담당자 문의)
|
|
||||||
$apiKey = $config['cf_cert_kg_cd']; // 부여받은 MID 에 대한 apiKey
|
|
||||||
$mTxId ='SIR_'.$max_cr_id.$type;
|
|
||||||
certify_count_check($member['mb_id'], 'sa'); // 금일 인증시도 횟수 체크
|
|
||||||
}
|
|
||||||
$reqSvcCd ='01';
|
|
||||||
|
|
||||||
// 등록가맹점 확인
|
|
||||||
$plainText1 = hash("sha256",(string)$mid.(string)$mTxId.(string)$apiKey);
|
|
||||||
$authHash = $plainText1;
|
|
||||||
|
|
||||||
$flgFixedUser = (!empty($member['mb_id']) && !empty($member['mb_name']) && !empty($member['mb_hp']) && !empty($member['mb_birth']))? 'Y' : 'N'; // 특정사용자 고정시 : Y 세팅및 아래 해시 데이터 생성
|
|
||||||
|
|
||||||
if($flgFixedUser == 'Y') {
|
|
||||||
$userName = $member['mb_name']; // 사용자 이름
|
|
||||||
$userPhone = preg_replace("/-/","" , $member['mb_hp']); // 사용자 전화번호 하이픈만 제거
|
|
||||||
$userBirth = $member['mb_birth']; // 사용자 생년월일
|
|
||||||
|
|
||||||
$plainText2 = hash("sha256",(string)$userName.(string)$mid.(string)$userPhone.(string)$mTxId.(string)$userBirth.(string)$reqSvcCd);
|
|
||||||
$userHash = $plainText2;
|
|
||||||
}
|
|
||||||
|
|
||||||
$g5['title'] = 'KG이니시스 통합인증';
|
|
||||||
include_once(G5_PATH.'/head.sub.php');
|
|
||||||
?>
|
|
||||||
<form name="saForm">
|
|
||||||
<input type="hidden" name="mid" value="<?php echo $mid ?>"> <!-- 필수 값 -->
|
|
||||||
<input type="hidden" name="reqSvcCd" value="<?php echo $reqSvcCd ?>"> <!-- 필수 값 -->
|
|
||||||
<input type="hidden" name="mTxId" value="<?php echo $mTxId ?>"> <!-- 필수 값 -->
|
|
||||||
|
|
||||||
<input type="hidden" name="authHash" value="<?php echo $authHash ?>"> <!-- 필수 값 -->
|
|
||||||
<input type="hidden" name="flgFixedUser" value="<?php echo $flgFixedUser ?>"> <!-- 필수 값 Y/N 특정사용자 인증 요청 여부 -->
|
|
||||||
<input type="hidden" name="userName" value="<?php echo $userName ?>">
|
|
||||||
<input type="hidden" name="userPhone" value="<?php echo $userPhone ?>">
|
|
||||||
<input type="hidden" name="userBirth" value="<?php echo $userBirth ?>">
|
|
||||||
<input type="hidden" name="userHash" value="<?php echo $userHash ?>">
|
|
||||||
<input type="hidden" name="mbId" value="<?php echo $member['mb_id'] ?>">
|
|
||||||
<input type="hidden" name="directAgency" value="<?php echo $_POST['directAgency']; ?>">
|
|
||||||
|
|
||||||
<input type="hidden" name="successUrl" value="<?php echo G5_KGCERT_URL; ?>/kg_find_result.php"> <!-- 필수 값 -->
|
|
||||||
<input type="hidden" name="failUrl" value="<?php echo G5_KGCERT_URL; ?>/kg_find_result.php"> <!-- 필수 값 -->
|
|
||||||
<!-- successUrl / failUrl 은 분리 하여 이용가능!-->
|
|
||||||
</form>
|
|
||||||
<script>
|
|
||||||
document.saForm.setAttribute("target", "_self");
|
|
||||||
document.saForm.setAttribute("post", "post");
|
|
||||||
document.saForm.setAttribute("action", "https://sa.inicis.com/auth");
|
|
||||||
document.saForm.submit();
|
|
||||||
</script>
|
|
||||||
<?php
|
|
||||||
include_once(G5_PATH.'/tail.sub.php');
|
|
||||||
@ -44,14 +44,11 @@
|
|||||||
$md5_ci = md5($ci . $ci);
|
$md5_ci = md5($ci . $ci);
|
||||||
$phone_no = hyphen_hp_number($phone_no);
|
$phone_no = hyphen_hp_number($phone_no);
|
||||||
$mb_dupinfo = $md5_ci;
|
$mb_dupinfo = $md5_ci;
|
||||||
|
|
||||||
$row = sql_fetch("select * from {$g5['member_table']} where mb_id <> '{$member['mb_id']}' and mb_dupinfo = '{$mb_dupinfo}'");
|
$row = sql_fetch("select mb_id from {$g5['member_table']} where mb_id <> '{$member['mb_id']}' and mb_dupinfo = '{$mb_dupinfo}'"); // ci데이터로 찾음
|
||||||
if (!$row['mb_id']) {
|
if(!$row['mb_id']) { // ci로 등록된 계정이 없다면
|
||||||
$row = sql_fetch("select * from {$g5['member_table']} where mb_id <> '{$member['mb_id']}' and mb_name ='{$user_name}' and mb_birth='{$birth_day}' and mb_hp='{$phone_no}'");
|
alert_close("인증하신 정보로 가입된 회원정보가 없습니다.");
|
||||||
if(!$row['mb_id']){
|
exit;
|
||||||
alert_close("인증하신 정보로 가입된 회원정보가 없습니다.");
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}else{
|
}else{
|
||||||
// 인증실패 curl의 인증실패 체크
|
// 인증실패 curl의 인증실패 체크
|
||||||
@ -66,8 +63,8 @@
|
|||||||
|
|
||||||
$g5['title'] = 'KG이니시스 통합인증 결과';
|
$g5['title'] = 'KG이니시스 통합인증 결과';
|
||||||
include_once(G5_PATH.'/head.sub.php');
|
include_once(G5_PATH.'/head.sub.php');
|
||||||
?>
|
?>
|
||||||
<form name="mbFindForm">
|
<form name="mbFindForm" method="POST">
|
||||||
<input type="hidden" name="mb_id" value="<?php echo $row["mb_id"]; ?>">
|
<input type="hidden" name="mb_id" value="<?php echo $row["mb_id"]; ?>">
|
||||||
</form>
|
</form>
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
@ -2,6 +2,8 @@
|
|||||||
include_once('./_common.php');
|
include_once('./_common.php');
|
||||||
global $g5;
|
global $g5;
|
||||||
|
|
||||||
|
if($_GET['directAgency'] == "KFTC") alert_close("서비스 준비중입니다.");
|
||||||
|
|
||||||
$sql = "select MAX(cr_id) as max_cr_id from {$g5['cert_history_table']} limit 1";
|
$sql = "select MAX(cr_id) as max_cr_id from {$g5['cert_history_table']} limit 1";
|
||||||
$res = sql_fetch($sql);
|
$res = sql_fetch($sql);
|
||||||
$max_cr_id = $res['max_cr_id'];
|
$max_cr_id = $res['max_cr_id'];
|
||||||
@ -33,7 +35,17 @@
|
|||||||
$plainText2 = hash("sha256",(string)$userName.(string)$mid.(string)$userPhone.(string)$mTxId.(string)$userBirth.(string)$reqSvcCd);
|
$plainText2 = hash("sha256",(string)$userName.(string)$mid.(string)$userPhone.(string)$mTxId.(string)$userBirth.(string)$reqSvcCd);
|
||||||
$userHash = $plainText2;
|
$userHash = $plainText2;
|
||||||
}
|
}
|
||||||
|
switch($_GET['pageType']){
|
||||||
|
case "register":
|
||||||
|
$resultPage = "/kg_result.php";
|
||||||
|
break;
|
||||||
|
case "find":
|
||||||
|
$resultPage = "/kg_find_result.php";
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
$resultUrl = G5_KGCERT_URL . $resultPage;
|
||||||
|
|
||||||
$g5['title'] = 'KG이니시스 통합인증';
|
$g5['title'] = 'KG이니시스 통합인증';
|
||||||
include_once(G5_PATH.'/head.sub.php');
|
include_once(G5_PATH.'/head.sub.php');
|
||||||
?>
|
?>
|
||||||
@ -49,10 +61,10 @@
|
|||||||
<input type="hidden" name="userBirth" value="<?php echo $userBirth ?>">
|
<input type="hidden" name="userBirth" value="<?php echo $userBirth ?>">
|
||||||
<input type="hidden" name="userHash" value="<?php echo $userHash ?>">
|
<input type="hidden" name="userHash" value="<?php echo $userHash ?>">
|
||||||
<input type="hidden" name="mbId" value="<?php echo $member['mb_id'] ?>">
|
<input type="hidden" name="mbId" value="<?php echo $member['mb_id'] ?>">
|
||||||
<input type="hidden" name="directAgency" value="<?php echo $_POST['directAgency']; ?>">
|
<input type="hidden" name="directAgency" value="<?php echo $_GET['directAgency']; ?>">
|
||||||
|
|
||||||
<input type="hidden" name="successUrl" value="<?php echo G5_KGCERT_URL; ?>/kg_result.php"> <!-- 필수 값 -->
|
<input type="hidden" name="successUrl" value="<?php echo $resultUrl; ?>"> <!-- 필수 값 -->
|
||||||
<input type="hidden" name="failUrl" value="<?php echo G5_KGCERT_URL; ?>/kg_result.php"> <!-- 필수 값 -->
|
<input type="hidden" name="failUrl" value="<?php echo $resultUrl; ?>"> <!-- 필수 값 -->
|
||||||
<!-- successUrl / failUrl 은 분리 하여 이용가능!-->
|
<!-- successUrl / failUrl 은 분리 하여 이용가능!-->
|
||||||
</form>
|
</form>
|
||||||
<script>
|
<script>
|
||||||
|
|||||||
Reference in New Issue
Block a user