Vipps.net
0.9.1
See the version list below for details.
dotnet add package Vipps.net --version 0.9.1
NuGet\Install-Package Vipps.net -Version 0.9.1
<PackageReference Include="Vipps.net" Version="0.9.1" />
paket add Vipps.net --version 0.9.1
#r "nuget: Vipps.net, 0.9.1"
// Install Vipps.net as a Cake Addin #addin nuget:?package=Vipps.net&version=0.9.1 // Install Vipps.net as a Cake Tool #tool nuget:?package=Vipps.net&version=0.9.1
sidebar_label: .NET pagination_next: null pagination_prev: null
.NET SDK
The official .NET SDK for the Checkout and ePayment APIs. Supports .NET Standard 2.0+, .NET Core 2.0+ and .NET Framework 4.8+.
You can install the SDK with Nuget as per Installation. More information about the package can be found on nuget.org.
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
};
var vippsApi = VippsApi.Create(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 vippsApi.CheckoutService.InitiateSession(request);
Unimplemented parameters and properties
This SDK offers 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 AdditionalProperties
. This is a dictionary that if set will merge with the request object.
AdditionalProperties
example:
InitiateSessionRequest initiateSessionRequest = new()
{
Transaction = new PaymentTransaction()
{
Amount = new Amount()
{
Currency = "NOK",
Value = 49000
},
PaymentDescription = "Hei"
},
AdditionalProperties =
{
{ "Configuration", new { AcceptedPaymentMethods = new[] { "WALLET", "CARD" } } }
}
};
Response
All response objects have a property called RawResponse
that contains the response in the form of a Json Object.
RawResponse
example:
var response = vippsApi.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.