Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Internet
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

Colaboración Paypal con ClubDelphi

Respuesta
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 16-04-2025
_Io _Io is offline
Miembro
 
Registrado: ene 2024
Posts: 114
Poder: 3
_Io Va por buen camino
Alta como integrador

Buenas Noches,

Quiero darme de alta como integrador.
Tengo toda la información que me piden, pero no tengo claro a dónde debo ir.

Cuando pincho en el enlace que viene en el procedimiento, entro en un formulario muy amplio y no veo dónde puedo hacer la
incidencia al soporte técnico. Al pinchar en contacto, me sale un formulario de incidencia, pero tengo la sensación que no es, parece como si fuera
para realizar incidencias internas.

Si alguien que la haya hecho, me puede ayudar lo agradecería.

Muchas Gracias.
Responder Con Cita
  #2  
Antiguo 19-04-2025
_Io _Io is offline
Miembro
 
Registrado: ene 2024
Posts: 114
Poder: 3
_Io Va por buen camino
Cita:
Empezado por _Io Ver Mensaje
Buenas Noches,

Quiero darme de alta como integrador.
Tengo toda la información que me piden, pero no tengo claro a dónde debo ir.

Cuando pincho en el enlace que viene en el procedimiento, entro en un formulario muy amplio y no veo dónde puedo hacer la
incidencia al soporte técnico. Al pinchar en contacto, me sale un formulario de incidencia, pero tengo la sensación que no es, parece como si fuera
para realizar incidencias internas.

Si alguien que la haya hecho, me puede ayudar lo agradecería.

Muchas Gracias.
Buenas noches.

Me respondo yo mismo.

De las dos opciones que hay, entraba en la equivocada. Hay que entrar en la opció :Empresas PDP Punto de Presencia en la redSARA
Dentro, pinchar en Nuevo Ticket, si pinchas en Elementos Populares saldrá Alta como Proveedoren FACe

Este sería el enlace al ticket https://servicios.administraciondigital.gob.es/HEAT/Modules/SelfService/?AnonymousRequest=yes#serviceCatalog/request/FC042E607CEF40D9BB5B280FFAB26B37

Saludos.
Responder Con Cita
  #3  
Antiguo 30-04-2025
_Io _Io is offline
Miembro
 
Registrado: ene 2024
Posts: 114
Poder: 3
_Io Va por buen camino
Soap envío

Buenas tardes.

¿Podría poner alguien la cabecera firmada de en envío a Face que funcione bien?

Es para tener una referencia buena, me estoy peleando con las ssb y quiere tener claro lo que tengo que buscar.

Muchas Gracias.
Responder Con Cita
  #4  
Antiguo 04-05-2025
_Io _Io is offline
Miembro
 
Registrado: ene 2024
Posts: 114
Poder: 3
_Io Va por buen camino
Buenos días.

Código:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<soapenv:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" soapenv:mustUnderstand="1">
<wsse:BinarySecurityToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" wsu:Id="CertID-33FA35B0F99306C865A96AD2E72ED81E">MIIHozCCBougAwIBAgIQeJ9MrQ87SXVlqQbhybS7zTANBgkqhkiG9w0BAQsFADBLMQswCQYDVQQGEwJFUzERMA8GA1UECgwIRk5NVC1SQ00xDjAMBgNVBAsMBUNlcmVzMRkwFwYDVQQDDBBBQyBGTk1UIFVzdWFyaW9zMB4XDTI0MDExODExMDkyMVoXDTI4MDExODExMDkyMVowgYcxCzAJBgNVBAYTAkVTMRgwFgYDVQQFEw9JRENFUy03NTc4MjE0MVExDzANBgNVBCoMBlJBRkFFTDEcMBoGA1UEBAwTTUFSVElOIE5Jw5FPIE1FRElOQTEvMC0GA1UEAwwmTUFSVElOIE5Jw5FPIE1FRElO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8VCjZRCbtZS7oBeFqJ+7lAA34FW1V4zj/VgzFFC84t7DmBI7PNEWS8QoCn6L86OhUl7XKV44/mZ+j9luhRex6AcbtF5uanht3oU+iKO6jUx/nXfcOeCBqJMh5HTR</wsse:BinarySecurityToken>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="Signature-33FA35B0F99306C865A96AD2E72ED81E">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<ds:Reference URI="#id-33FA35B0F99306C865A96AD2E72ED81E">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>99nZX9+HmQyLzch7yCfQ+UYFLXs=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue> bPg9G02CtrNgoOYMfgUNv/X0WFVnSKJFQ3eOWgcEgMC9ZoZQBiHuQQ1+ipdrbSNm l8EtmKgTyEkpLL5kTSn7jQdd2Q7F64ApfeNmIoDyPn+rD8llhIllDHzs0rbYgVyv amj58nNn0ADB02pVGaddPdL3AzwamyphnAYWvWF7QcC3/AfigUXUHhBPd8siAa96 JKX7gS/6SirANkgxKeiwnKX0li0TAWcYh9znX3XMg/IqPawGyRCPrZX7Mk+tTplp kZI0d/OatmmbFeJ+pxA5zDtW9ZUip16cSMp6LxuDExDL07LQ14TUtKbNGiRgFAyQ Icv3yhGBJqysdpNiHPyY0Q== </ds:SignatureValue>
<ds:KeyInfo Id="KeyId-33FA35B0F99306C865A96AD2E72ED81E">
<wsse:SecurityTokenReference xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="STRId-33FA35B0F99306C865A96AD2E72ED81E">
<wsse:Reference URI="#CertID-33FA35B0F99306C865A96AD2E72ED81E" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"/>
</wsse:SecurityTokenReference>
</ds:KeyInfo>
</ds:Signature>
</wsse:Security>
</soapenv:Header>
<soapenv:Body xmlns:NS1="https://webservice.face.gob.es" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" wsu:Id="id-33FA35B0F99306C865A96AD2E72ED81E">
<NS1:consultarUnidades/>
</soapenv:Body>
</soapenv:Envelope>
Me sale como firma inválida, pero no me da más información.

