Commit 5671a3cf by Jansa Jose

withdrawal

parent 653707f8
......@@ -5658,14 +5658,14 @@ print_r(date('H:i',$ms));exit();*/
}
public function encrypt_data(){
$data = '{"booking_id":"56","main_problem":"Hand fracture","description":"Description of the problem","kidney_problems":["4"],"joint_problems":["5"],"heart_problems":["1","11"],"respiratory_problems":["6"],"gastric_problems":["7"],"allergies":["8"],"medicines":["paracetamol","Dolo","new","syndopn"],"has_hepatitis":false,"is_pregnant":false,"has_diabetes":false,"has_healing_problems":false}';
/* public function encrypt_data(){
$data = 'Leg fracture';
$new = encrypt_data($data);
$neww = decrypt_data('rsv1ArvYKAD6sQmygtLhMFYm0o9FAab49lXkrNyMoNWGnCse1Fz/nTf8Vd6uC8XWOhb4Jzk8sahLObHNc99suwh1KEAbw5uK2p1V/EjvA8yoo3mQXCJMrtLcbKWllepQLdBfh115Z6fgXEN0sx3o1/6zmlNHHpHsKZIsRdJVigKrqFCHbSyY6YLZj8XRbHLLwNzcYOWWRAZCWloiGF7XM8VXPH4jnLCB6vDvHLInbjwr24wCgNZYkmYCx13PPJpziUGenbxxo4vVXCTJm0kEcGQgIQ2zFZywiIdX+FMXGLU=');
$neww = decrypt_data($new);
print_r($new);echo"<br>";
print_r($neww);
exit();
}
}*/
public function set_prescriptions(){
header('Content-type: application/json');
......@@ -6790,6 +6790,48 @@ print_r(date('H:i',$ms));exit();*/
print json_encode($res);
}
public function withdrawal_request(){
header('Content-type: application/json');
$headers = apache_request_headers();
$data = (array) json_decode(file_get_contents("php://input"));
if(isset($headers['Auth']) && strlen($headers['Auth'])) {
$check_authToken = $this->Webservice_model->check_auth_token_doctor($headers['Auth']);
if($check_authToken){
if(isset($data['bank_id']) && strlen(trim($data['bank_id']," ")) > 0 && isset($data['amount']) && strlen(trim($data['amount']," ")) > 0) {
$authtoken = $this->Webservice_model->get_doctorid_frm_authtoken($headers['Auth']);
$data['doctor_id'] = $authtoken->doctor_id;
$result = $this->Webservice_model->withdrawal_request($data);
if($result['status'] == 'success'){
$res = array('status'=>'success','data'=>$result['data']);
}else{
$res = array('status'=>'error','error'=>'error','message'=>$result['message']);
}
}else{
$res = array(
"status"=> "error",
"error"=> "required",
"message"=> "All Field is required"
);
}
}else{
$res = array(
"status"=> "error",
"error"=> "Not Valid",
"message"=> "Authtoken is not valid"
);
}
}else{
$res = array(
"status"=> "error",
"error"=> "required",
"message"=> "Authtoken is required"
);
}
print json_encode($res);
}
Public function payment_patient() {
header('Content-type: application/json');
......
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