| Line 2... |
Line 2... |
| 2 |
|
2 |
|
| 3 |
import in.shop2020.datalogger.EventType;
|
3 |
import in.shop2020.datalogger.EventType;
|
| 4 |
import in.shop2020.model.v1.order.Order;
|
4 |
import in.shop2020.model.v1.order.Order;
|
| 5 |
import in.shop2020.model.v1.order.TransactionServiceException;
|
5 |
import in.shop2020.model.v1.order.TransactionServiceException;
|
| 6 |
import in.shop2020.payments.PaymentException;
|
6 |
import in.shop2020.payments.PaymentException;
|
| - |
|
7 |
import in.shop2020.serving.utils.Utils;
|
| 7 |
import in.shop2020.thrift.clients.PaymentClient;
|
8 |
import in.shop2020.thrift.clients.PaymentClient;
|
| 8 |
import in.shop2020.thrift.clients.TransactionClient;
|
9 |
import in.shop2020.thrift.clients.TransactionClient;
|
| 9 |
import in.shop2020.thrift.clients.UserClient;
|
10 |
import in.shop2020.thrift.clients.UserClient;
|
| 10 |
import in.shop2020.utils.DataLogger;
|
11 |
import in.shop2020.utils.DataLogger;
|
| 11 |
|
12 |
|
| Line 47... |
Line 48... |
| 47 |
public String index() throws IOException, SecurityException, PaymentException, TException, TransactionServiceException{
|
48 |
public String index() throws IOException, SecurityException, PaymentException, TException, TransactionServiceException{
|
| 48 |
this.message = "Payment failed at the payment gateway. Please pay again.";
|
49 |
this.message = "Payment failed at the payment gateway. Please pay again.";
|
| 49 |
String merchantPaymentIdString = this.request.getParameter("paymentId");
|
50 |
String merchantPaymentIdString = this.request.getParameter("paymentId");
|
| 50 |
if(merchantPaymentIdString!=null){
|
51 |
if(merchantPaymentIdString!=null){
|
| 51 |
merchantPaymentId = Long.parseLong(merchantPaymentIdString);
|
52 |
merchantPaymentId = Long.parseLong(merchantPaymentIdString);
|
| - |
|
53 |
long txnId = pclient.getClient().getPayment(merchantPaymentId).getMerchantTxnId();
|
| - |
|
54 |
orders = tsc.getClient().getOrdersForTransaction(txnId, userinfo.getUserId());
|
| 52 |
}
|
55 |
}
|
| 53 |
DataLogger.logData(EventType.PAYMENT_FAILURE, getSessionId(), userinfo.getUserId(), userinfo.getEmail(), Long.toString(merchantPaymentId));
|
56 |
DataLogger.logData(EventType.PAYMENT_FAILURE, getSessionId(), userinfo.getUserId(), userinfo.getEmail(),
|
| - |
|
57 |
Long.toString(merchantPaymentId), Utils.getItemIdStringFromOrders(orders));
|
| 54 |
return "index";
|
58 |
return "index";
|
| 55 |
}
|
59 |
}
|
| 56 |
|
60 |
|
| 57 |
|
61 |
|
| 58 |
public String getMessage(){
|
62 |
public String getMessage(){
|