blob: 906295692d0b4914e503aeb0c0e3f66a3ebbf081 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
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));
|