func fetchStoredPaymentCardReadResultBatch(size: Int = 0) async throws -> StoreAndForwardBatch
Returns a batch of reads the framework previously stored, in chronological order, of the size you request.
There is only one active batch per application at a given time and to fetch a new batch the caller
needs to reset or resolve the current batch.
- Parameters:
- size: The desired batch size, if no size is provided, the framework uses a batch size of `0` that returns all the payments
stored in the batch.
- Returns: ``StoreAndForwardBatch`` when successful.
- Throws: This method throws a ``StoreError`` if the size is smaller than `0` or greater than the
number of payments stored, or if there's no payment stored. The framework also throws a
`StoreError` if a previous batch is pending resolution at the time when you call this method.
func fetchStoredPaymentCardReadResultCount() async throws -> Int
Returns the number of reads the framework performed using a Store and Forward session.
- Throws: This method throws a ``StoreError`` if the count cannot be fetched.
func resolveBatch(batchDeletionToken: StoreAndForwardBatchDeletionToken) async throws -> Int
Deletes the current batch and all its Store and Forward payments, allowing you to request a new
batch.
- Parameters:
- batchDeletionToken: The token you receive from the payment service provider.
- Returns: The remaining number of payments to process.
- Throws: This method throws a ``StoreError`` if the customer isn't online at the moment
you call it, if there's no Store and Forward batch to resolve, or if the deletion token is invalid.
method · iOS 18.4+
resetBatchState
TypeScript
resetBatchState(): Promise<void>
Swift declaration
func resetBatchState() async throws
Resets the current batch state in the store, allowing you to request a new batch.
Use this method if the transmission of the batch to the partner service provider fails and
the batch processing status is unknown. The framework doesn't delete the reads; instead, it
dissociates them from the batch.
- Throws: This method throws a ``StoreError`` if there's no batch for the framework to
reset.