diff --git a/api/application/controllers/Sales_PD_Controller.php b/api/application/controllers/Sales_PD_Controller.php index fde3062c..2153cf9f 100644 --- a/api/application/controllers/Sales_PD_Controller.php +++ b/api/application/controllers/Sales_PD_Controller.php @@ -1761,7 +1761,17 @@ public function filterSalesPDList_post() { public function cetNewSalesPd_get(){ //for demo purpose only $saltkey = $this->get('saltkey'); - + // if(password_verify("Smc@123$", '$2y$10$n4dEVCXJ2Oho9KJUnhss/.LAXTyXN60dz332ZRPNp4VpY8J.Ue7ly')){ + // echo '## a) true toMakeCetNewSalesPd Fns Going to Call'; + // } + // else{ + // echo '## b) false'; + // } + // die(); + // $hash = password_hash("Smc@123$", PASSWORD_DEFAULT); + // echo $hash; + // $2y$10$H4vSrWl15syQHO.tsT0DdOF7pYSTKZBT85sOFCJerttTdObBRsB36 + // die(); // postman header //$saltkey = ''; // foreach (getallheaders() as $name => $value) { @@ -1779,7 +1789,7 @@ public function filterSalesPDList_post() { log_message('ERROR','## B) toMakeCetNewSalesPd Fns Going to Call'); $this->toMakeCetNewSalesPd($this->get()); }else{ - log_message('ERROR','## B) Invaild Salt key '); + log_message('ERROR','## B) Invaild saltkey/Token '); $response['status']=false; $response['error']="Access denied ! Invaild Salt key"; $this->response($response,REST_Controller::HTTP_UNAUTHORIZED); @@ -1966,22 +1976,26 @@ public function filterSalesPDList_post() { $data['msg'] = 'Param (or) Value Not Missing,Please Check again'; } log_message('ERROR','## 6) Finally, '.$data['msg']); + date_default_timezone_set("Asia/Kolkata"); + $current_date = date("d/m/Y H:i:s"); if(ENVIRONMENT == 'production'){ $auth_user_id = "MwiseSales@yahoo.com"; $auth_password = "sine1234"; - $token = base64_encode($auth_user_id."#".$auth_password."#".$user_id."#".$role_id); + $token = base64_encode($auth_user_id."#".$auth_password."#".$user_id."#".$role_id."#".$current_date."#".$usersemailid); // echo $token; // log_message('ERROR','## 7) Finally, '.$data['msg']); $redirect_uri = "https://pdgenie.com/sales/#/auto?token=".$token; // For Production }else{ $auth_user_id = "MwiseSales@yahoo.com"; $auth_password = "sine1234"; - $token = base64_encode($auth_user_id."#".$auth_password."#".$user_id."#".$role_id); + $token = base64_encode($auth_user_id."#".$auth_password."#".$user_id."#".$role_id."#".$current_date."#".$usersemailid); // echo $token; // $token = base64_encode('mwisesales1@sine.com#test1234'."#".$user_id."#".$role_id); // $redirect_uri = "http://localhost:4200/#/auto?token=".$token; // For Localhost $redirect_uri ="https://demo.pdgenie.com/salespdpwa/#/auto?token=".$token; // For Testing } + // echo $redirect_uri; + // die(); header("Location: ".$redirect_uri); // $this->response($data,REST_Controller::HTTP_OK); //if($data['dataStatus']){ header("Location: https://sidharthindustries.com/SIA/"); }