Sabe alguien dónde está el error ?

Muchas Gracias.
Responder Con Cita
  #5  
Antiguo 04-05-2025
ermendalenda ermendalenda is offline
Miembro
 
Registrado: ago 2021
Posts: 2.764
Poder: 7
ermendalenda Va por buen camino
Cita:
Empezado por _Io Ver Mensaje
Buenos días.


Sabe alguien dónde está el error ?

Muchas Gracias.
Hola
Es dificil de saber, ya que muchos campos son calculos desde el backend o programa que los genere, pero te pongo algunas cosas para que revises:
Yo en vez de usar
Código:
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
Pongo:
Código:
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/TR/2001/REC-xml-c14n-20010315/>
No inserto este nodo:
Código:
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transforms>
Por otro lado, no se como insertas datos como este:
Código:
Id="Signature-33FA35B0F99306C865A96AD2E72ED81E">
Ya que el id-.... debe ser distinto para cada factura no se si lo haces bien


El digestmethod yo uso el de sha512 no se si vale igual el que tu usas sha1
uso:
Código:
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha512"></ds:DigestMethod>
si es asi tendrias que cambiar tambien el digestvalue(calculandolo para sha512)


Tambien tendria que ver si usas correctamente la politica de firma:
Código:
"name" => "Politica de Firma FacturaE v3.1",
    "url" => "http://www.facturae.es/politica_de_firma_formato_facturae/politica_de_firma_formato_facturae_v3_1.pdf",
    "digest" => "Ohixl6upD6av8N7pEvDABhEL6hM="
Y si lees correctamente las claves privadas y publicas
Responder Con Cita
  #6  
Antiguo 04-05-2025
_Io _Io is offline
Miembro
 
Registrado: ene 2024
Posts: 114
Poder: 3
_Io Va por buen camino
Muchas Gracias, por tu ayuda.

He tomado como referencia estas publicaciones de face:

Manual Soap -notificación de facturas

Ejemplo de este Manual:


Código:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelop
e/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w
3.org/2001/XMLSchema-instance">
<soapenv:Header>
<wsse:Security soapenv:mustUnderstand="1" mlns:wsse="http://docs.oasisopen.
org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:BinarySecurityToken EncodingType="http://docs.oasisopen.
org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary"
ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-tokenprofile-
1.0#X509v3" wsu:Id="CertId-DD1EB7392FADB1EE3713600719200334"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-
wss-wssecurity-utility-1.0.xsd">MIIEpDC...</wsse:BinarySecurityToken>
<ds:Signature Id="Signature-3"
xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo>
<ds:CanonicalizationMethod
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<ds:SignatureMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<ds:Reference URI="#id-4">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xmlexc-
c14n#"/>
</ds:Transforms>
<ds:DigestMethod
Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>wttpKeqdo7ltsD2MDitjZ7RWWaM=</ds:DigestValue
>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>n34z9gC...</ds:SignatureValue>
<ds:KeyInfo Id="KeyId-DD1EB7392FADB1EE3713600719200345">
<wsse:SecurityTokenReference wsu:Id="STRId-
DD1EB7392FADB1EE3713600719200346"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-
200401-wss-wssecurity-utility-1.0.xsd">
<wsse:Reference URI="#CertId-
DD1EB7392FADB1EE3713600719200334" ValueType="http://docs.oasisopen.
org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"/>
</wsse:SecurityTokenReference>
</ds:KeyInfo>
</ds:Signature>
</wsse:Security>
</soapenv:Header>
<soapenv:Body wsu:Id="id-4"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wsswssecurity-
utility-1.0.xsd">
<cambiarEstadoFactura
xmlns="http://ssweb.preapp.seap.minhap.es/facturae/web_services.php/ssgg">
<organoGestor xsi:type="xsd:string"
xmlns="">E00127403</organoGestor>
<unidadTramitadora xsi:type="xsd:string"
xmlns="">E03062503</unidadTramitadora>
<numeroRegistro xsi:type="xsd:string"
xmlns="">O00001301_13_00000142</numeroRegistro>
<codigoEstado xsi:type="xsd:string"
xmlns="">1200</codigoEstado>
<comentarios xsi:nil="true" xsi:type="xsd:string"
xmlns=""/>
</cambiarEstadoFactura>
</soapenv:Body>
</soapenv:Envelope>
Otro documento de referencia:
Servicios para sistemas automatizados de proveedores
(Equipo de desarrollo de FACe)


