Request a Check Transaction Status for an Offline Sale Pending Submission

Use the information in this section to request a check transaction status for a single offline sale transaction before it is submitted for authorization. The transaction status shows on the Summary screen.
Follow these steps to request a check transaction status for an offline sale pending submission.
  1. Access the
    transactionIdentifier
    value in the
    onActivityResult
    method of the original transaction.
  2. Retrieve the transaction
    summaryIntent
    value from the
    mposUi
    object.
  3. Use the
    startActivity
    method to initiate the Summary screen.
    val summaryIntent = mposUi.offlineModule.createTransactionSummaryIntent(transactionIdentifier = "transactionIdentifier") startActivityForResult(summaryIntent, MposUi.REQUEST_CODE_SHOW_SUMMARY)
  4. After the Summary screen is dismissed, the
    onActivityResult
    is triggered. This action returns information about the previous transaction.
    override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?)  {     super.onActivityResult(requestCode, resultCode, data)     if (requestCode == MposUi.REQUEST_CODE_SHOW_SUMMARY) {         when (resultCode) {             // Result code from a successful transaction             MposUi.RESULT_CODE_APPROVED -> {                val transactionIdentifier = data?.getStringExtra(MposUi.RESULT_EXTRA_TRANSACTION_IDENTIFIER)                Toast.makeText(findViewById(android.R.id.content),"Transaction approved!\nIdentifier: $transactionIdentifier", Toast.LENGTH_LONG).show()             }             // Result code from a declined, aborted or failed transaction             MposUi.RESULT_CODE_FAILED -> {                Toast.makeText(findViewById(android.R.id.content), "Transaction was declined, aborted, or failed", Toast.LENGTH_LONG).show()             }         }     } }