| Line 1... |
Line 1... |
| 1 |
package in.shop2020.serving.controllers;
|
1 |
package in.shop2020.serving.controllers;
|
| 2 |
|
2 |
|
| 3 |
import java.util.List;
|
- |
|
| 4 |
|
- |
|
| 5 |
import in.shop2020.datalogger.EventType;
|
3 |
import in.shop2020.datalogger.EventType;
|
| 6 |
import in.shop2020.model.v1.order.Order;
|
4 |
import in.shop2020.model.v1.order.Order;
|
| 7 |
import in.shop2020.model.v1.user.ShoppingCartException;
|
5 |
import in.shop2020.model.v1.user.ShoppingCartException;
|
| 8 |
import in.shop2020.serving.controllers.BaseController;
|
- |
|
| 9 |
import in.shop2020.serving.services.EbsPaymentService;
|
6 |
import in.shop2020.serving.services.EbsPaymentService;
|
| 10 |
import in.shop2020.serving.services.HdfcPaymentService;
|
7 |
import in.shop2020.serving.services.HdfcPaymentService;
|
| 11 |
import in.shop2020.serving.services.IPaymentService;
|
8 |
import in.shop2020.serving.services.IPaymentService;
|
| 12 |
import in.shop2020.serving.utils.DataLogger;
|
9 |
import in.shop2020.serving.utils.DataLogger;
|
| 13 |
import in.shop2020.thrift.clients.TransactionServiceClient;
|
10 |
import in.shop2020.thrift.clients.TransactionServiceClient;
|
| 14 |
import in.shop2020.thrift.clients.UserContextServiceClient;
|
11 |
import in.shop2020.thrift.clients.UserContextServiceClient;
|
| 15 |
|
12 |
|
| - |
|
13 |
import java.util.List;
|
| - |
|
14 |
|
| 16 |
import org.apache.log4j.Logger;
|
15 |
import org.apache.log4j.Logger;
|
| 17 |
import org.apache.struts2.convention.annotation.InterceptorRef;
|
16 |
import org.apache.struts2.convention.annotation.InterceptorRef;
|
| 18 |
import org.apache.struts2.convention.annotation.InterceptorRefs;
|
17 |
import org.apache.struts2.convention.annotation.InterceptorRefs;
|
| 19 |
import org.apache.struts2.convention.annotation.Result;
|
18 |
import org.apache.struts2.convention.annotation.Result;
|
| 20 |
import org.apache.struts2.convention.annotation.Results;
|
19 |
import org.apache.struts2.convention.annotation.Results;
|
| Line 192... |
Line 191... |
| 192 |
TransactionServiceClient transactionServiceClient = null;
|
191 |
TransactionServiceClient transactionServiceClient = null;
|
| 193 |
try {
|
192 |
try {
|
| 194 |
transactionServiceClient = new TransactionServiceClient();
|
193 |
transactionServiceClient = new TransactionServiceClient();
|
| 195 |
List<Order> orders = transactionServiceClient.getClient().getOrdersForTransaction(txnId, userinfo.getUserId());
|
194 |
List<Order> orders = transactionServiceClient.getClient().getOrdersForTransaction(txnId, userinfo.getUserId());
|
| 196 |
for (Order order : orders) {
|
195 |
for (Order order : orders) {
|
| 197 |
DataLogger.logData(EventType.ORDER_CREATION.name(), session.getId(),
|
196 |
DataLogger.logData(EventType.ORDER_CREATION, session.getId(),
|
| 198 |
Long.toString(userinfo.getUserId()),
|
- |
|
| 199 |
userinfo.getEmail(), Long.toString(order.getId()));
|
197 |
userinfo.getUserId(), userinfo.getEmail(), Long.toString(order.getId()));
|
| 200 |
}
|
198 |
}
|
| 201 |
} catch (Exception e1) {
|
199 |
} catch (Exception e1) {
|
| 202 |
log.warn("Unable to log orders through the datalogger", e1);
|
200 |
log.warn("Unable to log orders through the datalogger", e1);
|
| 203 |
}
|
201 |
}
|
| 204 |
|
202 |
|