Beispiel #1
0
        public void debitSaleWithNewCryptoURL()
        {
            ServicesContainer.ConfigureService(new GatewayConfig
            {
                SecretApiKey = "skapi_cert_MaePAQBr-1QAqjfckFC8FTbRTT120bVQUlfVOjgCBw",
                ServiceUrl   = "https://cert.api2-c.heartlandportico.com"
            });

            track = new DebitTrackData
            {
                Value          = "<E1050711%B4012001000000016^VI TEST CREDIT^251200000000000000000000?|LO04K0WFOmdkDz0um+GwUkILL8ZZOP6Zc4rCpZ9+kg2T3JBT4AEOilWTI|+++++++Dbbn04ekG|11;4012001000000016=25120000000000000000?|1u2F/aEhbdoPixyAPGyIDv3gBfF|+++++++Dbbn04ekG|00|||/wECAQECAoFGAgEH2wYcShV78RZwb3NAc2VjdXJlZXhjaGFuZ2UubmV0PX50qfj4dt0lu9oFBESQQNkpoxEVpCW3ZKmoIV3T93zphPS3XKP4+DiVlM8VIOOmAuRrpzxNi0TN/DWXWSjUC8m/PI2dACGdl/hVJ/imfqIs68wYDnp8j0ZfgvM26MlnDbTVRrSx68Nzj2QAgpBCHcaBb/FZm9T7pfMr2Mlh2YcAt6gGG1i2bJgiEJn8IiSDX5M2ybzqRT86PCbKle/XCTwFFe1X|>",
                PinBlock       = "32539F50C245A6A93D123412324000AA",
                EncryptionData = new EncryptionData
                {
                    Version = "01"
                }
            };
            var response = track.Charge(17.01m)
                           .WithCurrency("USD")
                           .WithAllowDuplicates(true)
                           .Execute();

            Assert.IsNotNull(response);
            Assert.AreEqual("00", response.ResponseCode, response.ResponseMessage);
        }
Beispiel #2
0
        public void Sale_Swipe()
        {
            var response = track.Charge(10m)
                           .WithCurrency("USD")
                           .Execute();

            Assert.IsNotNull(response);
            Assert.AreEqual("00", response.ResponseCode, response.ResponseMessage);
        }
Beispiel #3
0
        public void DebitSale()
        {
            var response = track.Charge(17.01m)
                           .WithCurrency("USD")
                           .WithAllowDuplicates(true)
                           .Execute();

            Assert.IsNotNull(response);
            Assert.AreEqual("00", response.ResponseCode, response.ResponseMessage);
        }
        public void DebitInteracPosNumber()
        {
            var response = track.Charge(8m)
                           .WithCurrency("USD")
                           .WithAllowDuplicates(true)
                           .WithPosSequenceNumber("000010010770")
                           .WithTagData(tagData)
                           .Execute();

            Assert.IsNotNull(response);
            Assert.AreEqual("00", response.ResponseCode, response.ResponseMessage);
        }
Beispiel #5
0
        public void WFRC_Response_Tests_Sale()
        {
            Transaction response = track.Charge(10m)
                                   .WithCurrency("USD")
                                   .Execute();

            Assert.IsNotNull(response);
            System.Diagnostics.Debug.WriteLine(response.ResponseMessage);
            System.Diagnostics.Debug.WriteLine(response.HostResponseDate);
            System.Diagnostics.Debug.WriteLine(response.SystemTraceAuditNumber);
        }
        public void DebitSaleSwipe()
        {
            var track = new DebitTrackData {
                Value       = "%B4012002000060016^VI TEST CREDIT^251210118039000000000396?;4012002000060016=25121011803939600000?",
                PinBlock    = "32539F50C245A6A93D123412324000AA",
                EntryMethod = EntryMethod.Swipe,
            };
            var response = track.Charge(17.01m)
                           .WithCurrency("USD")
                           .WithAllowDuplicates(true)
                           .Execute();

            Assert.IsNotNull(response);
            Assert.AreEqual(SUCCESS, response?.ResponseCode);
            Assert.AreEqual(GetMapping(TransactionStatus.Captured), response?.ResponseMessage);
        }
        public void DebitSaleContactlessChip_NewDebitTrackDataDetails()
        {
            var debitTrack = new DebitTrackData {
                Value       = ";4024720012345671=18125025432198712345?",
                PinBlock    = "AFEC374574FC90623D010000116001EE",
                EntryMethod = EntryMethod.Proximity
            };
            const string tag = "82021C008407A0000002771010950580000000009A031709289C01005F280201245F2A0201245F3401019F02060000000010009F03060000000000009F080200019F090200019F100706010A03A420009F1A0201249F26089CC473F4A4CE18D39F2701809F3303E0F8C89F34030100029F3501229F360200639F370435EFED379F410400000019";

            var response = debitTrack.Charge(amount)
                           .WithCurrency(currency)
                           .WithTagData(tag)
                           .Execute();

            AssertTransactionResponse(response, TransactionStatus.Captured);
            Assert.AreEqual("DEBIT", response.CardType);
        }