Código:
<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/
2001/XMLSchema-instance">
<soapenv:Header>
<wsse:Security soapenv:mustUnderstand="1"
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/
oasis-200401-wss-wssecurity-secext-1.0.xsd">
<wsse:BinarySecurityToken
EncodingType="http://docs.oasis-open.org/wss/2004/01/
oasis-200401-wss-soap-message-security-1.0#Base64Binary"ValueType="http://docs.oasis-open.org/wss/2004/01/
oasis-200401-wss-x509-token-profile-1.0#X509v3"
wsu:Id="CertId-5A5C126069B253F2B0135998798458616"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/
oasis-200401-wss-wssecurity-utility-1.0.xsd">MIIEpDCCBA2gAwIBAgIEPLPTKTANBgkqhkiG9w0BAQUFADA2MQswCQYDVQQGEwJFUzENMAsGA1UEChMERk5NVDEYMBYGA1UECxMPRk5NVCBDbGFzZSAyIENBMB4XDTALS6PmAJWFoOUT3Xvp8UxYptb9/
YK93ykPj5NYLcsXeh8L9SRWbFSnozoiATZoECDnrcMd054DdPrNVYLTZNhZ9Y2U9JqJpnIWR+a64Mo3iiMk/
KBkI2jo3QIuaCjvPK+k6LQCwTIaRvnHGRxwIDAQABo4IB1DCCAdAwgdgGA1UdEQSB0DCBzaSByjCBxzEYMBYGCSsGAQQBrGYBDxMJUzI4MjYwMTVGMUMwQQYJKwYBBAGsZgEOEzRJTlRFUlZFVc9fS1I6qgUkmwCZKHiwgJ4tS1Mv3gKMZ+8ulc8JErYo661ql3GVmLsfdH5g3eWyC5rBEcCjkHSKO0qDhzg==</wsse:BinarySecurityToken>
<ds:Signature Id="Signature-11" xmlns:ds="http://www.w3.org/
2000/09/xmldsig#">
<ds:SignedInfo>
<ds:CanonicalizationMethod
Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<ds:Reference URI="#id-12">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/
2001/10/xml-exc-c14n#"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/
2000/09/xmldsig#sha1"/>
<ds:DigestValue>vfoQe7yobzrB5LzQZ/
HD4B2F1BY=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue>
HOZFzxAsMAH8BDbuXOHekl+yyLXfodmPka5727t3LDFSkbxICkL92wy6dSbWyU07zK/dhfLl2a4c
33FcvOxAtYAEvQVRLcQM3VU9+L2SX9NReQaGTPPmtBb8UAWeH5m56nM9uxT7yIwfO424+lNEYEeo
1pYC+0DBI6WcN4LRgV4=
</ds:SignatureValue>
<ds:KeyInfo Id="KeyId-5A5C126069B253F2B0135998798458717">
<wsse:SecurityTokenReference
wsu:Id="STRId-5A5C126069B253F2B0135998798458718"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/
oasis-200401-wss-wssecurity-utility-1.0.xsd"><wsse:Reference
URI="#CertId-5A5C126069B253F2B0135998798458616"
ValueType="http://docs.oasis-open.org/wss/2004/01/
oasis-200401-wss-x509-token-profile-1.0#X509v3"/>
</wsse:SecurityTokenReference>
</ds:KeyInfo>
</ds:Signature>
<wsu:Timestamp wsu:Id="Timestamp-10"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/
oasis-200401-wss-wssecurity-utility-1.0.xsd">
<wsu:Created>2013-02-04T14:26:24.586Z</wsu:Created>
<wsu:Expires>2013-02-04T14:31:24.586Z</wsu:Expires>
</wsu:Timestamp>
</wsse:Security>
</soapenv:Header>
<soapenv:Body wsu:Id="id-12" xmlns:wsu="http://docs.oasis-open.org/
wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
<!-- BODY -->
</soapenv:Body>
</soapenv:Envelope>
El resto de datos que he puesto es el número de serie del certificado, que mirando ejemplos lo he ido colocando.

Utilizo los componentes sbb, pero la salida es bastante diferente:

