Subversion Repositories SmartDukaan

Rev

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

Rev 19359 Rev 19461
Line 1371... Line 1371...
1371
			$usId = $this->User->find('first',$opt);
1371
			$usId = $this->User->find('first',$opt);
1372
			$user_email = $usId['User']['email'];
1372
			$user_email = $usId['User']['email'];
1373
		}
1373
		}
1374
		$this->set(compact('response','maxpercentage','user_email'));
1374
		$this->set(compact('response','maxpercentage','user_email'));
1375
	}
1375
	}
-
 
1376
	
-
 
1377
	public function admin_userrefund(){
-
 
1378
		$id = $this->request->query('id');
-
 
1379
		$email = $this->request->query('email');
-
 
1380
		$phone = $this->request->query('mob'); 
-
 
1381
		$data = $this->request->data['UserRefund'];
-
 
1382
		if($this->request->is('post')){
-
 
1383
			$jsonVar = json_encode($data, JSON_NUMERIC_CHECK );
-
 
1384
			$url = $this->apihost."addRefundToWallet";
-
 
1385
			$response = $this->make_request($url, $jsonVar);
-
 
1386
			if ($response['result'] == 'success') {
-
 
1387
				$this->Session->setFlash("Query submitted. Pending for Approval.");
-
 
1388
				return $this->redirect(array('action' => 'admin_search'));
-
 
1389
			} else {
-
 
1390
				$this->Session->setFlash("Query not submitted");
-
 
1391
			}
-
 
1392
		}
-
 
1393
				
-
 
1394
		$this->set(compact('id','phone','email'));
-
 
1395
	}
1376
}
1396
}