Subversion Repositories SmartDukaan

Rev

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

Rev 13994 Rev 14026
Line 78... Line 78...
78
		//Get pending cashbacks
78
		//Get pending cashbacks
79
		$url = $this->apihost.'pending-refunds/user/'.$userId;
79
		$url = $this->apihost.'pending-refunds/user/'.$userId;
80
		$pendingCashbacks = $this->make_request($url,null);
80
		$pendingCashbacks = $this->make_request($url,null);
81
		//Get credited cashbacks
81
		//Get credited cashbacks
82
		$url = $this->apihost.'refund/user/'.$userId;
82
		$url = $this->apihost.'refund/user/'.$userId;
83
		$creditedCashbacks = $this->make_request($url,null);
83
		$activestores = $this->make_request($url,null);
84
		if(!empty($response)){
84
		if(!empty($creditedCashbacks)){
85
			foreach ($creditedCashbacks['data'] as $key => $value) {
85
			foreach ($creditedCashbacks['data'] as $key => $value) {
86
				$creditedAmount += $value['userAmount'];
86
				$creditedAmount += $value['userAmount'];
87
			}
87
			}
88
		}
88
		}
-
 
89
		$storemapping = Configure::read('storemapping');
89
		// debug($response);
90
		$activestores = Configure::read('activestores');
90
		if(!empty($response['data'])){
91
		if(!empty($response['data'])){
91
			$this->set(compact('pendingOrders','approvedOrders','creditedOrders','pendingCashbacks','creditedCashbacks','pendingAmount','approvedAmount','creditedAmount'));
92
			$this->set(compact('storemapping','activestores','pendingOrders','approvedOrders','creditedOrders','pendingCashbacks','creditedCashbacks','pendingAmount','approvedAmount','creditedAmount'));
92
		}
93
		}
93
	}
94
	}
94
 
95
 
95
/**
96
/**
96
 * index method
97
 * index method