Subversion Repositories SmartDukaan

Rev

Rev 11108 | Rev 11339 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 11108 Rev 11301
Line 15... Line 15...
15
		$this->layout->setlayout('layout/layout_main');
15
		$this->layout->setlayout('layout/layout_main');
16
		$this->load->model('checkout_model');
16
		$this->load->model('checkout_model');
17
		$this->load->model('captcha_model');
17
		$this->load->model('captcha_model');
18
		$this->layoutName= $this->layout->getLayout();
18
		$this->layoutName= $this->layout->getLayout();
19
		$this->layoutName =substr($this->layoutName , 0, strrpos($this->layoutName , "/")).'/';
19
		$this->layoutName =substr($this->layoutName , 0, strrpos($this->layoutName , "/")).'/';
20
			//print_r($this->session->userdata);
20
		//print_r($this->session->userdata);
21
		
21
		
22
 
22
 
23
	}
23
	}
24
	public function index()
24
	public function index()
25
	{
25
	{
Line 162... Line 162...
162
				$paymentSubmit = $data['response']['response']['payment_submit'][0];
162
				$paymentSubmit = $data['response']['response']['payment_submit'][0];
163
				if(isset($paymentSubmit->response->isPaymentRedirect) && $paymentSubmit->response->isPaymentRedirect == 1){
163
				if(isset($paymentSubmit->response->isPaymentRedirect) && $paymentSubmit->response->isPaymentRedirect == 1){
164
					$image = base_url().'assets/images/loading.gif';
164
					$image = base_url().'assets/images/loading.gif';
165
					$location = $paymentSubmit->response->redirectUrl;
165
					$location = $paymentSubmit->response->redirectUrl;
166
					echo '<html><head><meta http-equiv="refresh" content="1;url='.$paymentSubmit->response->redirectUrl.'">
166
					echo '<html><head><meta http-equiv="refresh" content="1;url='.$paymentSubmit->response->redirectUrl.'">
-
 
167
  					<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
167
  					<title>Saholic Mobile Site: Redirecting to <'.$paymentSubmit->response->gatewayName.'> Payment Gateway</title>
168
  					<title>Saholic Mobile Site: Redirecting to <'.$paymentSubmit->response->gatewayName.'> Payment Gateway</title>
168
 					</head>
169
 					</head>
169
 						<body>
170
 						<body>
170
     					<div style="text-align:center; margin-top:200px;">Please wait while we redirect you to the Payment Gateway.</div>
171
     					<div style="text-align:center; margin-top:200px;">Please wait while we redirect you to the Payment Gateway.</div>
171
     					<div align="center" class="img">
172
     					<div align="center" class="img">
Line 193... Line 194...
193
         			if(isset($response) && !empty($response)){
194
         			if(isset($response) && !empty($response)){
194
         				$ebs = $response[0]->response;
195
         				$ebs = $response[0]->response;
195
         				$image = base_url().'assets/images/loading.gif';
196
         				$image = base_url().'assets/images/loading.gif';
196
         				echo '<html>
197
         				echo '<html>
197
						<head>
198
						<head>
-
 
199
						 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
198
						 <title>m.saholic.com: Redirecting to EBS Payment Page</title>
200
						 <title>m.saholic.com: Redirecting to EBS Payment Page</title>
199
						</head>
201
						</head>
200
						<body>
202
						<body>
201
						    <div style="text-align:center; margin-top:200px;">Please wait while we redirect you to the Payment Gateway.</div>
203
						    <div style="text-align:center; margin-top:200px;">Please wait while we redirect you to the Payment Gateway.</div>
202
						 <div align="center" class="img">
204
						 <div align="center" class="img">
Line 272... Line 274...
272
				$redirectUrl = $data['response']['response']['ebs_processing'][0]->response->redirectUrl;
274
				$redirectUrl = $data['response']['response']['ebs_processing'][0]->response->redirectUrl;
273
				$redirectUrl = explode('?', $redirectUrl);
275
				$redirectUrl = explode('?', $redirectUrl);
274
				$redirectUrl = base_url().'ebs-pay-response/?'.$redirectUrl[1];
276
				$redirectUrl = base_url().'ebs-pay-response/?'.$redirectUrl[1];
275
				$image = base_url().'assets/images/loading.gif';
277
				$image = base_url().'assets/images/loading.gif';
276
				echo '<html><head><meta http-equiv="refresh" content="2;url='.$redirectUrl.'">
278
				echo '<html><head><meta http-equiv="refresh" content="2;url='.$redirectUrl.'">
-
 
279
					<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
277
  					<title>Saholic Mobile Site:</title>
280
  					<title>Saholic Mobile Site:</title>
278
 					</head>
281
 					</head>
279
 						<body>
282
 						<body>
280
     					<div style="text-align:center; margin-top:200px;">'.$data['response']['response']['ebs_processing'][0]->response->redirectMessage.'</div>
283
     					<div style="text-align:center; margin-top:200px;">'.$data['response']['response']['ebs_processing'][0]->response->redirectMessage.'</div>
281
     					<div align="center" class="img">
284
     					<div align="center" class="img">
Line 378... Line 381...
378
 			$response = $this->mcurl->execute($url);
381
 			$response = $this->mcurl->execute($url);
379
 			$data['response'] = $response['innoviti']['response'];
382
 			$data['response'] = $response['innoviti']['response'];
380
         	$response = $this->magento_model->payment_submit($data);
383
         	$response = $this->magento_model->payment_submit($data);
381
         	if(isset($response) && !empty($response)){
384
         	if(isset($response) && !empty($response)){
382
         		$innoviti = $response[0]->response;
385
         		$innoviti = $response[0]->response;
-
 
386
         		echo '<html>
-
 
387
						<head>
-
 
388
						 <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
-
 
389
						 <title>m.saholic.com: Redirecting to Innoviti Payment Page</title>
-
 
390
						</head>
-
 
391
						<body>
-
 
392
						    <div style="text-align:center; margin-top:200px;">Please wait while we redirect you to the Payment Gateway.</div>
-
 
393
						 <div align="center" class="img">
-
 
394
						  <img title="loading" alt="loading" src="'.$image.'">
-
 
395
						 </div>
-
 
396
						 <div style="display:none">
383
         		echo '<form  method="post" action="'.$innoviti->action.'" name="frmTransaction" id="frmTransaction">  
397
						  <form  method="post" action="'.$innoviti->action.'" name="frmTransaction" id="frmTransaction">  
384
           				<input name="merchantId" type="hidden" value="'.$innoviti->merchantId.'" />
398
								<input name="merchantId" type="hidden" value="'.$innoviti->merchantId.'" />
385
     					<input name="subMerchantId" type="hidden" value="'.$innoviti->subMerchantId.'" />
399
								<input name="subMerchantId" type="hidden" value="'.$innoviti->subMerchantId.'" />
386
           				<!-- Transaction Details -->
400
										<!-- Transaction Details -->
387
           				<input name="orderId" type="hidden" value="'.$innoviti->orderId.'" />
401
								<input name="orderId" type="hidden" value="'.$innoviti->orderId.'" />
388
     					<input name="amt" type="hidden" value="'.$innoviti->amt.'" />   
402
								<input name="amt" type="hidden" value="'.$innoviti->amt.'" />   
389
     					<input name="cur" type="hidden" value="INR" />
403
								<input name="cur" type="hidden" value="INR" />
390
     					<input name="processingCode" type="hidden" value="'.$innoviti->processingCode.'" />
404
								<input name="processingCode" type="hidden" value="'.$innoviti->processingCode.'" />
391
     					<input name="proSku" type="hidden" value="'.$innoviti->proSku.'" />
405
								<input name="proSku" type="hidden" value="'.$innoviti->proSku.'" />
392
           				<input name="Cname" type="hidden" value="'.$innoviti->Cname.'" /></td>
406
								<input name="Cname" type="hidden" value="'.$innoviti->Cname.'" /></td>
393
     					<input name="mobile" type="hidden" value="'.$innoviti->mobile.'" />
407
								<input name="mobile" type="hidden" value="'.$innoviti->mobile.'" />
394
     					<input name="emailId" type="hidden" value="'.$innoviti->emailId.'" />     
408
								<input name="emailId" type="hidden" value="'.$innoviti->emailId.'" />     
395
   						<input name="redirUrl" type="hidden" value="'.$innoviti->redirUrl.'" />
409
								<input name="redirUrl" type="hidden" value="'.$innoviti->redirUrl.'" />
396
     					<input name="chksum" type="hidden" value="'.$innoviti->chksum.'" />
410
								<input name="chksum" type="hidden" value="'.$innoviti->chksum.'" />
397
     					<input name="isCtx" type="hidden" value="NO" />
411
								<input name="isCtx" type="hidden" value="NO" />
398
        				<input name="submitted" value="Submit" type="submit" />&nbsp; 
412
							<input name="submitted" value="Submit" type="submit" />&nbsp; 
399
           				<input value="Reset" type="reset" />
413
							  </form>
400
           				<script type="text/javascript">
414
						    </div><script type="text/javascript">
401
						    document.getElementById("frmTransaction").submit();
415
						    document.getElementById("frmTransaction").submit();
402
						</script>
416
						</script></body></html>';
403
      				  </form>';
-
 
404
         	}
417
         	}
405
			}else{
418
			}else{
406
				redirect(base_url());
419
				redirect(base_url());
407
			}
420
			}
408
			
421