In your calling Activity, override the GetTransactionStatus method to receive a transaction status of the payment or refund transaction.

You can choose between transaction types: Purchase or Refund and to send the order ID of which transaction status needs to get checked.

The method will retrieve the transaction type, order ID, transaction status and the transaction reference:

IPCGetTransactionStatus ipcGetTransactionStatus = new IPCGetTransactionStatus();
ipcGetTransactionStatus.setOrderId(orderId);
ipcGetTransactionStatus.setTxtType(txnType);
ipcGetTransactionStatus.setOnCommandCompleteListener(new IPCGetTransactionStatus.OnCommandCompleteListener() {
    @Override
    public void onCommandComplete(final int transactionStatus, final String  
                                                      transactionReference) {
    }

    @Override
    public void onError(final int status) {
    }
});
ipcGetTransactionStatus.sendRequest();