public string LaunchProviderPortal() { if (!System.IO.Directory.Exists(LaunchDirectory)) { System.IO.Directory.CreateDirectory(LaunchDirectory); } ConfigProfileCollection ConfigProfileList = SerializerSupport.DeserializeFrom <ConfigProfileCollection>(ConfigProfileFilePath); var CurrentProfile = ConfigProfileList.ProfileList.SingleOrDefault(x => x.Key == ConfigProfileList.SelectedProfileKey); X509Certificate2 Cert = CertificateSupport.GetCertificate(CurrentProfile.CertificateFingerPrint, X509FindType.FindByThumbprint, StoreName.My, StoreLocation.CurrentUser, true); MhrRestClient Client = new MhrRestClient(CurrentProfile.Endpoint, CurrentProfile.ClientId, Cert, CurrentProfile.ProductName, CurrentProfile.ProductVersion); MhrRestClientResponse Response = Client.GetAccessToNpp(CurrentProfile.Hpio, CurrentProfile.Hpii, LauncherVM.Dob.ToString("dd-MM-yyyy"), LauncherVM.Gender, LauncherVM.Family, LauncherVM.Ihi, LauncherVM.MedicareNumber, LauncherVM.DvaNumber); if (Response.HttpStatus == System.Net.HttpStatusCode.OK) { System.IO.StreamWriter sw = new System.IO.StreamWriter(FastPassLauncherHtmlFileName); sw.WriteLine(Response.Content); sw.Close(); System.Diagnostics.Process.Start(FastPassLauncherHtmlFileName); return(string.Empty); } else { return($"{Response.Message}"); } }
public ConfigVM() { HpioCertList = CertificateSupport.GetNASHCertificateDictonary(StoreName.My, StoreLocation.CurrentUser); }