AnsweredAssumed Answered

.NET SDK Error - cvc-minLength-valid

Question asked by mdsdeveloper on Sep 11, 2018

Hello,

 

Question about the .NET SDK (LitleSdkForNet.dll version 11.4  AND CnpSdkForNet.dll version 12.4).
This is the Error I am getting for ECheckSale and Authorization.

 

Litle.Sdk.LitleOnlineException:

Error validating xml data against the schema: cvc-minLength-valid: Value '' with length = '0' is not facet-valid with respect to minLength '1' for type 'stringMin1Max36CollapseWhiteSpaceType'.

 

Any idea why I might be getting this error our how to handle it?

Thank you.

 

MY CODE:

var _config = GetLitleConfigSettings();

LitleOnline litle = new LitleOnline(_config);

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 = "12345657890";
echeck.accType = echeckAccountTypeEnum.Checking;
echeck.routingNum = "053100300";
sale.echeck = echeck;

echeckSalesResponse response = new echeckSalesResponse();

response = litle.EcheckSale(sale);

 

CONFIG:

var dictionary = new Dictionary<string, string>();
//dictionary.Add("url", "https://www.testvantivcnp.com/sandbox/communicator/online"); // Same Error W/ This URL
dictionary.Add("url", "https://www.testvantivcnp.com/sandbox/new/sandbox/communicator/online");
dictionary.Add("reportGroup", "Default Report Group");
dictionary.Add("version", "11.4.0");
dictionary.Add("timeout", "5000");
dictionary.Add("merchantId", "101");
dictionary.Add("username", "DOTNET");
dictionary.Add("password", "DOTNET");

dictionary.Add("proxyHost", null);
dictionary.Add("proxyPort", null);
dictionary.Add("logFile", null);

dictionary.Add("printxml", "true");
dictionary.Add("neuterAccountNums", "true");

return dictionary;

Outcomes