| Line 363... |
Line 363... |
| 363 |
InventoryService.Client inventoryClient = null;
|
363 |
InventoryService.Client inventoryClient = null;
|
| 364 |
Warehouse fulfillmentWarehouse= null;
|
364 |
Warehouse fulfillmentWarehouse= null;
|
| 365 |
for(int i=0;i<quantity;i++){
|
365 |
for(int i=0;i<quantity;i++){
|
| 366 |
LineItem lineItem = null;
|
366 |
LineItem lineItem = null;
|
| 367 |
lineItem = createLineItem(sku,unitSellingPrice);
|
367 |
lineItem = createLineItem(sku,unitSellingPrice);
|
| - |
|
368 |
logger.info(orderId+" "+subOrderId + "sku and Price " + sku + " " + unitSellingPrice);
|
| 368 |
lineItem.setExtra_info("flipkartOrderId = " + orderId + " flipkartsubOrderId = " + subOrderId);
|
369 |
lineItem.setExtra_info("flipkartOrderId = " + orderId + " flipkartsubOrderId = " + subOrderId);
|
| 369 |
in.shop2020.model.v1.order.Order t_order = new in.shop2020.model.v1.order.Order();
|
370 |
in.shop2020.model.v1.order.Order t_order = new in.shop2020.model.v1.order.Order();
|
| 370 |
t_order.setCustomer_id(user.getUserId());
|
371 |
t_order.setCustomer_id(user.getUserId());
|
| 371 |
t_order.setCustomer_email(sourceDetail.getEmail());
|
372 |
t_order.setCustomer_email(sourceDetail.getEmail());
|
| 372 |
t_order.setCustomer_name(shipToName);
|
373 |
t_order.setCustomer_name(shipToName);
|
| Line 461... |
Line 462... |
| 461 |
}
|
462 |
}
|
| 462 |
txn.setOrders(orderlist);
|
463 |
txn.setOrders(orderlist);
|
| 463 |
String transactionId;
|
464 |
String transactionId;
|
| 464 |
try {
|
465 |
try {
|
| 465 |
transactionId = String.valueOf(transaction_client.createTransaction(txn));
|
466 |
transactionId = String.valueOf(transaction_client.createTransaction(txn));
|
| - |
|
467 |
logger.info("Transaction id is : " + transactionId);
|
| 466 |
} catch (TransactionServiceException e) {
|
468 |
} catch (TransactionServiceException e) {
|
| 467 |
logger.error(orderId+" "+subOrderId + " Could not create transaction " , e);
|
469 |
logger.error(orderId+" "+subOrderId + " Could not create transaction " , e);
|
| 468 |
sb.append(orderId+" "+subOrderId + " Could not create transaction" +"\n");
|
470 |
sb.append(orderId+" "+subOrderId + " Could not create transaction" +"\n");
|
| 469 |
logger.info(orderId+" "+subOrderId + " Could not create transaction" +"\n");
|
471 |
logger.info(orderId+" "+subOrderId + " Could not create transaction" +"\n");
|
| 470 |
continue;
|
472 |
continue;
|
| Line 473... |
Line 475... |
| 473 |
sb.append(orderId+" "+subOrderId + " Transaction Service Exception could not create transaction" +"\n");
|
475 |
sb.append(orderId+" "+subOrderId + " Transaction Service Exception could not create transaction" +"\n");
|
| 474 |
logger.info(orderId+" "+subOrderId + " Transaction Service Exception could not create transaction" +"\n");
|
476 |
logger.info(orderId+" "+subOrderId + " Transaction Service Exception could not create transaction" +"\n");
|
| 475 |
continue;
|
477 |
continue;
|
| 476 |
}
|
478 |
}
|
| 477 |
try{
|
479 |
try{
|
| - |
|
480 |
logger.info("Creating payment for suborder id " + subOrderId);
|
| 478 |
createPayment(user,subOrderId,unitSellingPrice);
|
481 |
createPayment(user,subOrderId,unitSellingPrice);
|
| 479 |
}
|
482 |
}
|
| 480 |
catch (NumberFormatException e) {
|
483 |
catch (NumberFormatException e) {
|
| 481 |
logger.error("Could not create payment",e);
|
484 |
logger.error("Could not create payment",e);
|
| 482 |
sb.append(orderId+" "+subOrderId + " Could not create payment");
|
485 |
sb.append(orderId+" "+subOrderId + " Could not create payment");
|