Beispiel #1
0
        public void Test_030_Visa_MultiPart()
        {
            Logger.AppendText("\r\nTest_030_Visa_MultiPart");

            // AUTH
            Response = VisaManual.Authorize(30m)
                       .WithCurrency("USD")
                       .WithAddress(Address)
                       .WithClientTransactionId(ClientTransactionId)
                       .Execute();
            Assert.IsNotNull(Response);
            Assert.AreEqual("00", Response.ResponseCode);

            // FIRST CAPTURE
            Logger.AppendText("\r\nTest_030_First_Capture");

            Transaction firstCapture = Response.Capture(15m)
                                       .WithMultiCapture(1, 2)
                                       .Execute();

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

            // SECOND CAPTURE
            Logger.AppendText("\r\nTest_030_Second_Capture");

            Transaction secondCapture = Response.Capture(15m)
                                        .WithMultiCapture(2, 2)
                                        .Execute();

            Assert.IsNotNull(secondCapture);
            Assert.AreEqual("00", secondCapture.ResponseCode);
        }
Beispiel #2
0
        public void Test_030_Visa_MultiPart()
        {
            // AUTH
            Transaction response = VisaManual.Authorize(30m)
                                   .WithCurrency("USD")
                                   .Execute();

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

            // FIRST CAPTURE
            Transaction firstCapture = response.Capture(15m)
                                       .WithMultiCapture(1, 2)
                                       .Execute();

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

            // SECOND CAPTURE
            Transaction secondCapture = response.Capture(15m)
                                        .WithMultiCapture(2, 2)
                                        .Execute();

            Assert.IsNotNull(secondCapture);
            Assert.AreEqual("00", secondCapture.ResponseCode);
        }
Beispiel #3
0
        public void Test_015_Visa_Verfiy()
        {
            Transaction response = VisaManual.Verify()
                                   .WithAddress(Address)
                                   .Execute();

            Assert.IsNotNull(response);
            Assert.AreEqual("00", response.ResponseCode);
        }
Beispiel #4
0
        public void Test_013_Visa_Sale()
        {
            Transaction response = VisaManual.Charge(11.12m)
                                   .WithCurrency("USD")
                                   .Execute();

            Assert.IsNotNull(response);
            Assert.AreEqual("00", response.ResponseCode);
        }
        public void Test_033_Tokenize_Visa()
        {
            Logger.AppendText("\r\nTest_033_Tokenize_Visa");

            string token = VisaManual.Tokenize(false);

            Assert.IsNotNull(token);
            Logger.AppendText("Visa Token: {0}", token);
        }
Beispiel #6
0
        public void Test_015_Visa_Verfiy()
        {
            Logger.AppendText("\r\nTest_015_Visa_Verfiy");

            Response = VisaManual.Verify()
                       .WithAddress(Address)
                       .WithClientTransactionId(ClientTransactionId)
                       .Execute();
        }
Beispiel #7
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();
        }
Beispiel #8
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);
        }
Beispiel #9
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);
        }
Beispiel #10
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();
        }
Beispiel #11
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);
        }
Beispiel #12
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();
        }
Beispiel #13
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();
        }
Beispiel #14
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();
        }
Beispiel #15
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);
        }