Example #1
0
        public NWSCheckTests()
        {
            AcceptorConfig acceptorConfig = new AcceptorConfig
            {
                // data code values
                CardDataInputCapability            = CardDataInputCapability.ContactlessEmv_ContactEmv_MagStripe_KeyEntry,
                CardHolderAuthenticationCapability = CardHolderAuthenticationCapability.PIN,
                CardHolderAuthenticationEntity     = CardHolderAuthenticationEntity.ByMerchant,
                TerminalOutputCapability           = TerminalOutputCapability.Printing_Display,
                OperatingEnvironment = OperatingEnvironment.OnPremises_CardAcceptor_Unattended,

                // hardware software config values
                HardwareLevel = "34",
                SoftwareLevel = "21205710",

                // pos configuration values
                SupportsPartialApproval            = true,
                SupportsShutOffAmount              = true,
                SupportsReturnBalance              = true,
                SupportsDiscoverNetworkReferenceId = true,
                SupportsAvsCnvVoidReferrals        = true,
                SupportsEmvPin = true
            };

            // gateway config

            NetworkGatewayConfig config = new NetworkGatewayConfig(NetworkGatewayType.NWS)
            {
                ServiceUrl        = "test.txns-c.secureexchange.net",
                PrimaryPort       = 15031,
                SecondaryEndpoint = "test.txns-e.secureexchange.net",
                SecondaryPort     = 15031,
                CompanyId         = "SPSA",
                TerminalId        = "NWSDOTNET01",
                //UniqueDeviceId = "0001",
                AcceptorConfig = acceptorConfig,
                EnableLogging  = true,
                StanProvider   = StanGenerator.GetInstance(),
                BatchProvider  = BatchProvider.GetInstance()
            };

            ServicesContainer.ConfigureService(config);

            // with merchant type
            config.MerchantType = "5542";
            ServicesContainer.ConfigureService(config, "ICR");

            address = new Address
            {
                StreetAddress1 = "123 Main St.",
                City           = "Downtown",
                State          = "NJ",
                PostalCode     = "12345"
            };

            //check = new eCheck { AccountNumber = "0273771700", AccountType = AccountType.CHECKING, AchVerify = false };
            check = TestChecks.Certification();
        }
Example #2
0
        public void checks_004ConsumerBusinessSavings()
        {
            var check    = TestChecks.Certification(SecCode.PPD, CheckType.BUSINESS, AccountType.SAVINGS);
            var response = check.Charge(14.00m)
                           .WithCurrency("USD")
                           .WithAddress(address)
                           .Execute();

            Assert.IsNotNull(response);
            Assert.AreEqual("00", response.ResponseCode);
        }
Example #3
0
        public void checks_022WebBuisnessChecking()
        {
            var check    = TestChecks.Certification(SecCode.WEB, CheckType.BUSINESS, AccountType.CHECKING);
            var response = check.Charge(24.00m)
                           .WithCurrency("USD")
                           .WithAddress(address)
                           .Execute();

            Assert.IsNotNull(response);
            Assert.AreEqual("00", response.ResponseCode);
        }
Example #4
0
        public void checks_021WebPersonalChecking()
        {
            var check    = TestChecks.Certification(SecCode.WEB, CheckType.PERSONAL, AccountType.CHECKING);
            var response = check.Charge(23.00m)
                           .WithCurrency("USD")
                           .WithAddress(address)
                           .Execute();

            Assert.IsNotNull(response);
            Assert.AreEqual("00", response.ResponseCode);
        }
Example #5
0
        public void checks_015EsilverPersonalSavings()
        {
            var check    = TestChecks.Certification(SecCode.POP, CheckType.PERSONAL, AccountType.SAVINGS);
            var response = check.Charge(17.00m)
                           .WithCurrency("USD")
                           .WithAddress(address)
                           .Execute();

            Assert.IsNotNull(response);
            Assert.AreEqual("00", response.ResponseCode);
        }
Example #6
0
        public void checks_008CorporateBuisnessSavings()
        {
            var check    = TestChecks.Certification(SecCode.CCD, CheckType.BUSINESS, AccountType.SAVINGS, "Heartland Pays");
            var response = check.Charge(18.00m)
                           .WithCurrency("USD")
                           .WithAddress(address)
                           .Execute();

            Assert.IsNotNull(response);
            Assert.AreEqual("00", response.ResponseCode);
        }
Example #7
0
        public void checks_020EbronzeBusinessSavings()
        {
            var check = TestChecks.Certification(SecCode.EBRONZE, CheckType.BUSINESS, AccountType.SAVINGS);

            check.CheckVerify = true;
            var response = check.Charge(22.00m)
                           .WithCurrency("USD")
                           .WithAddress(address)
                           .Execute();

            Assert.IsNotNull(response);
            Assert.AreEqual("00", response.ResponseCode);
        }
Example #8
0
        public void checks_019EbronzePersonalChecking()
        {
            var check = TestChecks.Certification(SecCode.EBRONZE, CheckType.PERSONAL, AccountType.SAVINGS);

            check.CheckVerify = true;
            var response = check.Charge(21.00m)
                           .WithCurrency("USD")
                           .WithAddress(address)
                           .Execute();

            Assert.IsNotNull(response);
            Assert.AreEqual("00", response.ResponseCode);
        }
Example #9
0
        public void checks_005CorporatePersonalChecking()
        {
            var check    = TestChecks.Certification(SecCode.CCD, CheckType.PERSONAL, AccountType.CHECKING, "Heartland Pays");
            var response = check.Charge(15.00m)
                           .WithCurrency("USD")
                           .WithAddress(address)
                           .Execute();

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

            // test case 26
            var voidResponse = response.Void().Execute();

            Assert.IsNotNull(voidResponse);
            Assert.AreEqual("00", response.ResponseCode);
        }
Example #10
0
        public void checks_023WebPersonalSavings()
        {
            var check    = TestChecks.Certification(SecCode.WEB, CheckType.PERSONAL, AccountType.SAVINGS);
            var response = check.Charge(25.00m)
                           .WithCurrency("USD")
                           .WithAddress(address)
                           .Execute();

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

            // test case 29
            var voidResponse = response.Void().Execute();

            Assert.IsNotNull(voidResponse);
            Assert.AreEqual("00", response.ResponseCode);
        }
Example #11
0
        public void checks_014EsilverBuisnessChecking()
        {
            var check    = TestChecks.Certification(SecCode.POP, CheckType.BUSINESS, AccountType.CHECKING);
            var response = check.Charge(16.00m)
                           .WithCurrency("USD")
                           .WithAddress(address)
                           .Execute();

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

            // test case 28
            var voidResponse = response.Void().Execute();

            Assert.IsNotNull(voidResponse);
            Assert.AreEqual("00", response.ResponseCode);
        }
Example #12
0
        public void checks_001ConsumerPersonalChecking()
        {
            var check = TestChecks.Certification(SecCode.PPD, CheckType.PERSONAL, AccountType.CHECKING);

            var response = check.Charge(11.00m)
                           .WithCurrency("USD")
                           .WithAddress(address)
                           .Execute();

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

            // test case 25
            var voidResponse = response.Void().Execute();

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