Subversion Repositories SmartDukaan

Rev

Rev 18908 | Go to most recent revision | Details | 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();
20
		$this->apihost = Configure::read('pythonapihost');
21
	}
22
	public function tin_search($tin_num = null) {
23
		$this->layout = 'ajax';
24
// 		$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);
25
		$url = $this->apihost."tinsearch?tin=".$tin_num;
26
		$tinres = $this->make_request($url,null);
27
		$this->set(compact('tinres' ,'tin_num'));
28
		$this->render('/Elements/gettindetail');
29
	}
30
 
31
	public function index() {
32
		$this->layout = "innerpages";
33
	}
34
 
35
	public function confirm(){
36
// 		return $this->redirect(
37
// 				array('controller' => 'categories', 'action' => 'view',3));
38
		$this->redirect('/category/3');
39
	}
40
 
41
}
42
 
43
 
44
 
45
 
46
 
47
 
48