Subversion Repositories SmartDukaan

Rev

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

Rev 7178 Rev 7207
Line 1... Line 1...
1
package in.shop2020.recharge.controllers;
1
package in.shop2020.recharge.controllers;
2
 
2
 
-
 
3
import in.shop2020.model.v1.order.HotspotStore;
3
import in.shop2020.model.v1.order.RechargeOrderStatus;
4
import in.shop2020.model.v1.order.RechargeOrderStatus;
4
import in.shop2020.model.v1.order.RechargeTransaction;
5
import in.shop2020.model.v1.order.RechargeTransaction;
5
import in.shop2020.model.v1.order.TransactionService;
6
import in.shop2020.model.v1.order.TransactionService;
6
import in.shop2020.thrift.clients.TransactionClient;
7
import in.shop2020.thrift.clients.TransactionClient;
7
 
8
 
Line 19... Line 20...
19
    
20
    
20
    
21
    
21
    public String index() {
22
    public String index() {
22
        TransactionClient tcl;
23
        TransactionClient tcl;
23
        try {
24
        try {
-
 
25
            String loginStatus = (String) request.getSession().getAttribute("LOGGED_IN");
-
 
26
            if(loginStatus == null || !loginStatus.equals("TRUE")){
-
 
27
                return "authfail";
-
 
28
            }
24
            tcl = new TransactionClient();
29
            tcl = new TransactionClient();
25
            recharge =  tcl.getClient().getRechargeTransaction(rechargeId);
30
            recharge =  tcl.getClient().getRechargeTransaction(rechargeId);
-
 
31
            storeId = Long.parseLong((String) request.getSession().getAttribute("STORE_ID"));
-
 
32
            if(!hotspotStores.containsKey(storeId)){
-
 
33
                try{
-
 
34
                    HotspotStore hotSpotStore = (new TransactionClient()).getClient().getHotspotStore(storeId, "");
-
 
35
                    hotspotStores.put(storeId, hotSpotStore);
-
 
36
                } catch (Exception e) {
-
 
37
                    log.error("Unable to get store", e);
-
 
38
                }
-
 
39
            }
26
        } catch (Exception e) {
40
        } catch (Exception e) {
27
            log.error("Unable to get recharge txn for id : " + rechargeId, e);
41
            log.error("Unable to get recharge txn for id : " + rechargeId, e);
28
            return ":";
42
            return ":";
29
        }
43
        }
30
        return "index";
44
        return "index";