CieloRest 1.0.1

There is a newer version of this package available.
See the version list below for details.
dotnet add package CieloRest --version 1.0.1
NuGet\Install-Package CieloRest -Version 1.0.1
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="CieloRest" Version="1.0.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add CieloRest --version 1.0.1
#r "nuget: CieloRest, 1.0.1"
#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 CieloRest as a Cake Addin
#addin nuget:?package=CieloRest&version=1.0.1

// Install CieloRest as a Cake Tool
#tool nuget:?package=CieloRest&version=1.0.1

Características

  • Funções Assincronas.
  • HttpClient.
  • Sem dependência a bibliotecas JSON (NewtonSoft, Jil, MessagePack...)
  • Testes Unitários
  • .Net Standard 2.0, .NET CORE 2.0, Xamarin, NET 4.6.1 ...

Principais recursos

  • Pagamentos por cartão de crédito.
  • Pagamentos recorrentes.
    • Com autorização na primeira recorrência.
    • Com autorização a partir da primeira recorrência.
  • Pagamentos por cartão de débito.
  • Geração de token para o cartão para armazenamento seguro
  • Boleto
  • Transferência Eletrônica
  • Cancelamento de autorização.
  • Consulta de pagamentos.

Implemente seu provider JSON

Você pode utilizar qualquer provider JSON. Para isso implemente a interface ISerializerJSON. Exemplo utilizando Newtonsoft:

public class SerializerJSON : ISerializerJSON
{
    public string Serialize<T>(T value)
    {
        return Newtonsoft.Json.JsonConvert.SerializeObject(value);
    }

    public T Deserialize<T>(HttpContent content)
    {
         return Deserialize<T>(content.ReadAsStringAsync().Result);
    }

    public T Deserialize<T>(string json)
    {
         return Newtonsoft.Json.JsonConvert.DeserializeObject<T>(json);
    }
}

Transformando Async para Sync

Coloque no final da função o Result. Por exemplo:

api.CreateTransaction(Guid.NewGuid(), transaction).Result;

Chave do Sandbox

Caso queira executar o teste unitário pode deixar a minha chave do Sandbox, se deseja utilizar a sua altere a classe:

  public class Merchant
  {
          public static readonly Merchant SANDBOX = 
                 new Merchant(Guid.Parse("00000000-0000-0000-0000-000000000000"), "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA");

  }
 

Nuget

Install-Package CieloRest -Version 1.0.0

Documentação da Cielo

MIT License

Copyright (c) 2017 Hugo de Brito V. R. Alves

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

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 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 was computed. 
.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. 
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
1.0.19 2,113 6/23/2022
1.0.18 367 6/23/2022
1.0.17 369 6/23/2022
1.0.16 369 6/23/2022
1.0.15 3,644 7/2/2020
1.0.14 560 7/2/2020
1.0.13 402 7/2/2020
1.0.12 422 7/2/2020
1.0.11 12,959 3/20/2019
1.0.10 941 7/31/2018
1.0.9 1,029 6/18/2018
1.0.8 997 6/4/2018
1.0.7 1,011 5/9/2018
1.0.6 968 11/29/2017
1.0.5 1,019 10/24/2017
1.0.4 1,045 10/24/2017
1.0.3 1,202 10/23/2017
1.0.2 1,007 10/19/2017
1.0.1 1,062 10/19/2017
1.0.0 1,102 10/18/2017

Adicionando mais opções como Cartão de Débito, Wallet e FraudAnalysis