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(); }
public NWSGiftTests() { AcceptorConfig acceptorConfig = new AcceptorConfig(); // data code values acceptorConfig.CardDataInputCapability = CardDataInputCapability.ContactlessEmv_ContactEmv_MagStripe_KeyEntry; acceptorConfig.CardHolderAuthenticationCapability = CardHolderAuthenticationCapability.PIN; acceptorConfig.TerminalOutputCapability = TerminalOutputCapability.Printing_Display; acceptorConfig.CardDataOutputCapability = CardDataOutputCapability.Unknown; acceptorConfig.PinCaptureCapability = PinCaptureCapability.Unknown; // hardware software config values acceptorConfig.HardwareLevel = "34"; acceptorConfig.SoftwareLevel = "21205710"; // pos configuration values acceptorConfig.SupportsPartialApproval = true; acceptorConfig.SupportsShutOffAmount = true; acceptorConfig.SupportsReturnBalance = true; acceptorConfig.SupportsDiscoverNetworkReferenceId = true; acceptorConfig.SupportsAvsCnvVoidReferrals = true; // gateway config NetworkGatewayConfig config = new NetworkGatewayConfig(NetworkGatewayType.NWS); config.ServiceUrl = "test.txns-c.secureexchange.net"; config.PrimaryPort = 15031; config.SecondaryEndpoint = "test.txns-e.secureexchange.net"; config.SecondaryPort = 15031; config.CompanyId = "SPSA"; config.TerminalId = "NWSDOTNET01"; config.AcceptorConfig = acceptorConfig; config.EnableLogging = true; config.StanProvider = StanGenerator.GetInstance(); config.BatchProvider = BatchProvider.GetInstance(); ServicesContainer.ConfigureService(config); config.MerchantType = "5542"; ServicesContainer.ConfigureService(config, "ICR"); config.NodeIdentification = "VLK2"; ServicesContainer.ConfigureService(config, "ValueLink"); // VALUE LINK //giftCard = TestCards.ValueLinkManual(); //giftCard = TestCards.ValueLinkSwipe(); // SVS //giftCard = TestCards.SvsManual(); giftCard = TestCards.SvsSwipe(); //GIFT CARD //giftCard = TestCards.GiftCardManual(); //giftCard = TestCards.GiftCardSwipe(); }
public NWSBatchTests() { Address address = new Address { Name = "My STORE", StreetAddress1 = "1 MY STREET", City = "MYTOWN", PostalCode = "90210", State = "KY", Country = "USA" }; AcceptorConfig acceptorConfig = new AcceptorConfig(); acceptorConfig.Address = address; // data code values acceptorConfig.CardDataInputCapability = CardDataInputCapability.ContactlessEmv_ContactEmv_MagStripe_KeyEntry; //acceptorConfig.OperatingEnvironment = OperatingEnvironment.OnPremises_CardAcceptor_Unattended; acceptorConfig.TerminalOutputCapability = TerminalOutputCapability.Printing_Display; // hardware software config values acceptorConfig.HardwareLevel = "34"; acceptorConfig.SoftwareLevel = "21205710"; acceptorConfig.OperatingSystemLevel = "00"; // pos configuration values acceptorConfig.SupportsPartialApproval = true; acceptorConfig.SupportsShutOffAmount = true; acceptorConfig.SupportsReturnBalance = true; acceptorConfig.SupportsDiscoverNetworkReferenceId = true; acceptorConfig.SupportsAvsCnvVoidReferrals = true; batchProvider = BatchProvider.GetInstance(); // gateway config NetworkGatewayConfig config = new NetworkGatewayConfig(NetworkGatewayType.NWS); config.SecondaryEndpoint = "test.txns-c.secureexchange.net"; config.PrimaryPort = 15031; config.ServiceUrl = "test.txns-e.secureexchange.net"; config.SecondaryPort = 15031; config.CompanyId = "SPSA"; config.TerminalId = "NWSDOTNET21"; config.UniqueDeviceId = "0001"; config.MerchantType = "5542"; config.AcceptorConfig = acceptorConfig; config.EnableLogging = true; config.StanProvider = StanGenerator.GetInstance(); config.BatchProvider = batchProvider; ServicesContainer.ConfigureService(config); config.BatchProvider = null; ServicesContainer.ConfigureService(config, "NoBatch"); }
public NWSAdministrativeTests() { AcceptorConfig acceptorConfig = new AcceptorConfig { // data code values CardDataInputCapability = CardDataInputCapability.ContactlessEmv_ContactEmv_MagStripe_KeyEntry, CardHolderAuthenticationCapability = CardHolderAuthenticationCapability.None, 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, // DE 43-34 Message Data EchoSettlementData = 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() }; _adminService = new AdminService(config); ServicesContainer.ConfigureService(config); // with merchant type config.MerchantType = "5542"; ServicesContainer.ConfigureService(config, "ICR"); // VISA card = TestCards.VisaManual(true, true); track = TestCards.VisaSwipe(); }
public GivenABatchProvider() { Repository = new Mock<IRepository>(); BatchConfiguration = new Mock<IBatchConfiguration>(); PeriodicBackoutCheck = new Mock<IPeriodicBackoutCheck>(); BatchConfiguration.SetupGet(b => b.BatchMessageCount).Returns(3); BatchConfiguration.SetupGet(b => b.BatchMessagesSize).Returns(1000); BatchConfiguration.SetupGet(b => b.BatchUrl).Returns(new Uri("http://post.com/api/batch")); BatchConfiguration.SetupGet(b => b.SubmitInterval).Returns(24 * 60 * 60 * 1000); Provider = new BatchProvider(Repository.Object, PeriodicBackoutCheck.Object, BatchConfiguration.Object); }
public NWSAvsTests() { AcceptorConfig acceptorConfig = new AcceptorConfig(); // data code values acceptorConfig.CardDataInputCapability = CardDataInputCapability.ContactlessEmv_ContactEmv_MagStripe_KeyEntry; acceptorConfig.CardHolderAuthenticationCapability = CardHolderAuthenticationCapability.PIN; acceptorConfig.CardHolderAuthenticationEntity = CardHolderAuthenticationEntity.ByMerchant; acceptorConfig.TerminalOutputCapability = TerminalOutputCapability.Printing_Display; acceptorConfig.OperatingEnvironment = OperatingEnvironment.OnPremises_CardAcceptor_Unattended; // hardware software config values acceptorConfig.HardwareLevel = "34"; acceptorConfig.SoftwareLevel = "21205710"; // pos configuration values acceptorConfig.SupportsPartialApproval = true; acceptorConfig.SupportsShutOffAmount = true; acceptorConfig.SupportsReturnBalance = true; acceptorConfig.SupportsDiscoverNetworkReferenceId = true; acceptorConfig.SupportsAvsCnvVoidReferrals = true; acceptorConfig.SupportsEmvPin = true; // gateway config NetworkGatewayConfig config = new NetworkGatewayConfig(NetworkGatewayType.NWS); config.ServiceUrl = "test.txns-c.secureexchange.net"; config.PrimaryPort = 15031; config.SecondaryEndpoint = "test.txns-e.secureexchange.net"; config.SecondaryPort = 15031; config.CompanyId = "SPSA"; config.TerminalId = "NWSDOTNET02"; config.AcceptorConfig = acceptorConfig; config.EnableLogging = true; config.StanProvider = StanGenerator.GetInstance(); config.BatchProvider = BatchProvider.GetInstance(); ServicesContainer.ConfigureService(config); // with merchant type config.MerchantType = "5542"; ServicesContainer.ConfigureService(config, "ICR"); }
/// <summary> /// Helper method for defining a <see cref="MergeStep"/> to migrate a batch of items. /// </summary> /// <typeparam name="TItem"></typeparam> /// <typeparam name="TItemCriteria"></typeparam> /// <param name="target"></param> /// <param name="stage"></param> /// <param name="batchProvider"></param> /// <param name="priorityFilter"></param> /// <param name="processAction"></param> /// <param name="context"></param> /// <returns></returns> protected int Migrate <TItem, TItemCriteria>( TTarget target, int stage, BatchProvider <TItem, TItemCriteria> batchProvider, Action <TItemCriteria> priorityFilter, Action <TTarget, TItem> processAction, IPersistenceContext context) { // get batch var batch = batchProvider(target, priorityFilter, _itemsPerTransaction, context); // process items foreach (var item in batch) { processAction(target, item); } // if any items were processed in this batch, there may be more items // so remain at the same stage // if no items were processed, advance to the next stage return((batch.Count > 0) ? stage : stage + 1); }
public NWSWexEMVTests() { AcceptorConfig acceptorConfig = new AcceptorConfig(); // data code values acceptorConfig.CardDataInputCapability = CardDataInputCapability.ContactlessEmv_ContactEmv_MagStripe_KeyEntry; acceptorConfig.CardHolderAuthenticationCapability = CardHolderAuthenticationCapability.PIN; acceptorConfig.CardHolderAuthenticationEntity = CardHolderAuthenticationEntity.ByMerchant; acceptorConfig.TerminalOutputCapability = TerminalOutputCapability.Printing_Display; // hardware software config values acceptorConfig.HardwareLevel = "34"; acceptorConfig.SoftwareLevel = "21205710"; // pos configuration values acceptorConfig.SupportsShutOffAmount = true; acceptorConfig.SupportsDiscoverNetworkReferenceId = true; acceptorConfig.SupportsAvsCnvVoidReferrals = true; acceptorConfig.SupportedEncryptionType = EncryptionType.TEP2; acceptorConfig.SupportsEmvPin = true; // gateway config NetworkGatewayConfig config = new NetworkGatewayConfig(NetworkGatewayType.NWS); config.ServiceUrl = "test.txns-c.secureexchange.net"; config.PrimaryPort = 15031; config.SecondaryEndpoint = "test.txns-e.secureexchange.net"; config.SecondaryPort = 15031; config.UniqueDeviceId = "2001"; config.CompanyId = "SPSA"; config.TerminalId = "JOSHUA3"; config.AcceptorConfig = acceptorConfig; config.EnableLogging = true; config.StanProvider = StanGenerator.GetInstance(); config.BatchProvider = BatchProvider.GetInstance(); config.MerchantType = "5541"; ServicesContainer.ConfigureService(config); }
public NWSTimeoutTests() { AcceptorConfig acceptorConfig = new AcceptorConfig(); acceptorConfig.HardwareLevel = "3750"; acceptorConfig.SoftwareLevel = "04010031"; acceptorConfig.OperatingSystemLevel = "Q50016A6"; NetworkGatewayConfig config = new NetworkGatewayConfig(NetworkGatewayType.NWS); config.ServiceUrl = "test.txns-c.secureexchange.net"; config.PrimaryPort = 15031; config.SecondaryEndpoint = "test.txns-e.secureexchange.net"; config.SecondaryPort = 15031; config.CompanyId = "SPSA"; config.TerminalId = "NWSDOTNET01"; config.AcceptorConfig = acceptorConfig; config.StanProvider = StanGenerator.GetInstance(); config.BatchProvider = BatchProvider.GetInstance(); config.EnableLogging = true; ServicesContainer.ConfigureService(config); }
public NWSEMVTests() { Address address = new Address { Name = "My STORE", StreetAddress1 = "1 MY STREET", City = "MYTOWN", PostalCode = "90210", State = "KY", Country = "USA" }; AcceptorConfig acceptorConfig = new AcceptorConfig { Address = address, // data code values CardDataInputCapability = CardDataInputCapability.ContactlessEmv_ContactEmv_MagStripe_KeyEntry, // Inside //CardDataInputCapability = CardDataInputCapability.ContactlessEmv_ContactEmv_MagStripe, // Outside 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 = false, SupportsShutOffAmount = true, SupportsReturnBalance = true, SupportsDiscoverNetworkReferenceId = true, SupportsAvsCnvVoidReferrals = true, SupportsEmvPin = true, // DE 43-34 Message Data EchoSettlementData = 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 = "NWSDOTNET21", 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"); }
public NWSCreditTests() { Address address = new Address { Name = "My STORE", StreetAddress1 = "1 MY STREET", City = "MYTOWN", PostalCode = "90210", State = "KY", Country = "USA" }; AcceptorConfig acceptorConfig = new AcceptorConfig { Address = address, // data code values CardDataInputCapability = CardDataInputCapability.ContactlessEmv_ContactEmv_MagStripe_KeyEntry, // Inside //CardDataInputCapability = CardDataInputCapability.ContactlessEmv_ContactEmv_MagStripe, // Outside 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 = false, SupportsShutOffAmount = true, SupportsReturnBalance = true, SupportsDiscoverNetworkReferenceId = true, SupportsAvsCnvVoidReferrals = true, SupportsEmvPin = true, // DE 43-34 Message Data EchoSettlementData = 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"); // VISA card = TestCards.VisaManual(true, true); track = TestCards.VisaSwipe(); // VISA CORPORATE //card = TestCards.VisaCorporateManual(true, true); //track = TestCards.VisaCorporateSwipe(); // VISA PURCHASING //card = TestCards.VisaPurchasingManual(true, true); //track = TestCards.VisaPurchasingSwipe(); // MASTERCARD //card = TestCards.MasterCardManual(true, true); //track = TestCards.MasterCardSwipe(); // MASTERCARD PURCHASING //card = TestCards.MasterCardPurchasingManual(true, true); //track = TestCards.MasterCardPurchasingSwipe(); // MASTERCARD 2 //card = TestCards.MasterCard2Manual(true, true); //track = TestCards.MasterCard2Swipe(); // AMEX //card = TestCards.AmexManual(true, true); //track = TestCards.AmexSwipe(); // DISCOVER //card = TestCards.DiscoverManual(true, true); //track = TestCards.DiscoverSwipe(); //Visa ReadyLink //readylinkCard = TestCards.VisaReadyLinkManual(true, true); readylinkTrack = TestCards.VisaReadyLinkSwipe(); }
public NWSDebitTests() { Address address = new Address { Name = "My STORE", StreetAddress1 = "1 MY STREET", City = "MYTOWN", PostalCode = "90210", State = "KY", Country = "USA" }; AcceptorConfig acceptorConfig = new AcceptorConfig { Address = address, // data code values CardDataInputCapability = CardDataInputCapability.ContactlessEmv_ContactEmv_MagStripe_KeyEntry, TerminalOutputCapability = TerminalOutputCapability.Printing_Display, CardHolderAuthenticationCapability = CardHolderAuthenticationCapability.PIN, //CardHolderAuthenticationEntity = CardHolderAuthenticationEntity.AuthorizingAgent, //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 }; // 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"); // forced timeout config.ForceGatewayTimeout = true; ServicesContainer.ConfigureService(config, "timeout"); // debit card track = new DebitTrackData { Value = "4355567063338=2012101HJNw/ewskBgnZqkL", PinBlock = "62968D2481D231E1A504010024A00014", EncryptionData = EncryptionData.Version2("/wECAQEEAoFGAgEH4gcOTDT6jRZwb3NAc2VjdXJlZXhjaGFuZ2UubmV0m+/d4SO9TEshhRGUUQzVBrBvP/Os1qFx+6zdQp1ejjUCoDmzoUMbil9UG73zBxxTOy25f3Px0p8joyCh8PEWhADz1BkROJT3q6JnocQE49yYBHuFK0obm5kqUcYPfTY09vPOpmN+wp45gJY9PhkJF5XvPsMlcxX4/JhtCshegz4AYrcU/sFnI+nDwhy295BdOkVN1rn00jwCbRcE900kj3UsFfyc", "2") }; }
public NWSFleetTests() { AcceptorConfig acceptorConfig = new AcceptorConfig { // data code values CardDataInputCapability = CardDataInputCapability.ContactlessEmv_ContactEmv_MagStripe_KeyEntry, TerminalOutputCapability = TerminalOutputCapability.Printing_Display, CardHolderAuthenticationEntity = CardHolderAuthenticationEntity.ByMerchant, //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, SupportedEncryptionType = EncryptionType.TEP2 }; // 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 = "NWSDOTNET02", UniqueDeviceId = "0001", AcceptorConfig = acceptorConfig, EnableLogging = true, StanProvider = StanGenerator.GetInstance(), BatchProvider = BatchProvider.GetInstance() }; ServicesContainer.ConfigureService(config); config.MerchantType = "5542"; ServicesContainer.ConfigureService(config, "ICR"); // MASTERCARD FLEET card = TestCards.MasterCardFleetManual(true, true); track = TestCards.MasterCardFleetSwipe(); productData = new ProductData(ServiceLevel.FullServe, ProductCodeSet.Heartland); productData.Add("03", UnitOfMeasure.Gallons, 1, 10); // VOYAGER FLEET //card = TestCards.VoyagerManual(true, true); //track = TestCards.VoyagerSwipe(); fleetData = new FleetData { ServicePrompt = "0", //fleetData.DriverId = "5500"; //fleetData.VehicleNumber = "1111"; OdometerReading = "1256" }; // VISA //card = TestCards.VisaFleetManual(true, true); //track = TestCards.VisaFleetSwipe(); //productData = new ProductData(ServiceLevel.FullServe, ProductCodeSet.Heartland); //productData.Add("01", UnitOfMeasure.Gallons, 1, 10); //FleetOne //card = TestCards.FleetOneManual(true, true); //track = TestCards.FleetOneSwipe(); }
public void WhenConstructingShouldNotThrow() { this.Provider = new BatchProvider(this.Repository.Object, this.PeriodicBackoutCheck.Object); Assert.NotNull(this.Provider); Assert.NotNull(this.BatchConfiguration); }
public NWSEncryptionTests() { Address address = new Address(); address.Name = "My STORE"; address.StreetAddress1 = "1 MY STREET"; address.City = "MYTOWN"; address.PostalCode = "90210"; address.State = "KY"; address.Country = "USA"; AcceptorConfig acceptorConfig = new AcceptorConfig(); acceptorConfig.Address = address; // data code values acceptorConfig.CardDataInputCapability = CardDataInputCapability.ContactlessEmv_ContactEmv_MagStripe_KeyEntry; acceptorConfig.TerminalOutputCapability = TerminalOutputCapability.Printing_Display; // hardware software config values acceptorConfig.HardwareLevel = "34"; acceptorConfig.SoftwareLevel = "21205710"; // pos configuration values acceptorConfig.SupportsPartialApproval = true; acceptorConfig.SupportsShutOffAmount = true; acceptorConfig.SupportsReturnBalance = true; acceptorConfig.SupportsDiscoverNetworkReferenceId = true; acceptorConfig.SupportsAvsCnvVoidReferrals = true; acceptorConfig.SupportedEncryptionType = EncryptionType.TEP2; // gateway config NetworkGatewayConfig config = new NetworkGatewayConfig(NetworkGatewayType.NWS); config.ServiceUrl = "test.txns-c.secureexchange.net"; config.PrimaryPort = 15031; config.SecondaryEndpoint = "test.txns-e.secureexchange.net"; config.SecondaryPort = 15031; config.CompanyId = "SPSA"; config.TerminalId = "NWSDOTNET01"; config.AcceptorConfig = acceptorConfig; config.EnableLogging = true; config.StanProvider = StanGenerator.GetInstance(); config.BatchProvider = BatchProvider.GetInstance(); ServicesContainer.ConfigureService(config); // AMEX //card = TestCards.AmexManualEncrypted(); ////cardWithCvn = TestCards.AmexManualEncrypted(); ////cardWithCvn.Cvn = "9072488"; //track = TestCards.AmexSwipeEncrypted(); // DISCOVER card = TestCards.DiscoverManualEncrypted(); //cardWithCvn = TestCards.DiscoverManualEncrypted(); //cardWithCvn.Cvn = "703"; track = TestCards.DiscoverSwipeEncryptedV2(); // MASTERCARD //card = TestCards.MasterCardManualEncrypted(); ////cardWithCvn = TestCards.MasterCardManualEncrypted(); ////cardWithCvn.Cvn = "7803754"; //track = TestCards.MasterCardSwipeEncryptedV2(); // VISA //card = TestCards.VisaManualEncrypted(true, true); ////cardWithCvn = TestCards.VisaManualEncrypted(); ////cardWithCvn.Cvn = "7803754"; //track = TestCards.VisaSwipeEncryptedV2(); // DEBIT debit = new DebitTrackData(); debit.Value = ";6090001234567891=2112120000000000001?"; debit.PinBlock = "62968D2481D231E1A504010024A00014"; debit.EncryptionData = EncryptionData.Version2("/wECAQEEAoFGAgEH4gcOTDT6jRZwb3NAc2VjdXJlZXhjaGFuZ2UubmV0m+/d4SO9TEshhRGUUQzVBrBvP/Os1qFx+6zdQp1ejjUCoDmzoUMbil9UG73zBxxTOy25f3Px0p8joyCh8PEWhADz1BkROJT3q6JnocQE49yYBHuFK0obm5kqUcYPfTY09vPOpmN+wp45gJY9PhkJF5XvPsMlcxX4/JhtCshegz4AYrcU/sFnI+nDwhy295BdOkVN1rn00jwCbRcE900kj3UsFfyc", "2"); }
public NWSEwicTests() { Address address = new Address { Name = "My STORE", StreetAddress1 = "1 MY STREET", City = "MYTOWN", PostalCode = "90210", State = "KY", Country = "USA" }; AcceptorConfig acceptorConfig = new AcceptorConfig { Address = address, // data code values CardDataInputCapability = CardDataInputCapability.ContactlessEmv_ContactEmv_MagStripe_KeyEntry, TerminalOutputCapability = TerminalOutputCapability.Printing_Display, CardHolderAuthenticationEntity = CardHolderAuthenticationEntity.AuthorizingAgent, //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 }; // 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", MerchantType = "5541", EWICMerchantID = "123456789", AcceptorConfig = acceptorConfig, EnableLogging = true, StanProvider = StanGenerator.GetInstance(), BatchProvider = BatchProvider.GetInstance() }; ServicesContainer.ConfigureService(config); track = new EwicTrackData { Value = "6103189999903663=49121200001234", PinBlock = "12348D2481D231E1A504010024A00014", EntryMethod = EntryMethod.Swipe, //EncryptionData = EncryptionData.Version2("/wECAQEEAoFGAgEH4gcOTDT6jRZwb3NAc2VjdXJlZXhjaGFuZ2UubmV0m+/d4SO9TEshhRGUUQzVBrBvP/Os1qFx+6zdQp1ejjUCoDmzoUMbil9UG73zBxxTOy25f3Px0p8joyCh8PEWhADz1BkROJT3q6JnocQE49yYBHuFK0obm5kqUcYPfTY09vPOpmN+wp45gJY9PhkJF5XvPsMlcxX4/JhtCshegz4AYrcU/sFnI+nDwhy295BdOkVN1rn00jwCbRcE900kj3UsFfyc", "2") }; card = new EwicCardData { Number = "6103189999903663", ExpMonth = 12, ExpYear = 2049, PinBlock = "12348D2481D231E1A504010024A00014" }; eWICData = new EWICData(); DE117_WIC_Data_Field_EA eaData = new DE117_WIC_Data_Field_EA() { CategoryCode = "2", SubCategoryCode = "2", BenefitQuantity = "500" }; //eWICData.Add(eaData); DE117_WIC_Data_Field_PS psData = new DE117_WIC_Data_Field_PS() { UPCData = "11110583000", ItemPrice = "100", PurchaseQuantity = "1500" }; eWICData.Add(psData); }