Vipps.net
0.8.2
See the version list below for details.
dotnet add package Vipps.net --version 0.8.2
NuGet\Install-Package Vipps.net -Version 0.8.2
<PackageReference Include="Vipps.net" Version="0.8.2" />
paket add Vipps.net --version 0.8.2
#r "nuget: Vipps.net, 0.8.2"
// Install Vipps.net as a Cake Addin #addin nuget:?package=Vipps.net&version=0.8.2 // Install Vipps.net as a Cake Tool #tool nuget:?package=Vipps.net&version=0.8.2
Vipps.net
The official Vipps .NET SDK for the Checkout and Epayment APIs.
Supports .NET Standard 2.0+, .NET Core 2.0+ and .NET Framework 4.8+
Features
- Serialization/deserialization
- Authentication
- Network retries
- Idempotency
Installation
.NET Core CLI:
dotnet add package vipps.net
Usage
var vippsConfigurationOptions = new VippsConfigurationOptions
{
ClientId = "CLIENT-ID",
ClientSecret = "CLIENT-SECRET",
MerchantSerialNumber = "MERCHANT-SERIAL-NUMBER",
SubscriptionKey = "SUBSCRIPTION-KEY",
UseTestMode = true
};
VippsConfiguration.ConfigureVipps(vippsConfigurationOptions);
var request = new InitiateSessionRequest
{
MerchantInfo = new PaymentMerchantInfo
{
CallbackAuthorizationToken = Guid.NewGuid().ToString(),
CallbackUrl = "https://your-url-here.com:3000",
ReturnUrl = "https://your-url-here.com:3000",
},
Transaction = new PaymentTransaction
{
Amount = new Amount { Currency = "NOK", Value = 10000 },
PaymentDescription = "test",
Reference = Guid.NewGuid().ToString()
}
};
var result = await CheckoutService.InitiateSession(request);
Unimplemented parameters and properties
The Vipps SDK offer typed request and response classes. These classes might not be up to date if you are on the bleeding edge of our APIs, or if you use features that are not generally available.
Request
All request objects have a property called "ExtraParameters". This is a dynamic object that if set will merge with the request object.
ExtraParameters example
InitiateSessionRequest initiateSessionRequest = new()
{
Transaction = new PaymentTransaction()
{
Amount = new Amount()
{
Currency = "NOK",
Value = 49000
},
PaymentDescription = "Hei"
},
ExtraParameters = new
{
Transaction = new
{
Metadata = new
{
KID = "100001"
}
}
}
};
Response
All response objects have a property called RawResponse that contains the response in the form of a JsonObject.
RawResponse example
var response = checkoutService.InitiateSession(initiateSessionRequest);
var cancellationUrl = response.RawResponse["cancellationUrl"].ToString();
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 is compatible. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 is compatible. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 is compatible. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETCoreApp 3.1
- Microsoft.Extensions.Logging.Abstractions (>= 3.1.32)
- Newtonsoft.Json (>= 13.0.2)
- Polly.Contrib.WaitAndRetry (>= 1.1.1)
- Polly.Extensions.Http (>= 3.0.0)
- System.ComponentModel.Annotations (>= 5.0.0)
- System.IdentityModel.Tokens.Jwt (>= 6.27.0)
-
.NETFramework 4.8
- Microsoft.Extensions.Logging.Abstractions (>= 3.1.32)
- Newtonsoft.Json (>= 13.0.2)
- Polly.Contrib.WaitAndRetry (>= 1.1.1)
- Polly.Extensions.Http (>= 3.0.0)
- System.ComponentModel.Annotations (>= 5.0.0)
- System.IdentityModel.Tokens.Jwt (>= 6.27.0)
-
.NETStandard 2.0
- Microsoft.Extensions.Logging.Abstractions (>= 3.1.32)
- Newtonsoft.Json (>= 13.0.2)
- Polly.Contrib.WaitAndRetry (>= 1.1.1)
- Polly.Extensions.Http (>= 3.0.0)
- System.ComponentModel.Annotations (>= 5.0.0)
- System.IdentityModel.Tokens.Jwt (>= 6.27.0)
-
net6.0
- Microsoft.Extensions.Logging.Abstractions (>= 3.1.32)
- Newtonsoft.Json (>= 13.0.2)
- Polly.Contrib.WaitAndRetry (>= 1.1.1)
- Polly.Extensions.Http (>= 3.0.0)
- System.ComponentModel.Annotations (>= 5.0.0)
- System.IdentityModel.Tokens.Jwt (>= 6.27.0)
-
net7.0
- Microsoft.Extensions.Logging.Abstractions (>= 3.1.32)
- Newtonsoft.Json (>= 13.0.2)
- Polly.Contrib.WaitAndRetry (>= 1.1.1)
- Polly.Extensions.Http (>= 3.0.0)
- System.ComponentModel.Annotations (>= 5.0.0)
- System.IdentityModel.Tokens.Jwt (>= 6.27.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.