verify OTP
This commit is contained in:
@@ -56,5 +56,7 @@ $routes->get('/digiusers/v1/loan/loanlist', 'Loan::loanlist');
|
|||||||
|
|
||||||
$routes->post('/employment/v1/auth', 'Employment::login');
|
$routes->post('/employment/v1/auth', 'Employment::login');
|
||||||
$routes->post('/employment/v1/otp', 'Employment::verifyOTP');
|
$routes->post('/employment/v1/otp', 'Employment::verifyOTP');
|
||||||
|
$routes->post('/employment/v1/verify', 'Employment::verifyEmployment');
|
||||||
|
|
||||||
$routes->get('/employment/v1/application', 'Employment::loadApplication');
|
$routes->get('/employment/v1/application', 'Employment::loadApplication');
|
||||||
|
|
||||||
|
|||||||
@@ -46,6 +46,35 @@ class Employment extends BaseController
|
|||||||
|
|
||||||
public function verifyOTP() :ResponseInterface
|
public function verifyOTP() :ResponseInterface
|
||||||
{
|
{
|
||||||
|
$data = $this->request->getPost();
|
||||||
|
$row =[];
|
||||||
|
$session_valid = false;
|
||||||
|
if ($data['verify_uid'] !='' && $data['otp'] !=''){
|
||||||
|
|
||||||
|
$sqlVer = " SELECT a.loan_amount,c.firstname,c.lastname,e.name AS employer_name
|
||||||
|
FROM employer_checks ec
|
||||||
|
LEFT JOIN applications a ON ec.application_uid::text = a.uid::text
|
||||||
|
LEFT JOIN customers c ON c.uid::text=a.customer_uid::text
|
||||||
|
LEFT JOIN employers e ON e.uid::text = a.employer_uid::text
|
||||||
|
WHERE ec.uid = '".$data['verify_uid']."' ";
|
||||||
|
|
||||||
|
$query = $this->db->query( $sqlVer );
|
||||||
|
$rowV = $query->getResult('array');
|
||||||
|
if ( $rowV[0]){
|
||||||
|
$row = $rowV[0]['uid'];
|
||||||
|
$session_valid = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = [
|
||||||
|
'call_return' => '100',
|
||||||
|
'session_valid' => $session_valid,
|
||||||
|
'records' => $row
|
||||||
|
];
|
||||||
|
return $this->respond($data, 200);
|
||||||
|
}
|
||||||
|
|
||||||
|
public function verifyEmployment() :ResponseInterface{
|
||||||
$row =[];
|
$row =[];
|
||||||
$data = [
|
$data = [
|
||||||
'call_return' => '100',
|
'call_return' => '100',
|
||||||
|
|||||||
Reference in New Issue
Block a user