SPI  1.2111.4
Secured Payment Interface
Public Member Functions | List of all members
Modularity::SPI::SPI Class Reference

This class contains all the operations of the Payment Interface, Creation and Services management. More...

#include <SPI.h>

Public Member Functions

SPILIBRARY_API void Start ()
 Start using the SPI object. This method is mandatory start of version 1.0.0 Befre Start() is called , SetLogDirectory() and SetAndroidPackageName() may be called. More...
 
SPILIBRARY_API Service * AddService (string ServiceName, ServiceID Id, Config &ServiceConfig)
 Defines an active payment service and initilaizes it. Should be called before any operation is made with that service. Any function called regrading to service must be done with the pointer to Service instance returned in this function. More...
 
SPILIBRARY_API SPI_RET_VAL RemoveService (string ServiceName)
 Remove active payment service from the interface. More...
 
SPILIBRARY_API Device * AddDevice (string DeviceName, DeviceId Id, Config &DeviceConfig)
 Defines an active payment service and initilaizes it. Should be called before any operation is made with that service. Any function called regrading to service must be done with the pointer to Service instance returned in this function. More...
 
SPILIBRARY_API SPI_RET_VAL RemoveDevice (string DeviceName)
 Remove active payment service from the interface. More...
 
SPILIBRARY_API Service * GetServiceHandler (string ServiceName)
 Retrieves handle of active payment service instance according its name. More...
 
SPILIBRARY_API void GetSPIVersion (string &Version)
 Retrieve SPI version into string. More...
 
SPILIBRARY_API void SetLogDirectory (string Directory)
 Set the directory where SPI and it's services logs will be saved. If not called, default path will be used under installation directory. More...
 
SPILIBRARY_API void SetAndroidPackageName (string Name)
 Set package name that uses SPI in Android based systems.
More...
 
SPILIBRARY_API void SetLogLevel (SPILogLevel LogLevel)
 Set the log level to be saved in log files SPI and service. Default is Info. Must be set before starting SPI. More...
 
SPILIBRARY_API DcsStatus GetDcsStatus ()
 Get the DCS status of this machine. More...
 
SPILIBRARY_API SPI_RET_VAL DoDcsActivation (string PhoneNumber, DcsActivationMode ActivationMode)
 Blocking method to start activation of a user with phone number on DCS system. If error achieved use GetDcsIntProperty to get the error code. On PySPI/SPINode method is DoDcsActivation2. More...
 
SPILIBRARY_API SPI_RET_VAL DoDcsActivation (string User, string Password, DcsActivationMode ActivationMode)
 Blocking method to start activation os a user name in Nayax system. If error achieved use GetDcsIntProperty to get the error code. DcsActivation must be confirmed using ConfirmDcsActivation(). More...
 
SPILIBRARY_API void SetLynxEngineEndpoint (string LynxEndpoint, string EngineEndpoint)
 Set base endpoint to DCS enviorment. More...
 
SPILIBRARY_API void ClearDcsActivation ()
 Clear DCS Activation Data.
 
SPILIBRARY_API void EnableJNILogger ()
 Enable JNI internal logger This method is reserved for internal use only.
 
SPILIBRARY_API void SetHardwareId (string Manufacture, string Model, string Serial)
 Set hardware id - Only for Android API. More...
 
SPILIBRARY_API SPI_RET_VAL KeepAlive ()
 Do keep alive to dcs. More...
 
SPILIBRARY_API string GetStringDcsProperty (DcsProperty Property)
 Get a property from DCS as string. More...
 
SPILIBRARY_API ResultType GetIntDcsProperty (DcsProperty Property)
 Get a property from DCS as string. More...
 
SPILIBRARY_API SPI ()
 Default Constructor.
 
SPILIBRARY_API ~SPI ()
 Default Destructor.
 
SPILIBRARY_API string GetFingerprint ()
 Get SPI fingerprint. Reserved for internal usage. More...
 
APIHandle GetSPIHandle () const
 Reserved for internal useage.
 
void SetWorkingDirectory (const std::string &Path) const
 Reserved for internal useage.
 

Detailed Description

This class contains all the operations of the Payment Interface, Creation and Services management.

Examples:
CPP_Examples.cpp.

Definition at line 44 of file SPI.h.

Member Function Documentation

◆ AddDevice()

SPILIBRARY_API Device* Modularity::SPI::SPI::AddDevice ( string  DeviceName,
DeviceId  Id,
Config &  DeviceConfig 
)

Defines an active payment service and initilaizes it. Should be called before any operation is made with that service. Any function called regrading to service must be done with the pointer to Service instance returned in this function.

Parameters
[in]DeviceNameis a string describing payment service
[in]Idis Service type according to ServiceID.
[in]DeviceConfigis a Config Instance provinding information on the Service execution location, such as local library,remote server or remote service accessed by serial cabel.
Returns
Service handle.

◆ AddService()

SPILIBRARY_API Service* Modularity::SPI::SPI::AddService ( string  ServiceName,
ServiceID  Id,
Config &  ServiceConfig 
)

Defines an active payment service and initilaizes it. Should be called before any operation is made with that service. Any function called regrading to service must be done with the pointer to Service instance returned in this function.

Parameters
[in]ServiceNameis a string describing payment service
[in]Idis Service type according to ServiceID.
[in]ServiceConfigis a Config Instance provinding information on the Service execution location, such as local library,remote server or remote service accessed by serial cabel.
Returns
Service handle.
Examples:
CPP_Examples.cpp.

