Commit Graph

4 Commits

Author SHA1 Message Date
lite 9c4f11d7c7 refactor: accept certificates as base64, remove external dependencies
- Replace file path with base64 content in register endpoint
- Use native Go pkcs12 for certificate validation and loading
- Remove PowerShell script dependency (validator.go)
- Remove Python script dependency (client.go)
- Remove hardcoded Windows paths
- Cross-platform: works on Linux, macOS, Windows without external tools
- Update documentation (api.md, seguridad.md, prerequisites.md)
2026-05-19 16:03:28 -04:00
admin 1ad84a3b14 Fix integración VeriFactu AEAT: XML, hash y encadenamiento
Bugs corregidos tras validación directa contra la plataforma de pruebas:

- Hash: formato key=valor& en lugar de separador |
- TipoHuella: código 01 en lugar de literal SHA-256
- FechaHoraHusoGenRegistro: formato ISO 8601 con huso horario
- IdSistemaInformatico: 2 caracteres (01)
- Namespaces SOAP: URLs correctas de www2.agenciatributaria.gob.es
- Estructura XML: eliminados wrappers Content/AltaReq sobrantes
- Encadenamiento: xs:choice correcto (PrimerRegistro XOR RegistroAnterior)
- RegistroAnterior: referencia datos de la factura anterior, no la actual
- Destinatarios: bloque obligatorio para facturas F1/F3/rectificativas
- wsu:Id: eliminado atributo con namespace no declarado
- Parser respuesta: mapeado a RespuestaRegFactuSistemaFacturacion real
- Campo emisor_nombre añadido al input de factura

La API envía y recibe correctamente contra prewww1.aeat.es
con respuesta EstadoEnvio=Correcto y CSV asignado por la AEAT.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-13 01:13:09 +02:00
admin 4ab7670232 Implement VeriFactu API with certificate management, invoice submission and local fallback
- Add API handlers for facturas (alta/anulacion)
- Implement certificate storage with temp/permanent flow
- Add token generation for authenticated sessions
- Add fallback to local storage when AEAT unavailable
- Update config with certificate path/password
- Add client certificate conversion for TLS
- Add comprehensive documentation
2026-04-17 13:03:06 +02:00
admin fbd5e72774 verifactu: add client and XML structures for AEAT communication 2026-04-08 14:31:05 +02:00