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

This class contains all the input data and output data of Cibus transactions, including the methods inherited from class Transaction. All data in this class is reachable through various methods which define the behaivor of the operation. More...

#include <CibusTransaction.h>

Inheritance diagram for Modularity::SPI::CibusTransaction:
Modularity::SPI::Transaction

Public Member Functions

virtual SPILIBRARY_API std::string GetTransactionResultMessage () const
 Get transaction result message. Messages are in English. More...
 
SPILIBRARY_API ~CibusTransaction ()
 Class desrstructor.
 
APIHandle GetCibusHandle () const
 Handle get - reserved for internal useage.
 
Cibus Pre Transaction Information

Those methods can be called before Cibus transaction is executed.

SPILIBRARY_API CibusTransaction (string VendorUID, AmountType Amount)
 Class constructor. This type of transaction will result CibusTranType eq CibusTranType_AddOrder. More...
 
SPILIBRARY_API CibusTransaction (string VendorUID, Cibus::CibusTranType TranType)
 Class constructor. Must specify transaction type. More...
 
SPILIBRARY_API void SetCardData (string CardData)
 Set Card Data, can be obtained from Company Card, Cibus One Time code, Card number. More...
 
SPILIBRARY_API void SetCompanyCode (string CompanyCode)
 Set Company Code when transaction is done explicitly with company card. More...
 
SPILIBRARY_API void SetOriginalOrderId (string OriginalOrderId)
 Set Original order id when CibusTranType is CancelOrder. More...
 
SPILIBRARY_API void SetAdditionalInfo (string AdditionalInfo)
 Set AdditionalInfo. This is echo parameter. retreived by GetAdditionalInfo() and saved to DB on successful transaction. More...
 
SPILIBRARY_API void SetAcquirer (Cibus::CibusAcquirer Acquirer)
 Set Cibus Acquirer according to values in Cibus::CibusAcquirer. If not set default is CibusAcquirer_Cibus;. More...
 
Post Transaction Information

Those methods can be called after transaction is executed.

SPILIBRARY_API bool WasApproved () const
 A method that tells post transaction weather transaction succeded or not. More...
 
SPILIBRARY_API Cibus::CibusCardType GetCardType () const
 Get the card type used for the transaction. More...
 
SPILIBRARY_API Cibus::CibusCardEntryType GetCardEntryType () const
 Get the card type used for the transaction. More...
 
SPILIBRARY_API Cibus::CibusTranType GetTranType () const
 Get transaction type. More...
 
SPILIBRARY_API Cibus::CibusAcquirer GetAcquirer () const
 Get transaction acquirer - this value is not set by the service. More...
 
SPILIBRARY_API string GetOrderId () const
 Get Order Id from Cibus. More...
 
SPILIBRARY_API AmountType GetBudgetBalance () const
 Get Buget Balance from Cibus. More...
 
SPILIBRARY_API string GetCompanyName () const
 Get Company Name that Cibus card belnogs to. More...
 
SPILIBRARY_API string GetPosId () const
 Get PosId of resturant. More...
 
SPILIBRARY_API string GetAdditionalInfo () const
 Get AdditionalInfo set from SetAdditionalInfo() More...
 
- Public Member Functions inherited from Modularity::SPI::Transaction
APIHandle GetTransactionHandle () const
 Reserved for internal useage.
 
SPILIBRARY_API Transaction (AmountType Amount, CurrencyType Currency, string VendorUID)
 Transaction constructor. Can't be used explicitly as Transaction is pure virtual. More...
 
virtual SPILIBRARY_API ~Transaction ()=0
 Class destructor.
 
SPILIBRARY_API PPIDType GetPinPadId () const
 Get device identification number used to make the transaction. More...
 
SPILIBRARY_API void SetPinPadId (PPIDType PinPadID)
 Set device identification number used to make the transaction. More...
 
SPILIBRARY_API void SetVendorUID (string Vuid)
 Set VUID during Loyalty phase. This method will override the current Vuid from the Constructor and will assert uniqueness only during Loyalty phase. The method doesn't apply the new Vuid immediately. The new value will be applied only after legal call to service method as mentioned above. It's highly recomanded to assert your new vuid with GetVendorUID() to make sure the new Vuid was applied. Supported services: Ashrait. More...
 
SPILIBRARY_API string GetVendorUID () const
 Get vendor unique ID as initialized at derived class constructor. More...
 
SPILIBRARY_API AmountType GetAmount () const
 Get Transaction original amount as initialized at derived class constructor. More...
 
SPILIBRARY_API CurrencyType GetCurrency () const
 Get currency enumerator as initialized at derived class constructor. More...
 
SPILIBRARY_API ResultType GetTransactionResultCode () const
 Get transaction result code. If called before transaction was ended, a speical code -999 (Transaction in progress) is returned. Each code has a message. You may see Result Codes Messages for reference. More...
 

Detailed Description

This class contains all the input data and output data of Cibus transactions, including the methods inherited from class Transaction. All data in this class is reachable through various methods which define the behaivor of the operation.

