Subversion Repositories SmartDukaan

Rev

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

Rev 1999 Rev 2087
Line 1... Line 1...
1
package in.shop2020.serving.controllers;
1
package in.shop2020.serving.controllers;
2
 
2
 
3
import java.util.Date;
3
import java.util.Date;
4
import java.util.List;
4
import java.util.List;
5
 
5
 
-
 
6
import org.apache.commons.lang.StringUtils;
6
import org.apache.log4j.Logger;
7
import org.apache.log4j.Logger;
7
import org.apache.struts2.convention.annotation.InterceptorRef;
8
import org.apache.struts2.convention.annotation.InterceptorRef;
8
import org.apache.struts2.convention.annotation.InterceptorRefs;
9
import org.apache.struts2.convention.annotation.InterceptorRefs;
9
import org.apache.thrift.TException;
10
import org.apache.thrift.TException;
10
 
11
 
Line 13... Line 14...
13
import in.shop2020.model.v1.user.Cart;
14
import in.shop2020.model.v1.user.Cart;
14
import in.shop2020.model.v1.user.ShoppingCartException;
15
import in.shop2020.model.v1.user.ShoppingCartException;
15
import in.shop2020.model.v1.user.UserAffiliateException;
16
import in.shop2020.model.v1.user.UserAffiliateException;
16
import in.shop2020.payments.PaymentException;
17
import in.shop2020.payments.PaymentException;
17
import in.shop2020.serving.interceptors.TrackingInterceptor;
18
import in.shop2020.serving.interceptors.TrackingInterceptor;
-
 
19
import in.shop2020.serving.utils.DataLogger;
-
 
20
import in.shop2020.serving.utils.DataLogger.Event;
18
import in.shop2020.thrift.clients.PaymentServiceClient;
21
import in.shop2020.thrift.clients.PaymentServiceClient;
19
import in.shop2020.thrift.clients.TransactionServiceClient;
22
import in.shop2020.thrift.clients.TransactionServiceClient;
20
import in.shop2020.thrift.clients.UserContextServiceClient;
23
import in.shop2020.thrift.clients.UserContextServiceClient;
21
 
24
 
22
 
25
 
Line 27... Line 30...
27
 
30
 
28
public class PaySuccessController extends BaseController{
31
public class PaySuccessController extends BaseController{
29
	private static final long serialVersionUID = 1L;
32
	private static final long serialVersionUID = 1L;
30
 
33
 
31
	private static Logger log = Logger.getLogger(Class.class);
34
	private static Logger log = Logger.getLogger(Class.class);
-
 
35
	private static Logger dataLog = DataLogger.getLogger();
32
	
36
	
33
	long merchantPaymentId;
37
	long merchantPaymentId;
34
	List<Order> orders = null;
38
	List<Order> orders = null;
35
	String message = null;
39
	String message = null;
36
	
40
	
Line 86... Line 90...
86
		} catch (UserAffiliateException e) {
90
		} catch (UserAffiliateException e) {
87
		    log.error("Affiliate service exception. Payment id is" + merchantPaymentId + " message id and name are " + e.getId() + e.getMessage());
91
		    log.error("Affiliate service exception. Payment id is" + merchantPaymentId + " message id and name are " + e.getId() + e.getMessage());
88
            e.printStackTrace();
92
            e.printStackTrace();
89
        }
93
        }
90
		
94
		
-
 
95
		dataLog.info(StringUtils.join(new String[] { Event.PAYMENT_SUCCESS.name(), 
-
 
96
                userinfo.getEmail(), Long.toString(merchantPaymentId)}, ", "));
-
 
97
		
91
		return "index";
98
		return "index";
92
	}
99
	}
93
	
100
	
94
	
101
	
95
	
102