summaryrefslogtreecommitdiffstats
path: root/src/IOL.VippsEcommerce.Client
diff options
context:
space:
mode:
Diffstat (limited to 'src/IOL.VippsEcommerce.Client')
-rw-r--r--src/IOL.VippsEcommerce.Client/IOL.VippsEcommerce.Client.csproj16
-rw-r--r--src/IOL.VippsEcommerce.Client/Program.cs16
2 files changed, 32 insertions, 0 deletions
diff --git a/src/IOL.VippsEcommerce.Client/IOL.VippsEcommerce.Client.csproj b/src/IOL.VippsEcommerce.Client/IOL.VippsEcommerce.Client.csproj
new file mode 100644
index 0000000..9c27c35
--- /dev/null
+++ b/src/IOL.VippsEcommerce.Client/IOL.VippsEcommerce.Client.csproj
@@ -0,0 +1,16 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+ <PropertyGroup>
+ <OutputType>Exe</OutputType>
+ <TargetFramework>net5.0</TargetFramework>
+ </PropertyGroup>
+
+ <ItemGroup>
+ <ProjectReference Include="..\IOL.VippsEcommerce\IOL.VippsEcommerce.csproj" />
+ </ItemGroup>
+
+ <ItemGroup>
+ <PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="5.0.1" />
+ </ItemGroup>
+
+</Project>
diff --git a/src/IOL.VippsEcommerce.Client/Program.cs b/src/IOL.VippsEcommerce.Client/Program.cs
new file mode 100644
index 0000000..a4faccc
--- /dev/null
+++ b/src/IOL.VippsEcommerce.Client/Program.cs
@@ -0,0 +1,16 @@
+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 = "";
+});
+var provider = services.BuildServiceProvider();
+var vippsEcommerceService = provider.GetService<IVippsEcommerceService>();
+var res = vippsEcommerceService?.GetPaymentDetailsAsync("asdf").Result;
+Console.WriteLine(JsonSerializer.Serialize(res)); \ No newline at end of file