|
Market Pay POS API C# v20
|
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... | |
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.
Definition at line 13 of file IDriver.cs.
| void fr.marketpay.driver.IDriver.abortGettingCardData | ( | ) |
Terminates currently processed card data reading operation started with getCardData().
| void fr.marketpay.driver.IDriver.abortPinChange | ( | ) |
Terminates currently processed PIN change.
| 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.
| TerminalActivationResult fr.marketpay.driver.IDriver.activateTerminal | ( | int | timeout | ) |
Performs terminal activation before first use. The driver must be already open before calling this function.
| 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:
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.
NULL to accountId parameter to request reading the payment cardWhen the accountId parameter is NULL, payment terminal will read the payment card to obtain account balance. The BalanceInquiryResult.cardData will be initialized.
| driverCtx | Handle 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. |
| outBalanceInquiryResult | Contains operation result. |
| 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.
| int fr.marketpay.driver.IDriver.getApiVersion | ( | ) |
Provides version of driver core (native C++) API.
| 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.
| string fr.marketpay.driver.IDriver.getCoreVersion | ( | ) |
Provides version of driver core (native C++) API and implementation.
| LastTransactionResult fr.marketpay.driver.IDriver.getLastTransaction | ( | ) |
Tries to find last transaction result. Useful when last transaction failed due to connection error.
| 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().
| 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.
| ecrConfiguration | EcrConfiguration telling configuration of ECR device. |
| poiConfiguration | PoiConfiguration telling configuration of POI device |
| PinChangeResult fr.marketpay.driver.IDriver.pinChange | ( | ) |
Triggers changing the PIN of payment card.
| TransactionResult fr.marketpay.driver.IDriver.processCheckTransaction | ( | TransactionParams | transactionParams, |
| CheckParams | checkParams | ||
| ) |
Performs payment transaction using paper check (cheque).
| transactionParams | Determines the transaction configuration. TransactionParams.type must be TransactionType.Purchase, TransactionParams.mode must be TransactionMode.Direct. |
| checkParams | Check data read by check reader. |
| 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.
| transactionParams | Determines the transaction configuration. |
| handler | Object 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. |
| void fr.marketpay.driver.IDriver.setDiagnosticOptions | ( | string | diagnosticOptions | ) |
For internal purpose.
| diagnosticOptions | textual diagnostic options |
| TerminalStatus fr.marketpay.driver.IDriver.testConnection | ( | ) |
Checks whether the terminal connection is correct or not.
| CancellationResult fr.marketpay.driver.IDriver.transactionCancellation | ( | CancellationParams | cancellationParams | ) |
Performs transaction reversal operation. It is possible after succesfull payment operation.
| cancellationParams | Data required to find the transaction. |
| TerminalUpdateResult fr.marketpay.driver.IDriver.updateTerminal | ( | int | timeout | ) |
Requests the payment terminal to perform update. This is a long, blocking operation.
| timeout | Max update operation time in seconds after which this function will return. If 0, the default value will be used. |