Fetch the last transaction
Delegate
The fetchLastTransactionDataWithCompletion
delegate fetches data for the last transaction saved on a payment device.
Parameters
Name | Type | Required | Description |
---|---|---|---|
| void | A block that is called when | |
| ADYTransactionData | Information about the fetched transaction. | |
error | NSError | 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
Name | Type | Required | Description |
---|---|---|---|
count | NSUInteger | A maximum count of transactions to be fetched. | |
| void | A block that is called when | |
| ADYTransactionData | Information about the fetched transaction. | |
error | NSError | 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 | 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 | Information about the fetched transaction. | |
error |
NSError | Information about any errors that occurred. | |
tenderReference |
NSString | 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;