| Line 53... |
Line 53... |
| 53 |
paymentServiceClient = new PaymentServiceClient();
|
53 |
paymentServiceClient = new PaymentServiceClient();
|
| 54 |
transactionServiceClient = new TransactionServiceClient();
|
54 |
transactionServiceClient = new TransactionServiceClient();
|
| 55 |
userServiceClient = new UserContextServiceClient();
|
55 |
userServiceClient = new UserContextServiceClient();
|
| 56 |
} catch (Exception e1) {
|
56 |
} catch (Exception e1) {
|
| 57 |
// TODO Nothing to worry
|
57 |
// TODO Nothing to worry
|
| 58 |
e1.printStackTrace();
|
58 |
log.error("Unable to initialize the client for either payment or transaction or user service", e1);
|
| 59 |
}
|
59 |
}
|
| 60 |
|
60 |
|
| 61 |
|
61 |
|
| 62 |
merchantPaymentId = Long.parseLong(this.request.getParameter("paymentId"));
|
62 |
merchantPaymentId = Long.parseLong(this.request.getParameter("paymentId"));
|
| 63 |
|
63 |
|
| Line 75... |
Line 75... |
| 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 |
} catch (PaymentException e) {
|
79 |
} catch (PaymentException e) {
|
| 80 |
log.error("Payment service not responding. Payment id is" + merchantPaymentId);
|
80 |
log.error("Payment service not responding. Payment id is" + merchantPaymentId, e);
|
| 81 |
e.printStackTrace();
|
- |
|
| 82 |
} catch (TException e) {
|
81 |
} catch (TException e) {
|
| 83 |
log.error("Thrift service exception. Payment id is" + merchantPaymentId);
|
82 |
log.error("Thrift service exception. Payment id is" + merchantPaymentId, e);
|
| 84 |
e.printStackTrace();
|
- |
|
| 85 |
} catch (TransactionServiceException e) {
|
83 |
} catch (TransactionServiceException e) {
|
| 86 |
log.error("Transaction service exception. Payment id is" + merchantPaymentId);
|
84 |
log.error("Transaction service exception. Payment id is" + merchantPaymentId, e);
|
| 87 |
e.printStackTrace();
|
- |
|
| 88 |
} catch (ShoppingCartException e) {
|
85 |
} catch (ShoppingCartException e) {
|
| 89 |
log.error("Shopping cart service exception. Payment id is" + merchantPaymentId + " message id and name are " + e.getId() + e.getMessage());
|
86 |
log.error("Shopping cart service exception. Payment id is" + merchantPaymentId, e);
|
| 90 |
e.printStackTrace();
|
- |
|
| 91 |
} catch (UserAffiliateException e) {
|
87 |
} catch (UserAffiliateException e) {
|
| 92 |
log.error("Affiliate service exception. Payment id is" + merchantPaymentId + " message id and name are " + e.getId() + e.getMessage());
|
88 |
log.error("Affiliate service exception. Payment id is" + merchantPaymentId, e);
|
| 93 |
e.printStackTrace();
|
- |
|
| 94 |
}
|
89 |
}
|
| 95 |
|
90 |
|
| 96 |
DataLogger.logData(EventType.PAYMENT_SUCCESS, session.getId(), userinfo.getUserId(), userinfo.getEmail(), Long.toString(merchantPaymentId));
|
91 |
DataLogger.logData(EventType.PAYMENT_SUCCESS, session.getId(), userinfo.getUserId(), userinfo.getEmail(), Long.toString(merchantPaymentId));
|
| 97 |
|
92 |
|
| 98 |
return "index";
|
93 |
return "index";
|