Código:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" SOAP-ENV:mustUnderstand="1">
<wsse:BinarySecurityToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" wsu:Id="CertID-33FA35B0F99306C865A96AD2E72ED81E">MIIHozCCB.......HTR</wsse:BinarySecurityToken>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Id="Signature-33FA35B0F99306C865A96AD2E72ED81E">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<ds:Reference Id="Reference-1760189673" URI="#id-33FA35B0F99306C865A96AD2E72ED81E">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>99nZX9+HmQyLzch7yCfQ+UYFLXs=</ds:DigestValue>
</ds:Reference>
<ds:Reference Type="http://uri.etsi.org/01903#SignedProperties" URI="#SignedProperties-1094786911">
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>/DFyjNVzV/KgYYJ8Bv6E7AvY04E=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue> RI45lUcr0eS........= </ds:SignatureValue>
<ds:KeyInfo Id="KeyId-33FA35B0F99306C865A96AD2E72ED81E">
<wsse:SecurityTokenReference xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="STRId-33FA35B0F99306C865A96AD2E72ED81E">
<wsse:Reference URI="#CertID-33FA35B0F99306C865A96AD2E72ED81E" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"/>
</wsse:SecurityTokenReference>
</ds:KeyInfo>
<ds:Object>
<xades:QualifyingProperties xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" xmlns:xadesv141="http://uri.etsi.org/01903/v1.4.1#" Target="#Signature-33FA35B0F99306C865A96AD2E72ED81E">
<xades:SignedProperties Id="SignedProperties-1094786911">
<xades:SignedSignatureProperties>
<xades:SigningTime>2025-05-04T12:00:59.095Z</xades:SigningTime>
<xades:SigningCertificate>
<xades:Cert>
<xades:CertDigest>
<ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/>
<ds:DigestValue>i2PGjaWJKJm6VjN3FhUXFJZj3Ag=</ds:DigestValue>
</xades:CertDigest>
<xades:IssuerSerial>
<ds:X509IssuerName>CN=AC FNMT Usuarios, OU=Ceres, O=FNMT-RCM, C=ES</ds:X509IssuerName>
<ds:X509SerialNumber>160334489869012883505100958920202304461</ds:X509SerialNumber>
</xades:IssuerSerial>
</xades:Cert>
</xades:SigningCertificate>
<xades:SignaturePolicyIdentifier>
<xades:SignaturePolicyImplied/>
</xades:SignaturePolicyIdentifier>
</xades:SignedSignatureProperties>
<xades:SignedDataObjectProperties>
<xades:DataObjectFormat ObjectReference="#Reference-1760189673">
<xades:MimeType>text/xml</xades:MimeType>
</xades:DataObjectFormat>
</xades:SignedDataObjectProperties>
</xades:SignedProperties>
</xades:QualifyingProperties>
</ds:Object>
</ds:Signature>
</wsse:Security>
</SOAP-ENV:Header>
<SOAP-ENV:Body xmlns:NS1="https://webservice.face.gob.es" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" wsu:Id="id-33FA35B0F99306C865A96AD2E72ED81E">
<NS1:consultarUnidades/>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
En fin, perdido.

Muchas Gracias.
Responder Con Cita
  #7  
Antiguo 04-05-2025
_Io _Io is offline
Miembro
 
Registrado: ene 2024
Posts: 114
Poder: 3
_Io Va por buen camino
Cita:
Empezado por ermendalenda Ver Mensaje
Hola
Tambien tendria que ver si usas correctamente la politica de firma:
Código:
"name" => "Politica de Firma FacturaE v3.1",
    "url" => "http://www.facturae.es/politica_de_firma_formato_facturae/politica_de_firma_formato_facturae_v3_1.pdf",
    "digest" => "Ohixl6upD6av8N7pEvDABhEL6hM="
Esto sería la firma del XMl, de la Factura, no?
Nada que ver con la firma del la petición soap de la petición, es así?

Volver a darte las gracias.
Responder Con Cita
  #8  
Antiguo 07-05-2025
_Io _Io is offline
Miembro
 
Registrado: ene 2024
Posts: 114
Poder: 3
_Io Va por buen camino
Cita:
Empezado por _Io Ver Mensaje
Buenas tardes.

¿Podría poner alguien la cabecera firmada de en envío a Face que funcione bien?

Es para tener una referencia buena, me estoy peleando con las ssb y quiere tener claro lo que tengo que buscar.

Muchas Gracias.
Me respondo, al final lo conseguí.

Esta es una consulta de factura operativa:

