Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public function handle_payment() {
- $membership_type = ($this->input->post('membership_type'))?$this->input->post('membership_type'):NULL;
- // $method = ($this->input->post('method'))?$this->input->post('method'):NULL;
- $patient_full_name = ($this->input->post('patient_full_name'))?$this->input->post('patient_full_name'):NULL;
- $patient_email = ($this->input->post('patient_email'))?$this->input->post('patient_email'):NULL;
- $patient_mobile_no = ($this->input->post('patient_mobile_no'))?$this->input->post('patient_mobile_no'):NULL;
- $patient_alternate_mobile_no = ($this->input->post('patient_alternate_mobile_no'))?$this->input->post('patient_alternate_mobile_no'):NULL;
- $patient_age = ($this->input->post('patient_age'))?$this->input->post('patient_age'):NULL;
- $patient_nid = ($this->input->post('patient_nid'))?$this->input->post('patient_nid'):NULL;
- $patient_gender = ($this->input->post('patient_gender'))?$this->input->post('patient_gender'):NULL;
- $patient_dob = ($this->input->post('patient_dob'))?$this->input->post('patient_dob'):NULL;
- $patient_city = ($this->input->post('patient_city'))?$this->input->post('patient_city'):NULL;
- $patient_address = ($this->input->post('patient_address'))?$this->input->post('patient_address'):NULL;
- // var_dump($membership_type);exit;
- /* $nominee_full_name = ($this->input->post('nominee_full_name'))?$this->input->post('nominee_full_name'):NULL;
- $nominee_relation = ($this->input->post('nominee_relation'))?$this->input->post('nominee_relation'):NULL;
- $nominee_mobile_no = ($this->input->post('nominee_mobile_no'))?$this->input->post('nominee_mobile_no'):NULL;
- $nominee_nid = ($this->input->post('nominee_nid'))?$this->input->post('nominee_nid'):NULL;
- $nominee_gender = ($this->input->post('nominee_gender'))?$this->input->post('nominee_gender'):NULL;
- $nominee_dob = ($this->input->post('nominee_dob'))?$this->input->post('nominee_dob'):NULL;
- $nominee_city = ($this->input->post('nominee_city'))?$this->input->post('nominee_city'):NULL;
- $nominee_address = ($this->input->post('nominee_address'))?$this->input->post('nominee_address'):NULL;
- $cashback_bank_name = ($this->input->post('cashback_bank_name'))?$this->input->post('cashback_bank_name'):NULL;
- $cashback_bank_branch_name = ($this->input->post('cashback_bank_branch_name'))?$this->input->post('cashback_bank_branch_name'):NULL;
- $cashback_bank_number = ($this->input->post('cashback_bank_number'))?$this->input->post('cashback_bank_number'):NULL;
- $cashback_bkash_number = ($this->input->post('cashback_bkash_number'))?$this->input->post('cashback_bkash_number'):NULL;
- $cashback_rocket_number = ($this->input->post('cashback_rocket_number'))?$this->input->post('cashback_rocket_number'):NULL;*/
- if($membership_type == 200){
- $membership_type_id = 1;
- $amount = 200;
- $msg = "Apnar e-Sastho Basic membership confirm korte 01790777666 bKash number e 200Tk PAYMENT korar por 16484 e call kore ref code janiye din.";
- }elseif ($membership_type == 300){
- $membership_type_id = 3;
- $amount = 300;
- $msg = "Apnar e-Sastho Basic membership confirm korte 01790777666 bKash number e 200Tk PAYMENT korar por 16484 e call kore ref code janiye din.";
- }elseif ($membership_type == 600) {
- $membership_type_id = 4;
- $amount = 600;
- $msg = "Apnar e-Sastho Basic membership confirm korte 01790777666 bKash number e 200Tk PAYMENT korar por 16484 e call kore ref code janiye din.";
- }
- // if($method == 'bkash' || $method == 'rocket'){
- $username = $this->config->item('username');
- $password = $this->config->item('password');
- $url = $this->config->item('rest_url').'index.php/e_sastho_api/member_register/format/json/';
- $curl_handle = curl_init($url);
- curl_setopt($curl_handle, CURLOPT_RETURNTRANSFER, true);
- curl_setopt($curl_handle, CURLOPT_POST, true);
- curl_setopt($curl_handle, CURLOPT_POSTFIELDS, array(
- 'membership_type_id' => $membership_type_id,
- // 'method' => $method,
- 'patient_full_name' => $patient_full_name,
- 'patient_email' => $patient_email,
- 'patient_mobile_no' => $patient_mobile_no,
- 'patient_alternate_mobile_no' => $patient_alternate_mobile_no,
- 'patient_age' => $patient_age,
- 'patient_nid' => $patient_nid,
- 'patient_gender' => $patient_gender,
- 'patient_dob' => $patient_dob,
- 'patient_city' => $patient_city,
- 'patient_address' => $patient_address,
- /* 'nominee_full_name' => $nominee_full_name,
- 'nominee_relation' => $nominee_relation,
- 'nominee_mobile_no' => $nominee_mobile_no,
- 'nominee_nid' => $nominee_nid,
- 'nominee_gender' => $nominee_gender,
- 'nominee_dob' => $nominee_dob,
- 'nominee_city' => $nominee_city,
- 'nominee_address' => $nominee_address,
- 'cashback_bank_name' => $cashback_bank_name,
- 'cashback_bank_branch_name' => $cashback_bank_branch_name,
- 'cashback_bank_number' => $cashback_bank_number,
- 'cashback_bkash_number' => $cashback_bkash_number,
- 'cashback_rocket_number' => $cashback_rocket_number,*/
- 'username' => $username,
- 'password' => $password
- ));
- $buffer = curl_exec($curl_handle);
- curl_close($curl_handle);
- // echo $buffer;
- // $result = json_decode($buffer);
- // var_dump($result);exit;
- if($buffer == '"success"'){
- $cell = $patient_mobile_no;
- $msgs = $msg;
- $response = $this->do_push_sms($cell, $msgs);
- }
- exit(json_encode(array(
- 'result' => $buffer,
- )));
- // echo json_encode($response);
- // }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement