示例#1
0
        public void CloseBatch_Verify_MissingBatchId()
        {
            var transaction = creditCard.Verify()
                              .WithCurrency(CURRENCY)
                              .Execute();

            Assert.IsNotNull(transaction);
            Assert.AreEqual(SUCCESS, transaction?.ResponseCode);
            Assert.AreEqual(VERIFIED, transaction?.ResponseMessage);

            var exceptionCaught = false;

            try {
                BatchService.CloseBatch(transaction.BatchSummary.BatchReference);
            }
            catch (GatewayException ex) {
                exceptionCaught = true;
                Assert.AreEqual("MANDATORY_DATA_MISSING", ex.ResponseCode);
                Assert.AreEqual("40223", ex.ResponseMessage);
                Assert.AreEqual($"Status Code: BadRequest - Request expects the batch_id",
                                ex.Message);
            }
            finally {
                Assert.IsTrue(exceptionCaught);
            }
        }
        public void Verify_Swiped()
        {
            var response = track.Verify().Execute();

            Assert.IsNotNull(response);
            Assert.AreEqual("00", response.ResponseCode, response.ResponseMessage);
        }
        public void CreditVerify_CreditTrackDataDetails()
        {
            var response = creditTrackData.Verify()
                           .WithCurrency(currency)
                           .Execute();

            Assert.IsNotNull(response);
            Assert.AreEqual(SUCCESS, response?.ResponseCode);
            Assert.AreEqual(VERIFIED, response?.ResponseMessage);
        }
示例#4
0
        public void CreditTrackDataVerify()
        {
            var creditTrackData = new CreditTrackData {
                TrackData = "%B4012002000060016^VI TEST CREDIT^251210118039000000000396?;4012002000060016=25121011803939600000?"
            };
            var response = creditTrackData.Verify()
                           .WithCurrency("USD")
                           .Execute();

            Assert.IsNotNull(response);
            Assert.AreEqual(SUCCESS, response?.ResponseCode);
            Assert.AreEqual(VERIFIED, response?.ResponseMessage);
        }
        public void Test_005_swipe_verify()
        {
            Transaction response = track.Verify().Execute();

            Assert.IsNotNull(response);

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

            Assert.IsNotNull(pmi);
            Assert.AreEqual("1100", pmi.MessageTransactionIndicator);
            Assert.AreEqual("313000", pmi.ProcessingCode);
            Assert.AreEqual("108", pmi.FunctionCode);

            // check response
            Assert.AreEqual("000", response.ResponseCode);
        }
示例#6
0
        public void Test_005_swipe_verify()
        {
            Transaction response = track.Verify().Execute();

            Assert.IsNotNull(response);

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

            Assert.IsNotNull(pmi);
            Assert.AreEqual("1100", pmi.MessageTransactionIndicator);
            Assert.AreEqual("313000", pmi.ProcessingCode);
            Assert.AreEqual("108", pmi.FunctionCode);

            System.Diagnostics.Debug.WriteLine(response.HostResponseDate);
            System.Diagnostics.Debug.WriteLine(response.SystemTraceAuditNumber);

            // check response
            Assert.AreEqual("000", response.ResponseCode);
        }