PosPaymentSdkActionExecutor

Interface for executing various actions related to the POS External payment SDK.

Each method returns a Result: a Result.Success containing an SdkSuccessAnswer subtype on success, or a Result.Error indicating failure. Methods that validate input parameters can additionally return Result.ValidationErrors listing the failed checks.

Functions

Link copied to clipboard

Authorize a list of candidates.

Link copied to clipboard
abstract suspend fun cancel(amount: String, rrn: String, timeOut: Int? = null): Flow<PurchaseResult<SdkSuccessAnswer.Cancel>>

Cancels a transaction with the specified amount and RRN.

Link copied to clipboard
abstract suspend fun cancelQr(orderId: String, amount: Long?): Result<SdkSuccessAnswer.CancelQr>

Cancels a successfully paid QR order.

Link copied to clipboard
abstract suspend fun cancelWithoutCard(amount: String, rrn: String, timeOut: Int? = null): Flow<PurchaseResult<SdkSuccessAnswer.Cancel>>

Cancels a transaction without card with the specified amount and RRN.

Link copied to clipboard

Deletes an item from the black list by PAN and source.

Link copied to clipboard

Deletes an item from the offline queue by invoice.

Link copied to clipboard

Initiates an auto batch operation. The batch report is always printed, whether there were purchases or not.

Link copied to clipboard

Requests a revise (session summary).

Link copied to clipboard

Retrieves all authorized external candidates.

Link copied to clipboard

Retrieves the authentication status.

Link copied to clipboard

Get candidates for authorization.

Link copied to clipboard

Retrieves the credentials.

Link copied to clipboard

Gets the current offline black list.

Link copied to clipboard

Retrieves the current offline mode status.

Link copied to clipboard

Gets the current offline queue.

Link copied to clipboard
abstract suspend fun getPurchase(guid: String): Result<SdkSuccessAnswer.GetPurchase>

Returns a single purchase with its operations.

Link copied to clipboard
abstract suspend fun getPurchases(offset: Int, limit: Int): Result<SdkSuccessAnswer.GetPurchases>

Returns a page of purchases from the terminal history, ordered from newest to oldest.

Link copied to clipboard
abstract suspend fun getReceiptData(reference: String): Result<SdkSuccessAnswer.GetReceiptData>

Retrieves receipt data for the specified reference.

Link copied to clipboard

Retrieves the terminal hardware info (factory serial number).

Link copied to clipboard

Gets the current status of automatic offline operations posting.

Link copied to clipboard

Gets the current status of black list checking offline operations.

Link copied to clipboard
abstract suspend fun login(login: String, password: String): Result<SdkSuccessAnswer.Login>

Logs in with the provided credentials.

Link copied to clipboard
abstract suspend fun logout(): Result<SdkSuccessAnswer.Logout>

Logs out the current user.

Link copied to clipboard
abstract suspend fun logoutCandidates(candidates: List<SDKCandidate>): Result<SdkSuccessAnswer.LogoutCandidates>

Logs out external candidates.

Link copied to clipboard
abstract suspend fun postOfflineOperation(invoice: String): Result<SdkSuccessAnswer.PostOfflineOperation>

Posts an offline operation to the server.

Link copied to clipboard
abstract suspend fun purchase(amount: String, customMetaData: Map<String, String> = emptyMap(), timeOut: Int? = null): Flow<PurchaseResult<SdkSuccessAnswer.Purchase>>

Initiates a purchase transaction with the specified amount.

abstract suspend fun purchase(amount: String, customMetaData: Map<String, String> = emptyMap(), timeOut: Int? = null, currency: Currency, type: PaymentType): Flow<PurchaseResult<SdkSuccessAnswer.Purchase>>

Initiates a purchase transaction with the specified amount, currency and payment type.

Link copied to clipboard
abstract suspend fun refund(amount: String, rrn: String): Flow<PurchaseResult<SdkSuccessAnswer.Refund>>

Refunds a transaction with the specified amount and RRN.

Link copied to clipboard
abstract suspend fun refundWithoutCard(amount: String, rrn: String): Flow<PurchaseResult<SdkSuccessAnswer.Refund>>

Refunds a transaction without card with the specified amount and RRN.

Link copied to clipboard

Sets automatic posting of offline operations.

Link copied to clipboard

Sets black list checking of offline operations.

Link copied to clipboard
abstract suspend fun setOfflineMode(offlineMode: Boolean): Result<SdkSuccessAnswer.SetOfflineMode>

Sets the offline mode status.

Link copied to clipboard

Initiates a stop of the current transaction.

Link copied to clipboard

Attempts to auto batch the previous session. The batch report is printed only if there were purchases.