Market Pay POS API C# v20
Public Member Functions
fr.marketpay.driver.IDriver Interface Reference

Public Member Functions

void open (EcrConfiguration ecrConfiguration, PoiConfiguration poiConfiguration)
 
void close ()
 
TerminalStatus testConnection ()
 
TransactionResult processTransaction (TransactionParams transactionParams, ITransactionHandler handler)
 
void abortProcessingTransaction ()
 Terminates currently processed transaction started with processTransaction(). If called too late, the POI may ignore this request. The actual transaction result is stored in TransactionResult returned by IDriver.processTransaction. If transaction is successfully performed despite abort request, then next transaction has to be performed with TransactionType=Refund parameter. More...
 
TransactionResult processCheckTransaction (TransactionParams transactionParams, CheckParams checkParams)
 Performs payment transaction using paper check (cheque). More...
 
CardData getCardData ()
 Reads card identification data including loyalty ID. It's blocking function and can be interrupted calling abortGettingCardData() from another thread. More...
 
void abortGettingCardData ()
 Terminates currently processed card data reading operation started with getCardData(). More...
 
PinChangeResult pinChange ()
 Triggers changing the PIN of payment card. More...
 
void abortPinChange ()
 Terminates currently processed PIN change. More...
 
CancellationResult transactionCancellation (CancellationParams cancellationParams)
 Performs transaction reversal operation. It is possible after succesfull payment operation. More...
 
LastTransactionResult getLastTransaction ()
 Tries to find last transaction result. Useful when last transaction failed due to connection error. More...
 
BalanceInquiryResult balanceInquiry (string accountId)
 Allows checking the available amount in the account associated with payment card or with the accountId number. There are two ways to perform balance inquery: More...
 
TerminalActivationResult activateTerminal (int timeout)
 Performs terminal activation before first use. The driver must be already open before calling this function. More...
 
TerminalUpdateResult updateTerminal (int timeout)
 Requests the payment terminal to perform update. This is a long, blocking operation. More...
 
void setDiagnosticOptions (string diagnosticOptions)
 For internal purpose. More...
 
int getApiVersion ()
 Provides version of driver core (native C++) API. More...
 
string getCoreVersion ()
 Provides version of driver core (native C++) API and implementation. More...
 
string getVersion ()
 Provides version in format: [1.2.3-4] The first part number corresponds to this driver API version, getApiVersion(). More...
 

Detailed Description

This is a top-level interface for calling the payment terminal functions. There is implemetation of this interface in fr.marketpay.driver.Driver class and instance of Driver(ILogger) should be created.

Note that most of the IDriver methods are blocking - may be time-consuming.

Since
0.0.1

Definition at line 13 of file IDriver.cs.

Member Function Documentation

◆ abortGettingCardData()

void fr.marketpay.driver.IDriver.abortGettingCardData ( )

Terminates currently processed card data reading operation started with getCardData().

Since
0.0.8

◆ abortPinChange()

void fr.marketpay.driver.IDriver.abortPinChange ( )

Terminates currently processed PIN change.

◆ abortProcessingTransaction()

void fr.marketpay.driver.IDriver.abortProcessingTransaction ( )

Terminates currently processed transaction started with processTransaction(). If called too late, the POI may ignore this request. The actual transaction result is stored in TransactionResult returned by IDriver.processTransaction. If transaction is successfully performed despite abort request, then next transaction has to be performed with TransactionType=Refund parameter.

Since
0.0.8

◆ activateTerminal()

TerminalActivationResult fr.marketpay.driver.IDriver.activateTerminal ( int  timeout)

Performs terminal activation before first use. The driver must be already open before calling this function.

Returns
Result of activation operation
Since
0.0.7

◆ balanceInquiry()

BalanceInquiryResult fr.marketpay.driver.IDriver.balanceInquiry ( string  accountId)

Allows checking the available amount in the account associated with payment card or with the accountId number. There are two ways to perform balance inquery:

1. ECR scans any account identifier and passes it as accountId parameter.

In such case, payment terminal will use given account identifier to determine account balance. The payment terminal doesn't read the payment card, so the BalanceInquiryResult.cardData content is not initialized.

2. ECR passes NULL to accountId parameter to request reading the payment card

When the accountId parameter is NULL, payment terminal will read the payment card to obtain account balance. The BalanceInquiryResult.cardData will be initialized.

Parameters
driverCtxHandle to the driver instance.
accountId@Nullable Any account identifier which will be used to obtain balance inquery. When NULL, the payment terminal will scan the payment card to perform balance inquery.
outBalanceInquiryResultContains operation result.
Returns
Balance inquiry result.

◆ close()

