SPI  1.1.52
Secured Payment Interface
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
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.
 
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.
 
SPILIBRARY_API SPI_RET_VAL RemoveService (string ServiceName)
 Remove active payment service from the interface.
 
SPILIBRARY_API Service * GetServiceHandler (string ServiceName)
 Retrieves handle of active payment service instance according its name.
 
SPILIBRARY_API void GetSPIVersion (string &Version)
 Retrieve SPI version into string.
 
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.
 
SPILIBRARY_API void SetAndroidPackageName (string Name)
 Set package name that uses SPI in Android based systems.
 
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.
 
SPILIBRARY_API SPI ()
 Default Constructor.
 
SPILIBRARY_API ~SPI ()
 Default Destructor.
 
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 41 of file SPI.h.

Member Function Documentation

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.
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.
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.
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.
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
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.
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.
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: