Inheritance: ILitleOnline
        public void EcheckSaleWithShipTo()
        {
            LitleOnline lOnlineObj = new LitleOnline();

            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 = lOnlineObj.EcheckSale(echeckSaleObj);
            StringAssert.AreEqualIgnoringCase("Approved", response.message);
        }
        public void TestMissingBillingField()
        {
            LitleOnline lOnlineObj = new LitleOnline();

            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 = lOnlineObj.EcheckVerification(echeckVerificationObject);
            }
            catch (LitleOnlineException e)
            {
                Assert.True(e.Message.StartsWith("Error validating xml data against the schema"));
            }
        }
        public void EcheckSaleMissingBilling()
        {
            LitleOnline lOnlineObj = new LitleOnline();

            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 = lOnlineObj.EcheckSale(echeckSaleObj);
            }
            catch (LitleOnlineException e)
            {
                Assert.True(e.Message.StartsWith("Error validating xml data against the schema"));
            }
        }
        public void SimpleEcheckVerification()
        {
            LitleOnline lOnlineObj = new LitleOnline();

            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 = lOnlineObj.EcheckVerification(echeckVerificationObject);
            StringAssert.AreEqualIgnoringCase("Approved", response.message);
        }
Exemplo n.º 5
0
 public void SimpleTokenWithPayPage()
 {
     LitleOnline lOnlineObj = new LitleOnline();
     registerTokenRequestType registerTokenRequest = new registerTokenRequestType();
     registerTokenRequest.orderId = "12344";
     registerTokenRequest.paypageRegistrationId = "1233456789101112";
     registerTokenRequest.reportGroup = "Planets";
     registerTokenResponse rtokenResponse = lOnlineObj.RegisterToken(registerTokenRequest);
     StringAssert.AreEqualIgnoringCase("Account number was successfully registered", rtokenResponse.message);
 }
Exemplo n.º 6
0
 public void setUp()
 {
     Dictionary<string, string> config = new Dictionary<string, string>();
     config.Add("url", "https://www.testlitle.com/sandbox/communicator/online");
     config.Add("reportGroup", "Default Report Group");
     config.Add("username", "DOTNET");
     config.Add("version", "8.13");
     config.Add("timeout", "65");
     config.Add("merchantId", "101");
     config.Add("password", "TESTCASE");
     config.Add("printxml", "true");
     litle = new LitleOnline(config);
 }
Exemplo n.º 7
0
 public void SimpleTokenWithEcheck()
 {
     LitleOnline lOnlineObj = new LitleOnline();
     registerTokenRequestType registerTokenRequest = new registerTokenRequestType();
     registerTokenRequest.orderId = "12344";
     echeckForTokenType echeckObj = new echeckForTokenType();
     echeckObj.accNum = "12344565";
     echeckObj.routingNum = "123476545";
     registerTokenRequest.echeckForToken = echeckObj;
     registerTokenRequest.reportGroup = "Planets";
     registerTokenResponse rtokenResponse = lOnlineObj.RegisterToken(registerTokenRequest);
     StringAssert.AreEqualIgnoringCase("Account number was successfully registered", rtokenResponse.message);
 }
Exemplo n.º 8
0
 public void SimpleSaleWithPayPal()
 {
     LitleOnline lOnlineObj = new LitleOnline();
     sale saleObj = new sale();
     saleObj.amount = 106;
     saleObj.litleTxnId = 123456;
     saleObj.orderId = "12344";
     saleObj.orderSource = orderSourceType.ecommerce;
     payPal payPalObj = new payPal();
     payPalObj.payerId = "1234";
     payPalObj.token = "1234";
     payPalObj.transactionId = "123456";
     saleObj.paypal = payPalObj;
     saleResponse responseObj = lOnlineObj.Sale(saleObj);
     StringAssert.AreEqualIgnoringCase("Approved", responseObj.message);
 }
Exemplo n.º 9
0
 public void setUp()
 {
     Dictionary<string, string> config = new Dictionary<string, string>();
     config.Add("url", "https://www.testlitle.com/sandbox/communicator/online");
     config.Add("reportGroup", "Default Report Group");
     config.Add("username", "DOTNET");
     config.Add("version", "8.13");
     config.Add("timeout", "65");
     config.Add("merchantId", "101");
     config.Add("password", "TESTCASE");
     config.Add("printxml", "true");
     config.Add("proxyHost", Properties.Settings.Default.proxyHost);
     config.Add("proxyPort", Properties.Settings.Default.proxyPort);
     config.Add("logFile", Properties.Settings.Default.logFile);
     config.Add("neuterAccountNums", "true");
     litle = new LitleOnline(config);
 }
Exemplo n.º 10
0
        public void SimpleSaleWithCard()
        {
            LitleOnline lOnlineObj = new LitleOnline();
            sale saleObj = new sale();
            saleObj.amount = 106;
            saleObj.litleTxnId = 123456;
            saleObj.orderId = "12344";
            saleObj.orderSource = orderSourceType.ecommerce;
            cardType cardObj = new cardType();
            cardObj.type = methodOfPaymentTypeEnum.VI;
            cardObj.number = "4100000000000000";
            cardObj.expDate = "1210";
            saleObj.card = cardObj;

            saleResponse responseObj = lOnlineObj.Sale(saleObj);
            StringAssert.AreEqualIgnoringCase("Approved", responseObj.message);
        }
Exemplo n.º 11
0
 public void TokenEcheckMissingRequiredField()
 {
     LitleOnline lOnlineObj = new LitleOnline();
     registerTokenRequestType registerTokenRequest = new registerTokenRequestType();
     registerTokenRequest.orderId = "12344";
     echeckForTokenType echeckObj = new echeckForTokenType();
     echeckObj.routingNum = "123476545";
     registerTokenRequest.echeckForToken = echeckObj;
     registerTokenRequest.reportGroup = "Planets";
     try
     {
         //expected exception;
         registerTokenResponse rtokenResponse = lOnlineObj.RegisterToken(registerTokenRequest);
     }
     catch (LitleOnlineException e)
     {
         Assert.True(e.Message.StartsWith("Error validating xml data against the schema"));
     }
 }
 public void SetUpLitle()
 {
     litle = new LitleOnline();
 }
 public void setUp()
 {
     litle = new LitleOnline();
 }
Exemplo n.º 14
0
        public void SimpleEcheckSale()
        {
            LitleOnline lOnlineObj = new LitleOnline();

            echeckSale echeckSaleObj = new echeckSale();
            echeckSaleObj.reportGroup = "Planets";
            echeckSaleObj.litleTxnId = 123456789101112;
            echeckSaleObj.amount = 12;

            echeckSalesResponse response = lOnlineObj.EcheckSale(echeckSaleObj);
            StringAssert.AreEqualIgnoringCase("Approved", response.message);
        }
Exemplo n.º 15
0
        public void NoAmount()
        {
            LitleOnline lOnlineObj = new LitleOnline();
            echeckSale echeckSaleObj = new echeckSale();
            echeckSaleObj.reportGroup = "Planets";

            try
            {
                //expected exception;
                echeckSalesResponse response = lOnlineObj.EcheckSale(echeckSaleObj);
            }
            catch (LitleOnlineException e)
            {
                Assert.True(e.Message.StartsWith("Error validating xml data against the schema"));
            }
        }
 public void beforeClass()
 {
     litle = new LitleOnline();
 }