Manage digital card LCM
Last updated
Was this helpful?
Was this helpful?
// get the access token
String accessToken = "....";
// Get the card life cycle manager.
MGCardLifeCycleManager cardLifeCycleManager = MGClient.getCardLifeCycleManager();
// Delete a card using its digital card ID.
cardLifeCycleManager.deleteCard(
digitalCardId,
new MGCardLifecycleEventListener() {
@Override
public void onSuccess(String digitalCardId) {
/*
* Request accepted by the NFC Wallet SDK.
* The NFC Wallet backend sends a push notification to complete the operation.
*
* If the card is already deleted server-side, the SDK removes local card data.
*/
}
@Override
public void onError(String digitalCardId, MobileGatewayError error) {
/*
* Request failed.
* Inspect MobileGatewayError to determine the cause.
*/
}
},
null,
null,
accessToken );