No momento, esta página não está disponível em português
Point-of-sale icon

Fetch transaction data

Fetch the last transaction

Delegate

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

Parameters

NameTypeRequiredDescription

completion

void-white_check_mark-

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

-white_check_mark-

Information about the fetched transaction.

error

NSError

-white_check_mark-Information about any errors that occurred.

Declaration code example

Objective-C

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

Fetch a number of transactions

Delegate

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

Parameters

NameTypeRequiredDescription
count

NSUInteger

-white_check_mark-

A maximum count of transactions to be fetched.

completion

void-white_check_mark-

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

-white_check_mark-

Information about the fetched transaction.

error

NSError

-white_check_mark-Information about any errors that occurred.

Declaration code example

Objective-C

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

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 -white_check_mark- 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 -white_check_mark- Information about the fetched transaction.
error NSError -white_check_mark- Information about any errors that occurred.
tenderReference NSString -white_check_mark- 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;