NET

Quick Guide

Quick guide to get going from scratch making a transaction

Edit "Quick Guide" on GitHub

Create an instance of PAXTrmImp_1

PAXTrmImp_1 is the main class used and is created by calling the static method create which returns an interface, ISwpTrmIf_1, to the created instance. The create method requires a reference to an ISwpTrmCallbackInterface which in this case is implemented in the PaxImplementation class.

Simplest way of createing an instance using default values

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
using SwpTrmLib;
using SwpTrmLib.Nexo;

// The PaxImplementation call implements the callback interface
public class PaxImplementation : ISwpTrmCallBackInterface
{
    public ISwpTrmIf_1 PAX = {get; internal set; } = null;
 
    // create an instance with default values
    void PaxImplementation() 
    {
        PAX = PAXTrmImp_1.Create(
            new SwpIfConfig(),
            this);

    }
.
.
.

warning

Important!: Remember that EventCallback and PrintRequestEventCallback must be implemented together with the ConfirmationHandler. They are needed in case a transaction need signature approval.

Closer look at SwpIfConfig

A peek at SwpIfConfig and the defaults

1
2
3
4
5
6
7
8
9
10
11
12
namespace SwpTrmLib
{
    public class SwpIfConfig
    {
        public string LogPath { get; set; } = ".\\";
        public int TerminalRxPort { get; set; } = 11000;
        public LogLevel LogLevel { get; set; } = LogLevel.Debug;
        public string UICulture { get; set; } = CultureInfo.CurrentCulture.Name;
        public bool DraftCapture { get; set; } = false;
        public bool LogTerminalHandler { get; set; } = false;
    }
}