First, you should get your YaghutOptions from Yaghut.Client admin and add this section to your appsettings.[environment].json "Yaghut": { "username": "[your username]", "password": "[your password]", "BaseAddress": "https://moderntst.namicard.com/yaghuttest/", "CertificatePassword": "[your certificate password]", "CertificateContentFilePath":"[Certs\\YaghutClientCertificate.p12]" } and get certificate; add it to this root folder Certs/YaghutClientCertificate.p12 as an example, so to get full path we join HostingEnvironment.ContentRootPath with CertificateContentFilePath. your stratup ConfigureServices look like this: public Startup(IConfiguration configuration, IWebHostEnvironment environment) { Configuration = configuration; HostingEnvironment = environment; } public void ConfigureServices(IServiceCollection services) { if (HostingEnvironment.IsDevelopment()) { services.AddMockOfYaghutClient(); } else { services.AddYaghutClient(Configuration,HostingEnvironment); } } ....
License
—
Deps
2
Install Size
—
Vulns
✓ 0
Published
Jan 15, 2022
$ dotnet add package Yaghut.ClientNo README available.