예제 #1
0
        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 ());
        }
예제 #2
0
파일: CFDHelpers.cs 프로젝트: mictlanix/mbe
        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;
        }