Start
The start method initializes the PAXTrmImp_1 instance and starts the listener if default mode is desired. Whether default mode or client only mode is chosen depends on the SaleCapabilities string in the SaleApplInfo object. If default is desired the correct string is already there. For client only mode the SaleCapabilities string must only contain SaleCapabilities.PrinterReceipt.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
class PaxImplementation : ISwpTrmCallbackInterface
{
public ISwpTrmIf_1 PAX = {get; internal set; } = null;
public bool ClientOnly {get; set} = false;
public bool CloudConnection {get; set;} = true;
.
.
.
SaleApplInfo si = new SaleApplInfo() {
// provider identification is company or brand name
ProviderIdentification = "The best",
SoftwareVersion = "1.0",
ApplicationName = "A Demo",
POIID = POIID,
};
// If ClientOnly is desired, overwrite the default SaleCapabilities
if (ClientOnly) {
si.SaleCapabilities = SaleCapabilitiesEnum.PrinterReceipt.ToString();
}
si.TerminalConnectionType = CloudConnection ? TerminalConnectionTypes.CLOUD : TerminalConnectionTypes.LAN;
// Initialize and start listener unless ClientOnly
PAX.Start(si);
.
.
.
Closer look at SaleApplInfo
The only default value in SaleApplInfo is SaleCapabilities for default integration
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
namespace SwpTrmLib
{
//
// Summary:
// SaleApplInfo is information used in the LoginRequest towards the terminal.
public class SaleApplInfo
{
public string ProviderIdentification { get; set; }
public string ApplicationName { get; set; }
public string SoftwareVersion { get; set; }
public string POIID { get; set; }
public bool ForceAcquisitionReference { get; set; }
// Summary:
// Default SaleCapabilities will result in a listener being started on a configured port.
// To use Client Only Mode use only the value SaleCapabilitiesEnum.PrinterReceipt.
public string SaleCapabilities
public SaleTerminalEnvironment SaleTerminalEnvironment { get; set; }
public OperatorLanguages OperatorLanguage {get; set;} = OperatorLanguages.undefined;
public TerminalConnectionTypes TerminalConnectionType {get; set;} = TerminalConnectionType.LAN;
}
}
| Name | Type | Description |
|---|---|---|
| ProviderIdentification | string | Name of the integrator. |
| ApplicationName | string | Name of the application |
| SoftwareVersion | string | Version of the application |
| POIID | string | Identifies the POI for retrieving correct parameters and software |
| ForceAcquisitionReference | bool | If true, the terminal requires a CardAcquisitionRequest ahead of any PaymentRequest |
| SaleCapabilities | string | Capabilities of the POS that decides terminal’s behaviour. If only “PrinterReceipt”, a listener will not be started. Client only mode. |
| TerminalConnectionType | TerminalConnectionTypes | LAN or Cloud |