public static bool TestClient(MonerisPaymentSettings serverPaymentSettings, string number, DateTime date, ILogger logger, string zipCode)
 {
     var monerisTokenizeClient = new MonerisTokenizeClient(serverPaymentSettings, logger);
     var result = monerisTokenizeClient.Tokenize(number, date.ToString("yyMM"));
     string message;
     return RequestSuccesful(result, out message);
 }
		private async Task<TokenizedCreditCardResponse> Tokenize(MonerisTokenizeClient monerisClient, string cardNumber, DateTime expiryDate,string cvv, string zipCode, string streetNumber,string streetName, string email, string phone)
		{
			try
			{
			var response = await monerisClient.TokenizeAsync(cardNumber, expiryDate.ToString("yyMM"),cvv, streetNumber, streetName, zipCode, email, phone);

				var message = string.Empty;
				var success = RequestSuccesful(response, out message);

				if (success)
				{
					return new TokenizedCreditCardResponse
					{
						CardOnFileToken = response.GetDataKey(),
						IsSuccessful = true,
						Message = "Success",
						CardType = GetCreditCardType(cardNumber),
						LastFour = cardNumber.Substring(cardNumber.Length - 4, 4),
					};
				}

				return new TokenizedCreditCardResponse
				{
					IsSuccessful = false,
					Message = message
				};
			}
			catch (Exception e)
			{
                var message = e.Message;
                var exception = e as AggregateException;
                if (exception != null)
                {
                    message = exception.InnerException.Message;
                }

				return new TokenizedCreditCardResponse
				{
					IsSuccessful = false,
                    Message = message
				};
			}
		}
        public MonerisServiceClient(string url, string sessionId, MonerisPaymentSettings monerisSettings, IPackageInfo packageInfo, IConnectivityService connectivityService, ILogger logger)
            : base(url, sessionId, packageInfo, connectivityService, logger)
		{
			MonerisClient = new MonerisTokenizeClient(monerisSettings, logger);
		}