Beispiel #8
0
        private Transaction DebitSale(double amount)
        {
            DebitTrackData track = TestCards.AsDebit(TestCards.VisaSwipe(), "32539F50C245A6A93D123412324000AA");

            AuthorizationBuilder builder = track.Charge(new decimal(amount))
                                           .WithCurrency("USD");

            if (configName.Equals("NoBatch"))
            {
                builder.WithBatchNumber(batchProvider.GetBatchNumber(), batchProvider.GetSequenceNumber());
            }

            Transaction response = builder.Execute(configName);

            Assert.IsNotNull(response);
            Assert.AreEqual("000", response.ResponseCode);
            return(response);
        }
Beispiel #9
0
        public void Test_Indoor_Discover_E2E_50()
        {
            DebitTrackData track = new DebitTrackData
            {
                Value    = ";6510000000000018=23122011000010600000?",
                PinBlock = "62968D2481D231E1A504010024A00014"
            };

            Transaction response = track.Charge(79m)
                                   .WithCurrency("USD")
                                   .WithTagData("5F280208409F080200024F07A0000001523010500A4D617374657243617264820238008407A00000015230108E0A00000000000000001F00950500008080009A031901099B02E8009C01405F24032212315F25030401015F2A0208405F300202015F3401009F01060000000000019F02060000000006009F03060000000000009F0607A00000015230109F0702FF009F090200029F0D05B8508000009F0E0500000000009F0F05B8708098009F10080105A000030000009F120A4D6173746572436172649F160F3132333435363738393031323334359F1A0208409F1C0831313232333334349F1E0831323334353637389F21030710109F26080631450565A30B759F2701809F330360F0C89F34033F00019F3501219F360200049F3704C6B1A04F9F3901059F4005F000A0B0019F4104000000869F4C0865C862608A23945A9F4E0D54657374204D65726368616E74")
                                   .Execute();

            Assert.IsNotNull(response);
            System.Diagnostics.Debug.WriteLine(response.HostResponseDate);
            System.Diagnostics.Debug.WriteLine(response.SystemTraceAuditNumber);
            Assert.AreEqual("000", response.ResponseCode);
        }
        public void DebitSale()
        {
            var response = track.Charge(17.01m)
                           .WithCurrency("USD")
                           .WithAllowDuplicates(true)
                           .WithAddress(new Address
            {
                City        = "Lake Forest",
                Country     = "United States",
                CountryCode = "US",
                PostalCode  = "92630",
                Province    = "CA"
            })
                           .Execute();

            Assert.IsNotNull(response);
            Assert.AreEqual("00", response.ResponseCode, response.ResponseMessage);
        }
        public void DebitSaleSwipeEncrypted()
        {
            var track = new DebitTrackData {
                Value          = "<E1050711%B4012001000000016^VI TEST CREDIT^251200000000000000000000?|LO04K0WFOmdkDz0um+GwUkILL8ZZOP6Zc4rCpZ9+kg2T3JBT4AEOilWTI|+++++++Dbbn04ekG|11;4012001000000016=25120000000000000000?|1u2F/aEhbdoPixyAPGyIDv3gBfF|+++++++Dbbn04ekG|00|||/wECAQECAoFGAgEH2wYcShV78RZwb3NAc2VjdXJlZXhjaGFuZ2UubmV0PX50qfj4dt0lu9oFBESQQNkpoxEVpCW3ZKmoIV3T93zphPS3XKP4+DiVlM8VIOOmAuRrpzxNi0TN/DWXWSjUC8m/PI2dACGdl/hVJ/imfqIs68wYDnp8j0ZfgvM26MlnDbTVRrSx68Nzj2QAgpBCHcaBb/FZm9T7pfMr2Mlh2YcAt6gGG1i2bJgiEJn8IiSDX5M2ybzqRT86PCbKle/XCTwFFe1X|>",
                PinBlock       = "32539F50C245A6A93D123412324000AA",
                EntryMethod    = EntryMethod.Swipe,
                EncryptionData = new EncryptionData {
                    Version = "01"
                }
            };
            var response = track.Charge(17.01m)
                           .WithCurrency("USD")
                           .WithAllowDuplicates(true)
                           .Execute();

            Assert.IsNotNull(response);
            Assert.AreEqual(SUCCESS, response?.ResponseCode);
            Assert.AreEqual(GetMapping(TransactionStatus.Captured), response?.ResponseMessage);
        }
        public void DebitSaleContactlessChip()
        {
            var track = new DebitTrackData {
                Value       = ";4024720012345671=18125025432198712345?",
                EntryMethod = EntryMethod.Proximity,
                PinBlock    = "AFEC374574FC90623D010000116001EE"
            };

            string tagData = "82021C008407A0000002771010950580000000009A031709289C01005F280201245F2A0201245F3401019F02060000000010009F03060000000000009F080200019F090200019F100706010A03A420009F1A0201249F26089CC473F4A4CE18D39F2701809F3303E0F8C89F34030100029F3501229F360200639F370435EFED379F410400000019";

            var response = track.Charge(25.95m)
                           .WithCurrency("USD")
                           .WithAllowDuplicates(true)
                           .WithTagData(tagData)
                           .Execute();

            Assert.IsNotNull(response);
            Assert.AreEqual(SUCCESS, response?.ResponseCode);
            Assert.AreEqual(GetMapping(TransactionStatus.Captured), response?.ResponseMessage);
        }
