Subversion Repositories SmartDukaan

Rev

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

Rev 6546 Rev 6903
Line 49... Line 49...
49
	
49
	
50
	long merchantPaymentId;
50
	long merchantPaymentId;
51
	long txnId;
51
	long txnId;
52
	List<Order> orders = null;
52
	List<Order> orders = null;
53
	String message = null;
53
	String message = null;
-
 
54
 
-
 
55
    private boolean isAnyOrderInsured;
54
	
56
	
55
	public PaySuccessController(){
57
	public PaySuccessController(){
56
		super();
58
		super();
57
	}
59
	}
58
	
60
	
Line 76... Line 78...
76
		
78
		
77
		
79
		
78
		try {
80
		try {
79
			txnId = paymentServiceClient.getClient().getPayment(merchantPaymentId).getMerchantTxnId();
81
			txnId = paymentServiceClient.getClient().getPayment(merchantPaymentId).getMerchantTxnId();
80
			orders = transactionServiceClient.getClient().getOrdersForTransaction(txnId, userinfo.getUserId());
82
			orders = transactionServiceClient.getClient().getOrdersForTransaction(txnId, userinfo.getUserId());
-
 
83
			for(Order order : orders) {
-
 
84
			    if(order.getInsurer() > 0) {
-
 
85
			        setAnyOrderInsured(true);
-
 
86
			        break;
-
 
87
			    }
-
 
88
			}
81
			Cart cart = userServiceClient.getClient().getCart(userinfo.getCartId());
89
			Cart cart = userServiceClient.getClient().getCart(userinfo.getCartId());
82
			if(cart != null){
90
			if(cart != null){
83
				userinfo.setTotalItems(cart.getLinesSize());
91
				userinfo.setTotalItems(cart.getLinesSize());
84
				userinfo.setTotalAmount(cart.getTotalPrice());
92
				userinfo.setTotalAmount(cart.getTotalPrice());
85
			}else{
93
			}else{
Line 168... Line 176...
168
			url = "?" + url;
176
			url = "?" + url;
169
		}
177
		}
170
		url = request.getRequestURI() + url;
178
		url = request.getRequestURI() + url;
171
		return pageLoader.getHeaderHtml(userinfo.isLoggedIn(), userinfo.getEmail(), userinfo.getTotalItems(), url , 0, false);
179
		return pageLoader.getHeaderHtml(userinfo.isLoggedIn(), userinfo.getEmail(), userinfo.getTotalItems(), url , 0, false);
172
	}
180
	}
-
 
181
 
-
 
182
    public void setAnyOrderInsured(boolean isAnyOrderInsured) {
-
 
183
        this.isAnyOrderInsured = isAnyOrderInsured;
-
 
184
    }
-
 
185
 
-
 
186
    public boolean isAnyOrderInsured() {
-
 
187
        return isAnyOrderInsured;
-
 
188
    }
173
}
189
}
174
190