Add a signed Timbre Fiscal Digital (TFD) element to a CFDI document.
Namespace: FirmaSATAssembly: diFirmaSatNet (in diFirmaSatNet.dll) Version: 10.70.0.38178 (10.70.0.0)
Syntaxpublic static int AddSignedTfd(
string newFile,
string inputFile,
string keyFile,
string password,
string certFile
)
Public Shared Function AddSignedTfd (
newFile As String,
inputFile As String,
keyFile As String,
password As String,
certFile As String
) As Integer
Parameters
- newFile String
- Name of new file to be created
- inputFile String
- Name of existing CFDI file
- keyFile String
- Name of PAC's private key file
- password String
- Password for private key
- certFile String
- Name of PAC's X.509 certificate that matches the keyFile
Return Value
Int32Zero (0) if successful or non-zero
error code if failed
RemarksThe inputFile must be a version 4.0/3.3 CFDi document already signed with a
sello field and no existing TFD element.
The TFD will be timestamped using the system clock and a fresh UUID will be generated.
No other XML processing is carried out except inserting the TFD element.
Exampleint n = Tfd.AddSignedTfd(newname, fname, keyfile, password, certfile);
Console.WriteLine("Tfd.AddSignedTfd returns {0}", n);
string s = Sat.GetXmlAttribute("cfdv40-ejemplo_signed.xml", "SelloSAT", "TimbreFiscalDigital");
See Also