Search

Are you looking for test card numbers?

Would you like to contact support?

Handle receipts

Delegate

The transactionRequiresPrintedReceipt delegate is called when a receipt must be printed out by the app.

After this method has been called, transaction-processing will be paused until confirmReceiptPrinted: is called on the given printReceiptRequest.

This method must be implemented to print a receipt on paper, based on the data provided in the printReceiptRequest.

Instead of calling [ADYPrintReceiptRequest confirmReceiptPrinted:], it is also possible to cancel the transaction at this point by calling [ADYTransactionRequest requestCancel]. If this is done, do not call confirmReceiptPrinted: anymore.

However, it is possible that transactionRequiresPrintedReceipt: will be called a second time as part of the transaction-flow. If that happens, and it is not desirable to print out a receipt at that time, cancel the transaction again.

For more information on the fields required for receipts, see  .

Parameters

Name Type Required Description
printReceiptRequest ADYPrintReceiptRequest -white_check_mark- Object containing receipt-data, and methods to continue transaction-processing.

Declaration code example

Objective-C

- (void)transactionRequiresPrintedReceipt:
    (ADYPrintReceiptRequest *)printReceiptRequest;

Swift

func transactionRequiresPrintedReceipt(_ printReceiptRequest: ADYPrintReceiptRequest!)