// 2. For every order check the invoice
// 2.a If the invoice is in In-Process status, then move its status to ready and capture the payment.
// 2.b If the invoice is in status other then IN-Process, skip this. These would be already paid and captured.
try {
delegator.findByPrimaryKey("Shipment", UtilMisc.toMap("shipmentId", shipmentId));
} catch (GenericEntityException e) {
Debug.logError(e, "Trouble getting Shipment entity for shipment " + shipmentId, module);
return ServiceUtil.returnError(UtilProperties.getMessage(resource,
"AccountingTroubleGettingShipmentEntity",
UtilMisc.toMap("shipmentId", shipmentId), locale));