static void StampTest() { var cfd = CreateCFD (); var cli = new ProFactClient (USERNAME, ProFactClient.URL_TEST); AddItems (cfd, "Product", 3); cfd.Sign (File.ReadAllBytes (CSD_PRIVATE_KEY_FILE), Encoding.UTF8.GetBytes (CSD_PRIVATE_KEY_PWD)); var tfd = cli.Stamp ("WS01", cfd); Console.WriteLine (tfd.ToXmlString ()); Console.WriteLine (tfd.ToString ()); cfd.Complemento = new List<object>(); cfd.Complemento.Add (tfd); Console.WriteLine (cfd.ToXmlString ()); Console.WriteLine (cfd.ToString ()); }
static Mictlanix.CFDv32.Comprobante ProFactStamp(FiscalDocument item) { var cfd = SignCFD (item); var cli = new ProFactClient (WebConfig.ProFactUser, WebConfig.ProFactUrl); var id = string.Format ("{0}-{1:D6}", WebConfig.ProFactCode, item.Id); var tfd = cli.Stamp (id, cfd); cfd.Complemento = new List<object> (); cfd.Complemento.Add (tfd); return cfd; }