SPI  1.2404.0
Secured Payment Interface
Public Member Functions | Protected Attributes | Friends | List of all members
Modularity::SPI::Device Class Referenceabstract

This class contains all the operations that Avilible for a Service. Since this class is abstract, Servuce object is invlaid and can't be constructed. A Service handle is created by SPI class interface. All data in this class is reachable through various methods which define the behaivor of the operation. More...

#include <Device.h>

Public Member Functions

virtual SPILIBRARY_API SPI_RET_VAL Init ()=0
 Initialize the payment service. More...
 
virtual SPILIBRARY_API SPI_RET_VAL SetConfig (Config &ConfigObj)=0
 Send configuration set to payment application (Agamento). Use Config.SetCustomAttribute to set a config field. The fields are according to the document Agamento prefences. Boolean values are sent as string "true"/"false". More...
 
virtual SPILIBRARY_API SPI_RET_VAL AbortDisplayActivity (string PackageName)=0
 Abort display external application activity started by DisplayActivity. More...
 
virtual SPILIBRARY_API SPI_RET_VAL DisplayActivity (string PackageName, string ActivityName, string DataInput, string &DataOutput, TimeOutType Timeout)=0
 Display external application activity using Android startActivityForResult. Activity will be displayed. When finished, the intent extra field "data" will be set in DataOutput. More...
 
virtual SPILIBRARY_API string GetProperty (DeviceProperty Property)=0
 Get property of remote device. More...
 
virtual SPILIBRARY_API SPI_RET_VAL UploadLogs ()=0
 Upload device logs to cloud. More...
 
virtual SPILIBRARY_API SPI_RET_VAL GetConfig (Config &ConfigObj)=0
 Get configuration set from payment application (Agamento). Use Config.GetCustomAttribute to get a config field. The fields are according to the document Agamento prefences. Boolean values are sent as string "true"/"false". More...
 
virtual SPILIBRARY_API SPI_RET_VAL ReadCard (ReadCardData *DataIO)=0
 This method is extension to Service.DisplaySwipe and supports various interfaces of cards. This method get as input interfaces to enable on the device and returns appropiate data. Please see ReadCardData for full description. More...
 
virtual SPILIBRARY_API SPI_RET_VAL AbortReadCard ()=0
 Abort ReadCard operation while device is polling for card. More...
 
virtual SPILIBRARY_API SPI_RET_VAL SendExternalEvent (SignedNumericType Code, std::string Data)=0
 Send external event to the device. The device will send this event to back office SUPPORTED ONLY ON VPOST DEVICE. More...
 
SPILIBRARY_API string GetName () const
 Get device name as defined while added to SPI. More...
 
APIHandle GetDeviceHandle () const
 Handle get - reserved for internal useage.
 
 Device (string Name, Config &, DeviceId Id)
 Constructor reserved for internal useage.
 
virtual ~Device ()
 destructor reserved for internal useage
 

Protected Attributes

APIHandle DeviceHandle
 

Friends

class SPI
 

Detailed Description

This class contains all the operations that Avilible for a Service. Since this class is abstract, Servuce object is invlaid and can't be constructed. A Service handle is created by SPI class interface. All data in this class is reachable through various methods which define the behaivor of the operation.

Definition at line 31 of file Device.h.

Member Function Documentation

◆ AbortDisplayActivity()

virtual SPILIBRARY_API SPI_RET_VAL Modularity::SPI::Device::AbortDisplayActivity ( string  PackageName)
pure virtual

Abort display external application activity started by DisplayActivity.

Parameters
[in]PackageName- Activity's application package name.
[in]ActivityName- Activity full package path.
Returns
  • SPI_SUCCESS : Activity was displayed and result is in DataOutput
  • SPI_FAIL : Activity failed to displayed
  • SPI_INVALID : An error occurred with one of the input parameters

◆ AbortReadCard()

virtual SPILIBRARY_API SPI_RET_VAL Modularity::SPI::Device::AbortReadCard ( )
pure virtual

Abort ReadCard operation while device is polling for card.

Returns
  • SPI_SUCCESS : Abort OK.
  • SPI_FAIL: An error occurred

◆ DisplayActivity()

virtual SPILIBRARY_API SPI_RET_VAL Modularity::SPI::Device::DisplayActivity ( string  PackageName,
string  ActivityName,
string  DataInput,
string &  DataOutput,
TimeOutType  Timeout 
)
pure virtual

