| Line 53... |
Line 53... |
| 53 |
$_GET['userId'] = $authorized['Id'];
|
53 |
$_GET['userId'] = $authorized['Id'];
|
| 54 |
$_GET['Id'] = $authorized['cartId'];
|
54 |
$_GET['Id'] = $authorized['cartId'];
|
| 55 |
if($authorized['isLoggedIn'] == 1){
|
55 |
if($authorized['isLoggedIn'] == 1){
|
| 56 |
$_GET['isLoggedIn'] = 'true';
|
56 |
$_GET['isLoggedIn'] = 'true';
|
| 57 |
}
|
57 |
}
|
| 58 |
elseif(isset($authorized['isLoggedIn']) && empty($authorized['isLoggedIn'])) {
|
58 |
elseif(isset($authorized['isLoggedIn']) && empty($authorized['isLoggedIn'])) {
|
| 59 |
$_GET['isLoggedIn'] = 'false';
|
59 |
$_GET['isLoggedIn'] = 'false';
|
| 60 |
}
|
60 |
}
|
| 61 |
$newValues = $authorized;
|
61 |
$newValues = $authorized;
|
| 62 |
$newValues['totalItems'] = 0;
|
62 |
$newValues['totalItems'] = 0;
|
| 63 |
$this->session->set_userdata('authorized',$newValues);
|
63 |
$this->session->userdata['authorized'] = $newValues;
|
| 64 |
}
|
64 |
}
|
| 65 |
//die();
|
65 |
//die();
|
| 66 |
$this->lessphp->object()->ccompile('assets/css/shipping.less','assets/css/shipping.css');
|
66 |
$this->lessphp->object()->ccompile('assets/css/shipping.less','assets/css/shipping.css');
|
| 67 |
$data['stylesheet'] = 'shipping.css';
|
67 |
$data['stylesheet'] = 'shipping.css';
|
| 68 |
$data['response']=$this->checkout_model->getCheckoutDetails($this->input->get(),$this->input->post(),$this->config->item('orderconfirmation'));
|
68 |
$data['response']=$this->checkout_model->getCheckoutDetails($this->input->get(),$this->input->post(),$this->config->item('orderconfirmation'));
|
| 69 |
// $this->session->unset_userdata('shipping');
|
69 |
// $this->session->unset_userdata('shipping');
|
| 70 |
// $this->session->unset_userdata('billing');
|
70 |
// $this->session->unset_userdata('billing');
|
| 71 |
// $this->session->unset_userdata('shoppingId');
|
71 |
// $this->session->unset_userdata('shoppingId');
|
| 72 |
$this->session->unset_userdata('hotspotId');
|
- |
|
| 73 |
$this->session->unset_userdata('addressId');
|
72 |
$this->session->unset_userdata(array('hotspotId','addressId'));
|
| 74 |
$this->layout->view('checkout/checkout_view',$data);
|
73 |
$this->layout->view('checkout/checkout_view',$data);
|
| 75 |
}
|
74 |
}
|
| 76 |
public function payment()
|
75 |
public function payment()
|
| 77 |
{
|
76 |
{
|
| 78 |
//standard array
|
77 |
//standard array
|
| Line 169... |
Line 168... |
| 169 |
error_log('[USER] ' .print_r($authorized,1),3,'/tmp/payments.log');
|
168 |
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 |
error_log('[RESPONSE] '. print_r($data['response']['response'],1),3,'/tmp/payments.log');
|
| 171 |
if(isset($data['response']['response']['payment_submit'][0]) && !empty($data['response']['response']['payment_submit'][0])) {
|
170 |
if(isset($data['response']['response']['payment_submit'][0]) && !empty($data['response']['response']['payment_submit'][0])) {
|
| 172 |
$paymentSubmit = $data['response']['response']['payment_submit'][0];
|
171 |
$paymentSubmit = $data['response']['response']['payment_submit'][0];
|
| 173 |
if(isset($paymentSubmit->response->isPaymentRedirect) && $paymentSubmit->response->isPaymentRedirect == 1){
|
172 |
if(isset($paymentSubmit->response->isPaymentRedirect) && $paymentSubmit->response->isPaymentRedirect == 1){
|
| 174 |
$image = './assets/images/loading.gif';
|
173 |
$image = '/assets/images/loading.gif';
|
| 175 |
$location = $paymentSubmit->response->redirectUrl;
|
174 |
$location = $paymentSubmit->response->redirectUrl;
|
| 176 |
echo '<html><head><meta http-equiv="refresh" content="1;url='.$paymentSubmit->response->redirectUrl.'">
|
175 |
echo '<html><head><meta http-equiv="refresh" content="1;url='.$paymentSubmit->response->redirectUrl.'">
|
| 177 |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
176 |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
| 178 |
<title>Saholic Mobile Site: Redirecting to <'.$paymentSubmit->response->gatewayName.'> Payment Gateway</title>
|
177 |
<title>Saholic Mobile Site: Redirecting to <'.$paymentSubmit->response->gatewayName.'> Payment Gateway</title>
|
| 179 |
</head>
|
178 |
</head>
|
| Line 276... |
Line 275... |
| 276 |
error_log("payu response".print_r($response,1));
|
275 |
error_log("payu response".print_r($response,1));
|
| 277 |
$data['response'] = $response['payu']['response'];
|
276 |
$data['response'] = $response['payu']['response'];
|
| 278 |
$response = $this->magento_model->payment_submit($data);
|
277 |
$response = $this->magento_model->payment_submit($data);
|
| 279 |
if(isset($response) && !empty($response)){
|
278 |
if(isset($response) && !empty($response)){
|
| 280 |
$payu = $response[0]->response;
|
279 |
$payu = $response[0]->response;
|
| 281 |
$image = './assets/images/loading.gif';
|
280 |
$image = '/assets/images/loading.gif';
|
| 282 |
// $return_url = base_url().'ebs-pay-processing/?DR={DR}';
|
281 |
// $return_url = base_url().'ebs-pay-processing/?DR={DR}';
|
| 283 |
$ci = get_instance();
|
282 |
$ci = get_instance();
|
| 284 |
}
|
283 |
}
|
| 285 |
?>
|
284 |
?>
|
| 286 |
<html>
|
285 |
<html>
|
| Line 289... |
Line 288... |
| 289 |
<title>m.saholic.com: Redirecting to EBS Payment Page</title>
|
288 |
<title>m.saholic.com: Redirecting to EBS Payment Page</title>
|
| 290 |
</head>
|
289 |
</head>
|
| 291 |
<body>
|
290 |
<body>
|
| 292 |
<div style="text-align:center; margin-top:200px;">Please wait while we redirect you to the Payment Gateway.</div>
|
291 |
<div style="text-align:center; margin-top:200px;">Please wait while we redirect you to the Payment Gateway.</div>
|
| 293 |
<div align="center" class="img">
|
292 |
<div align="center" class="img">
|
| 294 |
<img title="loading" alt="loading" src="'.$image.'">
|
293 |
<img title="loading" alt="loading" src="<?php echo $image;?>">
|
| 295 |
</div>
|
294 |
</div>
|
| 296 |
<div style="display:none;">
|
295 |
<div style="display:none;">
|
| 297 |
<form action="<?php echo $payu->postActionUrl; ?>" method="post" id="payuForm">
|
296 |
<form action="<?php echo $payu->postActionUrl; ?>" method="post" id="payuForm">
|
| 298 |
<input type="hidden" name="key" value="<?php echo $payu->key; ?>" />
|
297 |
<input type="hidden" name="key" value="<?php echo $payu->key; ?>" />
|
| 299 |
<input type="hidden" name="hash" value="<?php echo $payu->hash ?>"/>
|
298 |
<input type="hidden" name="hash" value="<?php echo $payu->hash ?>"/>
|
| Line 343... |
Line 342... |
| 343 |
$data['response']=$this->checkout_model->getCheckoutDetails($this->input->get(),$this->input->post(),$paymentconfig);
|
342 |
$data['response']=$this->checkout_model->getCheckoutDetails($this->input->get(),$this->input->post(),$paymentconfig);
|
| 344 |
if(isset($data['response']['response']['ebs_processing'][0]->response)){
|
343 |
if(isset($data['response']['response']['ebs_processing'][0]->response)){
|
| 345 |
$redirectUrl = $data['response']['response']['ebs_processing'][0]->response->redirectUrl;
|
344 |
$redirectUrl = $data['response']['response']['ebs_processing'][0]->response->redirectUrl;
|
| 346 |
$redirectUrl = explode('?', $redirectUrl);
|
345 |
$redirectUrl = explode('?', $redirectUrl);
|
| 347 |
$redirectUrl = base_url().'ebs-pay-response/?'.$redirectUrl[1];
|
346 |
$redirectUrl = base_url().'ebs-pay-response/?'.$redirectUrl[1];
|
| 348 |
$image = './assets/images/loading.gif';
|
347 |
$image = '/assets/images/loading.gif';
|
| 349 |
echo '<html><head><meta http-equiv="refresh" content="2;url='.$redirectUrl.'">
|
348 |
echo '<html><head><meta http-equiv="refresh" content="2;url='.$redirectUrl.'">
|
| 350 |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
349 |
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
| 351 |
<title>Saholic Mobile Site:</title>
|
350 |
<title>Saholic Mobile Site:</title>
|
| 352 |
</head>
|
351 |
</head>
|
| 353 |
<body>
|
352 |
<body>
|