A .NET library for integration of your application with the payment services provided by Gerencianet.
From Visual Studio package manager: Search for Gerencianet.SDK
From command-line with NuGet:
$ nuget install Gerencianet.SDK
dotnet 4.0.0
using Gerencianet.SDK;
...
dynamic endpoints = new Endpoints("client_id", "client_secret", true);
var body = new
{
items = new[] {
new {
name = "Product 1",
value = 1000,
amount = 2
}
},
shippings = new[] {
new {
name = "Default Shipping Cost",
value = 100
}
}
};
var response = endpoints.CreateCharge(null, body);
Console.WriteLine(response);
You can run the examples contained in the project Gerencianet.SDK.Examples
by uncommenting the lines in Program.cs
file.
Just remember to set the correct credentials inside Gerencianet.SDK.Examples/Credentials.Settings
before running.
To run the tests, build Gerencianet.SDK.Tests
and use nunit3-console:
$ nunit3-console ./Gerencianet.SDK.Tests/bin/Release/Gerencianet.SDK.Tests.dll
The full documentation with all available endpoints is in https://dev.gerencianet.com.br/.
Bug reports and pull requests are welcome on GitHub at https://github.com/gerencianet/gn-api-sdk-dotnet. This project is intended to be a safe, welcoming space for collaboration.
The library is available as open source under the terms of the MIT License.