public void SimpleEcheckVerification()
        {
            EcheckVerification echeckVerificationObject = new EcheckVerification();
            echeckVerificationObject.Amount = 123456;
            echeckVerificationObject.OrderId = "12345";
            echeckVerificationObject.OrderSource = OrderSourceType.Ecommerce;

            EcheckType echeckTypeObj = new EcheckType();
            echeckTypeObj.AccType = EcheckAccountTypeEnum.Checking;
            echeckTypeObj.AccNum = "12345657890";
            echeckTypeObj.RoutingNum = "123456789";
            echeckTypeObj.CheckNum = "123455";

            Contact contactObj = new Contact();
            contactObj.Name = "Bob";
            contactObj.City = "lowell";
            contactObj.State = "MA";
            contactObj.Email = "litle.com";

            echeckVerificationObject.Echeck = echeckTypeObj;
            echeckVerificationObject.BillToAddress = contactObj;

            EcheckVerificationResponse response = litle.EcheckVerification(echeckVerificationObject);
            StringAssert.AreEqualIgnoringCase("Approved", response.Message);
        }
        public void EcheckSaleMissingBilling()
        {
            EcheckSale echeckSaleObj = new EcheckSale();
            echeckSaleObj.Amount = 123456;
            echeckSaleObj.OrderId = "12345";
            echeckSaleObj.OrderSource = OrderSourceType.Ecommerce;

            EcheckType echeckTypeObj = new EcheckType();
            echeckTypeObj.AccType = EcheckAccountTypeEnum.Checking;
            echeckTypeObj.AccNum = "12345657890";
            echeckTypeObj.RoutingNum = "123456789";
            echeckTypeObj.CheckNum = "123455";

            echeckSaleObj.Echeck = echeckTypeObj;

            try
            {
                //expected exception;
                EcheckSalesResponse response = litle.EcheckSale(echeckSaleObj);
            }
            catch (LitleOnlineException e)
            {
                Assert.True(e.Message.StartsWith("Error validating xml data against the schema"));
            }
        }
        public void echeckRedepositWithEcheck()
        {
            EcheckRedeposit echeckredeposit = new EcheckRedeposit();
            echeckredeposit.LitleTxnId = 123456;
            EcheckType echeck = new EcheckType();
            echeck.AccType = EcheckAccountTypeEnum.Checking;
            echeck.AccNum = "12345657890";
            echeck.RoutingNum = "123456789";
            echeck.CheckNum = "123455";

            echeckredeposit.Echeck = echeck;
            EcheckRedepositResponse response = litle.EcheckRedeposit(echeckredeposit);
            Assert.AreEqual("Approved", response.Message);
        }
        public void test37()
        {
            EcheckVerification verification = new EcheckVerification();
            verification.OrderId = "37";
            verification.Amount = 3001;
            verification.OrderSource = OrderSourceType.Telephone;
            Contact billToAddress = new Contact();
            billToAddress.FirstName = "Tom";
            billToAddress.LastName = "Black";
            verification.BillToAddress = billToAddress;
            EcheckType echeck = new EcheckType();
            echeck.AccNum = "10@BC99999";
            echeck.AccType = EcheckAccountTypeEnum.Checking;
            echeck.RoutingNum = "053100300";
            verification.Echeck = echeck;

            EcheckVerificationResponse response = litle.EcheckVerification(verification);
            Assert.AreEqual("301", response.Response);
            Assert.AreEqual("Invalid Account Number", response.Message);
        }
        public void test38()
        {
            EcheckVerification verification = new EcheckVerification();
            verification.OrderId = "38";
            verification.Amount = 3002;
            verification.OrderSource = OrderSourceType.Telephone;
            Contact billToAddress = new Contact();
            billToAddress.FirstName = "John";
            billToAddress.LastName = "Smith";
            billToAddress.Phone = "999-999-9999";
            verification.BillToAddress = billToAddress;
            EcheckType echeck = new EcheckType();
            echeck.AccNum = "1099999999";
            echeck.AccType = EcheckAccountTypeEnum.Checking;
            echeck.RoutingNum = "053000219";
            verification.Echeck = echeck;

            EcheckVerificationResponse response = litle.EcheckVerification(verification);
            Assert.AreEqual("000", response.Response);
            Assert.AreEqual("Approved", response.Message);
        }
 public void echeckCreditWithEcheck()
 {
     EcheckCredit echeckcredit = new EcheckCredit();
     echeckcredit.Amount = 12L;
     echeckcredit.OrderId = "12345";
     echeckcredit.OrderSource = OrderSourceType.Ecommerce;
     EcheckType echeck = new EcheckType();
     echeck.AccType = EcheckAccountTypeEnum.Checking;
     echeck.AccNum = "12345657890";
     echeck.RoutingNum = "123456789";
     echeck.CheckNum = "123455";
     echeckcredit.Echeck = echeck;
     Contact billToAddress = new Contact();
     billToAddress.Name = "Bob";
     billToAddress.City = "Lowell";
     billToAddress.State = "MA";
     billToAddress.Email = "litle.com";
     echeckcredit.BillToAddress = billToAddress;
     EcheckCreditResponse response = litle.EcheckCredit(echeckcredit);
     Assert.AreEqual("Approved", response.Message);
 }
        public void test47()
        {
            EcheckCredit credit = new EcheckCredit();
            credit.OrderId = "47";
            credit.Amount = 1007;
            credit.OrderSource = OrderSourceType.Telephone;
            Contact billToAddress = new Contact();
            billToAddress.FirstName = "Peter";
            billToAddress.LastName = "Green";
            billToAddress.CompanyName = "Green Co";
            credit.BillToAddress = billToAddress;
            EcheckType echeck = new EcheckType();
            echeck.AccNum = "6099999993";
            echeck.AccType = EcheckAccountTypeEnum.Corporate;
            echeck.RoutingNum = "211370545";
            credit.Echeck = echeck;

            EcheckCreditResponse response = litle.EcheckCredit(credit);
            Assert.AreEqual("000", response.Response);
            Assert.AreEqual("Approved", response.Message);
        }
        public void EcheckPreNoteTestAll()
        {
            BatchRequest litleBatchRequest = new BatchRequest();

            Contact billToAddress = new Contact();
            billToAddress.Name = "Mike";
            billToAddress.City = "Lowell";
            billToAddress.State = "MA";
            billToAddress.Email = "litle.com";

            EcheckType echeckSuccess = new EcheckType();
            echeckSuccess.AccType = EcheckAccountTypeEnum.Corporate;
            echeckSuccess.AccNum = "1092969901";
            echeckSuccess.RoutingNum = "011075150";
            echeckSuccess.CheckNum = "123456";

            EcheckType echeckRoutErr = new EcheckType();
            echeckRoutErr.AccType = EcheckAccountTypeEnum.Checking;
            echeckRoutErr.AccNum = "6099999992";
            echeckRoutErr.RoutingNum = "053133052";
            echeckRoutErr.CheckNum = "123457";

            EcheckType echeckAccErr = new EcheckType();
            echeckAccErr.AccType = EcheckAccountTypeEnum.Corporate;
            echeckAccErr.AccNum = "10@2969901";
            echeckAccErr.RoutingNum = "011100012";
            echeckAccErr.CheckNum = "123458";

            EcheckPreNoteSale echeckPreNoteSaleSuccess = new EcheckPreNoteSale();
            echeckPreNoteSaleSuccess.OrderId = "000";
            echeckPreNoteSaleSuccess.OrderSource = OrderSourceType.Ecommerce;
            echeckPreNoteSaleSuccess.Echeck = echeckSuccess;
            echeckPreNoteSaleSuccess.BillToAddress = billToAddress;
            litleBatchRequest.AddEcheckPreNoteSale(echeckPreNoteSaleSuccess);

            EcheckPreNoteSale echeckPreNoteSaleRoutErr = new EcheckPreNoteSale();
            echeckPreNoteSaleRoutErr.OrderId = "900";
            echeckPreNoteSaleRoutErr.OrderSource = OrderSourceType.Ecommerce;
            echeckPreNoteSaleRoutErr.Echeck = echeckRoutErr;
            echeckPreNoteSaleRoutErr.BillToAddress = billToAddress;
            litleBatchRequest.AddEcheckPreNoteSale(echeckPreNoteSaleRoutErr);

            EcheckPreNoteSale echeckPreNoteSaleAccErr = new EcheckPreNoteSale();
            echeckPreNoteSaleAccErr.OrderId = "301";
            echeckPreNoteSaleAccErr.OrderSource = OrderSourceType.Ecommerce;
            echeckPreNoteSaleAccErr.Echeck = echeckAccErr;
            echeckPreNoteSaleAccErr.BillToAddress = billToAddress;
            litleBatchRequest.AddEcheckPreNoteSale(echeckPreNoteSaleAccErr);

            EcheckPreNoteCredit echeckPreNoteCreditSuccess = new EcheckPreNoteCredit();
            echeckPreNoteCreditSuccess.OrderId = "000";
            echeckPreNoteCreditSuccess.OrderSource = OrderSourceType.Ecommerce;
            echeckPreNoteCreditSuccess.Echeck = echeckSuccess;
            echeckPreNoteCreditSuccess.BillToAddress = billToAddress;
            litleBatchRequest.AddEcheckPreNoteCredit(echeckPreNoteCreditSuccess);

            EcheckPreNoteCredit echeckPreNoteCreditRoutErr = new EcheckPreNoteCredit();
            echeckPreNoteCreditRoutErr.OrderId = "900";
            echeckPreNoteCreditRoutErr.OrderSource = OrderSourceType.Ecommerce;
            echeckPreNoteCreditRoutErr.Echeck = echeckRoutErr;
            echeckPreNoteCreditRoutErr.BillToAddress = billToAddress;
            litleBatchRequest.AddEcheckPreNoteCredit(echeckPreNoteCreditRoutErr);

            EcheckPreNoteCredit echeckPreNoteCreditAccErr = new EcheckPreNoteCredit();
            echeckPreNoteCreditAccErr.OrderId = "301";
            echeckPreNoteCreditAccErr.OrderSource = OrderSourceType.Ecommerce;
            echeckPreNoteCreditAccErr.Echeck = echeckAccErr;
            echeckPreNoteCreditAccErr.BillToAddress = billToAddress;
            litleBatchRequest.AddEcheckPreNoteCredit(echeckPreNoteCreditAccErr);

            litle.AddBatch(litleBatchRequest);

            LitleResponse litleResponse = litle.SendToLitleWithStream();

            Assert.NotNull(litleResponse);
            Assert.AreEqual("0", litleResponse.Response);
            Assert.AreEqual("Valid Format", litleResponse.Message);

            BatchResponse litleBatchResponse = litleResponse.NextBatchResponse();
            while (litleBatchResponse != null)
            {
                EcheckPreNoteSaleResponse echeckPreNoteSaleResponse = litleBatchResponse.NextEcheckPreNoteSaleResponse();
                while (echeckPreNoteSaleResponse != null)
                {
                    Assert.AreEqual(echeckPreNoteSaleResponse.OrderId, echeckPreNoteSaleResponse.Response);

                    echeckPreNoteSaleResponse = litleBatchResponse.NextEcheckPreNoteSaleResponse();
                }

                EcheckPreNoteCreditResponse echeckPreNoteCreditResponse = litleBatchResponse.NextEcheckPreNoteCreditResponse();
                while (echeckPreNoteCreditResponse != null)
                {
                    Assert.AreEqual(echeckPreNoteCreditResponse.OrderId, echeckPreNoteCreditResponse.Response);

                    echeckPreNoteCreditResponse = litleBatchResponse.NextEcheckPreNoteCreditResponse();
                }

                litleBatchResponse = litleResponse.NextBatchResponse();
            }
        }
        public void testEcheckVerification()
        {
            EcheckVerification echeckverification = new EcheckVerification();
            echeckverification.OrderId = "12345";
            echeckverification.Amount = 123456;
            echeckverification.OrderSource = OrderSourceType.Ecommerce;
            EcheckType echeck = new EcheckType();
            echeck.AccType = EcheckAccountTypeEnum.Checking;
            echeck.AccNum = "12345657890";
            echeck.RoutingNum = "123456789";
            echeck.CheckNum = "123455";
            echeckverification.Echeck = echeck;
            Contact contact = new Contact();
            contact.Name = "Bob";
            contact.City = "lowell";
            contact.State = "MA";
            contact.Email = "litle.com";
            echeckverification.BillToAddress = contact;

            var mock = new Mock<Communications>();

            mock.Setup(Communications => Communications.HttpPost(It.IsRegex("<litleOnlineRequest.*?<echeckVerification.*?<echeck>.*?<accNum>12345657890</accNum>.*?</echeck>.*?</echeckVerification>", RegexOptions.Singleline), It.IsAny<Dictionary<String, String>>()))
                .Returns("<litleOnlineResponse version='8.10' response='0' message='Valid Format' xmlns='http://www.litle.com/schema'><echeckVerificationResponse><litleTxnId>123</litleTxnId></echeckVerificationResponse></litleOnlineResponse>");

            Communications mockedCommunication = mock.Object;
            litle.SetCommunication(mockedCommunication);
            EcheckVerificationResponse echeckverificaitonresponse = litle.EcheckVerification(echeckverification);
            Assert.AreEqual(123, echeckverificaitonresponse.LitleTxnId);
        }
        public void testAddVendorDebit()
        {
            VendorDebit vendorDebit = new VendorDebit();
            vendorDebit.FundingSubmerchantId = "123456";
            vendorDebit.VendorName = "merchant";
            vendorDebit.FundsTransferId = "123467";
            vendorDebit.Amount = 106L;
            EcheckType echeck = new EcheckType();
            echeck.AccType = EcheckAccountTypeEnum.Checking;
            echeck.AccNum = "12345657890";
            echeck.RoutingNum = "123456789";
            echeck.CheckNum = "123455";
            vendorDebit.AccountInfo = echeck;

            batchRequest.AddVendorDebit(vendorDebit);

            Assert.AreEqual(1, batchRequest.GetNumVendorDebit());
            Assert.AreEqual(106L, batchRequest.GetVendorDebitAmount());

            mockLitleFile.Verify(litleFile => litleFile.CreateRandomFile(It.IsAny<String>(), It.IsAny<String>(), It.IsAny<String>(), mockLitleTime.Object));
            mockLitleFile.Verify(litleFile => litleFile.AppendLineToFile(mockFilePath, vendorDebit.Serialize()));
        }
        public void SimpleEcheckSaleWithSecondaryAmountWithOrderId()
        {
            EcheckSale echeckSaleObj = new EcheckSale();
            echeckSaleObj.Amount = 123456;
            echeckSaleObj.SecondaryAmount = 50;
            echeckSaleObj.OrderId = "12345";
            echeckSaleObj.OrderSource = OrderSourceType.Ecommerce;

            EcheckType echeckTypeObj = new EcheckType();
            echeckTypeObj.AccType = EcheckAccountTypeEnum.CorpSavings;
            echeckTypeObj.AccNum = "12345657890";
            echeckTypeObj.RoutingNum = "123456789";
            echeckTypeObj.CheckNum = "123455";

            Contact contactObj = new Contact();
            contactObj.Name = "Bob";
            contactObj.City = "lowell";
            contactObj.State = "MA";
            contactObj.Email = "litle.com";

            echeckSaleObj.Echeck = echeckTypeObj;
            echeckSaleObj.BillToAddress = contactObj;

            EcheckSalesResponse response = litle.EcheckSale(echeckSaleObj);
            StringAssert.AreEqualIgnoringCase("Approved", response.Message);
        }
        public void test41()
        {
            EcheckSale sale = new EcheckSale();
            sale.OrderId = "41";
            sale.Amount = 2008;
            sale.OrderSource = OrderSourceType.Telephone;
            Contact billToAddress = new Contact();
            billToAddress.FirstName = "Mike";
            billToAddress.MiddleInitial = "J";
            billToAddress.LastName = "Hammer";
            sale.BillToAddress = billToAddress;
            EcheckType echeck = new EcheckType();
            echeck.AccNum = "10@BC99999";
            echeck.AccType = EcheckAccountTypeEnum.Checking;
            echeck.RoutingNum = "053100300";
            sale.Echeck = echeck;

            EcheckSalesResponse response = litle.EcheckSale(sale);
            Assert.AreEqual("301", response.Response);
            Assert.AreEqual("Invalid Account Number", response.Message);
        }
        public void test40()
        {
            EcheckVerification verification = new EcheckVerification();
            verification.OrderId = "40";
            verification.Amount = 3004;
            verification.OrderSource = OrderSourceType.Telephone;
            Contact billToAddress = new Contact();
            billToAddress.FirstName = "Peter";
            billToAddress.LastName = "Green";
            billToAddress.CompanyName = "Green Co";
            billToAddress.Phone = "9999999999";
            verification.BillToAddress = billToAddress;
            EcheckType echeck = new EcheckType();
            echeck.AccNum = "8099999999";
            echeck.AccType = EcheckAccountTypeEnum.Corporate;
            echeck.RoutingNum = "063102152";
            verification.Echeck = echeck;

            EcheckVerificationResponse response = litle.EcheckVerification(verification);
            Assert.AreEqual("951", response.Response);
            Assert.AreEqual("Absolute Decline", response.Message);
        }
 public void missingBilling()
 {
     EcheckCredit echeckcredit = new EcheckCredit();
     echeckcredit.Amount = 12L;
     echeckcredit.OrderId = "12345";
     echeckcredit.OrderSource = OrderSourceType.Ecommerce;
     EcheckType echeck = new EcheckType();
     echeck.AccType = EcheckAccountTypeEnum.Checking;
     echeck.AccNum = "12345657890";
     echeck.RoutingNum = "123456789";
     echeck.CheckNum = "123455";
     echeckcredit.Echeck = echeck;
     try
     {
         litle.EcheckCredit(echeckcredit);
         Assert.Fail("Expected exception");
     }
     catch (LitleOnlineException e)
     {
         Assert.IsTrue(e.Message.Contains("Error validating xml data against the schema"));
     }
 }
        public void testEcheckPreNoteSale()
        {
            EcheckPreNoteSale echeckPreNoteSale = new EcheckPreNoteSale();
            echeckPreNoteSale.OrderId = "12345";
            echeckPreNoteSale.OrderSource = OrderSourceType.Ecommerce;
            EcheckType echeck = new EcheckType();
            echeck.AccType = EcheckAccountTypeEnum.Checking;
            echeck.AccNum = "12345657890";
            echeck.RoutingNum = "123456789";
            echeck.CheckNum = "123455";
            echeckPreNoteSale.Echeck = echeck;
            Contact contact = new Contact();
            contact.Name = "Bob";
            contact.City = "lowell";
            contact.State = "MA";
            contact.Email = "litle.com";
            echeckPreNoteSale.BillToAddress = contact;

            var mockLitleResponse = new Mock<LitleResponse>();
            var mockLitleXmlSerializer = new Mock<LitleXmlSerializer>();

            mockXmlReader.SetupSequence(XmlReader => XmlReader.ReadOuterXml())
                .Returns("<echeckPreNoteSaleResponse xmlns='http://www.litle.com/schema'><litleTxnId>123</litleTxnId></echeckPreNoteSaleResponse>")
                .Returns("<echeckPreNoteSaleResponse xmlns='http://www.litle.com/schema'><litleTxnId>124</litleTxnId></echeckPreNoteSaleResponse>");

            BatchResponse mockedLitleBatchResponse = new BatchResponse();
            mockedLitleBatchResponse.SetEcheckPreNoteSaleResponseReader(mockXmlReader.Object);

            mockLitleResponse.Setup(litleResponse => litleResponse.NextBatchResponse()).Returns(mockedLitleBatchResponse);
            LitleResponse mockedLitleResponse = mockLitleResponse.Object;

            Communications mockedCommunications = mockCommunications.Object;

            mockLitleXmlSerializer.Setup(litleXmlSerializer => litleXmlSerializer.DeserializeObjectFromFile(It.IsAny<String>())).Returns(mockedLitleResponse);
            LitleXmlSerializer mockedLitleXmlSerializer = mockLitleXmlSerializer.Object;

            LitleFile mockedLitleFile = mockLitleFile.Object;

            litle.SetCommunication(mockedCommunications);
            litle.SetLitleXmlSerializer(mockedLitleXmlSerializer);
            litle.SetLitleFile(mockedLitleFile);
            litle.SetLitleTime(mockLitleTime.Object);

            BatchRequest litleBatchRequest = new BatchRequest();
            litleBatchRequest.SetLitleFile(mockedLitleFile);
            litleBatchRequest.SetLitleTime(mockLitleTime.Object);
            litleBatchRequest.AddEcheckPreNoteSale(echeckPreNoteSale);
            litleBatchRequest.AddEcheckPreNoteSale(echeckPreNoteSale);
            litle.AddBatch(litleBatchRequest);

            string batchFileName = litle.SendToLitle();

            LitleResponse actualLitleResponse = litle.ReceiveFromLitle(batchFileName);
            BatchResponse actualLitleBatchResponse = actualLitleResponse.NextBatchResponse();
            EcheckPreNoteSaleResponse actualEcheckPreNoteSaleResponse1 = actualLitleBatchResponse.NextEcheckPreNoteSaleResponse();
            EcheckPreNoteSaleResponse actualEcheckPreNoteSaleResponse2 = actualLitleBatchResponse.NextEcheckPreNoteSaleResponse();
            EcheckPreNoteSaleResponse nullEcheckPreNoteSalesResponse = actualLitleBatchResponse.NextEcheckPreNoteSaleResponse();

            Assert.AreEqual(123, actualEcheckPreNoteSaleResponse1.LitleTxnId);
            Assert.AreEqual(124, actualEcheckPreNoteSaleResponse2.LitleTxnId);
            Assert.IsNull(nullEcheckPreNoteSalesResponse);

            mockCommunications.Verify(Communications => Communications.FtpDropOff(It.IsAny<String>(), mockFileName, It.IsAny<Dictionary<String, String>>()));
            mockCommunications.Verify(Communications => Communications.FtpPickUp(It.IsAny<String>(), It.IsAny<Dictionary<String, String>>(), mockFileName));
        }
        public void TestMissingBillingField()
        {
            EcheckVerification echeckVerificationObject = new EcheckVerification();
            echeckVerificationObject.ReportGroup = "Planets";
            echeckVerificationObject.Amount = 123;
            echeckVerificationObject.OrderId = "12345";
            echeckVerificationObject.OrderSource = OrderSourceType.Ecommerce;

            EcheckType echeckTypeObj = new EcheckType();
            echeckTypeObj.AccType = EcheckAccountTypeEnum.Checking;
            echeckTypeObj.AccNum = "12345657890";
            echeckTypeObj.RoutingNum = "123456789";
            echeckTypeObj.CheckNum = "123455";
            echeckVerificationObject.Echeck = echeckTypeObj;
            try
            {
                //expected exception;
                EcheckVerificationResponse response = litle.EcheckVerification(echeckVerificationObject);
            }
            catch (LitleOnlineException e)
            {
                Assert.True(e.Message.StartsWith("Error validating xml data against the schema"));
            }
        }
        public void test39()
        {
            EcheckVerification verification = new EcheckVerification();
            verification.OrderId = "39";
            verification.Amount = 3003;
            verification.OrderSource = OrderSourceType.Telephone;
            Contact billToAddress = new Contact();
            billToAddress.FirstName = "Robert";
            billToAddress.LastName = "Jones";
            billToAddress.CompanyName = "Good Goods Inc";
            billToAddress.Phone = "9999999999";
            verification.BillToAddress = billToAddress;
            EcheckType echeck = new EcheckType();
            echeck.AccNum = "3099999999";
            echeck.AccType = EcheckAccountTypeEnum.Corporate;
            echeck.RoutingNum = "053100300";
            verification.Echeck = echeck;

            EcheckVerificationResponse response = litle.EcheckVerification(verification);
            Assert.AreEqual("950", response.Response);
            Assert.AreEqual("Declined - Negative Information on File", response.Message);
        }
        public void EcheckSaleWithShipTo()
        {
            EcheckSale echeckSaleObj = new EcheckSale();
            echeckSaleObj.ReportGroup = "Planets";
            echeckSaleObj.Amount = 123456;
            echeckSaleObj.Verify = true;
            echeckSaleObj.OrderId = "12345";
            echeckSaleObj.OrderSource = OrderSourceType.Ecommerce;

            EcheckType echeckTypeObj = new EcheckType();
            echeckTypeObj.AccType = EcheckAccountTypeEnum.Checking;
            echeckTypeObj.AccNum = "12345657890";
            echeckTypeObj.RoutingNum = "123456789";
            echeckTypeObj.CheckNum = "123455";

            Contact contactObj = new Contact();
            contactObj.Name = "Bob";
            contactObj.City = "lowell";
            contactObj.State = "MA";
            contactObj.Email = "litle.com";

            echeckSaleObj.Echeck = echeckTypeObj;
            echeckSaleObj.BillToAddress = contactObj;
            echeckSaleObj.ShipToAddress = contactObj;

            EcheckSalesResponse response = litle.EcheckSale(echeckSaleObj);
            StringAssert.AreEqualIgnoringCase("Approved", response.Message);
        }
        public void test63()
        {
            EcheckSale sale = new EcheckSale();
            sale.OrderId = "63";
            sale.Amount = 15000;
            sale.OrderSource = OrderSourceType.Ecommerce;
            Contact billToAddress = new Contact();
            billToAddress.FirstName = "Tom";
            billToAddress.LastName = "Black";
            sale.BillToAddress = billToAddress;
            EcheckType echeck = new EcheckType();
            echeck.AccType = EcheckAccountTypeEnum.Checking; ;
            echeck.AccNum = "1099999999";
            echeck.RoutingNum = "214567892";
            sale.Echeck = echeck;

            EcheckSalesResponse response = litle.EcheckSale(sale);
            Assert.AreEqual("801", response.TokenResponse.TokenResponseCode);
            Assert.AreEqual("Account number was successfully registered", response.TokenResponse.TokenMessage);
            Assert.AreEqual(MethodOfPaymentTypeEnum.EC, response.TokenResponse.Type);
            Assert.AreEqual("999", response.TokenResponse.ECheckAccountSuffix);
            Assert.AreEqual("111922223333555999", response.TokenResponse.LitleToken);
        }
        public void InvalidCredientialsBatch()
        {
            LitleRequest litleIC = new LitleRequest(invalidConfig);

            BatchRequest litleBatchRequest = new BatchRequest();

            Authorization authorization = new Authorization();
            authorization.ReportGroup = "Planets";
            authorization.OrderId = "12344";
            authorization.Amount = 106;
            authorization.OrderSource = OrderSourceType.Ecommerce;
            CardType card = new CardType();
            card.Type = MethodOfPaymentTypeEnum.VI;
            card.Number = "4100000000000001";
            card.ExpDate = "1210";
            authorization.Card = card; //This needs to compile

            litleBatchRequest.AddAuthorization(authorization);

            Authorization authorization2 = new Authorization();
            authorization2.ReportGroup = "Planets";
            authorization2.OrderId = "12345";
            authorization2.Amount = 106;
            authorization2.OrderSource = OrderSourceType.Ecommerce;
            CardType card2 = new CardType();
            card2.Type = MethodOfPaymentTypeEnum.VI;
            card2.Number = "4242424242424242";
            card2.ExpDate = "1210";
            authorization2.Card = card2; //This needs to compile

            litleBatchRequest.AddAuthorization(authorization2);

            AuthReversal reversal = new AuthReversal();
            reversal.LitleTxnId = 12345678000L;
            reversal.Amount = 106;
            reversal.PayPalNotes = "Notes";

            litleBatchRequest.AddAuthReversal(reversal);

            AuthReversal reversal2 = new AuthReversal();
            reversal2.LitleTxnId = 12345678900L;
            reversal2.Amount = 106;
            reversal2.PayPalNotes = "Notes";

            litleBatchRequest.AddAuthReversal(reversal2);

            Capture capture = new Capture();
            capture.LitleTxnId = 123456000;
            capture.Amount = 106;
            capture.PayPalNotes = "Notes";

            litleBatchRequest.AddCapture(capture);

            Capture capture2 = new Capture();
            capture2.LitleTxnId = 123456700;
            capture2.Amount = 106;
            capture2.PayPalNotes = "Notes";

            litleBatchRequest.AddCapture(capture2);

            CaptureGivenAuth capturegivenauth = new CaptureGivenAuth();
            capturegivenauth.Amount = 106;
            capturegivenauth.OrderId = "12344";
            AuthInformation authInfo = new AuthInformation();
            DateTime authDate = new DateTime(2002, 10, 9);
            authInfo.AuthDate = authDate;
            authInfo.AuthCode = "543216";
            authInfo.AuthAmount = 12345;
            capturegivenauth.AuthInformation = authInfo;
            capturegivenauth.OrderSource = OrderSourceType.Ecommerce;
            capturegivenauth.Card = card;

            litleBatchRequest.AddCaptureGivenAuth(capturegivenauth);

            CaptureGivenAuth capturegivenauth2 = new CaptureGivenAuth();
            capturegivenauth2.Amount = 106;
            capturegivenauth2.OrderId = "12344";
            AuthInformation authInfo2 = new AuthInformation();
            authDate = new DateTime(2003, 10, 9);
            authInfo2.AuthDate = authDate;
            authInfo2.AuthCode = "543216";
            authInfo2.AuthAmount = 12345;
            capturegivenauth2.AuthInformation = authInfo;
            capturegivenauth2.OrderSource = OrderSourceType.Ecommerce;
            capturegivenauth2.Card = card2;

            litleBatchRequest.AddCaptureGivenAuth(capturegivenauth2);

            Credit creditObj = new Credit();
            creditObj.Amount = 106;
            creditObj.OrderId = "2111";
            creditObj.OrderSource = OrderSourceType.Ecommerce;
            creditObj.Card = card;

            litleBatchRequest.AddCredit(creditObj);

            Credit creditObj2 = new Credit();
            creditObj2.Amount = 106;
            creditObj2.OrderId = "2111";
            creditObj2.OrderSource = OrderSourceType.Ecommerce;
            creditObj2.Card = card2;

            litleBatchRequest.AddCredit(creditObj2);

            EcheckCredit echeckcredit = new EcheckCredit();
            echeckcredit.Amount = 12L;
            echeckcredit.OrderId = "12345";
            echeckcredit.OrderSource = OrderSourceType.Ecommerce;
            EcheckType echeck = new EcheckType();
            echeck.AccType = EcheckAccountTypeEnum.Checking;
            echeck.AccNum = "1099999903";
            echeck.RoutingNum = "011201995";
            echeck.CheckNum = "123455";
            echeckcredit.Echeck = echeck;
            Contact billToAddress = new Contact();
            billToAddress.Name = "Bob";
            billToAddress.City = "Lowell";
            billToAddress.State = "MA";
            billToAddress.Email = "litle.com";
            echeckcredit.BillToAddress = billToAddress;

            litleBatchRequest.AddEcheckCredit(echeckcredit);

            EcheckCredit echeckcredit2 = new EcheckCredit();
            echeckcredit2.Amount = 12L;
            echeckcredit2.OrderId = "12346";
            echeckcredit2.OrderSource = OrderSourceType.Ecommerce;
            EcheckType echeck2 = new EcheckType();
            echeck2.AccType = EcheckAccountTypeEnum.Checking;
            echeck2.AccNum = "1099999903";
            echeck2.RoutingNum = "011201995";
            echeck2.CheckNum = "123456";
            echeckcredit2.Echeck = echeck2;
            Contact billToAddress2 = new Contact();
            billToAddress2.Name = "Mike";
            billToAddress2.City = "Lowell";
            billToAddress2.State = "MA";
            billToAddress2.Email = "litle.com";
            echeckcredit2.BillToAddress = billToAddress2;

            litleBatchRequest.AddEcheckCredit(echeckcredit2);

            EcheckRedeposit echeckredeposit = new EcheckRedeposit();
            echeckredeposit.LitleTxnId = 123456;
            echeckredeposit.Echeck = echeck;

            litleBatchRequest.AddEcheckRedeposit(echeckredeposit);

            EcheckRedeposit echeckredeposit2 = new EcheckRedeposit();
            echeckredeposit2.LitleTxnId = 123457;
            echeckredeposit2.Echeck = echeck2;

            litleBatchRequest.AddEcheckRedeposit(echeckredeposit2);

            EcheckSale echeckSaleObj = new EcheckSale();
            echeckSaleObj.Amount = 123456;
            echeckSaleObj.OrderId = "12345";
            echeckSaleObj.OrderSource = OrderSourceType.Ecommerce;
            echeckSaleObj.Echeck = echeck;
            echeckSaleObj.BillToAddress = billToAddress;

            litleBatchRequest.AddEcheckSale(echeckSaleObj);

            EcheckSale echeckSaleObj2 = new EcheckSale();
            echeckSaleObj2.Amount = 123456;
            echeckSaleObj2.OrderId = "12346";
            echeckSaleObj2.OrderSource = OrderSourceType.Ecommerce;
            echeckSaleObj2.Echeck = echeck2;
            echeckSaleObj2.BillToAddress = billToAddress2;

            litleBatchRequest.AddEcheckSale(echeckSaleObj2);

            EcheckVerification echeckVerificationObject = new EcheckVerification();
            echeckVerificationObject.Amount = 123456;
            echeckVerificationObject.OrderId = "12345";
            echeckVerificationObject.OrderSource = OrderSourceType.Ecommerce;
            echeckVerificationObject.Echeck = echeck;
            echeckVerificationObject.BillToAddress = billToAddress;

            litleBatchRequest.AddEcheckVerification(echeckVerificationObject);

            EcheckVerification echeckVerificationObject2 = new EcheckVerification();
            echeckVerificationObject2.Amount = 123456;
            echeckVerificationObject2.OrderId = "12346";
            echeckVerificationObject2.OrderSource = OrderSourceType.Ecommerce;
            echeckVerificationObject2.Echeck = echeck2;
            echeckVerificationObject2.BillToAddress = billToAddress2;

            litleBatchRequest.AddEcheckVerification(echeckVerificationObject2);

            ForceCapture forcecapture = new ForceCapture();
            forcecapture.Amount = 106;
            forcecapture.OrderId = "12344";
            forcecapture.OrderSource = OrderSourceType.Ecommerce;
            forcecapture.Card = card;

            litleBatchRequest.AddForceCapture(forcecapture);

            ForceCapture forcecapture2 = new ForceCapture();
            forcecapture2.Amount = 106;
            forcecapture2.OrderId = "12345";
            forcecapture2.OrderSource = OrderSourceType.Ecommerce;
            forcecapture2.Card = card2;

            litleBatchRequest.AddForceCapture(forcecapture2);

            Sale saleObj = new Sale();
            saleObj.Amount = 106;
            saleObj.LitleTxnId = 123456;
            saleObj.OrderId = "12344";
            saleObj.OrderSource = OrderSourceType.Ecommerce;
            saleObj.Card = card;

            litleBatchRequest.AddSale(saleObj);

            Sale saleObj2 = new Sale();
            saleObj2.Amount = 106;
            saleObj2.LitleTxnId = 123456;
            saleObj2.OrderId = "12345";
            saleObj2.OrderSource = OrderSourceType.Ecommerce;
            saleObj2.Card = card2;

            litleBatchRequest.AddSale(saleObj2);

            RegisterTokenRequestType registerTokenRequest = new RegisterTokenRequestType();
            registerTokenRequest.OrderId = "12344";
            registerTokenRequest.AccountNumber = "1233456789103801";
            registerTokenRequest.ReportGroup = "Planets";

            litleBatchRequest.AddRegisterTokenRequest(registerTokenRequest);

            RegisterTokenRequestType registerTokenRequest2 = new RegisterTokenRequestType();
            registerTokenRequest2.OrderId = "12345";
            registerTokenRequest2.AccountNumber = "1233456789103801";
            registerTokenRequest2.ReportGroup = "Planets";

            litleBatchRequest.AddRegisterTokenRequest(registerTokenRequest2);

            litleIC.AddBatch(litleBatchRequest);

            string batchName = litleIC.SendToLitle();

            litleIC.BlockAndWaitForResponse(batchName, 60*1000*5);

            try
            {
                LitleResponse litleResponse = litleIC.ReceiveFromLitle(batchName);
                Assert.Fail("Fail to throw a connection exception");
            }
            catch (LitleOnlineException e)
            {
                Assert.AreEqual("Error occured while attempting to retrieve and save the file from SFTP", e.Message);
            }
        }
        public void test42()
        {
            EcheckSale sale = new EcheckSale();
            sale.OrderId = "42";
            sale.Amount = 2004;
            sale.OrderSource = OrderSourceType.Telephone;
            Contact billToAddress = new Contact();
            billToAddress.FirstName = "Tom";
            billToAddress.LastName = "Black";
            sale.BillToAddress = billToAddress;
            EcheckType echeck = new EcheckType();
            echeck.AccNum = "4099999992";
            echeck.AccType = EcheckAccountTypeEnum.Checking;
            echeck.RoutingNum = "211370545";
            sale.Echeck = echeck;

            EcheckSalesResponse response = litle.EcheckSale(sale);
            Assert.AreEqual("000", response.Response);
            Assert.AreEqual("Approved", response.Message);
        }
        public void testEcheckVerification()
        {
            EcheckVerification echeckverification = new EcheckVerification();
            echeckverification.OrderId = "12345";
            echeckverification.Amount = 123456;
            echeckverification.OrderSource = OrderSourceType.Ecommerce;
            EcheckType echeck = new EcheckType();
            echeck.AccType = EcheckAccountTypeEnum.Checking;
            echeck.AccNum = "12345657890";
            echeck.RoutingNum = "123456789";
            echeck.CheckNum = "123455";
            echeckverification.Echeck = echeck;
            Contact contact = new Contact();
            contact.Name = "Bob";
            contact.City = "lowell";
            contact.State = "MA";
            contact.Email = "litle.com";
            echeckverification.BillToAddress = contact;

            batchRequest.AddEcheckVerification(echeckverification);

            Assert.AreEqual(1, batchRequest.GetNumEcheckVerification());
            Assert.AreEqual(echeckverification.Amount, batchRequest.GetSumOfEcheckVerification());

            mockLitleFile.Verify(litleFile => litleFile.CreateRandomFile(It.IsAny<String>(), It.IsAny<String>(), It.IsAny<String>(), mockLitleTime.Object));
            mockLitleFile.Verify(litleFile => litleFile.AppendLineToFile(mockFilePath, echeckverification.Serialize()));
        }
        public void nullBatchData()
        {
            BatchRequest litleBatchRequest = new BatchRequest();

            Authorization authorization = new Authorization();
            authorization.ReportGroup = "Planets";
            authorization.OrderId = "12344";
            authorization.Amount = 106;
            authorization.OrderSource = OrderSourceType.Ecommerce;
            CardType card = new CardType();
            card.Type = MethodOfPaymentTypeEnum.VI;
            card.Number = "414100000000000000";
            card.ExpDate = "1210";
            authorization.Card = card;

            litleBatchRequest.AddAuthorization(authorization);
            try
            {
                litleBatchRequest.AddAuthorization(null);
            }
            catch (System.NullReferenceException e)
            {
                Assert.AreEqual("Object reference not set to an instance of an object.", e.Message);
            }

            AuthReversal reversal = new AuthReversal();
            reversal.LitleTxnId = 12345678000L;
            reversal.Amount = 106;
            reversal.PayPalNotes = "Notes";

            litleBatchRequest.AddAuthReversal(reversal);
            try
            {
                litleBatchRequest.AddAuthReversal(null);
            }
            catch (System.NullReferenceException e)
            {
                Assert.AreEqual("Object reference not set to an instance of an object.", e.Message);
            }

            Capture capture = new Capture();
            capture.LitleTxnId = 123456000;
            capture.Amount = 106;
            capture.PayPalNotes = "Notes";

            litleBatchRequest.AddCapture(capture);
            try
            {
                litleBatchRequest.AddCapture(null);
            }
            catch (System.NullReferenceException e)
            {
                Assert.AreEqual("Object reference not set to an instance of an object.", e.Message);
            }

            CaptureGivenAuth capturegivenauth = new CaptureGivenAuth();
            capturegivenauth.Amount = 106;
            capturegivenauth.OrderId = "12344";
            AuthInformation authInfo = new AuthInformation();
            DateTime authDate = new DateTime(2002, 10, 9);
            authInfo.AuthDate = authDate;
            authInfo.AuthCode = "543216";
            authInfo.AuthAmount = 12345;
            capturegivenauth.AuthInformation = authInfo;
            capturegivenauth.OrderSource = OrderSourceType.Ecommerce;
            capturegivenauth.Card = card;

            litleBatchRequest.AddCaptureGivenAuth(capturegivenauth);
            try
            {
                litleBatchRequest.AddCaptureGivenAuth(null);
            }
            catch (System.NullReferenceException e)
            {
                Assert.AreEqual("Object reference not set to an instance of an object.", e.Message);
            }

            Credit creditObj = new Credit();
            creditObj.Amount = 106;
            creditObj.OrderId = "2111";
            creditObj.OrderSource = OrderSourceType.Ecommerce;
            creditObj.Card = card;

            litleBatchRequest.AddCredit(creditObj);
            try
            {
                litleBatchRequest.AddCredit(null);
            }
            catch (System.NullReferenceException e)
            {
                Assert.AreEqual("Object reference not set to an instance of an object.", e.Message);
            }

            EcheckCredit echeckcredit = new EcheckCredit();
            echeckcredit.Amount = 12L;
            echeckcredit.OrderId = "12345";
            echeckcredit.OrderSource = OrderSourceType.Ecommerce;
            EcheckType echeck = new EcheckType();
            echeck.AccType = EcheckAccountTypeEnum.Checking;
            echeck.AccNum = "12345657890";
            echeck.RoutingNum = "011201995";
            echeck.CheckNum = "123455";
            echeckcredit.Echeck = echeck;
            Contact billToAddress = new Contact();
            billToAddress.Name = "Bob";
            billToAddress.City = "Lowell";
            billToAddress.State = "MA";
            billToAddress.Email = "litle.com";
            echeckcredit.BillToAddress = billToAddress;

            litleBatchRequest.AddEcheckCredit(echeckcredit);
            try
            {
                litleBatchRequest.AddEcheckCredit(null);
            }
            catch (System.NullReferenceException e)
            {
                Assert.AreEqual("Object reference not set to an instance of an object.", e.Message);
            }

            EcheckRedeposit echeckredeposit = new EcheckRedeposit();
            echeckredeposit.LitleTxnId = 123456;
            echeckredeposit.Echeck = echeck;

            litleBatchRequest.AddEcheckRedeposit(echeckredeposit);
            try
            {
                litleBatchRequest.AddEcheckRedeposit(null);
            }
            catch (System.NullReferenceException e)
            {
                Assert.AreEqual("Object reference not set to an instance of an object.", e.Message);
            }

            EcheckSale echeckSaleObj = new EcheckSale();
            echeckSaleObj.Amount = 123456;
            echeckSaleObj.OrderId = "12345";
            echeckSaleObj.OrderSource = OrderSourceType.Ecommerce;
            echeckSaleObj.Echeck = echeck;
            echeckSaleObj.BillToAddress = billToAddress;

            litleBatchRequest.AddEcheckSale(echeckSaleObj);
            try
            {
                litleBatchRequest.AddEcheckSale(null);
            }
            catch (System.NullReferenceException e)
            {
                Assert.AreEqual("Object reference not set to an instance of an object.", e.Message);
            }

            EcheckVerification echeckVerificationObject = new EcheckVerification();
            echeckVerificationObject.Amount = 123456;
            echeckVerificationObject.OrderId = "12345";
            echeckVerificationObject.OrderSource = OrderSourceType.Ecommerce;
            echeckVerificationObject.Echeck = echeck;
            echeckVerificationObject.BillToAddress = billToAddress;

            litleBatchRequest.AddEcheckVerification(echeckVerificationObject);
            try
            {
                litleBatchRequest.AddEcheckVerification(null);
            }
            catch (System.NullReferenceException e)
            {
                Assert.AreEqual("Object reference not set to an instance of an object.", e.Message);
            }

            ForceCapture forcecapture = new ForceCapture();
            forcecapture.Amount = 106;
            forcecapture.OrderId = "12344";
            forcecapture.OrderSource = OrderSourceType.Ecommerce;
            forcecapture.Card = card;

            litleBatchRequest.AddForceCapture(forcecapture);
            try
            {
                litleBatchRequest.AddForceCapture(null);
            }
            catch (System.NullReferenceException e)
            {
                Assert.AreEqual("Object reference not set to an instance of an object.", e.Message);
            }

            Sale saleObj = new Sale();
            saleObj.Amount = 106;
            saleObj.LitleTxnId = 123456;
            saleObj.OrderId = "12344";
            saleObj.OrderSource = OrderSourceType.Ecommerce;
            saleObj.Card = card;

            litleBatchRequest.AddSale(saleObj);
            try
            {
                litleBatchRequest.AddSale(null);
            }
            catch (System.NullReferenceException e)
            {
                Assert.AreEqual("Object reference not set to an instance of an object.", e.Message);
            }

            RegisterTokenRequestType registerTokenRequest = new RegisterTokenRequestType();
            registerTokenRequest.OrderId = "12344";
            registerTokenRequest.AccountNumber = "1233456789103801";
            registerTokenRequest.ReportGroup = "Planets";

            litleBatchRequest.AddRegisterTokenRequest(registerTokenRequest);
            try
            {
                litleBatchRequest.AddRegisterTokenRequest(null);
            }
            catch (System.NullReferenceException e)
            {
                Assert.AreEqual("Object reference not set to an instance of an object.", e.Message);
            }

            try
            {
                litle.AddBatch(litleBatchRequest);
            }
            catch (System.NullReferenceException e)
            {
                Assert.AreEqual("Object reference not set to an instance of an object.", e.Message);
            }
        }
        public void test44()
        {
            EcheckSale sale = new EcheckSale();
            sale.OrderId = "44";
            sale.Amount = 2009;
            sale.OrderSource = OrderSourceType.Telephone;
            Contact billToAddress = new Contact();
            billToAddress.FirstName = "Peter";
            billToAddress.LastName = "Green";
            billToAddress.CompanyName = "Green Co";
            sale.BillToAddress = billToAddress;
            EcheckType echeck = new EcheckType();
            echeck.AccNum = "9099999992";
            echeck.AccType = EcheckAccountTypeEnum.Corporate;
            echeck.RoutingNum = "053133052";
            sale.Echeck = echeck;

            EcheckSalesResponse response = litle.EcheckSale(sale);
            Assert.AreEqual("900", response.Response);
            Assert.AreEqual("Invalid Bank Routing Number", response.Message);
        }
        public void SimpleBatch()
        {
            BatchRequest litleBatchRequest = new BatchRequest();

            Authorization authorization = new Authorization();
            authorization.ReportGroup = "Planets";
            authorization.OrderId = "12344";
            authorization.Amount = 106;
            authorization.OrderSource = OrderSourceType.Ecommerce;
            CardType card = new CardType();
            card.Type = MethodOfPaymentTypeEnum.VI;
            card.Number = "4100000000000001";
            card.ExpDate = "1210";
            authorization.Card = card;

            litleBatchRequest.AddAuthorization(authorization);

            Authorization authorization2 = new Authorization();
            authorization2.ReportGroup = "Planets";
            authorization2.OrderId = "12345";
            authorization2.Amount = 106;
            authorization2.OrderSource = OrderSourceType.Ecommerce;
            CardType card2 = new CardType();
            card2.Type = MethodOfPaymentTypeEnum.VI;
            card2.Number = "4242424242424242";
            card2.ExpDate = "1210";
            authorization2.Card = card2;

            litleBatchRequest.AddAuthorization(authorization2);

            AuthReversal reversal = new AuthReversal();
            reversal.LitleTxnId = 12345678000L;
            reversal.Amount = 106;
            reversal.PayPalNotes = "Notes";

            litleBatchRequest.AddAuthReversal(reversal);

            AuthReversal reversal2 = new AuthReversal();
            reversal2.LitleTxnId = 12345678900L;
            reversal2.Amount = 106;
            reversal2.PayPalNotes = "Notes";

            litleBatchRequest.AddAuthReversal(reversal2);

            Capture capture = new Capture();
            capture.LitleTxnId = 123456000;
            capture.Amount = 106;
            capture.PayPalNotes = "Notes";

            litleBatchRequest.AddCapture(capture);

            Capture capture2 = new Capture();
            capture2.LitleTxnId = 123456700;
            capture2.Amount = 106;
            capture2.PayPalNotes = "Notes";

            litleBatchRequest.AddCapture(capture2);

            CaptureGivenAuth capturegivenauth = new CaptureGivenAuth();
            capturegivenauth.Amount = 106;
            capturegivenauth.OrderId = "12344";
            AuthInformation authInfo = new AuthInformation();
            DateTime authDate = new DateTime(2002, 10, 9);
            authInfo.AuthDate = authDate;
            authInfo.AuthCode = "543216";
            authInfo.AuthAmount = 12345;
            capturegivenauth.AuthInformation = authInfo;
            capturegivenauth.OrderSource = OrderSourceType.Ecommerce;
            capturegivenauth.Card = card;

            litleBatchRequest.AddCaptureGivenAuth(capturegivenauth);

            CaptureGivenAuth capturegivenauth2 = new CaptureGivenAuth();
            capturegivenauth2.Amount = 106;
            capturegivenauth2.OrderId = "12344";
            AuthInformation authInfo2 = new AuthInformation();
            authDate = new DateTime(2003, 10, 9);
            authInfo2.AuthDate = authDate;
            authInfo2.AuthCode = "543216";
            authInfo2.AuthAmount = 12345;
            capturegivenauth2.AuthInformation = authInfo;
            capturegivenauth2.OrderSource = OrderSourceType.Ecommerce;
            capturegivenauth2.Card = card2;

            litleBatchRequest.AddCaptureGivenAuth(capturegivenauth2);

            Credit creditObj = new Credit();
            creditObj.Amount = 106;
            creditObj.OrderId = "2111";
            creditObj.OrderSource = OrderSourceType.Ecommerce;
            creditObj.Card = card;

            litleBatchRequest.AddCredit(creditObj);

            Credit creditObj2 = new Credit();
            creditObj2.Amount = 106;
            creditObj2.OrderId = "2111";
            creditObj2.OrderSource = OrderSourceType.Ecommerce;
            creditObj2.Card = card2;

            litleBatchRequest.AddCredit(creditObj2);

            EcheckCredit echeckcredit = new EcheckCredit();
            echeckcredit.Amount = 12L;
            echeckcredit.OrderId = "12345";
            echeckcredit.OrderSource = OrderSourceType.Ecommerce;
            EcheckType echeck = new EcheckType();
            echeck.AccType = EcheckAccountTypeEnum.Checking;
            echeck.AccNum = "1099999903";
            echeck.RoutingNum = "011201995";
            echeck.CheckNum = "123455";
            echeckcredit.Echeck = echeck;
            Contact billToAddress = new Contact();
            billToAddress.Name = "Bob";
            billToAddress.City = "Lowell";
            billToAddress.State = "MA";
            billToAddress.Email = "litle.com";
            echeckcredit.BillToAddress = billToAddress;

            litleBatchRequest.AddEcheckCredit(echeckcredit);

            EcheckCredit echeckcredit2 = new EcheckCredit();
            echeckcredit2.Amount = 12L;
            echeckcredit2.OrderId = "12346";
            echeckcredit2.OrderSource = OrderSourceType.Ecommerce;
            EcheckType echeck2 = new EcheckType();
            echeck2.AccType = EcheckAccountTypeEnum.Checking;
            echeck2.AccNum = "1099999903";
            echeck2.RoutingNum = "011201995";
            echeck2.CheckNum = "123456";
            echeckcredit2.Echeck = echeck2;
            Contact billToAddress2 = new Contact();
            billToAddress2.Name = "Mike";
            billToAddress2.City = "Lowell";
            billToAddress2.State = "MA";
            billToAddress2.Email = "litle.com";
            echeckcredit2.BillToAddress = billToAddress2;

            litleBatchRequest.AddEcheckCredit(echeckcredit2);

            EcheckRedeposit echeckredeposit = new EcheckRedeposit();
            echeckredeposit.LitleTxnId = 123456;
            echeckredeposit.Echeck = echeck;

            litleBatchRequest.AddEcheckRedeposit(echeckredeposit);

            EcheckRedeposit echeckredeposit2 = new EcheckRedeposit();
            echeckredeposit2.LitleTxnId = 123457;
            echeckredeposit2.Echeck = echeck2;

            litleBatchRequest.AddEcheckRedeposit(echeckredeposit2);

            EcheckSale echeckSaleObj = new EcheckSale();
            echeckSaleObj.Amount = 123456;
            echeckSaleObj.OrderId = "12345";
            echeckSaleObj.OrderSource = OrderSourceType.Ecommerce;
            echeckSaleObj.Echeck = echeck;
            echeckSaleObj.BillToAddress = billToAddress;

            litleBatchRequest.AddEcheckSale(echeckSaleObj);

            EcheckSale echeckSaleObj2 = new EcheckSale();
            echeckSaleObj2.Amount = 123456;
            echeckSaleObj2.OrderId = "12346";
            echeckSaleObj2.OrderSource = OrderSourceType.Ecommerce;
            echeckSaleObj2.Echeck = echeck2;
            echeckSaleObj2.BillToAddress = billToAddress2;

            litleBatchRequest.AddEcheckSale(echeckSaleObj2);

            EcheckPreNoteSale echeckPreNoteSaleObj1 = new EcheckPreNoteSale();
            echeckPreNoteSaleObj1.OrderId = "12345";
            echeckPreNoteSaleObj1.OrderSource = OrderSourceType.Ecommerce;
            echeckPreNoteSaleObj1.Echeck = echeck;
            echeckPreNoteSaleObj1.BillToAddress = billToAddress;

            litleBatchRequest.AddEcheckPreNoteSale(echeckPreNoteSaleObj1);

            EcheckPreNoteSale echeckPreNoteSaleObj2 = new EcheckPreNoteSale();
            echeckPreNoteSaleObj2.OrderId = "12345";
            echeckPreNoteSaleObj2.OrderSource = OrderSourceType.Ecommerce;
            echeckPreNoteSaleObj2.Echeck = echeck2;
            echeckPreNoteSaleObj2.BillToAddress = billToAddress2;

            litleBatchRequest.AddEcheckPreNoteSale(echeckPreNoteSaleObj2);

            EcheckPreNoteCredit echeckPreNoteCreditObj1 = new EcheckPreNoteCredit();
            echeckPreNoteCreditObj1.OrderId = "12345";
            echeckPreNoteCreditObj1.OrderSource = OrderSourceType.Ecommerce;
            echeckPreNoteCreditObj1.Echeck = echeck;
            echeckPreNoteCreditObj1.BillToAddress = billToAddress;

            litleBatchRequest.AddEcheckPreNoteCredit(echeckPreNoteCreditObj1);

            EcheckPreNoteCredit echeckPreNoteCreditObj2 = new EcheckPreNoteCredit();
            echeckPreNoteCreditObj2.OrderId = "12345";
            echeckPreNoteCreditObj2.OrderSource = OrderSourceType.Ecommerce;
            echeckPreNoteCreditObj2.Echeck = echeck2;
            echeckPreNoteCreditObj2.BillToAddress = billToAddress2;

            EcheckVerification echeckVerificationObject = new EcheckVerification();
            echeckVerificationObject.Amount = 123456;
            echeckVerificationObject.OrderId = "12345";
            echeckVerificationObject.OrderSource = OrderSourceType.Ecommerce;
            echeckVerificationObject.Echeck = echeck;
            echeckVerificationObject.BillToAddress = billToAddress;

            litleBatchRequest.AddEcheckVerification(echeckVerificationObject);

            EcheckVerification echeckVerificationObject2 = new EcheckVerification();
            echeckVerificationObject2.Amount = 123456;
            echeckVerificationObject2.OrderId = "12346";
            echeckVerificationObject2.OrderSource = OrderSourceType.Ecommerce;
            echeckVerificationObject2.Echeck = echeck2;
            echeckVerificationObject2.BillToAddress = billToAddress2;

            litleBatchRequest.AddEcheckVerification(echeckVerificationObject2);

            ForceCapture forcecapture = new ForceCapture();
            forcecapture.Amount = 106;
            forcecapture.OrderId = "12344";
            forcecapture.OrderSource = OrderSourceType.Ecommerce;
            forcecapture.Card = card;

            litleBatchRequest.AddForceCapture(forcecapture);

            ForceCapture forcecapture2 = new ForceCapture();
            forcecapture2.Amount = 106;
            forcecapture2.OrderId = "12345";
            forcecapture2.OrderSource = OrderSourceType.Ecommerce;
            forcecapture2.Card = card2;

            litleBatchRequest.AddForceCapture(forcecapture2);

            Sale saleObj = new Sale();
            saleObj.Amount = 106;
            saleObj.LitleTxnId = 123456;
            saleObj.OrderId = "12344";
            saleObj.OrderSource = OrderSourceType.Ecommerce;
            saleObj.Card = card;

            litleBatchRequest.AddSale(saleObj);

            Sale saleObj2 = new Sale();
            saleObj2.Amount = 106;
            saleObj2.LitleTxnId = 123456;
            saleObj2.OrderId = "12345";
            saleObj2.OrderSource = OrderSourceType.Ecommerce;
            saleObj2.Card = card2;

            litleBatchRequest.AddSale(saleObj2);

            RegisterTokenRequestType registerTokenRequest = new RegisterTokenRequestType();
            registerTokenRequest.OrderId = "12344";
            registerTokenRequest.AccountNumber = "1233456789103801";
            registerTokenRequest.ReportGroup = "Planets";

            litleBatchRequest.AddRegisterTokenRequest(registerTokenRequest);

            RegisterTokenRequestType registerTokenRequest2 = new RegisterTokenRequestType();
            registerTokenRequest2.OrderId = "12345";
            registerTokenRequest2.AccountNumber = "1233456789103801";
            registerTokenRequest2.ReportGroup = "Planets";

            litleBatchRequest.AddRegisterTokenRequest(registerTokenRequest2);

            UpdateCardValidationNumOnToken updateCardValidationNumOnToken = new UpdateCardValidationNumOnToken();
            updateCardValidationNumOnToken.OrderId = "12344";
            updateCardValidationNumOnToken.CardValidationNum = "123";
            updateCardValidationNumOnToken.LitleToken = "4100000000000001";

            litleBatchRequest.AddUpdateCardValidationNumOnToken(updateCardValidationNumOnToken);

            UpdateCardValidationNumOnToken updateCardValidationNumOnToken2 = new UpdateCardValidationNumOnToken();
            updateCardValidationNumOnToken2.OrderId = "12345";
            updateCardValidationNumOnToken2.CardValidationNum = "123";
            updateCardValidationNumOnToken2.LitleToken = "4242424242424242";

            litleBatchRequest.AddUpdateCardValidationNumOnToken(updateCardValidationNumOnToken2);
            litle.AddBatch(litleBatchRequest);

            string batchName = litle.SendToLitle();

            litle.BlockAndWaitForResponse(batchName, estimatedResponseTime(2 * 2, 10 * 2));

            LitleResponse litleResponse = litle.ReceiveFromLitle(batchName);

            Assert.NotNull(litleResponse);
            Assert.AreEqual("0", litleResponse.Response);
            Assert.AreEqual("Valid Format", litleResponse.Message);

            BatchResponse litleBatchResponse = litleResponse.NextBatchResponse();
            while (litleBatchResponse != null)
            {
                AuthorizationResponse authorizationResponse = litleBatchResponse.NextAuthorizationResponse();
                while (authorizationResponse != null)
                {
                    Assert.AreEqual("000", authorizationResponse.Response);

                    authorizationResponse = litleBatchResponse.NextAuthorizationResponse();
                }

                AuthReversalResponse authReversalResponse = litleBatchResponse.NextAuthReversalResponse();
                while (authReversalResponse != null)
                {
                    Assert.AreEqual("360", authReversalResponse.Response);

                    authReversalResponse = litleBatchResponse.NextAuthReversalResponse();
                }

                CaptureResponse captureResponse = litleBatchResponse.NextCaptureResponse();
                while (captureResponse != null)
                {
                    Assert.AreEqual("360", captureResponse.Response);

                    captureResponse = litleBatchResponse.NextCaptureResponse();
                }

                CaptureGivenAuthResponse captureGivenAuthResponse = litleBatchResponse.NextCaptureGivenAuthResponse();
                while (captureGivenAuthResponse != null)
                {
                    Assert.AreEqual("000", captureGivenAuthResponse.Response);

                    captureGivenAuthResponse = litleBatchResponse.NextCaptureGivenAuthResponse();
                }

                CreditResponse creditResponse = litleBatchResponse.NextCreditResponse();
                while (creditResponse != null)
                {
                    Assert.AreEqual("000", creditResponse.Response);

                    creditResponse = litleBatchResponse.NextCreditResponse();
                }

                EcheckCreditResponse echeckCreditResponse = litleBatchResponse.NextEcheckCreditResponse();
                while (echeckCreditResponse != null)
                {
                    Assert.AreEqual("000", echeckCreditResponse.Response);

                    echeckCreditResponse = litleBatchResponse.NextEcheckCreditResponse();
                }

                EcheckRedepositResponse echeckRedepositResponse = litleBatchResponse.NextEcheckRedepositResponse();
                while (echeckRedepositResponse != null)
                {
                    Assert.AreEqual("360", echeckRedepositResponse.Response);

                    echeckRedepositResponse = litleBatchResponse.NextEcheckRedepositResponse();
                }

                EcheckSalesResponse echeckSalesResponse = litleBatchResponse.NextEcheckSalesResponse();
                while (echeckSalesResponse != null)
                {
                    Assert.AreEqual("000", echeckSalesResponse.Response);

                    echeckSalesResponse = litleBatchResponse.NextEcheckSalesResponse();
                }

                EcheckPreNoteSaleResponse echeckPreNoteSaleResponse = litleBatchResponse.NextEcheckPreNoteSaleResponse();
                while (echeckPreNoteSaleResponse != null)
                {
                    Assert.AreEqual("000", echeckPreNoteSaleResponse.Response);

                    echeckPreNoteSaleResponse = litleBatchResponse.NextEcheckPreNoteSaleResponse();
                }

                EcheckPreNoteCreditResponse echeckPreNoteCreditResponse = litleBatchResponse.NextEcheckPreNoteCreditResponse();
                while (echeckPreNoteCreditResponse != null)
                {
                    Assert.AreEqual("000", echeckPreNoteCreditResponse.Response);

                    echeckPreNoteCreditResponse = litleBatchResponse.NextEcheckPreNoteCreditResponse();
                }

                EcheckVerificationResponse echeckVerificationResponse = litleBatchResponse.NextEcheckVerificationResponse();
                while (echeckVerificationResponse != null)
                {
                    Assert.AreEqual("957", echeckVerificationResponse.Response);

                    echeckVerificationResponse = litleBatchResponse.NextEcheckVerificationResponse();
                }

                ForceCaptureResponse forceCaptureResponse = litleBatchResponse.NextForceCaptureResponse();
                while (forceCaptureResponse != null)
                {
                    Assert.AreEqual("000", forceCaptureResponse.Response);

                    forceCaptureResponse = litleBatchResponse.NextForceCaptureResponse();
                }

                RegisterTokenResponse registerTokenResponse = litleBatchResponse.NextRegisterTokenResponse();
                while (registerTokenResponse != null)
                {
                    Assert.AreEqual("820", registerTokenResponse.Response);

                    registerTokenResponse = litleBatchResponse.NextRegisterTokenResponse();
                }

                SaleResponse saleResponse = litleBatchResponse.NextSaleResponse();
                while (saleResponse != null)
                {
                    Assert.AreEqual("000", saleResponse.Response);

                    saleResponse = litleBatchResponse.NextSaleResponse();
                }

                UpdateCardValidationNumOnTokenResponse updateCardValidationNumOnTokenResponse = litleBatchResponse.NextUpdateCardValidationNumOnTokenResponse();
                while (updateCardValidationNumOnTokenResponse != null)
                {
                    Assert.AreEqual("823", updateCardValidationNumOnTokenResponse.Response);

                    updateCardValidationNumOnTokenResponse = litleBatchResponse.NextUpdateCardValidationNumOnTokenResponse();
                }

                litleBatchResponse = litleResponse.NextBatchResponse();
            }
        }
        public void test45()
        {
            EcheckCredit credit = new EcheckCredit();
            credit.OrderId = "45";
            credit.Amount = 1001;
            credit.OrderSource = OrderSourceType.Telephone;
            Contact billToAddress = new Contact();
            billToAddress.FirstName = "John";
            billToAddress.LastName = "Smith";
            credit.BillToAddress = billToAddress;
            EcheckType echeck = new EcheckType();
            echeck.AccNum = "10@BC99999";
            echeck.AccType = EcheckAccountTypeEnum.Checking;
            echeck.RoutingNum = "053100300";
            credit.Echeck = echeck;

            EcheckCreditResponse response = litle.EcheckCredit(credit);
            Assert.AreEqual("301", response.Response);
            Assert.AreEqual("Invalid Account Number", response.Message);
        }
        public void test46()
        {
            EcheckCredit credit = new EcheckCredit();
            credit.OrderId = "46";
            credit.Amount = 1003;
            credit.OrderSource = OrderSourceType.Telephone;
            Contact billToAddress = new Contact();
            billToAddress.FirstName = "Robert";
            billToAddress.LastName = "Jones";
            billToAddress.CompanyName = "Widget Inc";
            credit.BillToAddress = billToAddress;
            EcheckType echeck = new EcheckType();
            echeck.AccNum = "3099999999";
            echeck.AccType = EcheckAccountTypeEnum.Corporate;
            echeck.RoutingNum = "063102152";
            credit.Echeck = echeck;

            EcheckCreditResponse response = litle.EcheckCredit(credit);
            Assert.AreEqual("000", response.Response);
            Assert.AreEqual("Approved", response.Message);
        }
        public void PFIFInstructionTxnTest()
        {
            Dictionary<string, string> configOverride = new Dictionary<string, string>();
            configOverride["url"] = Properties.Settings.Default.url;
            configOverride["reportGroup"] = Properties.Settings.Default.reportGroup;
            configOverride["username"] = "******";
            configOverride["printxml"] = Properties.Settings.Default.printxml;
            configOverride["timeout"] = Properties.Settings.Default.timeout;
            configOverride["proxyHost"] = Properties.Settings.Default.proxyHost;
            configOverride["merchantId"] = "0180";
            configOverride["password"] = "******";
            configOverride["proxyPort"] = Properties.Settings.Default.proxyPort;
            configOverride["sftpUrl"] = Properties.Settings.Default.sftpUrl;
            configOverride["sftpUsername"] = Properties.Settings.Default.sftpUsername;
            configOverride["sftpPassword"] = Properties.Settings.Default.sftpPassword;
            configOverride["knownHostsFile"] = Properties.Settings.Default.knownHostsFile;
            configOverride["onlineBatchUrl"] = Properties.Settings.Default.onlineBatchUrl;
            configOverride["onlineBatchPort"] = Properties.Settings.Default.onlineBatchPort;
            configOverride["requestDirectory"] = Properties.Settings.Default.requestDirectory;
            configOverride["responseDirectory"] = Properties.Settings.Default.responseDirectory;

            LitleRequest litleOverride = new LitleRequest(configOverride);

            BatchRequest litleBatchRequest = new BatchRequest(configOverride);

            EcheckType echeck = new EcheckType();
            echeck.AccType = EcheckAccountTypeEnum.Corporate;
            echeck.AccNum = "1092969901";
            echeck.RoutingNum = "011075150";
            echeck.CheckNum = "123455";

            SubmerchantCredit submerchantCredit = new SubmerchantCredit();
            submerchantCredit.FundingSubmerchantId = "123456";
            submerchantCredit.SubmerchantName = "merchant";
            submerchantCredit.FundsTransferId = "123467";
            submerchantCredit.Amount = 106L;
            submerchantCredit.AccountInfo = echeck;
            litleBatchRequest.AddSubmerchantCredit(submerchantCredit);

            PayFacCredit payFacCredit = new PayFacCredit();
            payFacCredit.FundingSubmerchantId = "123456";
            payFacCredit.FundsTransferId = "123467";
            payFacCredit.Amount = 107L;
            litleBatchRequest.AddPayFacCredit(payFacCredit);

            ReserveCredit reserveCredit = new ReserveCredit();
            reserveCredit.FundingSubmerchantId = "123456";
            reserveCredit.FundsTransferId = "123467";
            reserveCredit.Amount = 107L;
            litleBatchRequest.AddReserveCredit(reserveCredit);

            VendorCredit vendorCredit = new VendorCredit();
            vendorCredit.FundingSubmerchantId = "123456";
            vendorCredit.VendorName = "merchant";
            vendorCredit.FundsTransferId = "123467";
            vendorCredit.Amount = 106L;
            vendorCredit.AccountInfo = echeck;
            litleBatchRequest.AddVendorCredit(vendorCredit);

            PhysicalCheckCredit physicalCheckCredit = new PhysicalCheckCredit();
            physicalCheckCredit.FundingSubmerchantId = "123456";
            physicalCheckCredit.FundsTransferId = "123467";
            physicalCheckCredit.Amount = 107L;
            litleBatchRequest.AddPhysicalCheckCredit(physicalCheckCredit);

            SubmerchantDebit submerchantDebit = new SubmerchantDebit();
            submerchantDebit.FundingSubmerchantId = "123456";
            submerchantDebit.SubmerchantName = "merchant";
            submerchantDebit.FundsTransferId = "123467";
            submerchantDebit.Amount = 106L;
            submerchantDebit.AccountInfo = echeck;
            litleBatchRequest.AddSubmerchantDebit(submerchantDebit);

            PayFacDebit payFacDebit = new PayFacDebit();
            payFacDebit.FundingSubmerchantId = "123456";
            payFacDebit.FundsTransferId = "123467";
            payFacDebit.Amount = 107L;
            litleBatchRequest.AddPayFacDebit(payFacDebit);

            ReserveDebit reserveDebit = new ReserveDebit();
            reserveDebit.FundingSubmerchantId = "123456";
            reserveDebit.FundsTransferId = "123467";
            reserveDebit.Amount = 107L;
            litleBatchRequest.AddReserveDebit(reserveDebit);

            VendorDebit vendorDebit = new VendorDebit();
            vendorDebit.FundingSubmerchantId = "123456";
            vendorDebit.VendorName = "merchant";
            vendorDebit.FundsTransferId = "123467";
            vendorDebit.Amount = 106L;
            vendorDebit.AccountInfo = echeck;
            litleBatchRequest.AddVendorDebit(vendorDebit);

            PhysicalCheckDebit physicalCheckDebit = new PhysicalCheckDebit();
            physicalCheckDebit.FundingSubmerchantId = "123456";
            physicalCheckDebit.FundsTransferId = "123467";
            physicalCheckDebit.Amount = 107L;
            litleBatchRequest.AddPhysicalCheckDebit(physicalCheckDebit);

            litleOverride.AddBatch(litleBatchRequest);

            LitleResponse litleResponse = litleOverride.SendToLitleWithStream();

            Assert.NotNull(litleResponse);
            Assert.AreEqual("0", litleResponse.Response);
            Assert.AreEqual("Valid Format", litleResponse.Message);

            BatchResponse litleBatchResponse = litleResponse.NextBatchResponse();
            while (litleBatchResponse != null)
            {
                SubmerchantCreditResponse submerchantCreditResponse = litleBatchResponse.NextSubmerchantCreditResponse();
                while (submerchantCreditResponse != null)
                {
                    Assert.AreEqual("000", submerchantCreditResponse.Response);
                    submerchantCreditResponse = litleBatchResponse.NextSubmerchantCreditResponse();
                }

                PayFacCreditResponse payFacCreditResponse = litleBatchResponse.NextPayFacCreditResponse();
                while (payFacCreditResponse != null)
                {
                    Assert.AreEqual("000", payFacCreditResponse.Response);
                    payFacCreditResponse = litleBatchResponse.NextPayFacCreditResponse();
                }

                VendorCreditResponse vendorCreditResponse = litleBatchResponse.NextVendorCreditResponse();
                while (vendorCreditResponse != null)
                {
                    Assert.AreEqual("000", vendorCreditResponse.Response);
                    vendorCreditResponse = litleBatchResponse.NextVendorCreditResponse();
                }

                ReserveCreditResponse reserveCreditResponse = litleBatchResponse.NextReserveCreditResponse();
                while (reserveCreditResponse != null)
                {
                    Assert.AreEqual("000", reserveCreditResponse.Response);
                    reserveCreditResponse = litleBatchResponse.NextReserveCreditResponse();
                }

                PhysicalCheckCreditResponse physicalCheckCreditResponse = litleBatchResponse.NextPhysicalCheckCreditResponse();
                while (physicalCheckCreditResponse != null)
                {
                    Assert.AreEqual("000", physicalCheckCreditResponse.Response);
                    physicalCheckCreditResponse = litleBatchResponse.NextPhysicalCheckCreditResponse();
                }

                SubmerchantDebitResponse submerchantDebitResponse = litleBatchResponse.NextSubmerchantDebitResponse();
                while (submerchantDebitResponse != null)
                {
                    Assert.AreEqual("000", submerchantDebitResponse.Response);
                    submerchantDebitResponse = litleBatchResponse.NextSubmerchantDebitResponse();
                }

                PayFacDebitResponse payFacDebitResponse = litleBatchResponse.NextPayFacDebitResponse();
                while (payFacDebitResponse != null)
                {
                    Assert.AreEqual("000", payFacDebitResponse.Response);
                    payFacDebitResponse = litleBatchResponse.NextPayFacDebitResponse();
                }

                VendorDebitResponse vendorDebitResponse = litleBatchResponse.NextVendorDebitResponse();
                while (vendorDebitResponse != null)
                {
                    Assert.AreEqual("000", vendorDebitResponse.Response);
                    vendorDebitResponse = litleBatchResponse.NextVendorDebitResponse();
                }

                ReserveDebitResponse reserveDebitResponse = litleBatchResponse.NextReserveDebitResponse();
                while (reserveDebitResponse != null)
                {
                    Assert.AreEqual("000", reserveDebitResponse.Response);
                    reserveDebitResponse = litleBatchResponse.NextReserveDebitResponse();
                }

                PhysicalCheckDebitResponse physicalCheckDebitResponse = litleBatchResponse.NextPhysicalCheckDebitResponse();
                while (physicalCheckDebitResponse != null)
                {
                    Assert.AreEqual("000", physicalCheckDebitResponse.Response);
                    physicalCheckDebitResponse = litleBatchResponse.NextPhysicalCheckDebitResponse();
                }

                litleBatchResponse = litleResponse.NextBatchResponse();
            }
        }