Definition at line 32 of file CibusTransaction.h.

Constructor & Destructor Documentation

◆ CibusTransaction() [1/2]

SPILIBRARY_API Modularity::SPI::CibusTransaction::CibusTransaction ( string  VendorUID,
AmountType  Amount 
)

Class constructor. This type of transaction will result CibusTranType eq CibusTranType_AddOrder.

Parameters
[in]VendorUIDis an identifier string generated by the ECR. Can't be empty string.
[in]Amountis the amount with currency configured in the Machine.

◆ CibusTransaction() [2/2]

SPILIBRARY_API Modularity::SPI::CibusTransaction::CibusTransaction ( string  VendorUID,
Cibus::CibusTranType  TranType 
)

Class constructor. Must specify transaction type.

Parameters
[in]VendorUIDis an identifier string generated by the ECR. Can't be empty string.
[in]TranTypeis type of transaction to do with Cibus.

Member Function Documentation

◆ GetAcquirer()

SPILIBRARY_API Cibus::CibusAcquirer Modularity::SPI::CibusTransaction::GetAcquirer ( ) const

Get transaction acquirer - this value is not set by the service.

Returns
CibusAcquirer

◆ GetAdditionalInfo()

SPILIBRARY_API string Modularity::SPI::CibusTransaction::GetAdditionalInfo ( ) const

Get AdditionalInfo set from SetAdditionalInfo()

Returns
AdditionalInfo as std::string

◆ GetBudgetBalance()

SPILIBRARY_API AmountType Modularity::SPI::CibusTransaction::GetBudgetBalance ( ) const

Get Buget Balance from Cibus.

Returns
Busget Balance as long integer in cents

◆ GetCardEntryType()

SPILIBRARY_API Cibus::CibusCardEntryType Modularity::SPI::CibusTransaction::GetCardEntryType ( ) const

Get the card type used for the transaction.

Returns
CibusCardType

◆ GetCardType()

SPILIBRARY_API Cibus::CibusCardType Modularity::SPI::CibusTransaction::GetCardType ( ) const

Get the card type used for the transaction.

Returns
CibusCardType

◆ GetCompanyName()

SPILIBRARY_API string Modularity::SPI::CibusTransaction::GetCompanyName ( ) const

Get Company Name that Cibus card belnogs to.

Returns
Busget Balance as std::string

◆ GetOrderId()

SPILIBRARY_API string Modularity::SPI::CibusTransaction::GetOrderId ( ) const

Get Order Id from Cibus.

Returns
Order Id as std::string

◆ GetPosId()

SPILIBRARY_API string Modularity::SPI::CibusTransaction::GetPosId ( ) const

Get PosId of resturant.

Returns
PosId as std::string

◆ GetTransactionResultMessage()

virtual SPILIBRARY_API std::string Modularity::SPI::CibusTransaction::GetTransactionResultMessage ( ) const
virtual

Get transaction result message. Messages are in English.

See also
GetTransactionResultCode()
Returns
Result as std::string

Reimplemented from Modularity::SPI::Transaction.

◆ GetTranType()

SPILIBRARY_API Cibus::CibusTranType Modularity::SPI::CibusTransaction::GetTranType ( ) const

Get transaction type.

Returns
CibusTranType

◆ SetAcquirer()

SPILIBRARY_API void Modularity::SPI::CibusTransaction::SetAcquirer ( Cibus::CibusAcquirer  Acquirer)

Set Cibus Acquirer according to values in Cibus::CibusAcquirer. If not set default is CibusAcquirer_Cibus;.

Parameters
[in]Acquireras enum

◆ SetAdditionalInfo()

SPILIBRARY_API void Modularity::SPI::CibusTransaction::SetAdditionalInfo ( string  AdditionalInfo)

Set AdditionalInfo. This is echo parameter. retreived by GetAdditionalInfo() and saved to DB on successful transaction.

Parameters
[in]AdditionalInfoas string

◆ SetCardData()

SPILIBRARY_API void Modularity::SPI::CibusTransaction::SetCardData ( string  CardData)

Set Card Data, can be obtained from Company Card, Cibus One Time code, Card number.

Parameters
[in]CardDataas string. Can't be empty string.

◆ SetCompanyCode()

SPILIBRARY_API void Modularity::SPI::CibusTransaction::SetCompanyCode ( string  CompanyCode)

Set Company Code when transaction is done explicitly with company card.

Parameters
[in]CompanyCodeas string. Can't be empty string.

◆ SetOriginalOrderId()

SPILIBRARY_API void Modularity::SPI::CibusTransaction::SetOriginalOrderId ( string  OriginalOrderId)

Set Original order id when CibusTranType is CancelOrder.

Parameters
[in]OriginalOrderIdas string. Can't be empty string.

◆ WasApproved()

SPILIBRARY_API bool Modularity::SPI::CibusTransaction::WasApproved ( ) const

A method that tells post transaction weather transaction succeded or not.

Returns
weather transaction succeded or not

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