for (String returnOrderId : toReturn.keySet()) {
GenericValue gOrder = findGoogleOrder(delegator, returnOrderId);
if (gOrder != null) {
MerchantInfo mInfo = getMerchantInfo(delegator, getProductStoreFromOrder(gOrder));
if (mInfo != null) {
ReturnItemsRequest rir = new ReturnItemsRequest(mInfo, gOrder.getString("externalId"));
List<String> items = toReturn.get(returnOrderId);
for (String item : items) {
rir.addItem(item);
}
try {
rir.send();
} catch (CheckoutException e) {
Debug.logError(e, module);
return ServiceUtil.returnError(e.getMessage());
}
}