public EcheckVerification ( |
||
echeckVerification | ||
Результат |
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); }
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")); } }