Paytrail-dotnet-sdk
1.0.14
See the version list below for details.
dotnet add package Paytrail-dotnet-sdk --version 1.0.14
NuGet\Install-Package Paytrail-dotnet-sdk -Version 1.0.14
<PackageReference Include="Paytrail-dotnet-sdk" Version="1.0.14" />
paket add Paytrail-dotnet-sdk --version 1.0.14
#r "nuget: Paytrail-dotnet-sdk, 1.0.14"
// Install Paytrail-dotnet-sdk as a Cake Addin #addin nuget:?package=Paytrail-dotnet-sdk&version=1.0.14 // Install Paytrail-dotnet-sdk as a Cake Tool #tool nuget:?package=Paytrail-dotnet-sdk&version=1.0.14
Paytrail .NET SDK
.NET Software Development Kit for Paytrail payment service
Paytrail Payment Service
Paytrail is a payment gateway that offer 20+ payment methods for finish customers.
The payment gateway provides all the popular payment methods with one simple integration. The provided payment methods include, but are not limited to, credit cards, online banking and mobile payments.
To use the payment service, you need to sign up for a Paytrai account. Transactio fees will be charged for every transaction. Transaction cost may vary from merchant to merchant, based on what is agreed upon with Paytrail when negotiating your contract. For more informationm and registration, please visit our website or contact (asiakaspalvelu@paytrail.com) directly.
Requirements
General requirements
- .NET and .NET Core 2.0 or later
- .NET Framework 4.6.1 or later
Development requirements
- XUnit - community-focused unit testing tool for the .NET
Installation
Install with Nuget Package Management Install with .NET Core CLI
Nuget\Install-Package Paytrail-dotnet-sdk -Version 1.0.2
Install with Package Manager Console`
dotnet add package Paytrail-dotnet-sdk --version 1.0.2
Usage
using Newtonsoft.Json;
using Paytrail_dotnet_sdk;
using Paytrail_dotnet_sdk.Model.Request;
using Paytrail_dotnet_sdk.Model.Request.RequestModels;
using Paytrail_dotnet_sdk.Model.Response;
class Program
{
static void Main()
{
PaytrailClient payTrail = new PaytrailClient("375917", "SAIPPUAKAUPPIAS", "xxx");
GetPaymentProvidersRequest payload = new GetPaymentProvidersRequest
{
amount = 1000,
groups = new List<PaymentMethodGroup>()
{
PaymentMethodGroup.creditcard,
}
};
GetPaymentProvidersResponse res = payTrail.GetPaymentProviders(payload);
Console.WriteLine(JsonConvert.SerializeObject(res));
}
}
Folder contents & descriptions
Folder/File | Content/Description |
---|---|
Paytrail-dotnet-sdk/Interface | Interface for all the related classes to implement |
Paytrail-dotnet-sdk/Model | Model classes and functions |
Paytrail-dotnet-sdk/Model/Request | Request model and functions |
Paytrail-dotnet-sdk/Model/Response | Response model and functions |
Paytrail-dotnet-sdk/Util | Utility/Enum classes and functions |
Paytrail-dotnet-sdk/Paytrail.cs | Init paytrail service |
Paytrail-dotnet-sdk/PaytrailClient.cs | Paytrail client class and functions |
Paytrail-dotnet-sdk.UnitTest | .NET unit test |
Basic fucntionalities
The Paytrail-dotnet-sdk supports some functionalities of the Paytrail Payment API.
Some of the key features are:
Payments and refunds
Shop-in-shop
- Creating Shop-in-shop payment request
Token payments
Methods
Method | Description |
---|---|
CreatePayment() | Create payment |
CreateShopInShopPayment() | Create SiS payment |
GetPaymentInfo() | Request payment status |
RefundPayment() | Create refund request |
PayAndAddCardRequest() | Combine a payment and adding a new card with a single request |
GetPaymentProviders() | Get a list of payment providers |
GetGroupedPaymentProviders() | Returns an array of grouped payment providers fields |
EmailRefund() | Create email refund |
CreateGetTokenRequest() | Request card token |
GetSettlements() | Request settlements |
RequestPaymentReport() | Request payment report |
CreateMitPaymentCharge() | Create MiT payment |
CreateMitPaymentAuthorizationHold() | Create MiT authorization hold |
CreateCitPaymentCharge() | Create CiT payment |
CreateCitPaymentAuthorizationHold() | Create CiT authorization hold |
CreateMitPaymentCommit() | Commit MiT authorization hold |
CreateCitPaymentCommit() | Commit CiT authorization hold |
RevertPaymentAuthorizationHold() | Revert existing Mit or CiT authorization hold |
RequestPaymentReportBySettlement() | Request payment report by settlement ID |
CreateAddCardFormRequest() | Save card details |
Product | Versions 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 | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 is compatible. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. 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. |
-
.NETStandard 2.0
- Newtonsoft.Json (>= 13.0.3)
- RestSharp (>= 109.0.1)
-
.NETStandard 2.1
- Newtonsoft.Json (>= 13.0.3)
- RestSharp (>= 109.0.1)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Fixed shop-in-shop validation