/// <summary>
        /// Get detailed card information based on the number
        /// </summary>
        /// <param name="cardNumber">card number</param>
        /// <returns>new SagePayCardDetails with card info</returns>
        public SagePayCardDetails GetCardDetails(string cardNumber)
        {
            // only pass up to 9 digits
            string strippedNumber = Regex.Replace(cardNumber, @"[^\d]", string.Empty, RegexOptions.IgnoreCase);

            if (strippedNumber.Length > GETCARDTYPE_MAX_DIGITS)
            {
                strippedNumber = strippedNumber.Substring(0, GETCARDTYPE_MAX_DIGITS);
            }

            // call APi and check for error
            SagePayResponse response = ProcessAPI(COMMAND_GETCARDDETAILS, "<cardbegins>" + strippedNumber + "</cardbegins>");

            if (response.ErrorCode != 0)
            {
                throw new SagePageErrorException(response.ErrorCode, response.ErrorText);
            }

            // build card info object
            SagePayCardDetails spcd = new SagePayCardDetails();

            spcd.CardType    = Converter.ToCardType(response["shortname"]);
            spcd.Description = response["paymentsystemname"];
            spcd.IssueDigits = Converter.ToInt(response["issuedigits"]);
            //
            spcd.MinBinRange = Converter.ToDecimal(response["minimum"]);
            spcd.MaxBinRange = Converter.ToDecimal(response["maximum"]);
            //
            spcd.CountryCode = response["countrycode"];
            spcd.Issuer      = response["issuer"];
            spcd.IsCorporate = (string.Compare(response["corporatecard"], "yes", true) == 0);
            spcd.IsCredit    = (string.Compare(response["iscredit"], "yes", true) == 0);

            return(spcd);
        }
		/// <summary>
		/// Get detailed card information based on the number
		/// </summary>
		/// <param name="cardNumber">card number</param>
		/// <returns>new SagePayCardDetails with card info</returns>
		public SagePayCardDetails GetCardDetails(string cardNumber)
		{
			// only pass up to 9 digits
			string strippedNumber = Regex.Replace(cardNumber, @"[^\d]", string.Empty, RegexOptions.IgnoreCase);
			if (strippedNumber.Length > GETCARDTYPE_MAX_DIGITS)
			{
				strippedNumber = strippedNumber.Substring(0, GETCARDTYPE_MAX_DIGITS);
			}

			// call APi and check for error
			SagePayResponse response = ProcessAPI(COMMAND_GETCARDDETAILS, "<cardbegins>" + strippedNumber + "</cardbegins>");
			if (response.ErrorCode != 0)
			{
				throw new SagePageErrorException(response.ErrorCode, response.ErrorText);
			}

			// build card info object
			SagePayCardDetails spcd = new SagePayCardDetails();
			spcd.CardType = Converter.ToCardType(response["shortname"]);
			spcd.Description = response["paymentsystemname"];
			spcd.IssueDigits = Converter.ToInt(response["issuedigits"]);
			//
			spcd.MinBinRange = Converter.ToDecimal(response["minimum"]);
			spcd.MaxBinRange = Converter.ToDecimal(response["maximum"]);
			//
			spcd.CountryCode = response["countrycode"];
			spcd.Issuer = response["issuer"];
			spcd.IsCorporate = (string.Compare(response["corporatecard"], "yes", true) == 0);
			spcd.IsCredit = (string.Compare(response["iscredit"], "yes", true) == 0);

			return spcd;
		}