Código:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Header>
<wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" SOAP-ENV:mustUnderstand="1">
<wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="">
<wsu:Created>2025-05-07T21:06:20.434Z</wsu:Created>
<wsu:Expires>2025-05-07T21:11:20.434Z</wsu:Expires>
</wsu:Timestamp>
<wsse:BinarySecurityToken xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3" EncodingType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-soap-message-security-1.0#Base64Binary" wsu:Id="CertId-000001">MIIHozCCBougAwIBAgIQeJ9MrQ87SXVlqQbhybS7zTANBgkqhkiG9w0BAQsFADBLMQswCQYDVQQGEwJFUzERMA8GA1UECgwIRk5NVC1SQ00xDjAMBgNVBAsMBUNlcmVzMRkwFwYDVQQDDBBBQyBGTk1UIFVzdWFyaW9zMB4XDTI0MDExODExMDkyMVoXDTI4MDExODExMDkyMVowgYcxCzAJBgNVBAYTAkVTMRgwFgYDVQQFEw9JRENFUy03NTc4MjE0MVExDzANBgNVBCoMBlJBRkFFTDEcMBoGA1UEBAwTTUFSVElOIE5Jw5FPIE1FRElOQTEvMC0GA1UEAwwmTUFSVElOIE5Jw5FPIE1FRElOQSBSQUZBRUwgLSA3NTc4MjE0MVEwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC7fGrEVpaFhksE2QA/iVRP0z8bkSPQnunUGHq7ztbN5a1QmTGwzoAP6sk/XHU50SdSTKdrx1Jzg2GVTIXOarMhiWAIJTqKBhUM2V+nv+jLcpqUVRbviyKI5Bf1MeTQjC/g5a1lW/3kJSrfqxmM2TBTIhHPb28mbOINJFXB+4cRWdlFObImpvRqpieOtPOEnHaZt/lE1A5G5H8pv7lKUIQy7KDNDmOg1ftT9p0vzgAkki+hWoqBTcsi2ulbyz6GqEkUrODA1y2+GeyHF8Rz1+Izgkog55LQeUHXLAQ3gF1m/WJBOrzn/tYpCzQq95dj1szbrAWA7yqzr727cSIIjR2LAgMBAAGjggREMIIEQDByBgNVHREEazBppGcwZTEYMBYGCSsGAQQBrGYBBAwJNzU3ODIxNDFRMRUwEwYJKwYBBAGsZgEDDAZNRURJTkExGzAZBgkrBgEEAaxmAQIMD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aggdOggdCGgZ5sZGFwOi8vbGRhcHVzdS5jZXJ0LmZubXQuZXMvY249Q1JMVTY2MCxjbj1BQyUyMEZOTVQlMjBVc3VhcmlvcyxvdT1DRVJFUyxvPUZOTVQtUkNNLGM9RVM/Y2VydGlmaWNhdGVSZXZvY2F0aW9uTGlzdDtiaW5hcnk/YmFzZT9vYmplY3RjbGFzcz1jUkxEaXN0cmlidXRpb25Qb2ludIYtaHR0cDovL3d3dy5jZXJ0LmZubXQuZXMvY3Jsc2FjdXN1L0NSTFU2NjAuY3JsMA0GCSqGSIb3DQEBCwUAA4IBAQA5+WD+8DswpLDEfcXO8aZX+t8t/LY/NrILXviYSsvMQAWgzTdOq7hrWTAuk1F+XuP1Gx5oYahS3cAYpnUuE9MX2iHV/p1lc1asaFHvyrwc0K9KteNITJgVMrboY/N/5GvRmOjuvlNAHXPlG+HK8Yf3HDii0YA+a7amqktWL4TJuMue2vwjClKMqEeQXrRIgHGmqxBWwZBZhREinhA2irwHAOAs8VCjZRCbtZS7oBeFqJ+7lAA34FW1V4zj/VgzFFC84t7DmBI7PNEWS8QoCn6L86OhUl7XKV44/mZ+j9luhRex6AcbtF5uanht3oU+iKO6jUx/nXfcOeCBqJMh5HTR</wsse:BinarySecurityToken>
<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<ds:SignedInfo>
<ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
<ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/>
<ds:Reference URI="#id-BodyREF">
<ds:Transforms>
<ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/>
</ds:Transforms>
<ds:DigestMethod Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>
<ds:DigestValue>jsJHpwdckjOO6v9SHSDz4yTCoqzvsaxsrvCVDrVdj8Q=</ds:DigestValue>
</ds:Reference>
</ds:SignedInfo>
<ds:SignatureValue> ujhcfQcRD4BZXBFtrz4CnS1aIx6kemlAFVVTnOSVkxM7TEjwwhWHhN61uxfakiPu 0J/CsAJrt2LZ3StR4nGT/YJuZnhHAVW8+D1kD2Yf2bYJLpHdhJnRlQDMWAXy+md5 jPWRoRT+uXrw/nSF/NKm3PrJ4NSytIcGY5UNGBk0JGFfPb+Hzed9geIXrWyzNg/D znJJ9lyUjhWB5kcK9S8Wk0LtlSQxwa5yMX1n+Y/BCcRtI1ooItBDLKNYxkdaPMup XogVxomDoamqSSVddJWH9Doiht4/Y8fY5NPAMsqjA6Pa58uyV181cI2XZ/PZvOxF 8EtIyGiA1ELASkGUtraFcw== </ds:SignatureValue>
<ds:KeyInfo Id="KeyId-000002">
<wsse:SecurityTokenReference xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" wsu:Id="STRId-000003">
<wsse:Reference URI="#CertId-000001" ValueType="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3"/>
</wsse:SecurityTokenReference>
</ds:KeyInfo>
</ds:Signature>
</wsse:Security>
</SOAP-ENV:Header>
<SOAP-ENV:Body xmlns:NS1="https://webservice.face.gob.es" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" wsu:Id="id-BodyREF">
<NS1:consultarFactura>
<numeroRegistro xsi:type="xsd:string">REGAGE25e000xxxxxxxx</numeroRegistro>
</NS1:consultarFactura>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Y este es el código:

Código:
function c_face_soap_sig.FirmaSoap_int(var aStream :TStream):boolean;
var
  FSOAPSigner: TsbxSOAPSigner;
  Utils :TsbxUtils;
