Esempio n. 1
0
        public void Test_013_Visa_Sale()
        {
            Transaction response = VisaManual.Charge(11.12m)
                                   .WithCurrency("USD")
                                   .Execute();

            Assert.IsNotNull(response);
            Assert.AreEqual("00", response.ResponseCode);
        }
Esempio n. 2
0
        public void Test_013_Visa_Sale()
        {
            Logger.AppendText("\r\nTest_013_Visa_Sale");

            Response = VisaManual.Charge(11.12m)
                       .WithCurrency("USD")
                       .WithClientTransactionId(ClientTransactionId)
                       .WithAddress(Address)
                       .Execute();
        }
Esempio n. 3
0
        public void Test_026_Visa_Internet_ECI_6()
        {
            VisaManual.ThreeDSecure = new ThreeDSecure {
                Eci = "6",
                AuthenticationValue = "1234567890123456789012345678901234567890"
            };

            Transaction response = VisaManual.Charge(0.81m)
                                   .WithCurrency("USD")
                                   .Execute();

            Assert.IsNotNull(response);
            Assert.AreEqual("00", response.ResponseCode);
        }
Esempio n. 4
0
        public void Test_001_Visa_Level_II_Sale()
        {
            var commercialData = new CommercialData(TaxType.NOTUSED)
            {
                PoNumber = "9876543210"
            };

            Transaction response = VisaManual.Charge(0.52m)
                                   .WithCurrency("USD")
                                   .WithCommercialData(commercialData)
                                   .Execute();

            Assert.IsNotNull(response);
            Assert.AreEqual("00", response.ResponseCode);
        }
Esempio n. 5
0
        public void Test_026b_Visa_Internet_ECI_6()
        {
            Logger.AppendText("\r\nTest_026_Visa_Internet_ECI_6");

            VisaManual.ThreeDSecure = new ThreeDSecure {
                Eci           = 6,
                SecureCode    = "1234567890123456789012345678901234567890",
                UCAFIndicator = UCAFIndicator.FullyAuthenticated
            };

            Response = VisaManual.Charge(0.81m)
                       .WithCurrency("USD")
                       .WithAddress(Address)
                       .WithClientTransactionId(ClientTransactionId)
                       .Execute();
        }
Esempio n. 6
0
        public void Test_018_Visa_Level3_Sale()
        {
            var commercialData = new CommercialData(TaxType.NOTUSED)
            {
                PoNumber = "9876543210"
            };

            commercialData.AddLineItems(
                new CommercialLineItem {
                CommodityCode = "030",
                Description   = "Misc Good",
                UPC           = "012345678901",
                Quantity      = 5.1m,
                UnitOfMeasure = "lbs",
                UnitCost      = 0.6m,
                //DiscountAmount = 0.61m,
                TotalAmount          = 0.62m,
                TaxAmount            = 0.63m,
                ExtendedAmount       = 0.64m,
                CreditDebitIndicator = CreditDebitIndicator.Credit,
                NetGrossIndicator    = NetGrossIndicator.Gross
            },
                new CommercialLineItem {
                CommodityCode = "031",
                Description   = "Misc Good2",
                UPC           = "012345678901",
                Quantity      = 5.1m,
                UnitOfMeasure = "lbs",
                UnitCost      = 0.6m,
                //DiscountAmount = 0.61m,
                TotalAmount          = 0.62m,
                TaxAmount            = 0.63m,
                ExtendedAmount       = 0.64m,
                CreditDebitIndicator = CreditDebitIndicator.Credit,
                NetGrossIndicator    = NetGrossIndicator.Gross
            }
                );

            Transaction response = VisaManual.Charge(0.52m)
                                   .WithCurrency("USD")
                                   .WithCommercialData(commercialData)
                                   .Execute();

            Assert.IsNotNull(response);
            Assert.AreEqual("00", response.ResponseCode);
        }
Esempio n. 7
0
        public void Test_022a_Visa_Internet_ECI_5()
        {
            Logger.AppendText("\r\nTest_022_Visa_Internet_ECI_5");

            VisaManual.ThreeDSecure = new ThreeDSecure {
                Eci           = 5,
                SecureCode    = "1234567890123456789012345678901234567890",
                UCAFIndicator = UCAFIndicator.FullyAuthenticated,
                Version       = Secure3dVersion.One
            };

            Response = VisaManual.Charge(1.01m)
                       .WithCurrency("USD")
                       .WithAddress(Address)
                       .WithClientTransactionId(ClientTransactionId)
                       .Execute();
        }
Esempio n. 8
0
        public void Test_001_Visa_Level_II_Sale()
        {
            Logger.AppendText("Test_001_Visa_Level_II_Sale");

            var commercialData = new CommercialData(TaxType.NOTUSED)
            {
                PoNumber  = "9876543210",
                TaxAmount = 0m
            };

            Response = VisaManual.Charge(0.52m)
                       .WithCurrency("USD")
                       .WithCommercialData(commercialData)
                       .WithAddress(Address)
                       .WithClientTransactionId(ClientTransactionId)
                       .WithDescription("Test_001_Visa_Level_II_Sale")
                       .Execute();
        }
