/// <summary> /// This function validates the information on a profile - making sure what you have stored at AuthNET is valid. You can /// do this in two ways: in TestMode it will just run a validation to be sure all required fields are present and valid. If /// you specify "live" - a live authorization request will be performed. /// </summary> /// <param name="profileID">The profile ID.</param> /// <param name="paymentProfileID">The payment profile ID.</param> /// <param name="shippingAddressID">The shipping address ID.</param> /// <param name="mode">The mode.</param> /// <returns></returns> public string ValidateProfile(string profileID, string paymentProfileID, string shippingAddressID, ValidationMode mode) { var req = new validateCustomerPaymentProfileRequest(); req.customerProfileId = profileID; req.customerPaymentProfileId = paymentProfileID; if (!String.IsNullOrEmpty(shippingAddressID)) { req.customerShippingAddressId = shippingAddressID; } req.validationMode = mode.Equals(ValidationMode.LiveMode) ? validationModeEnum.liveMode : mode.Equals(ValidationMode.TestMode) ? validationModeEnum.testMode : validationModeEnum.none; var response = (validateCustomerPaymentProfileResponse)_gateway.Send(req); return(response.directResponse); }