Skip to content

johanssontobias/adyen-dotnet-api-library

 
 

Repository files navigation

Adyen dotnet API Library

nuget nuget .NET Core

The Adyen API Library for .net framework enables you to work with Adyen APIs, Hosted Payment Pages and Terminal API with any .net application.

The Library supports all APIs under the following services:

  • bin lookup
  • checkout
  • checkout utility
  • payments
  • payout
  • modifications
  • recurring
  • notifications
  • marketpay account
  • marketpay fund
  • Terminal API (Local and Cloud based)

Requirements

  • Adyen API Library supports .net standard 2.0
  • In order for Adyen API Library to support local terminal api certificate validation the application should be set to .net core 2.1 and above or .net framework 4.6.1 and above

Installation

Vagrant setup

  • Prerequisites virtualbox and vagrant
  • Run the following commands in the root folder to setup vagrant
vagrant up
vagrant ssh
  • Run the library tests
cd adyen-dotnet-api-library
dotnet build
dotnet test

Usage

In order to submit http request to Adyen API you need to initialize the client. The following example makes a checkout payment request:

// Create a paymentsRequest
var amount = new Model.Checkout.Amount("USD", 1000);
var paymentRequest = new Model.Checkout.PaymentRequest
{
      Reference = "Your order number",
      Amount = amount,
      ReturnUrl = @"https://your-company.com/...",
      MerchantAccount = ClientConstants.MerchantAccount,
};
paymentRequest.AddCardData("4111111111111111", "10", "2020", "737", "John Smith");

//Create the http client
var client = new Client("YOUR-XAPI-KEY", Model.Enum.Environment.Test);//or Model.Enum.Environment.Live
var checkout = new Checkout(client);
//Make the call to the service. This example code makes a call to /payments
var paymentResponse = checkout.Payments(paymentRequest);

Documentation

Contributing

We strongly encourage you to join us in contributing to this repository so everyone can benefit from:

  • New features and functionality
  • Resolved bug fixes and issues
  • Any general improvements

Read our contribution guidelines to find out how.

Support

If you have a feature request, or spotted a bug or a technical problem, create a GitHub issue. For other questions, contact our support team.

Licence

MIT license. For more information, see the LICENSE file.

About

Adyen API Library for .NET

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 99.9%
  • HTML 0.1%