| Line 5... |
Line 5... |
| 5 |
import in.shop2020.model.v1.order.LineItem;
|
5 |
import in.shop2020.model.v1.order.LineItem;
|
| 6 |
import in.shop2020.model.v1.order.Order;
|
6 |
import in.shop2020.model.v1.order.Order;
|
| 7 |
import in.shop2020.model.v1.order.OrderStatus;
|
7 |
import in.shop2020.model.v1.order.OrderStatus;
|
| 8 |
import in.shop2020.model.v1.order.RechargeOrderStatus;
|
8 |
import in.shop2020.model.v1.order.RechargeOrderStatus;
|
| 9 |
import in.shop2020.model.v1.order.RechargeTransaction;
|
9 |
import in.shop2020.model.v1.order.RechargeTransaction;
|
| - |
|
10 |
import in.shop2020.model.v1.order.StoreOrderDetail;
|
| 10 |
import in.shop2020.model.v1.order.TransactionService;
|
11 |
import in.shop2020.model.v1.order.TransactionService;
|
| 11 |
import in.shop2020.thrift.clients.HelperClient;
|
12 |
import in.shop2020.thrift.clients.HelperClient;
|
| 12 |
import in.shop2020.thrift.clients.TransactionClient;
|
13 |
import in.shop2020.thrift.clients.TransactionClient;
|
| 13 |
import in.shop2020.utils.Mail;
|
14 |
import in.shop2020.utils.Mail;
|
| 14 |
|
15 |
|
| Line 404... |
Line 405... |
| 404 |
}
|
405 |
}
|
| 405 |
|
406 |
|
| 406 |
public String cancelRequest() {
|
407 |
public String cancelRequest() {
|
| 407 |
try{
|
408 |
try{
|
| 408 |
TransactionClient tcl = new TransactionClient();
|
409 |
TransactionClient tcl = new TransactionClient();
|
| - |
|
410 |
long storeId = Long.parseLong((String) request.getSession().getAttribute("STORE_ID"));
|
| 409 |
|
411 |
StoreOrderDetail sod = tcl.getClient().getStoreOrderDetail(orderId, storeId);
|
| - |
|
412 |
tcl.getClient().saveRefundAmountsForStoreOrder(orderId, storeId, sod.getCashAmount(), sod.getCardAmount());
|
| 410 |
tcl.getClient().refundOrder(orderId, "Store", "User requested for cancellation");
|
413 |
tcl.getClient().refundOrder(orderId, "Store", "User requested for cancellation");
|
| 411 |
} catch (Exception e) {
|
414 |
} catch (Exception e) {
|
| 412 |
logger.error("Could not mark order as cancellation requested for id : " + orderId.toString(), e);
|
415 |
logger.error("Could not mark order as cancellation requested for id : " + orderId.toString(), e);
|
| 413 |
setSearchError("Request failed. Try again or call customer care.");
|
416 |
setSearchError("Request failed. Try again or call customer care.");
|
| 414 |
}
|
417 |
}
|