function RegistrarSuce($params) { $db = new ConSQL(); $db->connect(); $objFormato = new cFormato(); $objFormato->llenar($params); $db->beginTransacction(); $res = $objFormato->insertar($db); if ($res != null) { $db->commit(); $msj = array("codigo" => "OK", "texto" => "Exito"); } else { error_log("Entidad.WebServices ServicioEntidad->RegistrarSuce failed"); $db->rollback(); $msj = array("codigo" => "ERROR", "texto" => "No se pudo insertar: "); } return $msj; }