통합인증 : 코드 정리

This commit is contained in:
projectSylas
2021-09-29 03:02:00 +00:00
parent 40694f2b75
commit 736aa92769
3 changed files with 8 additions and 7 deletions

View File

@ -27,11 +27,11 @@
curl_close($ch);
$res_data = json_decode($response, true);
if($res_data['resultCode'] == "0000") {
if($res_data['resultCode'] === "0000") {
@insert_cert_history('@password_lost@', 'kg', 'sa'); // 인증성공 시 내역 기록
$cert_type = 'sa'; // 인증타입
$cert_type = 'sa'; // 인증타입
$cert_no = $res_data['txId']; // 이니시스 트랜잭션 ID
$phone_no = $res_data['userPhone']; // 전화번호
$user_name = $res_data['userName']; // 이름
@ -50,7 +50,7 @@
alert_close("인증하신 정보로 가입된 회원정보가 없습니다.");
exit;
}
}else{
} else {
// 인증실패 curl의 인증실패 체크
alert_close('코드 : '.$res_data['resultCode'].' '.urldecode($res_data['resultMsg']));
exit;

View File

@ -26,7 +26,7 @@
$flgFixedUser = (!empty($member['mb_id']) && !empty($member['mb_name']) && !empty($member['mb_hp']) && !empty($member['mb_birth']))? 'Y' : 'N'; // 특정사용자 고정시 : Y 세팅및 아래 해시 데이터 생성
// php8버전 값체크 경고 때문에 필수값이 아닌 값이 없을수 있는 선택값들은 선언해주어야함
// php8버전 값체크 경고 때문에 필수값이 아닌 값이 없을수 있는 선택값들은 초기화해주어야함
$userName = '';
$userPhone = '';
$userBirth = '';
@ -40,7 +40,8 @@
$plainText2 = hash("sha256",(string)$userName.(string)$mid.(string)$userPhone.(string)$mTxId.(string)$userBirth.(string)$reqSvcCd);
$userHash = $plainText2;
}
switch($_GET['pageType']){
switch($_GET['pageType']) {
case "register":
$resultPage = "/kg_result.php";
break;

View File

@ -34,7 +34,7 @@
@insert_cert_history($member['mb_id'], 'kg', 'sa'); // 인증성공 시 내역 기록
$cert_type = 'sa'; // 인증타입
$cert_type = 'sa'; // 인증타입
$cert_no = $res_data['txId']; // 이니시스 트랜잭션 ID
$phone_no = $res_data['userPhone']; // 전화번호
$user_name = $res_data['userName']; // 이름
@ -71,7 +71,7 @@
//set_session("ss_cert_sex", ($sex_code=="01"?"M":"F")); // 이니시스 통합인증은 성별정보 리턴 없음
set_session('ss_cert_dupinfo', $mb_dupinfo);
}else{
} else {
// 인증실패 curl의 인증실패 체크
alert_close('코드 : '.$res_data['resultCode'].' '.urldecode($res_data['resultMsg']));
exit;