protected function GenerateResponse() { try { $this->response = POSController::EnviarOffline(isset($_POST['compras']) ? json_decode($_POST['compras']) : null, isset($_POST['ventas']) ? json_decode($_POST['ventas']) : null); } catch (Exception $e) { //Logger::error($e); throw new ApiException($this->error_dispatcher->invalidDatabaseOperation($e->getMessage())); } }