begin

  fUltimoError:='';

  try

    // Se crea el componente utils contiene
    // muchas utilidades, sería conveiente"
    // mirar unit TsbxUtils"
    Utils:=TsbxUtils.Create(nil);

    FSOAPSigner := TsbxSOAPSigner.Create(nil);
    try

      // Se carga certificado firma
      cargaCertificado(FSOAPSigner);

      // Se toma los datos generados del evento
      // OnBefore del componente htpPrio
      FSOAPSigner.InputBytes := StreamToBytes(aStream);

      // Configuración básica
      FSOAPSigner.Config('XMLFormatting=auto');

      // Configuración necesaria en ws-security
      FSOAPSigner.Config('SecurityHeaderMustUnderstand=1');

      FSOAPSigner.Config('BinarySecurityTokenId=CertId-000001');
      FSOAPSigner.Config('KeyInfoID=KeyId-000002');
      FSOAPSigner.Config('SecurityTokenReferenceID=STRId-000003');

      // Marca de tiempo, muestra la hora local
      // referenciada al huso horio "Z", no sé
      // si esta bien, españa esta en huso "A"
      // y en veranos huso "B"
      FSOAPSigner.Config('WSUTimestampCreated=' + Utils.DateToString(Now()));
      FSOAPSigner.Config('WSUTimestampExpires=' + Utils.DateToString(IncMinute(Now(), 5)));
      FSOAPSigner.Config('WSUTimestampCreatedFormat=YYYY-MM-DDThh:mm:ss.sssTZD');
      FSOAPSigner.Config('WSUTimestampExpiresFormat=YYYY-MM-DDThh:mm:ss.sssTZD');


      // Creamos la referencia al Body del mensaje,
      // asignandole un URI, se asigna false a AutoGenerateId
      FSOAPSigner.AddBodyReference('id-BodyREF',false);

      // Asignamos los datos necesarios a la referencia
      // del elemento a ser firmado "Body"
      FSOAPSigner.References[0].HashAlgorithm:='SHA256';
      FSOAPSigner.References[0].CanonicalizationMethod:=cxcmExclCanon;

      // Asignamos la configuración de la firma

      // sstWSSSignature =>  (WS-Security, WSS) signature
      // SHA1 => /xmldsig#sha1
      // cxcmExclCanon => /xml-exc-c14n#
      // aslGeneric => this value applicable to XAdES
      //               signature only  andcorresponds to
      //               XML-DSIG signature
      FSOAPSigner.NewSignature.SignatureType := sstWSSSignature;
      FSOAPSigner.NewSignature.HashAlgorithm := 'SHA1';
      FSOAPSigner.NewSignature.CanonicalizationMethod:=cxcmExclCanon;
      FSOAPSigner.NewSignature.Level:=aslGeneric;

      // Certificado en BinarySecurityToken
      FSOAPSigner.EmbedCertificateMethod := cwecInBinarySecurityToken;

      // Siempre se crea SecurityHeader
      FSOAPSigner.SecurityHeaderIndex:=-1;

      FSOAPSigner.Sign();

      BytesToStream(FSOAPSigner.OutputBytes,aStream);

    except

      on e:exception do fUltimoError:=e.ToString;

    end;


  finally

    FreeAndNil(Utils);
    FreeAndNil(FSOAPSigner);

  end;

  result:=fUltimoError='';

end;
Se utilizan los componentes sbb.

Saludos.
Responder Con Cita
  #9  
Antiguo 09-05-2025
_Io _Io is offline
Miembro
 
Registrado: ene 2024
Posts: 114
Poder: 3
_Io Va por buen camino
Buenos Días.

Haciendo consulta de una factura, la respuesta que tengo es:

En el entorno de pruebas:
Cita:
No existe ningún usuario asociado al certificado que firma la petición

En el entorno de producción:
Cita:
Resultado:
= 316
= La factura ha sido presentada por el portal web, no puede consultar el estado de la factura por servicios web
= 681dac99169e4
¿Hay que darse de alta de forma independiente en el entorno de pruebas?

¿Cómo lo debería hacer?

Muchas Gracias.
Responder Con Cita
  #10  
Antiguo 20-06-2025
sglorka sglorka is offline
Miembro
 
Registrado: mar 2017
Ubicación: Tenerife
Posts: 550
Poder: 10
sglorka Va por buen camino
Buenas tardes
Alguien sabe como se codifica en formato facturae para las administraciones públicas la subvención de 20céntimos de combustible ¿ Utilizáis el nodo Subsidies ?
Gracias
Responder Con Cita
  #11  
Antiguo 20-06-2025
ermendalenda ermendalenda is offline
Miembro
 
