Summary Screen
After a transaction is completed, a merchant might want to refund or capture it, or send another receipt to their shoppers. The Summary Screen makes this very easy to do.
To get started, make sure that you store the
transactionIdentifer
for each transaction in your system. You can access the
transactionIdentifer
in the
onActivityResult
callback of the payment method.
Showing the Summary Screen
To show the Summary Screen on the payment terminal, call the
createTransactionSummaryIntent
with your previously stored
transactionIdentifier
:
ui.getConfiguration().setSummaryFeatures(EnumSet.of(
// Add this line, if you do want to offer captures
// MposUiConfiguration.SummaryFeature.CAPTURE_TRANSACTION,
// Remove this line, if you do not want to offer refunds at all
MposUiConfiguration.SummaryFeature.REFUND_TRANSACTION,
MposUiConfiguration.SummaryFeature.SEND_RECEIPT_VIA_EMAIL)
);
Intent intent = ui.createTransactionSummaryIntent("transactionIdentifier");
startActivityForResult(intent, MposUi.REQUEST_CODE_SHOW_SUMMARY);
On the Summary Screen, your merchants can now refund or capture the transaction and email another receipt. If the transaction has already been refunded or captured, the Summary Screen will display this information.
Check if the Summary Screen was closed:
In the
onActivityResult
callback, check for a result of
RESULT_CODE_SUMMARY_CLOSED
.
Update your UI, if required.