Subversion Repositories SmartDukaan

Rev

Rev 10944 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 10944 Rev 13435
Line 342... Line 342...
342
	            	
342
	            	
343
	                logger.info("Successfully created transaction: " + transactionId + " for amount: " + totalPrice);
343
	                logger.info("Successfully created transaction: " + transactionId + " for amount: " + totalPrice);
344
	                
344
	                
345
	                Transaction transaction = transaction_client.getTransaction(Long.parseLong(transactionId));
345
	                Transaction transaction = transaction_client.getTransaction(Long.parseLong(transactionId));
346
	                Order order = transaction.getOrders().get(0);
346
	                Order order = transaction.getOrders().get(0);
347
	                
-
 
348
	                inventoryClient.reserveItemInWarehouse(ebayItem.getItemId(), fulfillmentWarehouse.getId(), 1, 
-
 
349
	                		order.getId(), order.getCreated_timestamp(), order.getPromised_shipping_time(), order.getLineitems().get(0).getQuantity());
-
 
350
	                
347
	                	                
351
	                EbayOrder ebayOrder = new EbayOrder();
348
	                EbayOrder ebayOrder = new EbayOrder();
352
	                ebayOrder.setEbayListingId(ebayItem.getEbayListingId());
349
	                ebayOrder.setEbayListingId(ebayItem.getEbayListingId());
353
	                ebayOrder.setSalesRecordNumber(new Double(row.getCell(SALES_RECORD_NUM_INDEX).getNumericCellValue()).longValue());
350
	                ebayOrder.setSalesRecordNumber(new Double(row.getCell(SALES_RECORD_NUM_INDEX).getNumericCellValue()).longValue());
354
	                try {
351
	                try {
355
	                	//Date ebayTransactionDate = interchangeDateAndMonth(row.getCell(TRANSACTION_DATE_INDEX).getDateCellValue());
352
	                	//Date ebayTransactionDate = interchangeDateAndMonth(row.getCell(TRANSACTION_DATE_INDEX).getDateCellValue());
Line 364... Line 361...
364
	                ebayOrder.setSubsidyAmount(ebayItem.getSubsidy()*quantity);
361
	                ebayOrder.setSubsidyAmount(ebayItem.getSubsidy()*quantity);
365
	                ebayOrder.setListingPrice(listingPrice);
362
	                ebayOrder.setListingPrice(listingPrice);
366
	                transaction_client.createEbayOrder(ebayOrder);
363
	                transaction_client.createEbayOrder(ebayOrder);
367
	                in.shop2020.payments.PaymentService.Client client = new PaymentClient().getClient();
364
	                in.shop2020.payments.PaymentService.Client client = new PaymentClient().getClient();
368
	                client.updatePaymentDetails(paymentId, null, null, null, null, null, null, paisaPayId, null, PaymentStatus.SUCCESS, null, null);
365
	                client.updatePaymentDetails(paymentId, null, null, null, null, null, null, paisaPayId, null, PaymentStatus.SUCCESS, null, null);
-
 
366
	                inventoryClient.reserveItemInWarehouse(ebayItem.getItemId(), fulfillmentWarehouse.getId(), 1, 
-
 
367
	                		order.getId(), order.getCreated_timestamp(), order.getPromised_shipping_time(), order.getLineitems().get(0).getQuantity());
369
	            } catch (Exception e) {
368
	            } catch (Exception e) {
370
	                logger.error("Error while creating order for rowId " + rowId, e);
369
	                logger.error("Error while creating order for rowId " + rowId, e);
371
	                addActionError("Error while creating order for rowId " + rowId);
370
	                addActionError("Error while creating order for rowId " + rowId);
372
	                setErrorMsg(getErrorMsg() + "<br>Error while creating order for row number " + rowId);
371
	                setErrorMsg(getErrorMsg() + "<br>Error while creating order for row number " + rowId);
373
	                continue;
372
	                continue;