public void TestInit()
        {
            TestServices.InitializeService();


            _walletService  = TestServices.ServiceProvider.GetService <IWalletService>();
            _paymentService = TestServices.ServiceProvider.GetService <IPaymentService>();

            _cardA = new Card
            {
                Customer   = "TESTAUTO",
                CardHolder = new CardHolder
                {
                    FirstName = "PantsON",
                    LastName  = "Fire",
                },

                Account        = "4583194798565295",
                Cvc            = "532",
                ExpirationDate = "0925",
                Billto         = new Address
                {
                    City    = "Wheton",
                    Country = "USA",
                    Line1   = "218 Esat Avenue",
                    State   = "IL",
                    Zip     = "60139",
                    Email   = "*****@*****.**"
                }
            };

            _cardB = new Card
            {
                Customer   = "TESTAUTO",
                CardHolder = new CardHolder
                {
                    FirstName = "PantsON",
                    LastName  = "Fire",
                },

                Account        = "4111111111111111",
                Cvc            = "532",
                ExpirationDate = "0925",
                Billto         = new Address
                {
                    City    = "Wheton",
                    Country = "USA",
                    Line1   = "218 Esat Avenue",
                    State   = "IL",
                    Zip     = "60139",
                    Email   = "*****@*****.**"
                }
            };

            _extendedInformation = new ExtendedInformation
            {
                InvoiceNumber = "Inv0001",
                DocumentHead  = new LevelTwoData
                {
                    DutyAmount    = 100M,
                    FreightAmount = 110M,
                    OrderDate     = DateTime.Now,
                    PONumber      = "Po0013",
                    TaxAmount     = 43.98M,
                }
            };
        }
Esempio n. 2
0
        public void TestInit()
        {
            TestServices.InitializeService();

            var _payFabricOptions = TestServices.ServiceProvider.GetService <IOptions <PayFabricOptions> >().Value;

            _paymentService = TestServices.ServiceProvider.GetService <IPaymentService>();

            if (string.Compare(_payFabricOptions.SetupId, "AuthorizeNet", true) == 0)
            {
                isAuthorizeNet = true;
            }
            _amount   = 40.0M;
            _currency = "USD";
            _address  = new Address
            {
                City    = "Wheaton",
                Country = "USA",
                Email   = "*****@*****.**"
            };

            _badcard = new Card
            {
                CardHolder = new CardHolder
                {
                    FirstName = "PantsON",
                    LastName  = "Fire",
                },
                Account        = "4583194798565295",
                Cvc            = "532",
                ExpirationDate = "0925",
                Billto         = new Address
                {
                    City    = "Wheton",
                    Country = "USA",
                    Line1   = "218 Esat Avenue",
                    State   = "IL",
                    Zip     = "60139",
                    Email   = "*****@*****.**"
                }
            };

            _goodcard = new Card
            {
                CardHolder = new CardHolder
                {
                    FirstName = "PantsON",
                    LastName  = "Fire",
                },

                Account        = "4111111111111111",
                Cvc            = "532",
                ExpirationDate = "0925",
                Billto         = new Address
                {
                    City    = "wheaton",
                    Country = "USA",
                    Line1   = "1953 Wexford Cir",
                    State   = "IL",
                    Zip     = "60189",
                    Email   = "*****@*****.**"
                },
                Tender = TenderTypeEnum.CreditCard
            };

            _extendedInformation = new ExtendedInformation
            {
                Customer      = "TESTAUTO",
                InvoiceNumber = "Inv0001",
                DocumentHead  = new LevelTwoData
                {
                    DutyAmount    = 100M,
                    FreightAmount = 110M,
                    OrderDate     = DateTime.Now,
                    PONumber      = "Po0013",
                    TaxAmount     = 43.98M,
                }
            };
        }