Store and Forward - triPOS Mobile

Document created by Chris Jennings on Feb 6, 2017
Version 1Show Document
  • View in full screen mode

The purpose of this document is to describe the store-and-forward mechanism implemented in payment software in the cases when online (real-time) transaction processing becomes unavailable due to temporary loss of connectivity with the processing platform Express or due to some other errors. The documentation below is a supplement to the triPOS® Mobile SDK, which should also be referred to inconjunction to this overview.

 

Configuration

isStoringTransactionsAllowed

Gets or sets whether store and forward is enabled or not. If store and forward is not enabled and Express is not available, all transactions are declined and not stored.

shouldTransactionsBeAutomaticallyForwarded

Gets or sets whether stored transactions should be automatically forwarded. If enabled, a process is started that attempts to forward the unprocessed transactions when Express becomes available.

transactionAmountLimit

Gets or sets the amount over which the transaction will be declined and not stored. If the transaction amount is less than or equal to this amount, it is stored.

unprocessedTotalAmountLimit

Gets or sets the total amount over which transactions will be declined and not stored. This property is used to limit the total amount for stored and unprocessed transactions. If the total amount of stored sales/authorizations plus the transaction amount is less than or equal to this amount, the transaction is stored.

numberOfDaysToRetainProcessedTransactions

Gets or sets the number of days a transaction marked as processed or deleted will be retained.

 

Storing

If isStoringTransactionsAllowed is set to YES and Express cannot be reached, transactions are stored for later processing. When a transaction is stored, the response contains an indicator the transaction was stored (wasTransactionStored = YES) and the unique ID of the stored transaction (tpId).

 

NOTE: Store and forward only applies to the built-in flows (sale, authorization only, and refund). In addition, only transactions without online PIN or cashback. Once the triPOS Mobile SDK knows Express is not reachable, it no longer prompts for cashback and assumes any transaction is credit.

 

Forwarding

The triPOS Mobile SDK offers two methods for forwarding stored transactions:

 

Manual

For this method, if enabled, the triPOS Mobile SDK stores transactions when Express is not reachable, but the calling application is responsible for forwarding the stored transactions to Express. When a transaction is stored, a unique ID (tpId) is generated and stored with the transaction. The calling application can either maintain a list of the unique ID’s returned in the responses or use the query functionality to determine this list.

 

Automatic

For this method, if enabled, the triPOS Mobile SDK stores transactions when Express is not reachable and starts a background process that attempts to forward each unprocessed transaction when Express is reachable.

NOTE: Because the triPOS Mobile SDK is part of the calling application, this process relies on the calling application to be running and active.

 

Deleting

The triPOS Mobile SDK provides a mechanism for the calling application to delete stored unprocessed transactions. This process is intended to allow the calling application to “void” stored transaction prior to the transaction being either automatically or manually forwarded to Express.

 

Querying

The triPOS Mobile SDK provides several methods for querying stored transactions:

 

Query by unique ID (tpId)

This method provides a mechanism to query an individual stored transaction by its unique ID (tpID).

 

Query all transactions

This method provides a mechanism to query all stored transactions. This method returns all stored transactions.

 

Query all transactions “paged”

This method provides a mechanism to query all stored transactions, but allowing the calling application to control the number of items returned by supplying the start index and the number of items to return.

 

Query by state

This method provides a mechanism to query all stored transactions with a given state. Below are the states and descriptions:

 

VTPStoreTransactionStateStored

This state indicates the transaction is stored with processing pending. To be processed, either automatic forwarding needs to be enabled or the calling application needs to manually forward it.

VTPStoreTransactionStateProcessing

This state indicates the transaction is in the process of being sent to Express either automatically or manually.

VTPStoreTransactionStateProcessed

This state indicates the transaction has been successfully sent to Express. Note, this state does not indicate approved or declined, it only indicates the transaction was successfully sent to Express and a response was received.

VTPStoreTransactionStateDeleted

This state indicates the transaction has been marked as deleted. This state is set when the calling application requests an unprocessed transaction be deleted.

 

Database clean up

The triPOS Mobile SDK runs a periodic process to clean up the store database. This process is dependent on the numberOfDaysToRetainProcessedTransactions configuration property. When this process runs, any transaction marked as processed or deleted that was last updated previous to the configured number of days is permanently removed from the store database.

Attachments

    Outcomes