Skip to content

dorana/swedbank-pay-sdk-dotnet

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Swedbank Pay SDK for .NET

Swedbank Pay SDK for .NET

Build status

Build server Platform Status
Azure DevOps Windows Build Status

About

IMPORTANT: This SDK is at an early stage and not yet used in production. We do not offer support for this version, but will release supported versions in the future. Feel free to play around, but for full functionality and support, please wait for the supported, stable release.

SwedbankPay.Sdk is a netstandard2 library that allows you to interact with Swedbank Pay's API Platform in a statically typed client.

Supported APIs

  • Payment Order
    • create payment order
    • get payment order
    • capture
    • cancel
    • reversal
    • abort
  • Swish Payments
    • create swish payment
    • get swish payment
    • abort
    • reversal
  • Card Payments
    • create card payment
    • get card payment
    • capture
    • cancel
    • reversal

Sample apps

Check the the samples folder.
To run the sample site. Make sure to add your PayeeId and ApiBaseUrl from SwedbankPay in appsettings.json

You will also need to add the token from SwedbankPay in secrets.json by running the following command in the project root folder.
dotnet user-secrets set "Token" "{Your token}" --project src/Samples/Sample.AspNetCore

Getting started

Install the SwedbankPay.Sdk NuGet in your project:

dotnet add package SwedbankPay.Sdk

To configure the SDK in one line using Microsoft.Extensions.DependencyInjection, you need to install SwedbankPay.Sdk.Extensions. The SDK can then be configured as such: (This requires that you have added SwedbankPay.Sdk.Extensions)

public void ConfigureServices(IServiceCollection services)
{
    services.AddSwedbankPayClient(ApiUrl, AuthenticationToken);
    ...
}

This will add the ISwedbankPayClient to the system, as well as interfaces for all api's in case you want to have more control over what is injected. See the samples for inspiration and usage. Using this to configure the SwedbankPay.Sdk will set up a LoggingDelegatingHandler that aids in logging error responses from the api.

About

Swedbank Pay SDK for .NET (Beta)

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 90.5%
  • HTML 7.0%
  • PowerShell 1.3%
  • Shell 0.6%
  • Dockerfile 0.3%
  • CSS 0.3%