DibsPaymentSDK 1.1.0

The owner has unlisted this package. This could mean that the package is deprecated, has security vulnerabilities or shouldn't be used anymore.
dotnet add package DibsPaymentSDK --version 1.1.0
NuGet\Install-Package DibsPaymentSDK -Version 1.1.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DibsPaymentSDK" Version="1.1.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add DibsPaymentSDK --version 1.1.0
#r "nuget: DibsPaymentSDK, 1.1.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install DibsPaymentSDK as a Cake Addin
#addin nuget:?package=DibsPaymentSDK&version=1.1.0

// Install DibsPaymentSDK as a Cake Tool
#tool nuget:?package=DibsPaymentSDK&version=1.1.0

Dibs Payment API SDK

Description

.Net Core SDK for Dibs Payment easy API, it's a .Net core wrapper for Dibs Payment APIs including APIs for create payments, charge payment, update orders... etc.

For more details about Dibs Payment Please visit https://www.nets.eu/en/payments/online/

For more specific information about Dibs Payment APIs, Please visit Dibs Payment API site which also include full API documentation and code samples.

https://tech.dibspayment.com/easy/api/paymentapi

Installation

Use the nuget package manager to install library.

Install-Package DibsPaymentSDK -Version 1.0.0

Requirements

.Net Core v3
VSCode or VS
Nuget Package Manager

DibsPaymentSDK Configuration

  Add below section to your application appsettings.json file.

	"DibsPaymentAPI": {
		"BaseURL": "https://test.api.dibspayment.eu",
		"SecretKey": "100101010101010101010"
	}

DibsPaymentSDK Usage

	var createPaymentPost = new CreatePaymentPost();

        var items = new List<Item>();
        items.Add(new Item() {
            Name = "Product1",
            Reference = "22020206",
            GrossTotalAmount = 10,
            NetTotalAmount = 10,
            Quantity = 5,
            TaxAmount = 0,
            TaxRate = 0,
            Unit = "Item",
            UnitPrice = 2
        });
		
        createPaymentPost.Order = new Order() { 
            Amount = 10,
            Currency = "DKK",
            Reference = "123456",
            Items = items
        };
		
        createPaymentPost.PaymentMethods = new List<PaymentMethod>();
        createPaymentPost.PaymentMethods.Add(new PaymentMethod()
        {
            Fee = items.First(),
            Name = "easy-invoice"
        });
		
        var countries = new List<Country>();
        countries.Add(new Country() {
            CountryCode = "DNK"
        });
		
        createPaymentPost.Checkout = new Checkout()
        {
            Charge = true,
            Consumer = new Consumer()
            { Company = null
              ,Email = "123@live.com",
                PhoneNumber = new PhoneNumber { Number = "01281339011", Prefix = "+45" },
                PrivatePerson = null,
                Reference = "3303030",
                ShippingAddress = new ShippingAddress()
                {
                    Country = "DNK",
                    AddressLine1 = "123 anywhere",
                    AddressLine2 = "here",
                    City = "Copenhagen",
                    PostalCode = "2000"
                }

            },
            ConsumerType = new ConsumerType()
            { Default = "B2C" },
            IntegrationType = "EmbeddedCheckout",
            MerchantHandlesConsumerData = true,
            MerchantHandlesShippingCost = true,
            PublicDevice = true,
            ReturnUrl = "https://luftborn.com/callback",
            Shipping = new Shipping() { Countries = countries },
            TermsUrl = "https://luftborn.com/terms",
            Url = "https://luftborn.com/checkout"
        };
		
        createPaymentPost.Notifications = new Notifications()
        {
            WebHooks = new List<WebHook>()
        };
		
        createPaymentPost.Notifications.WebHooks.Add(new WebHook()
        {
            Authorization = "111111111",
            Url = "https://c95aed08.ngrok.io/home/Callback",
            EventName = "payment.created"
        });
		
		//create payment
        var paymnetAPI = new PaymentAPI();
        var response = await paymnetAPI.CreatePayment(createPaymentPost);

		//get payment
        var response = await paymentAPI.GetPayment("023900005e43e0a4046e301eacf52f20");

		//charge payment
		
        var chargePayment = new ChargePayment();

        chargePayment.Amount = 10;
        chargePayment.OrderItems = new List<DibsPaymentSDK.Entities.ChargePayment.OrderItem>();
        chargePayment.OrderItems.Add(new DibsPaymentSDK.Entities.ChargePayment.OrderItem() {
            Name = "Product1",
            Reference = "22020206",
            GrossTotalAmount = 10,
            NetTotalAmount = 10,
            Quantity = 5,
            TaxAmount = 0,
            TaxRate = 0,
            Unit = "Item",
            UnitPrice = 2
        });

        var response = await paymentAPI.ChargePayment("00c600005e43dd5a046e301eacf52f0e", chargePayment);
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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 was computed.  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 netcoreapp3.0 is compatible.  netcoreapp3.1 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated