On This Page
Check Transaction Status
Use this information to request a check transaction status. This transaction enables you to
retrieve response data for a transaction that was lost or timed out. You must have
the
transactionIdentifier
value for the transaction that you want
to check. When the check transaction status request is complete, the transaction
details show on the Summary screen.Follow these steps to request a check transaction status.
- Obtain thetransactionIdentifiervalue in theonActivityResultmethod of the original transaction.
- Retrieve the transactionsummaryIntentvalue from themposUIobject.
- Use thestartActivitymethod to initiate the Summary screen.val summaryIntent = mposUi.createTransactionSummaryIntent(transactionIdentifier = "transactionIdentifier") startActivityForResult(summaryIntent, MposUi.REQUEST_CODE_SHOW_SUMMARY)
- After the Summary screen is dismissed, theonActivityResultmethod is triggered. This action returns information about the previous transaction.override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) { super.onActivityResult(requestCode, resultCode, data) // Result code from closing the summary screen if (resultCode == MposUi.RESULT_CODE_SUMMARY_CLOSED) { // Accessing status from the transaction that was just queried val transactionStatus = mposUi.latestTransaction?.status Toast.makeText(activity, "Summary closed. Transaction status: $transactionStatus", Toast.LENGTH_SHORT).show() } }
- You can get the full transaction object by retrieving thelatestTransactionfrom the mposUi object.val transactionObject = mposUi.latestTransaction