Subversion Repositories SmartDukaan

Rev

Rev 18900 | Rev 18912 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
18900 naman 1
<?php
2
App::uses('AppController', 'Controller');
3
/**
4
 * Exceptionalnlcs Controller
5
 *
6
 * @property Exceptionalnlc $Exceptionalnlc
7
 * @property PaginatorComponent $Paginator
8
 */
9
class TinsController extends AppController {
10
 
11
/**
12
 * Components
13
 *
14
 * @var array
15
 */
16
	public $components = array('Paginator');
17
 
18
	public function beforeFilter() {
19
		parent::beforeFilter();
18908 naman 20
		$this->Auth->allow(array('tin_search'));
18900 naman 21
		$this->apihost = Configure::read('pythonapihost');
22
	}
23
	public function tin_search($tin_num = null) {
24
		$this->layout = 'ajax';
25
// 		$tinres = json_decode('{"tin" : "07976957280" , "cst" : "07976957280","counter_name" : "E-RETAIL SHOP","counter_address" : "SHOP IN H. NO. 61 BLOCK B MOLAR BAND EXTN.,-110044" ,"state" : "North Delhi","pan" : "AEEPV9740C","registered_on" :"16/03/15 ","cst_status" : "Active","valid_since" :"06/07/15", "isError": "false", "errorMsg": "Error message"}',true);
26
		$url = $this->apihost."tinsearch?tin=".$tin_num;
27
		$tinres = $this->make_request($url,null);
28
		$this->set(compact('tinres' ,'tin_num'));
29
		$this->render('/Elements/gettindetail');
30
	}
31
 
32
	public function index() {
33
		$this->layout = "innerpages";
34
	}
35
 
36
	public function confirm(){
37
// 		return $this->redirect(
38
// 				array('controller' => 'categories', 'action' => 'view',3));
18908 naman 39
// 		mobileapi/tin?userId=<>&isLoggedIn=true&privateDealUser=true
18900 naman 40
		$this->redirect('/category/3');
41
	}
42
 
43
}
44
 
45
 
46
 
47
 
48
 
49
 
50