Registrado: ago 2021
Posts: 2.764
Poder: 7
ermendalenda Va por buen camino
Cita:
Empezado por sglorka Ver Mensaje
Buenas tardes
Alguien sabe como se codifica en formato facturae para las administraciones públicas la subvención de 20céntimos de combustible ¿ Utilizáis el nodo Subsidies ?
Gracias
No he visto ese nodo en facturae, te propongo descuento a nivel de línea o global indicando en la razon el artículo del rd
Ejemplo:
Código PHP:
<?xml version="1.0" encoding="UTF-8"?>
<Facturae xmlns="http://www.facturae.es/Facturae/2014/v3.2.2/Facturae"
          xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
          xsi:schemaLocation="http://www.facturae.es/Facturae/2014/v3.2.2/Facturae 
                              http://www.facturae.es/Facturae/2014/v3.2.2/Facturaev3.2.2.xsd">
  <FileHeader>
    <SchemaVersion>3.2.2</SchemaVersion>
    <Modality>I</Modality>
    <InvoiceIssuerType>EM</InvoiceIssuerType>
    <Batch>
      <BatchIdentifier>F0001</BatchIdentifier>
      <InvoicesCount>1</InvoicesCount>
      <TotalInvoicesAmount>
        <TotalAmount>193.60</TotalAmount>
      </TotalInvoicesAmount>
      <TotalOutstandingAmount>
        <TotalAmount>193.60</TotalAmount>
      </TotalOutstandingAmount>
      <TotalExecutableAmount>
        <TotalAmount>193.60</TotalAmount>
      </TotalExecutableAmount>
    </Batch>
  </FileHeader>

  <Parties>
    <SellerParty>
      <TaxIdentification>
        <PersonTypeCode>J</PersonTypeCode>
        <ResidenceTypeCode>R</ResidenceTypeCode>
        <TaxIdentificationNumber>B12345678</TaxIdentificationNumber>
      </TaxIdentification>
      <LegalEntity>
        <CorporateName>Gasóleos Ejemplo S.L.</CorporateName>
        <AddressInSpain>
          <Address>Avda. Ejemplo 123</Address>
          <PostCode>28080</PostCode>
          <Town>Madrid</Town>
          <Province>Madrid</Province>
          <CountryCode>ESP</CountryCode>
        </AddressInSpain>
      </LegalEntity>
    </SellerParty>

    <BuyerParty>
      <TaxIdentification>
        <PersonTypeCode>J</PersonTypeCode>
        <ResidenceTypeCode>R</ResidenceTypeCode>
        <TaxIdentificationNumber>S1234567C</TaxIdentificationNumber>
      </TaxIdentification>
      <LegalEntity>
        <CorporateName>Ayuntamiento de Ejemplo</CorporateName>
        <AddressInSpain>
          <Address>Plaza Mayor 1</Address>
          <PostCode>28080</PostCode>
          <Town>Madrid</Town>
          <Province>Madrid</Province>
          <CountryCode>ESP</CountryCode>
        </AddressInSpain>
        <AdministrativeCentre>
          <CentreCode>DIR3CODE123</CentreCode>
          <RoleTypeCode>01</RoleTypeCode>
          <Name>Unidad de Compras</Name>
          <AddressInSpain>
            <Address>Plaza Mayor 1</Address>
            <PostCode>28080</PostCode>
            <Town>Madrid</Town>
            <Province>Madrid</Province>
            <CountryCode>ESP</CountryCode>
          </AddressInSpain>
        </AdministrativeCentre>
      </LegalEntity>
    </BuyerParty>
  </Parties>

  <Invoices>
    <Invoice>
      <InvoiceHeader>
        <InvoiceNumber>F0001</InvoiceNumber>
        <InvoiceSeriesCode>A</InvoiceSeriesCode>
        <InvoiceDocumentType>FC</InvoiceDocumentType>
        <InvoiceClass>OO</InvoiceClass>
      </InvoiceHeader>
      <InvoiceIssueData>
        <IssueDate>2022-09-30</IssueDate>
        <InvoiceCurrencyCode>EUR</InvoiceCurrencyCode>
      </InvoiceIssueData>

      <TaxesOutputs>
        <Tax>
          <TaxTypeCode>01</TaxTypeCode> <!-- IVA -->
          <TaxRate>21.00</TaxRate>
          <TaxableBase>
            <TotalAmount>160.00</TotalAmount>
          </TaxableBase>
          <TaxAmount>
            <TotalAmount>33.60</TotalAmount>
          </TaxAmount>
        </Tax>
      </TaxesOutputs>

      <InvoiceTotals>
        <TotalGrossAmount>180.00</TotalGrossAmount>
        <GeneralDiscounts>
          <Discount>
            <DiscountReason>Bonificación estatal por combustible - RDL 6/2022</DiscountReason>
            <DiscountRate>0.00</DiscountRate>
            <DiscountAmount>20.00</DiscountAmount>
          </Discount>
        </GeneralDiscounts>
        <TotalGeneralDiscounts>20.00</TotalGeneralDiscounts>
        <TotalGrossAmountBeforeTaxes>160.00</TotalGrossAmountBeforeTaxes>
        <TotalTaxOutputs>33.60</TotalTaxOutputs>
        <InvoiceTotal>193.60</InvoiceTotal>
        <TotalOutstandingAmount>193.60</TotalOutstandingAmount>
        <TotalExecutableAmount>193.60</TotalExecutableAmount>
      </InvoiceTotals>

      <Items>
        <InvoiceLine>
          <ItemDescription>Gasóleo A</ItemDescription>
          <Quantity>100.00</Quantity>
          <UnitOfMeasure>Litro</UnitOfMeasure>
          <UnitPriceWithoutTax>1.80</UnitPriceWithoutTax>
          <DiscountsAndRebates>
            <Discount>
              <DiscountReason>Bonificación estatal por combustible - RDL 6/2022</DiscountReason>
              <DiscountRate>0.00</DiscountRate>
              <DiscountAmount>20.00</DiscountAmount>
            </Discount>
          </DiscountsAndRebates>
          <GrossAmount>180.00</GrossAmount>
          <TaxesOutputs>
            <Tax>
              <TaxTypeCode>01</TaxTypeCode>
              <TaxRate>21.00</TaxRate>
              <TaxableBase>
                <TotalAmount>160.00</TotalAmount>
              </TaxableBase>
              <TaxAmount>
                <TotalAmount>33.60</TotalAmount>
              </TaxAmount>
            </Tax>
          </TaxesOutputs>
        </InvoiceLine>
      </Items>
    </Invoice>
  </Invoices>