◆ DoDcsActivation() [1/2]

SPILIBRARY_API SPI_RET_VAL Modularity::SPI::SPI::DoDcsActivation ( string  PhoneNumber,
DcsActivationMode  ActivationMode 
)

Blocking method to start activation of a user with phone number on DCS system. If error achieved use GetDcsIntProperty to get the error code. On PySPI/SPINode method is DoDcsActivation2.

Parameters
[in]PhoneNumberis the phone number the device registered with.
Returns
SPI_SUCCESS if ok, SPI_FAIL otherwise

◆ DoDcsActivation() [2/2]

SPILIBRARY_API SPI_RET_VAL Modularity::SPI::SPI::DoDcsActivation ( string  User,
string  Password,
DcsActivationMode  ActivationMode 
)

Blocking method to start activation os a user name in Nayax system. If error achieved use GetDcsIntProperty to get the error code. DcsActivation must be confirmed using ConfirmDcsActivation().

Parameters
[in]Useris the username registered in Nayax.
[in]Passwordis User's password in plain.
Returns
SPI_SUCCESS if ok, SPI_FAIL otherwise

◆ GetDcsStatus()

SPILIBRARY_API DcsStatus Modularity::SPI::SPI::GetDcsStatus ( )

Get the DCS status of this machine.

Returns
DcsStatus

◆ GetFingerprint()

SPILIBRARY_API string Modularity::SPI::SPI::GetFingerprint ( )

Get SPI fingerprint. Reserved for internal usage.

Returns
string.

◆ GetIntDcsProperty()

SPILIBRARY_API ResultType Modularity::SPI::SPI::GetIntDcsProperty ( DcsProperty  Property)

Get a property from DCS as string.

Parameters
[in]Propertyis the requiered property.
Returns
property if found, -1 otherwise.

◆ GetServiceHandler()

SPILIBRARY_API Service* Modularity::SPI::SPI::GetServiceHandler ( string  ServiceName)

Retrieves handle of active payment service instance according its name.

Parameters
[in]ServiceNameis the payment service description string as provided in AddService()
Returns
Service handle. NULL pointer is returned in case of unknown service.
Examples:
CPP_Examples.cpp.

◆ GetSPIVersion()

SPILIBRARY_API void Modularity::SPI::SPI::GetSPIVersion ( string &  Version)

Retrieve SPI version into string.

Parameters
[out]Versionis std::string provided as output parameter and is cleaned before written.
Examples:
CPP_Examples.cpp.

◆ GetStringDcsProperty()

SPILIBRARY_API string Modularity::SPI::SPI::GetStringDcsProperty ( DcsProperty  Property)

Get a property from DCS as string.

Parameters
[in]Propertyis the requiered property.
Returns
string if propert found, empty otherwise.

◆ KeepAlive()

SPILIBRARY_API SPI_RET_VAL Modularity::SPI::SPI::KeepAlive ( )

Do keep alive to dcs.

Returns
RFU

◆ RemoveDevice()

SPILIBRARY_API SPI_RET_VAL Modularity::SPI::SPI::RemoveDevice ( string  DeviceName)

Remove active payment service from the interface.

Parameters
[in]ServiceNameis the payment service description string as provided in AddService()
Returns
  • SPI_SUCCESS if device removed successfully.
  • SPI_INVALID if device not found.

◆ RemoveService()

SPILIBRARY_API SPI_RET_VAL Modularity::SPI::SPI::RemoveService ( string  ServiceName)

Remove active payment service from the interface.

Parameters
[in]ServiceNameis the payment service description string as provided in AddService()
Returns
  • SPI_SUCCESS if service removed successfully.
  • SPI_INVALID if Service not found.

◆ SetAndroidPackageName()

SPILIBRARY_API void Modularity::SPI::SPI::SetAndroidPackageName ( string  Name)

Set package name that uses SPI in Android based systems.

Parameters
[in]Nameis the package name

◆ SetHardwareId()

SPILIBRARY_API void Modularity::SPI::SPI::SetHardwareId ( string  Manufacture,
string  Model,
string  Serial 
)

Set hardware id - Only for Android API.

Parameters
[in]Manufacture
[in]Model
[in]Serialis the sevice serial number

◆ SetLogDirectory()

SPILIBRARY_API void Modularity::SPI::SPI::SetLogDirectory ( string  Directory)

Set the directory where SPI and it's services logs will be saved. If not called, default path will be used under installation directory.

Parameters
[in]Directoryis an absolute path to the directory.

◆ SetLogLevel()

SPILIBRARY_API void Modularity::SPI::SPI::SetLogLevel ( SPILogLevel  LogLevel)

Set the log level to be saved in log files SPI and service. Default is Info. Must be set before starting SPI.

Parameters
[in]Level.

◆ SetLynxEngineEndpoint()

SPILIBRARY_API void Modularity::SPI::SPI::SetLynxEngineEndpoint ( string  LynxEndpoint,
string  EngineEndpoint 
)

Set base endpoint to DCS enviorment.

Parameters
[in]LynxEndpointis base endpoint for Lynx
[in]EngineEndpointis base endpoint for Engine

◆ Start()

SPILIBRARY_API void Modularity::SPI::SPI::Start ( )

Start using the SPI object. This method is mandatory start of version 1.0.0 Befre Start() is called , SetLogDirectory() and SetAndroidPackageName() may be called.

Returns
void.

The documentation for this class was generated from the following file: