Get transaction history
Last updated
Was this helpful?
Was this helpful?
// Values previously initialized.
String digitalCardId = "...";
String accessToken = "...";
// Get the transaction history service.
MobileGatewayManager mgClient = MobileGatewayManager.INSTANCE;
MGTransactionHistoryService transactionHistoryService = mgClient.getTransactionHistoryService();
// Fetch the transaction history.
transactionHistoryService.refreshHistory(
accessToken,
digitalCardId,
null,
new TransactionHistoryListener() {
@Override
public void onSuccess(
List<MGTransactionRecord> records,
String digitalCardId,
String timeStamp) {
// Success.
// Each MGTransactionRecord holds details for one transaction.
// See the API reference for field-level details.
}
@Override
public void onError(String digitalCardId, MobileGatewayError error) {
// Handle the error.
}
}
);