public static string ThirdPartyAuthenticate(string CIF, ThirdPartyAuthOption thirdPartyAuthOption)
        {
            var profile = customerProfileService.GetCustomerProfile(CIF).Result;

            if (profile == null)
            {
                return("Unable to get customer profile");
            }

            if (profile.HasMessage)
            {
                return(profile.Message);
            }

            if (profile.Data.IsPinBlocked)
            {
                return("PIN BLOCKED");
            }
            if (AuthenticationType.PinAndOtp == thirdPartyAuthOption.AuthenticationType)
            {
                var authResponse = customerProfileService.VerifyPin(profile.Data.ProfileId, thirdPartyAuthOption.PIN).Result?.Data;

                if (authResponse == null)
                {
                    return(AirtimeValidationMessages.ErrorMessages.PinAuthenticationFailed);
                }

                if (!authResponse.Status)
                {
                    return(authResponse.Message);
                }

                if (authResponse.Status)
                {
                    return(AirtimeValidationMessages.ConstantMessages.AuthenticationSuccessful);
                }
            }

            return(AirtimeValidationMessages.ErrorMessages.AuthenticationFailed);
        }
 public static bool ValidateAuthType(ThirdPartyAuthOption authModel)
 {
     if (authModel == null)
     {
         return(false);
     }
     if (authModel.AuthenticationType == AuthenticationType.Pin)
     {
         return(false);
     }
     if (authModel.AuthenticationType == AuthenticationType.PinAndBiometrics)
     {
         return(true);
     }
     if (authModel.AuthenticationType == AuthenticationType.PinAndOtp)
     {
         return(true);
     }
     if (authModel.AuthenticationType == AuthenticationType.None)
     {
         return(false);
     }
     return(false);
 }