cancel

abstract suspend fun cancel(request: PosRequest, rrn: String, timeOut: Int? = null): Flow<FiscalPurchaseResult<SdkSuccessAnswer.FiscalPurchase>>

Cancels a fiscalized transaction with the specified request and RRN.

Return

Flow emitting a FiscalPurchaseResult with SdkSuccessAnswer.FiscalPurchase with invoice, receipt and fiscal data details if successful, or a FiscalPurchaseResult.Error if the operation fails.

Additionally, the flow can emit intermediate states: - FiscalPurchaseResult.InitOperation: Indicates the terminal is being configured. - FiscalPurchaseResult.ReaderReady: Indicates the terminal is ready and waiting for the card. - FiscalPurchaseResult.Processing: Indicates the transaction is being processed.

Note: These intermediate states will only be emitted when the communication type is set to CommunicationType.AIDL.

Parameters

request

The POS request

rrn

RRN of the cancelling operation.

timeOut

Card wait timeout in seconds. null uses the POS default (60 seconds).

See also