Preview: qc_gst_send_otp.php
Size: 1.99 KB
/home/justbyquicklly-old/www/qc_gst_send_otp.php
<?php
session_start();
include('include/config.php');
include("include/functions.php");
$token=$_COOKIE['apitokensearch'];
//echo $_REQUEST['mnum'].'<br>';
$countryCpde= base64_decode($_REQUEST['countryCpde']);
$mobileNo = base64_decode($_REQUEST['mnum']);
$emailId = base64_decode($_REQUEST['gstEmil']);
//echo "tpp=".$_REQUEST['mnum'];die;
//Check duplicate email/phone
/*$uEmailChk = $conn->prepare("select email from tbl_user where email=? and deleted_on is null");
$uEmailChk->bind_param("s",$emailId);
if(!$uEmailChk->execute()){
echo $uEmailChk->error;
}else{
$uEmailChk->store_result();
}
$uMobileChk = $conn->prepare("select mobile from tbl_user where mobile=? and deleted_on is null");
$uMobileChk->bind_param("s",$mobileNo);
if(!$uMobileChk->execute()){
echo $uMobileChk->error;
}else{
$uMobileChk->store_result();
}
if ($uMobileChk->num_rows >0) {
$apiVerfArr = array('very_popen' => 0, "msg" => "This mobile number is already exists. Please choose another.");
echo json_encode($apiVerfArr);
exit;
}else
if ($uEmailChk->num_rows >0) {
$apiVerfArr = array('very_popen' => 0, "msg" => "This email id is already exists. Please choose another.");
echo json_encode($apiVerfArr);
exit;
}else {
$result = callAPI('POST', "https://devrestapi.goquicklly.com/common/send-otp", array('mobile' =>$mobileNo,'countryCode'=>$countryCpde,'token'=>$token));
$apiVerfArr = array('very_popen' => 2, "vrcdechk" => $result->tag,"msg" => $result->msg);
echo json_encode($apiVerfArr);
}*/
if(!empty($mobileNo)) {
$result = callAPI('POST', WEBAPI_URL_NEW.'miniuser/send-email-otp', array('mobile' =>$mobileNo,'countryCode'=>$countryCpde,'token'=>$token,'email'=>$emailId,'firstName'=>$fname,'lastName'=>$lname));
$otpMsg = $result->msg;
$apiVerfArr = array('very_popen' => 2, "vrcdechk" => $result->tag,"msg" => $otpMsg,'email'=>$emailId,'firstName'=>$fname,'lastName'=>$lname);
echo json_encode($apiVerfArr);
}
?>
Directory Contents
Dirs: 12 × Files: 59