if (fulfillmentGroupRequest.getOrder() != null && fulfillmentGroupRequest.getOrder().getId().equals(cart.getId())) {
try {
fulfillmentGroupRequest.setOrder(cart);
FulfillmentGroup fulfillmentGroup = fulfillmentGroupService.addFulfillmentGroupToOrder(fulfillmentGroupRequest, priceOrder);
FulfillmentGroupWrapper fulfillmentGroupWrapper = (FulfillmentGroupWrapper) context.getBean(FulfillmentGroupWrapper.class.getName());
fulfillmentGroupWrapper.wrapDetails(fulfillmentGroup, request);
return fulfillmentGroupWrapper;
} catch (PricingException e) {
throw BroadleafWebServicesException.build(Response.Status.INTERNAL_SERVER_ERROR.getStatusCode(), null, null, e)
.addMessage(BroadleafWebServicesException.CART_PRICING_ERROR);
}