Tingg.Checkout.Net 1.0.15

The ID prefix of this package has been reserved for one of the owners of this package by NuGet.org. Prefix Reserved
dotnet add package Tingg.Checkout.Net --version 1.0.15
NuGet\Install-Package Tingg.Checkout.Net -Version 1.0.15
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="Tingg.Checkout.Net" Version="1.0.15" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Tingg.Checkout.Net --version 1.0.15
#r "nuget: Tingg.Checkout.Net, 1.0.15"
#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 Tingg.Checkout.Net as a Cake Addin
#addin nuget:?package=Tingg.Checkout.Net&version=1.0.15

// Install Tingg.Checkout.Net as a Cake Tool
#tool nuget:?package=Tingg.Checkout.Net&version=1.0.15

Tingg Checkout SDK for .NET

tingg

The Tingg Checkout SDK gives fast and easy access to the Tingg hosted checkout platform.

Getting started

Explain how to use your package, provide clear and concise getting started instructions, including any necessary steps.

Prerequisites

You need a Tingg Account to use this package. If you don't have one you can contact our account managers through tingg-checkout@cellulant.io and have your business registered & activated.

Visit our Official Documentation to find out more on how you can get started using Tingg.

Once you're signed in, you will need to retrieve your API Keys, that is the IV Key, the Secret Key and the Access Key.

Installation

dotnet add package Tingg.Checkout.Net

Usage

  1. To use this library add a using statement for Checkout.Models and Checkout.Service
  2. You can now initialize CheckoutEncryption passing in the relevant parameters IVKey and SecretKey (advised to have these keys in a separate configuration source)
  3. Validate the payload by calling the CheckoutValidation.Validate() function.
  4. Call Encrypt() on the CheckoutEncryption instance passing in the validated payload.
using Checkout.Models;
using Checkout.Service;

var builder = WebApplication.CreateBuilder(args);
builder.Services.AddCors();

// Add services to the container.
var app = builder.Build();


// Configure the HTTP request pipeline.

app.UseHttpsRedirection();
app.UseCors(x=>x
.SetIsOriginAllowed(origin=>true));

// Generate express link
app.MapPost("/checkout-express", (Payload payload) =>
{
    CheckoutExpress checkoutExpress = new CheckoutExpress(SupportedEnvironment.Testing);
    try {
        return checkoutExpress.create("<API_KEY>", "<CLIENT_ID>", "<CLIENT_SECRET>", payload);
    } catch (ValidationException ex) {
        Console.WriteLine($"Validation failed: {ex.Message}");
    } catch (Exception ex) {
        Console.WriteLine($"Encryption failed: {ex.Message}");
    }
});


// encrypt payload
app.MapPost("/checkout-encryption", (Payload payload) =>
{
    CheckoutEncryption checkoutEncryption = new CheckoutEncryption("<IV_KEY>", "<SECRET_KEY>");
    try {
        //OPTIONAL - Validate payload before encryption
        Payload validPayload = CheckoutValidation.Validate(payload);
        string encryptedParams = checkoutEncryption.encrypt(validPayload);
        return new CheckoutResponse() 
         {
            encrypted_payload = encryptedParams,
            access_key = "<ACCESS_KEY>"
         };
    } catch (ValidationException ex) {
        Console.WriteLine($"Validation failed: {ex.Message}");
    } catch (Exception ex) {
        Console.WriteLine($"Encryption failed: {ex.Message}");
    }
});

app.Run();

Additional documentation

Feedback

Feel free to reach us through our discussion forum.

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.1 is compatible. 
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.15 137 3/27/2024
1.0.14 446 1/17/2024
1.0.13 470 1/16/2024
1.0.12 474 1/16/2024
1.0.11 465 1/16/2024
1.0.10 499 1/15/2024
1.0.9 507 1/15/2024
1.0.8 494 1/15/2024
1.0.7 508 1/15/2024
1.0.6 498 1/15/2024
1.0.5 490 1/15/2024
1.0.4 489 1/12/2024
1.0.3 708 12/1/2023
1.0.2 634 11/22/2023
1.0.1 658 11/22/2023

This is the initial release