On This Page
Check Transaction Status
Use the information in this section to request a check transaction status. This
transaction type is used to retrieve response data for a transaction that was lost
or timed out. You can initiate a status check when you have the
transactionIdentifier
value for the transaction that you want
to query. When the check transaction status request is completed, the transaction
details are shown on the Summary screen.Follow these steps to request a check transaction status.
- Access 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, theonActivityResultis 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() } }
- Get the full transaction object by retrieving thelatestTransactionfrom the mposUi object.val transactionObject = mposUi.latestTransaction