Subversion Repositories SmartDukaan

Rev

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

Rev 2944 Rev 3121
Line 42... Line 42...
42
	public PaySuccessController(){
42
	public PaySuccessController(){
43
		super();
43
		super();
44
	}
44
	}
45
	
45
	
46
	public String index() {
46
	public String index() {
47
		this.message = "Payment completed successfully.";
-
 
-
 
47
		
48
		PaymentServiceClient paymentServiceClient = null;
48
		PaymentServiceClient paymentServiceClient = null;
49
		TransactionServiceClient transactionServiceClient = null;
49
		TransactionServiceClient transactionServiceClient = null;
50
		UserContextServiceClient userServiceClient = null;
50
		UserContextServiceClient userServiceClient = null;
51
	
51
	
52
		try {
52
		try {
Line 74... Line 74...
74
			if (cookiesMap.containsKey(TrackingInterceptor.AFF_COOKIE)) {
74
			if (cookiesMap.containsKey(TrackingInterceptor.AFF_COOKIE)) {
75
	            long affId = Long.parseLong(cookiesMap.get(TrackingInterceptor.AFF_COOKIE).getValue());
75
	            long affId = Long.parseLong(cookiesMap.get(TrackingInterceptor.AFF_COOKIE).getValue());
76
	            userServiceClient.getClient().addTrackLog(affId, userinfo.getUserId(), "payment success", "",
76
	            userServiceClient.getClient().addTrackLog(affId, userinfo.getUserId(), "payment success", "",
77
                        Long.toString(merchantPaymentId), (new Date()).getTime());
77
                        Long.toString(merchantPaymentId), (new Date()).getTime());
78
	        }
78
	        }
-
 
79
			if(orders.get(0).isCod())
-
 
80
			    this.message = "Order placed successfully";
-
 
81
			else
-
 
82
			    this.message = "Payment completed successfully.";	   
79
		} catch (PaymentException e) {
83
		} catch (PaymentException e) {
80
			log.error("Payment service not responding. Payment id is" + merchantPaymentId, e);
84
			log.error("Payment service not responding. Payment id is" + merchantPaymentId, e);
81
		} catch (TException e) {
85
		} catch (TException e) {
82
			log.error("Thrift service exception. Payment id is" + merchantPaymentId, e);
86
			log.error("Thrift service exception. Payment id is" + merchantPaymentId, e);
83
		} catch (TransactionServiceException e) {
87
		} catch (TransactionServiceException e) {