| Line 5... |
Line 5... |
| 5 |
|
5 |
|
| 6 |
import in.shop2020.model.v1.catalog.CatalogServiceException;
|
6 |
import in.shop2020.model.v1.catalog.CatalogServiceException;
|
| 7 |
import in.shop2020.model.v1.catalog.Item;
|
7 |
import in.shop2020.model.v1.catalog.Item;
|
| 8 |
import in.shop2020.model.v1.order.LineItem;
|
8 |
import in.shop2020.model.v1.order.LineItem;
|
| 9 |
import in.shop2020.model.v1.order.Order;
|
9 |
import in.shop2020.model.v1.order.Order;
|
| - |
|
10 |
import in.shop2020.model.v1.order.OrderSource;
|
| 10 |
import in.shop2020.model.v1.order.OrderStatus;
|
11 |
import in.shop2020.model.v1.order.OrderStatus;
|
| 11 |
import in.shop2020.model.v1.order.OrderType;
|
12 |
import in.shop2020.model.v1.order.OrderType;
|
| 12 |
import in.shop2020.model.v1.order.Transaction;
|
13 |
import in.shop2020.model.v1.order.Transaction;
|
| 13 |
import in.shop2020.model.v1.order.TransactionService.Client;
|
14 |
import in.shop2020.model.v1.order.TransactionService.Client;
|
| 14 |
import in.shop2020.model.v1.order.TransactionServiceException;
|
15 |
import in.shop2020.model.v1.order.TransactionServiceException;
|
| Line 178... |
Line 179... |
| 178 |
|
179 |
|
| 179 |
Client transactionClient = new TransactionClient().getClient();
|
180 |
Client transactionClient = new TransactionClient().getClient();
|
| 180 |
if(!tinNumber.equals("") && !(tinNumber == null)) {
|
181 |
if(!tinNumber.equals("") && !(tinNumber == null)) {
|
| 181 |
transactionClient.setOrderAttributeForTransaction(Long.parseLong(transactionId), orderAttribute);
|
182 |
transactionClient.setOrderAttributeForTransaction(Long.parseLong(transactionId), orderAttribute);
|
| 182 |
}
|
183 |
}
|
| 183 |
transactionClient.changeTransactionStatus(Long.valueOf(transactionId), TransactionStatus.AUTHORIZED, "Payment received for the order", PickUpType.valueOf(pickUp).getValue(), OrderType.valueOf(orderType));
|
184 |
transactionClient.changeTransactionStatus(Long.valueOf(transactionId), TransactionStatus.AUTHORIZED, "Payment received for the order", PickUpType.valueOf(pickUp).getValue(), OrderType.valueOf(orderType), OrderSource.WEBSITE);
|
| 184 |
transactionClient.changeTransactionStatus(Long.valueOf(transactionId), TransactionStatus.IN_PROCESS, "RTGS Payment accepted", PickUpType.valueOf(pickUp).getValue(), OrderType.valueOf(orderType));
|
185 |
transactionClient.changeTransactionStatus(Long.valueOf(transactionId), TransactionStatus.IN_PROCESS, "RTGS Payment accepted", PickUpType.valueOf(pickUp).getValue(), OrderType.valueOf(orderType), OrderSource.WEBSITE);
|
| 185 |
log.info("Successfully created transaction: " + transactionId + " for amount: " + amount);
|
186 |
log.info("Successfully created transaction: " + transactionId + " for amount: " + amount);
|
| 186 |
}
|
187 |
}
|
| 187 |
} catch (UserContextException e) {
|
188 |
} catch (UserContextException e) {
|
| 188 |
addActionError("Error while finding customer: " + customerEmailId);
|
189 |
addActionError("Error while finding customer: " + customerEmailId);
|
| 189 |
log.error("Could not fetch user for email Id: " + customerEmailId, e);
|
190 |
log.error("Could not fetch user for email Id: " + customerEmailId, e);
|