Add a signed Timbre Fiscal Digital (TFD) element to a CFDI document.
Namespace:
FirmaSATAssembly: diFirmaSatNet (in diFirmaSatNet.dll) Version: 10.50.0.29531
Syntax
C# |
---|
public static int AddSignedTfd( string newFile, string inputFile, string keyFile, string password, string certFile ) |
Visual Basic (Declaration) |
---|
Public Shared Function AddSignedTfd ( _ newFile As String, _ inputFile As String, _ keyFile As String, _ password As String, _ certFile As String _ ) As Integer |
Parameters
- newFile
- Type: System..::.String
Name of new file to be created
- inputFile
- Type: System..::.String
Name of existing CFDI file
- keyFile
- Type: System..::.String
Name of PAC's private key file
- password
- Type: System..::.String
Password for private key
- certFile
- Type: System..::.String
Name of PAC's X.509 certificate that matches the keyFile
Return Value
Zero (0) if successful or non-zero error code if failed
Remarks
The 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.
Examples

int n = Tfd.AddSignedTfd(newname, fname, keyfile, password, certfile); Console.WriteLine("Tfd.AddSignedTfd returns {0}", n); // 0 string s = Sat.GetXmlAttribute("cfdv40-ejemplo_signed.xml", "SelloSAT", "TimbreFiscalDigital"); // SelloSat=Qncw19SZ0w/uxkwCYkf/7V3DF3j28Jp1XyNVyqiyOreq0S ...