Summary Screen

After a transaction has been done, merchants might want to refund it, capture it or send another receipt to their shoppers. The Summary Screen makes this very easy for you!

Just make sure that you store the transactionIdentifer for each transaction in your system. You can access the transactionIdentifer in the completed callback of the payment method.

Show the Summary Screen

Call createSummaryViewControllerWithTransactionIdentifier with your previously stored transactionIdentifier:

ui.configuration.summaryFeatures =
// Add this line, if you want to offer captures
// MPUMposUiConfigurationSummaryFeatureCaptureTransaction |
// Remove this line, if you do not want to offer refunds at all
MPUMposUiConfigurationSummaryFeatureRefundTransaction |
MPUMposUiConfigurationSummaryFeatureSendReceiptViaEmail;

UIViewController *viewController =
[ui createSummaryViewControllerWithTransactionIdentifier:@"transactionIdentifier"
											   completed:^(UIViewController *controller)
{
	[self dismissViewControllerAnimated:YES completion:NULL];
}];

UINavigationController *modalNav = [[UINavigationController alloc] initWithRootViewController:viewController];
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
	modalNav.modalPresentationStyle = UIModalPresentationFullScreen;
} else { // on iPad
	modalNav.modalPresentationStyle = UIModalPresentationFormSheet;
}
[self presentViewController:modalNav animated:YES completion:NULL];

In the Summary Screen, your merchants can then refund or capture the transaction and email another receipt. If the transaction has already been refunded or captured, the Summary Screen will show this accordingly.

After a transaction has been done, merchants might want to refund it, capture it or send another receipt to their shoppers. The Summary Screen makes this very easy for you!

Just 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.

Show the Summary Screen

Call 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);

In the Summary Screen, your merchants can then refund or capture the transaction and email another receipt. If the transaction has already been refunded or captured, the Summary Screen will show this accordingly.

In the onActivityResult callback, check for a result ofRESULT_CODE_SUMMARY_CLOSED to find out whether the Summary Screen was closed, so that you can update your own UI if required.

Can we help you?

If you cannot find your answer, contact us and we'll get in touch with you soon.

© Copyright 2017 Payworks GmbH. Legal.