CHECKOTP W/o
This commit is contained in:
parent
a67b86edd0
commit
fe4ef4b9bd
@ -771,12 +771,14 @@ class PD_Controller extends REST_Controller {
|
||||
{
|
||||
$pdotp = $this->post('records');
|
||||
|
||||
$pdotpStatus = $this->PD_Model->checkotp($pdotp);
|
||||
|
||||
$pdotpStatus = 0;
|
||||
if(!array_key_exists('reason',$pdotp))
|
||||
{
|
||||
$pdotpStatus = $this->PD_Model->checkotp($pdotp);
|
||||
$updatePd['pd_id'] = $pdotp['pd_id'];
|
||||
$updatePd['pd_status'] = INPROGRESS;
|
||||
$updatePd['fk_updatedby'] = $pdotp['pd_id'];
|
||||
$updatePd['is_otp_done'] = 1;
|
||||
$updatePd['fk_updatedby'] = $pdotp['fk_updatedby'];
|
||||
$updatePd['updatedon'] = date('Y-m-d h:m:00');
|
||||
|
||||
if($pdotpStatus != 0 || $pdotpStatus != '' && count($pdotpStatus) != 0)
|
||||
@ -795,7 +797,32 @@ class PD_Controller extends REST_Controller {
|
||||
$data['status'] = REST_Controller::HTTP_NOT_MODIFIED;
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//echo "WITHOUT OTP CALLED";
|
||||
|
||||
$updatePd['pd_id'] = $pdotp['pd_id'];
|
||||
$updatePd['pd_status'] = INPROGRESS;
|
||||
$updatePd['is_otp_done'] = 0;
|
||||
$updatePd['otp_reject_reason'] = $pdotp['reason'];
|
||||
$updatePd['otp_reject_other_reason'] = $pdotp['other_reason'];
|
||||
$updatePd['updatedon'] = date('Y-m-d h:m:00');
|
||||
$updatePd['fk_updatedby'] = $pdotp['fk_updatedby'];
|
||||
|
||||
$where_condition_array = array('pd_id' => $pdotp['pd_id']);
|
||||
$pd_id_modified = $this->PD_Model->updateRecords($updatePd,PDTRIGGER,$where_condition_array);
|
||||
|
||||
$data['dataStatus'] = true;
|
||||
$data['status'] = REST_Controller::HTTP_OK;
|
||||
$data['records'] = true;
|
||||
$this->response($data,REST_Controller::HTTP_OK);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user