blob: 7f768047c0e3ae4618b74fa69e4177246d51e5cd (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
using System;
using System.Text.Json;
using IOL.VippsEcommerce;
using Microsoft.Extensions.DependencyInjection;
var services = new ServiceCollection();
services.AddVippsEcommerceService(o => {
o.ClientSecret = "asdf";
o.ClientId = "asdf";
o.ApiUrl = "sadf";
o.PrimarySubscriptionKey = "";
o.Verify();
});
var provider = services.BuildServiceProvider();
var vippsEcommerceService = provider.GetService<IVippsEcommerceService>();
if (vippsEcommerceService == default) {
return;
}
Console.WriteLine(JsonSerializer.Serialize(vippsEcommerceService.Configuration));
|