Fetch transaction data

Fetch the last transaction

Delegate

The fetchLastTransactionDataWithCompletion delegate fetches data for the last transaction saved on a payment device.

Parameters

Name Type Required Description

completion

void (tick)

A block that is called when ADYTransactionData is available or when an error occurs. The block takes two parameters: transaction, which contains the ADYTransactionData, and error, which contains an error, if one occurred.

transaction

ADYTransactionData

(tick)

Information about the fetched transaction.

error

NSError

(tick) Information about any errors that occurred.

Declaration code example

Objective-C

- (void)fetchLastTransactionDataWithCompletion:(void (^)(ADYTransactionData *transaction, NSError *error))completion; 

Swift

 

Fetch a number of transactions

Delegate

The fetchLastTransactionsDataWithCount delegate fetches data for a provided number of transactions (count) saved on a payment device.

Parameters

Name Type Required Description
count

NSUInteger

(tick)

A maximum count of transactions to be fetched.

completion

void (tick)

A block that is called when ADYTransactionData is available or when an error occurs. The block takes two parameters: transaction, which contains the ADYTransactionData, and error, which contains an error, if one occurred.

transactions

ADYTransactionData

(tick)

Information about the fetched transaction.

error

NSError

(tick) Information about any errors that occurred.

Declaration code example

Objective-C

- (void)fetchLastTransactionsDataWithCount:(NSUInteger)count completion:(void (^)(NSArray<ADYTransactionData *> *transactions, NSError *error))completion; 

Swift

 

Fetch transaction with a tender reference

Delegate

The fetchTransactionDataWithTenderReference delegate fetches data for a specified transaction saved on a payment device.

 

Parameters 

Name Type Required Description
completion void (tick)

A block that is called when ADYTransactionData is available or when an error occurs. The block takes two parameters: transaction, which contains the ADYTransactionData, and error, which contains an error, if one occurred.

transaction

ADYTransactionData

(tick)

Information about the fetched transaction.

error

NSError

(tick) Information about any errors that occurred.

tenderReference

NSString

(tick) Reference for the tender. Specify a tenderReference to return a report for that tender.

Declaration code example

Objective-C

- (void)fetchTransactionDataWithTenderReference:(NSString *)tenderReference completion:(void (^)(ADYTransactionData *transaction, NSError *error))completion;

Swift