Ver Mensaje Individual
  #437  
Antiguo 06-06-2025
mqm mqm is offline
Miembro
 
Registrado: nov 2006
Posts: 63
Reputación: 20
mqm Va por buen camino
Arrow

Yo en las base de datos de cada empresa tengo un campo donde le indico si esta en fase de desarrollo, pruebas o entorno real.
Dependientdo del valor que tiene llamos a uno u otro

Código:
    
const
     URL_PRODUCCION = 'https://www1.agenciatributaria.gob.es/wlpl/TIKE-CONT/ws/SistemaFacturacion/VerifactuSOAP';
     QR_PRODUCCION = 'https://www2.agenciatributaria.gob.es/wlpl/TIKE-CONT/ValidarQR?';
     URL_PREPRODUCCION = 'https://prewww1.aeat.es/wlpl/TIKE-CONT/ws/SistemaFacturacion/VerifactuSOAP?';
     QR_PREPRODUCCION = 'https://prewww2.aeat.es/wlpl/TIKE-CONT/ValidarQR?';

procedure ConfigurarURLs(modo_verifactu: string);
begin
    case UpperCase(modo_verifactu) of
    'S':    begin                // Entorno real
                    editURL.Text := URL_PRODUCCION;
                    editQR.Text := QR_PRODUCCION;
             end;
    'P':    begin               // Entorno de Pruebas
                    editURL.Text := URL_PREPRODUCCION;
                    editQR.Text := QR_PREPRODUCCION;
             end;
    else
             begin              // Entorno de de Desarrollo - No toco nada de verifactu en esa empresa
                   editURL.Text := '';
                   editQR.Text := '';
             end;
    end;
end;
En la dll no toco nada, solo en el aplicativo demo_D7