Beispiel #13
0
        public void CloseBatch_ContactlessTransaction()
        {
            var debitCard = new DebitTrackData {
                Value       = ";4024720012345671=18125025432198712345?",
                EntryMethod = EntryMethod.Proximity,
                PinBlock    = "AFEC374574FC90623D010000116001EE"
            };

            var transaction = debitCard.Charge(1.99m)
                              .WithCurrency(CURRENCY)
                              .WithTagData(TAG_DATA)
                              .Execute();

            AssertTransactionResponse(transaction, TransactionStatus.Captured);

            //TODO - remove when api fix polling issue
            Thread.Sleep(1000);

            var batchSummary = BatchService.CloseBatch(transaction.BatchSummary.BatchReference);

            AssertBatchCloseResponse(batchSummary, 1.99m);
        }
Beispiel #14
0
        public void CloseBatch_DebitTrackData()
        {
            var debitCard = new DebitTrackData {
                Value =
                    "%B4012002000060016^VI TEST CREDIT^251210118039000000000396?;4012002000060016=25121011803939600000?",
                PinBlock    = "32539F50C245A6A93D123412324000AA",
                EntryMethod = EntryMethod.Swipe,
            };

            var transaction = debitCard.Charge(1.99m)
                              .WithCurrency(CURRENCY)
                              .Execute();

            AssertTransactionResponse(transaction, TransactionStatus.Captured);

            //TODO - remove when api fix polling issue
            Thread.Sleep(1000);

            var batchSummary = BatchService.CloseBatch(transaction.BatchSummary.BatchReference);

            AssertBatchCloseResponse(batchSummary, 1.99m);
        }
        public void Test_150_sale()
        {
            Transaction response = track.Charge(10m)
                                   .WithCurrency("USD")
                                   .Execute();

            Assert.IsNotNull(response);

            // check message data
            PriorMessageInformation pmi = response.MessageInformation;

            Assert.IsNotNull(pmi);
            Assert.AreEqual("1200", pmi.MessageTransactionIndicator);
            Assert.AreEqual("000800", pmi.ProcessingCode);
            Assert.AreEqual("200", pmi.FunctionCode);

            // check response
            Assert.AreEqual("000", response.ResponseCode);
            System.Diagnostics.Debug.WriteLine(response.HostResponseDate);
            System.Diagnostics.Debug.WriteLine(response.SystemTraceAuditNumber);
        }