void fr.marketpay.driver.IDriver.close ( )

Closes the payment terminal session. After this call cannot call other operations. Only open(EcrConfiguration, PoiConfiguration) operation is allowed. It have to be called at the end of session regardless exception occurred.

See also
open(EcrConfiguration, PoiConfiguration)

◆ getApiVersion()

int fr.marketpay.driver.IDriver.getApiVersion ( )

Provides version of driver core (native C++) API.

Returns
Version of driver core API.

◆ getCardData()

CardData fr.marketpay.driver.IDriver.getCardData ( )

Reads card identification data including loyalty ID. It's blocking function and can be interrupted calling abortGettingCardData() from another thread.

Returns
card data.
Since
0.0.8

◆ getCoreVersion()

string fr.marketpay.driver.IDriver.getCoreVersion ( )

Provides version of driver core (native C++) API and implementation.

Returns
Version of driver core API and implementation.

◆ getLastTransaction()

LastTransactionResult fr.marketpay.driver.IDriver.getLastTransaction ( )

Tries to find last transaction result. Useful when last transaction failed due to connection error.

Note
Payment terminal may provide previous (one before last) transaction if processTransaction failed very late, so user is obligated to check if field: LastTransactionResult.transactionResult.finalTransactionParams.transactionId matches the transaction id which failed.
Returns
last transaction result
Since
0.0.7

◆ getVersion()

string fr.marketpay.driver.IDriver.getVersion ( )

Provides version in format: [1.2.3-4] The first part number corresponds to this driver API version, getApiVersion().

Returns
version string. Never returns NULL.

◆ open()

void fr.marketpay.driver.IDriver.open ( EcrConfiguration  ecrConfiguration,
PoiConfiguration  poiConfiguration 
)

Opens the payment terminal session. The session must be open to perform any other operations.

Parameters
ecrConfigurationEcrConfiguration telling configuration of ECR device.
poiConfigurationPoiConfiguration telling configuration of POI device

◆ pinChange()

PinChangeResult fr.marketpay.driver.IDriver.pinChange ( )

Triggers changing the PIN of payment card.

Returns
Operation result.

◆ processCheckTransaction()

TransactionResult fr.marketpay.driver.IDriver.processCheckTransaction ( TransactionParams  transactionParams,
CheckParams  checkParams 
)

Performs payment transaction using paper check (cheque).

Parameters
transactionParamsDetermines the transaction configuration. TransactionParams.type must be TransactionType.Purchase, TransactionParams.mode must be TransactionMode.Direct.
checkParamsCheck data read by check reader.
Returns
Final result of transaction. Contains final transaction status and approved amounts..
Note
When TransactionResult.status is Status.Partial, the approved amounts (including Tip and Cashback) may be lower than initially requested amounts.
Check transaction cannot be aborted or cancelled.
Since
v17

◆ processTransaction()

TransactionResult fr.marketpay.driver.IDriver.processTransaction ( TransactionParams  transactionParams,
ITransactionHandler  handler 
)

Begins the transaction process.

This is a long-time-blocking function. Returns after whole transaction processing. To abort the transaction, call IDriver.abortProcessingTransaction() or ITransactionRuntime.abort(). If this function throws an excection, the IDriver.getLastTransaction should be called to check if transaction is cancelled.

Parameters
transactionParamsDetermines the transaction configuration.
handlerObject provided by ECR, implementing the ITransactionHandler. This object will be notified by the driver about the transaction status and will receive possibility to cancel transactions.
Returns
Final result of transaction.
See also
ITransactionRuntime::abort()

◆ setDiagnosticOptions()

void fr.marketpay.driver.IDriver.setDiagnosticOptions ( string  diagnosticOptions)

For internal purpose.

Parameters
diagnosticOptionstextual diagnostic options
Since
0.0.10

◆ testConnection()

TerminalStatus fr.marketpay.driver.IDriver.testConnection ( )

Checks whether the terminal connection is correct or not.

Returns
TerminalStatus informs about the status of terminal, including the number of offline transactions.

◆ transactionCancellation()

CancellationResult fr.marketpay.driver.IDriver.transactionCancellation ( CancellationParams  cancellationParams)

Performs transaction reversal operation. It is possible after succesfull payment operation.

Parameters
cancellationParamsData required to find the transaction.
Returns
Operation result.

◆ updateTerminal()

TerminalUpdateResult fr.marketpay.driver.IDriver.updateTerminal ( int  timeout)

Requests the payment terminal to perform update. This is a long, blocking operation.

Parameters
timeoutMax update operation time in seconds after which this function will return. If 0, the default value will be used.
Returns
Result of terminal update.
Since
0.0.10

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