Display external application activity using Android startActivityForResult. Activity will be displayed. When finished, the intent extra field "data" will be set in DataOutput.

Parameters
[in]PackageName- Activity's application package name.
[in]ActivityName- Activity full package path.
[in]DataInput- Data will be sent in the intent to the Activity insie the field "data".
[out]DataOutput- String that the activity will set in the intent result back to the launching activity in field "data".
[in]Timeout- timeout in seconds to abort the activity from the launching application.
Returns
  • SPI_SUCCESS : Activity was displayed and result is in DataOutput
  • SPI_FAIL : Activity failed to displayed
  • SPI_ABORTED : Timeout / Aborted by user
  • SPI_INVALID : An error occurred with one of the input parameters
See also
AbortDisplayActivity()

◆ GetConfig()

virtual SPILIBRARY_API SPI_RET_VAL Modularity::SPI::Device::GetConfig ( Config &  ConfigObj)
pure virtual

Get configuration set from payment application (Agamento). Use Config.GetCustomAttribute to get a config field. The fields are according to the document Agamento prefences. Boolean values are sent as string "true"/"false".

Parameters
[out]ConfigObj- Config object to write the result. must be sent.
Returns
  • SPI_SUCCESS : Config get successfully
  • SPI_FAIL: An error occurred

◆ GetName()

SPILIBRARY_API string Modularity::SPI::Device::GetName ( ) const

Get device name as defined while added to SPI.

Returns
std::string with Name.

◆ GetProperty()

virtual SPILIBRARY_API string Modularity::SPI::Device::GetProperty ( DeviceProperty  Property)
pure virtual

Get property of remote device.

Parameters
[in]Propertyas integer as described in DeviceProperty
Returns
  • Property as string if exist

◆ Init()

virtual SPILIBRARY_API SPI_RET_VAL Modularity::SPI::Device::Init ( )
pure virtual

Initialize the payment service.

Parameters
[in]DeviceSerialNo- Device serial number.Considering AshraitEMV service, that runs over the user device such as library, that must be sent.
Returns
  • SPI_SUCCESS : Service initialization was OK.
  • SPI_INVALID : An error occurred
See also
InitAshraitExample()

◆ ReadCard()

virtual SPILIBRARY_API SPI_RET_VAL Modularity::SPI::Device::ReadCard ( ReadCardData *  DataIO)
pure virtual

This method is extension to Service.DisplaySwipe and supports various interfaces of cards. This method get as input interfaces to enable on the device and returns appropiate data. Please see ReadCardData for full description.

See also
ReadCardData
Parameters
[in,out]Data- uses as Input and Output - as pointer already allocated
Returns
  • SPI_SUCCESS : Card read OK. Get your data from Data object.
  • SPI_FAIL: An error occurred
  • SPI_INVALID: Invalid input on client side.
  • SPI_ABORTED: ABORTED with AbortReadCard or from the device
  • SPI_TIME_OUT: Timeout set on Data object has reached.

◆ SendExternalEvent()

virtual SPILIBRARY_API SPI_RET_VAL Modularity::SPI::Device::SendExternalEvent ( SignedNumericType  Code,
std::string  Data 
)
pure virtual

Send external event to the device. The device will send this event to back office SUPPORTED ONLY ON VPOST DEVICE.

Parameters
[in]Codeas integer to represesnt event code
[in]Dataas String for additional data
Returns
  • SPI_SUCCESS : OK.
  • SPI_FAIL: An error occurred

◆ SetConfig()

virtual SPILIBRARY_API SPI_RET_VAL Modularity::SPI::Device::SetConfig ( Config &  ConfigObj)
pure virtual

Send configuration set to payment application (Agamento). Use Config.SetCustomAttribute to set a config field. The fields are according to the document Agamento prefences. Boolean values are sent as string "true"/"false".

Parameters
[in]ConfigObj- Config object with config set. must be sent.
Returns
  • SPI_SUCCESS : Config set successfully
  • SPI_INVALID : An error occurred

◆ UploadLogs()

virtual SPILIBRARY_API SPI_RET_VAL Modularity::SPI::Device::UploadLogs ( )
pure virtual

Upload device logs to cloud.

Returns
  • SPI_SUCCESS : Upload logs succeeded
  • SPI_FAIL : Upload logs failed

Member Data Documentation

◆ DeviceHandle

APIHandle Modularity::SPI::Device::DeviceHandle
protected

Handle

Definition at line 180 of file Device.h.


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