Commit b9af1141 by Jansa Jose

change auth spelling and secret key

parent 128dae6f
...@@ -23,8 +23,7 @@ ...@@ -23,8 +23,7 @@
$this->load->model('Webservice_model'); $this->load->model('Webservice_model');
$this->load->library('form_validation'); $this->load->library('form_validation');
//define("PAYSTACK_SECRET_KEY", "sk_test_36658e3260b1d1668b563e6d8268e46ad6da3273"); define("PAYSTACK_SECRET_KEY", "sk_live_ac1f5350a42852fd3439fdac8ba1d434f1c42360");
define("PAYSTACK_SECRET_KEY", "sk_test_dae3d816baeeabcab5063def4aad5fe546e9758d");
date_default_timezone_set('Asia/Kolkata'); date_default_timezone_set('Asia/Kolkata');
} }
// customer_login // customer_login
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
$this->load->model('Webservice_mechanic_model'); $this->load->model('Webservice_mechanic_model');
$this->load->library('form_validation'); $this->load->library('form_validation');
define("PAYSTACK_SECRET_KEY", "sk_test_36658e3260b1d1668b563e6d8268e46ad6da3273"); define("PAYSTACK_SECRET_KEY", "sk_live_ac1f5350a42852fd3439fdac8ba1d434f1c42360");
} }
// customer_login // customer_login
...@@ -44,12 +44,12 @@ ...@@ -44,12 +44,12 @@
public function get_todays_services(){ public function get_todays_services(){
header('Content-type: application/json'); header('Content-type: application/json');
$headers = apache_request_headers(); $headers = apache_request_headers();
if(!isset($headers['Auth']) || empty($headers['Auth'])){ if(!isset($headers['auth']) || empty($headers['auth'])){
$respArr['status'] = 'error'; $respArr['status'] = 'error';
$respArr['message'] = 'Authtoken is Required'; $respArr['message'] = 'Authtoken is Required';
echo json_encode($respArr);exit; echo json_encode($respArr);exit;
} }
$authRes = $this->Webservice_mechanic_model->get_mechanic_authtoken($headers['Auth']); $authRes = $this->Webservice_mechanic_model->get_mechanic_authtoken($headers['auth']);
if($authRes['status'] == 'error'){ if($authRes['status'] == 'error'){
echo json_encode($authRes);exit; echo json_encode($authRes);exit;
} }
...@@ -102,12 +102,12 @@ ...@@ -102,12 +102,12 @@
public function services_details(){ public function services_details(){
header('Content-type: application/json'); header('Content-type: application/json');
$headers = apache_request_headers(); $headers = apache_request_headers();
if(!isset($headers['Auth']) || empty($headers['Auth'])){ if(!isset($headers['auth']) || empty($headers['auth'])){
$respArr['status'] = 'error'; $respArr['status'] = 'error';
$respArr['message'] = 'Authtoken is Required'; $respArr['message'] = 'Authtoken is Required';
echo json_encode($respArr);exit; echo json_encode($respArr);exit;
} }
$authRes = $this->Webservice_mechanic_model->get_mechanic_authtoken($headers['Auth']); $authRes = $this->Webservice_mechanic_model->get_mechanic_authtoken($headers['auth']);
if($authRes['status'] == 'error'){ if($authRes['status'] == 'error'){
echo json_encode($authRes);exit; echo json_encode($authRes);exit;
} }
...@@ -125,12 +125,12 @@ ...@@ -125,12 +125,12 @@
public function get_service_history(){ public function get_service_history(){
header('Content-type: application/json'); header('Content-type: application/json');
$headers = apache_request_headers(); $headers = apache_request_headers();
if(!isset($headers['Auth']) || empty($headers['Auth'])){ if(!isset($headers['auth']) || empty($headers['auth'])){
$respArr['status'] = 'error'; $respArr['status'] = 'error';
$respArr['message'] = 'Authtoken is Required'; $respArr['message'] = 'Authtoken is Required';
echo json_encode($respArr);exit; echo json_encode($respArr);exit;
} }
$authRes = $this->Webservice_mechanic_model->get_mechanic_authtoken($headers['Auth']); $authRes = $this->Webservice_mechanic_model->get_mechanic_authtoken($headers['auth']);
if($authRes['status'] == 'error'){ if($authRes['status'] == 'error'){
echo json_encode($authRes);exit; echo json_encode($authRes);exit;
} }
...@@ -183,12 +183,12 @@ ...@@ -183,12 +183,12 @@
public function logout(){ public function logout(){
header('Content-type: application/json'); header('Content-type: application/json');
$headers = apache_request_headers(); $headers = apache_request_headers();
if(!isset($headers['Auth']) || empty($headers['Auth'])){ if(!isset($headers['auth']) || empty($headers['auth'])){
$respArr['status'] = 'error'; $respArr['status'] = 'error';
$respArr['message'] = 'Authtoken is Required'; $respArr['message'] = 'Authtoken is Required';
echo json_encode($respArr);exit; echo json_encode($respArr);exit;
} }
$authRes = $this->Webservice_mechanic_model->get_mechanic_authtoken($headers['Auth']); $authRes = $this->Webservice_mechanic_model->get_mechanic_authtoken($headers['auth']);
if($authRes['status'] == 'error'){ if($authRes['status'] == 'error'){
echo json_encode($authRes);exit; echo json_encode($authRes);exit;
} }
......
...@@ -107,7 +107,8 @@ class Booking_model extends CI_Model { ...@@ -107,7 +107,8 @@ class Booking_model extends CI_Model {
FROM bookings AS BK FROM bookings AS BK
INNER JOIN customer_vehicle AS VEH ON (VEH.customer_veh_id = BK.customer_veh_id) INNER JOIN customer_vehicle AS VEH ON (VEH.customer_veh_id = BK.customer_veh_id)
WHERE $cond WHERE $cond
GROUP BY BK.booking_id"; GROUP BY BK.booking_id
ORDER BY BK.booking_id DESC";
$bookData = $this->db->query($sql); $bookData = $this->db->query($sql);
if(empty($bookData)){ if(empty($bookData)){
return 0; return 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment