Fix PHP "return by reference" notice.
Send the Shipment AJAX response before returning

Fixes hidden error messages on shipment failure.