| Line 552... |
Line 552... |
| 552 |
//}
|
552 |
//}
|
| 553 |
}
|
553 |
}
|
| 554 |
public function insuranceInfo($bday,$gname,$addressId){
|
554 |
public function insuranceInfo($bday,$gname,$addressId){
|
| 555 |
if((isset($bday) && !empty($bday)) && (isset($gname) && !empty($gname)) && (isset($addressId) && !empty($addressId))){
|
555 |
if((isset($bday) && !empty($bday)) && (isset($gname) && !empty($gname)) && (isset($addressId) && !empty($addressId))){
|
| 556 |
if(isset($gname) && !empty($gname)){
|
556 |
if(isset($gname) && !empty($gname)){
|
| 557 |
$gname = str_replace('-','',$gname);
|
557 |
$gname = str_replace('-',' ',$gname);
|
| 558 |
$gname = ltrim($gname);
|
558 |
$gname = ltrim($gname);
|
| 559 |
$gname = rtrim($gname);
|
559 |
$gname = rtrim($gname);
|
| 560 |
$_GET['guardianName'] = $gname;
|
560 |
$_GET['guardianName'] = $gname;
|
| 561 |
}
|
561 |
}
|
| 562 |
if(isset($bday) && !empty($bday)){
|
562 |
if(isset($bday) && !empty($bday)){
|
| 563 |
$dob = explode('-',$bday);
|
563 |
$dob = explode('-',$bday);
|
| 564 |
$dob = array_reverse($dob);
|
564 |
//$dob = array_reverse($dob);
|
| 565 |
$temp1 = $dob[1];
|
565 |
$temp1 = $dob[1];
|
| 566 |
$temp2 = $dob[0];
|
566 |
$temp2 = $dob[0];
|
| 567 |
$dob[0] = $temp1;
|
567 |
$dob[0] = $temp1;
|
| 568 |
$dob[1] = $temp2;
|
568 |
$dob[1] = $temp2;
|
| - |
|
569 |
|
| 569 |
$dob = implode('/', $dob);
|
570 |
$dob = implode('/', $dob);
|
| 570 |
$_GET['dob'] = $dob;
|
571 |
$_GET['dob'] = $dob;
|
| 571 |
}
|
572 |
}
|
| 572 |
$insuranceconfig = $this->config->item('insurance_info');
|
573 |
$insuranceconfig = $this->config->item('insurance_info');
|
| 573 |
$_GET['addressId'] = $addressId;
|
574 |
$_GET['addressId'] = $addressId;
|
| 574 |
$data['response']=$this->checkout_model->getCheckoutDetails($this->input->get(),$this->input->post(),$insuranceconfig);
|
575 |
$data['response']=$this->checkout_model->getCheckoutDetails($this->input->get(),$this->input->post(),$insuranceconfig);
|
| 575 |
if(isset($data['response']['response']['insuranceInfo'][0]->response) && (!empty($data['response']['response']['insuranceInfo'][0]->response))) {
|
576 |
if(isset($data['response']['response']['insuranceInfo'][0]->response) && (!empty($data['response']['response']['insuranceInfo'][0]->response))) {
|
| 576 |
echo json_encode($data['response']['response']['insuranceInfo'][0]);
|
577 |
echo json_encode($data['response']['response']['insuranceInfo'][0]);
|