</Facturae>
Responder Con Cita
  #12  
Antiguo 19-10-2025
ermendalenda ermendalenda is offline
Miembro
 
Registrado: ago 2021
Posts: 2.764
Poder: 7
ermendalenda Va por buen camino
Clasificación receptor --> B2B, B2C ó B2G

Hola, estoy aquí dandole

Última edición por ermendalenda fecha: 19-10-2025 a las 20:23:32.
Responder Con Cita
  #13  
Antiguo 19-10-2025
ermendalenda ermendalenda is offline
Miembro
 
Registrado: ago 2021
Posts: 2.764
Poder: 7
ermendalenda Va por buen camino
Clasificación receptor --> B2B, B2C ó B2G

Hola, estoy aquí dandole vueltas a como puede saber, en todos los casos, a quien se está emitiendo una factura B2B para poder cumplir con el nuevo reglamento de facturacion electrónica, ya que en el proyecto dice que se enviarán solo las B2B.
Teniendo en cuenta de que hay algunos Nifs que son identificables a b2g por adelantado:
Los que empiezan por P, Q y S.
También existen dudosos:
- por un lado G / R que son fundaciones, asociaciones o entidades religiosas que pueden ser B2B o B2G, según si gestionan fondos públicos
-Y los mas dudosos, un Nif de persona física, como va a actuar fiscalmente, va a declarar la factura como autónomo B2B, o simplemente quiere la factura como comprobante B2C .
-por otro las que actuan en nombre de entidades públicas que puede ser cualquiera, pero éstos deberían tener consideración B2B por que fiscalmente no estamos factyrando directamente a un organismo publico, aunque finalmente use los canales de remisión B2G, aquí queda la duda de quien hace la remisíón B2G por que no se me ha dado el caso y habrá que ver si tendremos que enviarlo al servicio que dispongan para b2b.
Como veis, aun qiesan detalles que temdrán qu definir y me temo que nos queda otro cruce de preguntas xon el canal que nos pongan.
1. Aclaración de que es B2B y que pasa con las B2G que no solicitan su remision ni a Face ni a peppol, ni a... y que ocurre con las B2C
2. Semántica final que se usará para el ubl 2.1, que contendrá nuevas definiciones acordes a los datos que necesiten y aunque suppmgo que serán parecidos a la semantica de Billing 3.0, seguro sufrirá nuevas definiciones.
3.habrá que firmar el xml o será igual que en verifactu, en la que se considera firmado por enviar con certificado.
4.que otros requisitos pueden ser condicionantes para enviarlas o no, habrá importe mínimo, por ejemplo a partir de facturas de 1000euros?.

Lo que sí está claro y confrimado a través del proyecto y otras fuentes, es que él que quiera empezar ya puede ir trabajando en UBL 2.1 con la normativa europea EN 16931, teniendo en cuenta que tendrá algunas definiciones especiales que ya nos dirán.
Por cierto, esto no se axaba una vez emitida, como sean facturas pendientes de pago hay que estar cambiando los estados, el receptor y el emisor pedniente de esos cambios.
‐-----------
Por favor borrar el anterior post!!!

Última edición por ermendalenda fecha: 19-10-2025 a las 20:30:45.
Responder Con Cita
  #14  
Antiguo 20-10-2025
Avatar de bmfranky
bmfranky bmfranky is offline
Miembro
 
Registrado: may 2024
Ubicación: Gandia, Valencia
Posts: 863
Poder: 3
bmfranky Va por buen camino
Hola, @ermendalenda ,puedes poner enlace a donde está la información del proyecto?
__________________
Uno se alegra de ser útil. (Isaac Asimov)
Responder Con Cita
  #15  
Antiguo 20-10-2025
ermendalenda ermendalenda is offline
Miembro
 
Registrado: ago 2021
Posts: 2.764
Poder: 7
ermendalenda Va por buen camino
Cita:
Empezado por bmfranky Ver Mensaje
Hola, @ermendalenda ,puedes poner enlace a donde está la información del proyecto?
Nos va a hacer falta um servicio de consulta websoap para ver si un nif está dado de alta como empresario. Hay un sevicio de consulta por web, quizas se pueda trasladar a llamadas curl.o solicitar a algun canal de la aeat que va a ser algo imprescindible para la factura electrónica.
Responder Con Cita
Respuesta


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Facturas Electronicas Argentina Chaja Varios 3 10-07-2015 19:15:05
Agregar Adendas a Facturas electronicas mexico reypcs Varios 0 20-01-2011 16:26:10
Tabla de Facturas vs Detalles de Facturas magnu9 Conexión con bases de datos 9 27-07-2007 17:27:37
Comunicaciones electronicas EDI Toni Conexión con bases de datos 0 18-04-2006 13:06:34
Campos calculados, facturas y detalles de facturas. Letty Conexión con bases de datos 7 07-11-2003 11:19:44


La franja horaria es GMT +2. Ahora son las 02:57:41.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi