Commit 8728a87f by Jansa Jose

wait lists

parent 10c031d9
......@@ -6827,7 +6827,7 @@ print_r(date('H:i',$ms));exit();*/
$create_customer = array('email' => $patient_data['pt_email'], 'name' => $patient_data['pt_name'], 'cpf_cnpj' => $patient_data['pt_cpf'], 'zip_code' => $patient_data['pt_zip_code'], 'street' => $patient_data['pt_street_add'], 'number' => $patient_data['pt_number'], 'complement' => $patient_data['pt_complement']);
$request = load_curl('https://api.iugu.com/v1/customers', $create_customer);
$customer = json_decode($request);
$this->Patient_model->update_profile($patient_data['patientid'], array('customer_id' => $customer->id));
$this->Webservice_model->update_profile($patient_data['patientid'], array('customer_id' => $customer->id));
$patient_data['pt_customer_id'] = $customer->id;
}
......@@ -6948,7 +6948,8 @@ print_r(date('H:i',$ms));exit();*/
}
$result = $this->Webservice_model->set_payment_status($data['booking_id']);
$res = array('status' => 'success', 'payment_status' => '1', 'message' => 'payment success', 'booking_date' => date('d/m/Y', $check_markbooking['booking_date']), 'booking_slot' => $check_markbooking['booking_slot']);
//$res = array('status' => 'success', 'payment_status' => '1', 'message' => 'payment success', 'booking_date' => date('d/m/Y', $check_markbooking['booking_date']), 'booking_slot' => $check_markbooking['booking_slot']);
$res = array('status' => 'success', 'data' =>array('booking_id'=>$data['booking_id']));
} else {
// $res = array('status' => 'fail', 'payment_status'=>'0','message'=>$charge->message);
......
......@@ -3508,6 +3508,19 @@ class Webservice_model extends CI_Model {
return $res;
}
Public function update_profile($id,$data){
$this->db->where('tbl_registration.id',$id);
if($this->db->update('tbl_registration',$data))
{
$result = array('status' => 'success');
}
else
{
$result = array('status' => 'error');
}
return $result;
}
public function set_patient_notification_status($data){
if($data['status'] == true){
$status = 1;
......
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