Exemple #1
0
 public void UT_GetInvoicePagos10()
 {
     SW.Tools.Entities.Pagos pago = new Tools.Entities.Pagos();
     pago.SetPago("01", null, DateTime.Now, null, "USD", 15000.00m, null, "1", null, null, 21.5m);
     pago.SetDoctoRelacionado("RogueOne", "Folio1", "0aded095-b84d-4364-8f8e-59c3f650e530",
                              "PPD", "MXN", "1", 30000, 15000, 15000);
     pago.SetEmisor("LAN7008173R5", "CINDEMEX SA DE CV", "601");
     pago.SetReceptor("AAQM610917QJA", "EMPLEADO SMARTERWEB");
     var invoice    = pago.GetInvoice("99056", "A", "1");
     var xmlInvoice = SW.Tools.Helpers.Serializer.SerializeDocument(invoice);
 }
Exemple #2
0
        public void UT_StampInvoicePagos10()
        {
            SW.Tools.Entities.Pagos pago = new Tools.Entities.Pagos();
            pago.SetPago("01", null, DateTime.Now, null, "USD", 15000.00m, null, "1", null, null, 21.5m);
            pago.SetDoctoRelacionado("RogueOne", "Folio1", "0aded095-b84d-4364-8f8e-59c3f650e530",
                                     "PPD", "MXN", "1", 1.0000000m, 30000.0000000m, 15000.000000000000m, 15000.000000m);
            pago.SetEmisor("LAN8507268IA", "CINDEMEX SA DE CV", "601");
            pago.SetReceptor("AAQM610917QJA", "EMPLEADO SMARTERWEB");
            var invoice    = pago.GetInvoice("99056", "A", "1");
            var xmlInvoice = SW.Tools.Helpers.Serializer.SerializeDocument(invoice);

            xmlInvoice = SignInvoice(xmlInvoice);
            Stamp           stamp              = new Stamp(this.url, this.userStamp, this.passwordStamp);
            StampResponseV2 response           = stamp.TimbrarV2(xmlInvoice);
            var             invoiceResultStamp = SW.Tools.Helpers.Serializer.DeserealizeDocument <SW.Tools.Entities.Comprobante>
                                                     (response.data.cfdi);

            Assert.IsTrue(response.status == "success");
        }