summaryrefslogtreecommitdiffstats
path: root/src/IOL.VippsEcommerce.Client/Program.cs
blob: b165f630c8e0a2537a0d7acd89de2cce85c7ad2b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
using System;
using System.Text.Json;
using IOL.VippsEcommerce;
using Microsoft.Extensions.DependencyInjection;

var services = new ServiceCollection();
services.AddVippsEcommerceService(o => {
	o.ApiUrl = "";
	o.PrimarySubscriptionKey = "";
	o.ClientSecret = "";
	o.ClientId = "";
	o.CacheEncryptionKey = "";
	o.CacheDirectoryPath = "";
});
var provider = services.BuildServiceProvider();
var vippsEcommerceService = provider.GetService<IVippsEcommerceService>();
var res = vippsEcommerceService?.GetPaymentDetailsAsync("asdf").Result;
Console.WriteLine(JsonSerializer.Serialize(res));