| Line 139... |
Line 139... |
| 139 |
}
|
139 |
}
|
| 140 |
else{
|
140 |
else{
|
| 141 |
redirect(base_url()."cart");
|
141 |
redirect(base_url()."cart");
|
| 142 |
}
|
142 |
}
|
| 143 |
}
|
143 |
}
|
| 144 |
elseif(isset($_POST['submit'])){
|
144 |
elseif(isset($_POST['submit'])) {
|
| 145 |
if(isset($_POST['captcha_response_field']) && !empty($_POST['captcha_response_field'])){
|
145 |
if(isset($_POST['captcha_response_field']) && !empty($_POST['captcha_response_field'])){
|
| 146 |
$captcha = $this->session->userdata('captcha');
|
146 |
$captcha = $this->session->userdata('captcha');
|
| 147 |
if(strcmp($captcha,$_POST['captcha_response_field']) != 0){
|
147 |
if(strcmp($captcha,$_POST['captcha_response_field']) != 0){
|
| 148 |
if(isset($_POST['payoption']) && ($_POST['payoption'] == 3000) || $_POST['payoption'] == 3001) {
|
148 |
if(isset($_POST['payoption']) && ($_POST['payoption'] == 3000) || $_POST['payoption'] == 3001) {
|
| 149 |
$this->session->set_userdata('cod',1);
|
149 |
$this->session->set_userdata('cod',1);
|
| Line 164... |
Line 164... |
| 164 |
}
|
164 |
}
|
| 165 |
$addressId = $this->session->userdata('addressId');
|
165 |
$addressId = $this->session->userdata('addressId');
|
| 166 |
$_POST['addressid'] = $addressId;
|
166 |
$_POST['addressid'] = $addressId;
|
| 167 |
$_POST['payment_option'] = $_POST['payoption'];
|
167 |
$_POST['payment_option'] = $_POST['payoption'];
|
| 168 |
$data['response']=$this->checkout_model->getCheckoutDetails($this->input->get(),$this->input->post(),$paymentconfig);
|
168 |
$data['response']=$this->checkout_model->getCheckoutDetails($this->input->get(),$this->input->post(),$paymentconfig);
|
| - |
|
169 |
error_log('[USER] ' .print_r($authorized,1),3,'/tmp/payments.log');
|
| - |
|
170 |
error_log('[RESPONSE] '. print_r($data['response']['response'],1),3,'/tmp/payments.log');
|
| 169 |
if(isset($data['response']['response']['payment_submit'][0]) && !empty($data['response']['response']['payment_submit'][0])){
|
171 |
if(isset($data['response']['response']['payment_submit'][0]) && !empty($data['response']['response']['payment_submit'][0])) {
|
| 170 |
$paymentSubmit = $data['response']['response']['payment_submit'][0];
|
172 |
$paymentSubmit = $data['response']['response']['payment_submit'][0];
|
| 171 |
if(isset($paymentSubmit->response->isPaymentRedirect) && $paymentSubmit->response->isPaymentRedirect == 1){
|
173 |
if(isset($paymentSubmit->response->isPaymentRedirect) && $paymentSubmit->response->isPaymentRedirect == 1){
|
| 172 |
$image = './assets/images/loading.gif';
|
174 |
$image = './assets/images/loading.gif';
|
| 173 |
$location = $paymentSubmit->response->redirectUrl;
|
175 |
$location = $paymentSubmit->response->redirectUrl;
|
| 174 |
echo '<html><head><meta http-equiv="refresh" content="1;url='.$paymentSubmit->response->redirectUrl.'">
|
176 |
echo '<html><head><meta http-equiv="refresh" content="1;url='.$paymentSubmit->response->redirectUrl.'">
|
| Line 317... |
Line 319... |
| 317 |
<?php
|
319 |
<?php
|
| 318 |
}
|
320 |
}
|
| 319 |
else{
|
321 |
else{
|
| 320 |
redirect(base_url().$paymentSubmit->response->redirectUrl);
|
322 |
redirect(base_url().$paymentSubmit->response->redirectUrl);
|
| 321 |
}
|
323 |
}
|
| - |
|
324 |
} else {
|
| - |
|
325 |
redirect(base_url()."payment");
|
| 322 |
}
|
326 |
}
|
| 323 |
else{
|
- |
|
| 324 |
redirect(base_url()."payment");
|
- |
|
| 325 |
}
|
327 |
}
|
| 326 |
}
|
- |
|
| 327 |
|
- |
|
| 328 |
}
|
328 |
}
|
| 329 |
|
329 |
|
| 330 |
public function ebsprocessing(){
|
330 |
public function ebsprocessing(){
|
| 331 |
if(isset($_GET['DR']) && !empty($_GET['DR'])){
|
331 |
if(isset($_GET['DR']) && !empty($_GET['DR'])){
|
| 332 |
$paymentconfig = $this->config->item('ebsProcessing');
|
332 |
$paymentconfig = $this->config->item('ebsProcessing');
|