| Line 401... |
Line 401... |
| 401 |
orderCountForRow++;
|
401 |
orderCountForRow++;
|
| 402 |
|
402 |
|
| 403 |
txn.setOrders(orders);
|
403 |
txn.setOrders(orders);
|
| 404 |
Client transaction_client = new TransactionClient().getClient();
|
404 |
Client transaction_client = new TransactionClient().getClient();
|
| 405 |
try {
|
405 |
try {
|
| 406 |
long subOrderId = new Double(row.getCell(SUBORDER_ID_INDEX).getNumericCellValue()).longValue();
|
406 |
String subOrderId = row.getCell(SUBORDER_ID_INDEX).getStringCellValue();
|
| 407 |
String referenceCode = row.getCell(REFERENCE_CODE_INDEX).getStringCellValue();
|
407 |
String referenceCode = row.getCell(REFERENCE_CODE_INDEX).getStringCellValue();
|
| 408 |
String productName = row.getCell(PRODUCT_NAME_INDEX).getStringCellValue();
|
408 |
String productName = row.getCell(PRODUCT_NAME_INDEX).getStringCellValue();
|
| 409 |
Date snapdealTxnDate = row.getCell(TRANSACTION_DATE_INDEX).getDateCellValue();
|
409 |
Date snapdealTxnDate = row.getCell(TRANSACTION_DATE_INDEX).getDateCellValue();
|
| 410 |
|
410 |
|
| 411 |
if(transaction_client.snapdealOrderExists(subOrderId, referenceCode)) {
|
411 |
if(transaction_client.snapdealOrderExists(subOrderId, referenceCode)) {
|
| Line 433... |
Line 433... |
| 433 |
snapdealOrder.setProductName(productName);
|
433 |
snapdealOrder.setProductName(productName);
|
| 434 |
snapdealOrder.setSnapdealTxnDate(snapdealTxnDate.getTime());
|
434 |
snapdealOrder.setSnapdealTxnDate(snapdealTxnDate.getTime());
|
| 435 |
snapdealOrder.setListingPrice(listingPrice);
|
435 |
snapdealOrder.setListingPrice(listingPrice);
|
| 436 |
snapdealOrder.setMaxNlc(snapdealItem.getMaxNlc());
|
436 |
snapdealOrder.setMaxNlc(snapdealItem.getMaxNlc());
|
| 437 |
transaction_client.createSnapdealOrder(snapdealOrder);
|
437 |
transaction_client.createSnapdealOrder(snapdealOrder);
|
| 438 |
new PaymentClient().getClient().updatePaymentDetails(paymentId, null, null, null, null, null, null, Long.toString(subOrderId), null, PaymentStatus.SUCCESS, null, null);
|
438 |
new PaymentClient().getClient().updatePaymentDetails(paymentId, null, null, null, null, null, null, subOrderId, null, PaymentStatus.SUCCESS, null, null);
|
| 439 |
|
439 |
|
| 440 |
} catch (Exception e) {
|
440 |
} catch (Exception e) {
|
| 441 |
logger.error("Error while creating order for rowId " + rowId, e);
|
441 |
logger.error("Error while creating order for rowId " + rowId, e);
|
| 442 |
addActionError("Error while creating order for rowId " + rowId);
|
442 |
addActionError("Error while creating order for rowId " + rowId);
|
| 443 |
setErrorMsg(getErrorMsg() + "<br>Error while creating order for row number " + rowId);
|
443 |
setErrorMsg(getErrorMsg() + "<br>Error while creating order for row number " + rowId);
|