public EcheckSale ( |
||
echeckSale | ||
return |
public void EcheckSaleWithEcheckToken() { LitleOnline lOnlineObj = new LitleOnline(); echeckSale echeckSaleObj = new echeckSale(); echeckSaleObj.reportGroup = "Planets"; echeckSaleObj.amount = 123456; echeckSaleObj.verify = true; echeckSaleObj.orderId = "12345"; echeckSaleObj.orderSource = orderSourceType.ecommerce; echeckTokenType echeckTokenTypeObj = new echeckTokenType(); echeckTokenTypeObj.accType = echeckAccountTypeEnum.Checking; echeckTokenTypeObj.litleToken = "1234565789012"; echeckTokenTypeObj.routingNum = "123456789"; echeckTokenTypeObj.checkNum = "123455"; customBilling customBillingObj = new customBilling(); customBillingObj.phone = "123456789"; customBillingObj.descriptor = "good"; contact contactObj = new contact(); contactObj.name = "Bob"; contactObj.city = "lowell"; contactObj.state = "MA"; contactObj.email = "litle.com"; echeckSaleObj.token = echeckTokenTypeObj; echeckSaleObj.customBilling = customBillingObj; echeckSaleObj.billToAddress = contactObj; echeckSalesResponse response = lOnlineObj.EcheckSale(echeckSaleObj); StringAssert.AreEqualIgnoringCase("Approved", response.message); }
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 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); }
public void SimpleEcheckSaleWithEcheck() { 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"; 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 = lOnlineObj.EcheckSale(echeckSaleObj); StringAssert.AreEqualIgnoringCase("Approved", response.message); }
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")); } }