Esempio n. 9
0
        public void Test_018_Visa_Level3_Sale()
        {
            Logger.AppendText("\r\nTest_018_Visa_Level3_Sale");

            var commercialData = new CommercialData(TaxType.NOTUSED, CommercialIndicator.Level_III)
            {
                PoNumber               = "1784951399984509620",
                TaxAmount              = 0.01m,
                DestinationPostalCode  = "85212",
                DestinationCountryCode = "USA",
                OriginPostalCode       = "22193",
                SummaryCommodityCode   = "SCC",
                CustomerVAT_Number     = "123456789",
                VAT_InvoiceNumber      = "UVATREF162",
                OrderDate              = DateTime.Now,
                FreightAmount          = 0.01m,
                DutyAmount             = 0.01m,
                AdditionalTaxDetails   = new AdditionalTaxDetails {
                    TaxType     = "VAT",
                    TaxAmount   = 0.01m,
                    TaxRate     = 0.04m,
                    TaxCategory = TaxCategory.VAT
                }
            };

            commercialData.AddLineItems(
                new CommercialLineItem {
                ProductCode          = "PRDCD1",
                Name                 = "PRDCD1NAME",
                UnitCost             = 0.01m,
                Quantity             = 1m,
                UnitOfMeasure        = "METER",
                Description          = "PRODUCT 1 NOTES",
                CommodityCode        = "12DIGIT ACCO",
                AlternateTaxId       = "1234567890",
                CreditDebitIndicator = CreditDebitIndicator.Credit,
                DiscountDetails      = new DiscountDetails {
                    DiscountName       = "Indep Sale 1",
                    DiscountAmount     = 0.50m,
                    DiscountPercentage = 0.10m,
                    DiscountType       = "SALE"
                }
            },
                new CommercialLineItem {
                ProductCode          = "PRDCD2",
                Name                 = "PRDCD2NAME",
                UnitCost             = 0.01m,
                Quantity             = 1m,
                UnitOfMeasure        = "METER",
                Description          = "PRODUCT 2 NOTES",
                CommodityCode        = "12DIGIT ACCO",
                AlternateTaxId       = "1234567890",
                CreditDebitIndicator = CreditDebitIndicator.Debit,
                DiscountDetails      = new DiscountDetails {
                    DiscountName       = "Indep Sale 1",
                    DiscountAmount     = 0.50m,
                    DiscountPercentage = 0.10m,
                    DiscountType       = "SALE"
                }
            }
                );

            Response = VisaManual.Charge(0.53m)
                       .WithCurrency("USD")
                       .WithCommercialData(commercialData)
                       .WithClientTransactionId(ClientTransactionId)
                       .WithAddress(Address)
                       .Execute();
        }
Esempio n. 10
0
        public void Visa_Level3_Sale()
        {
            var commercialData = new CommercialData(TaxType.SALESTAX, CommercialIndicator.Level_III)
            {
                PoNumber               = "1784951399984509620",
                TaxAmount              = 0.01m,
                DestinationPostalCode  = "85212",
                DestinationCountryCode = "USA",
                OriginPostalCode       = "22193",
                SummaryCommodityCode   = "SCC",
                VAT_InvoiceNumber      = "UVATREF162",
                OrderDate              = DateTime.Now,
                FreightAmount          = 0.01m,
                DutyAmount             = 0.01m,
                AdditionalTaxDetails   = new AdditionalTaxDetails {
                    TaxAmount = 0.01m,
                    TaxRate   = 0.04m
                }
            };

            commercialData.AddLineItems(
                new CommercialLineItem {
                ProductCode   = "PRDCD1",
                UnitCost      = 0.01m,
                Quantity      = 1m,
                UnitOfMeasure = "METER",
                Description   = "PRODUCT 1 NOTES",
                // CommodityCode = "12DIGIT ACCO",
                DiscountDetails = new DiscountDetails {
                    DiscountAmount = 0.50m
                }
            },
                new CommercialLineItem {
                ProductCode   = "PRDCD2",
                UnitCost      = 0.01m,
                Quantity      = 1m,
                UnitOfMeasure = "METER",
                Description   = "PRODUCT 2 NOTES",
                // CommodityCode = "12DIGIT ACCO",
                DiscountDetails = new DiscountDetails {
                    DiscountAmount = 0.50m
                }
            }
                );

            var response = VisaManual.Charge(0.53m)
                           .WithCurrency("USD")
                           .WithCommercialRequest(true)
                           .WithClientTransactionId(ClientTransactionId)
                           .WithAddress(Address)
                           .Execute();

            Assert.IsNotNull(response);
            Assert.AreEqual("00", response.ResponseCode);

            var edit = response.Edit()
                       .WithCommercialData(commercialData)
                       .Execute();

            Assert.IsNotNull(edit);
            Assert.AreEqual("00", edit.ResponseCode);
        }