Replenish ODA
Overview
Offline Data Authentication (ODA) is supported in the D1 SDK module. It is a mechanism to authenticate the end user during transit at the gates. For example, during usage of digitized card to pay at the gates of public transport stations.
In order to complete a Visa transaction which requires ODA, the issuer application must check the expiry date of Visa ODA certificate as described in the following sections.
To support this use case, two methods are available:
isOdaReplenishmentNeeded()to check if ODA is needed. For more information, refer to Digital Card ListreplenishODA()to request for ODA replenishment.
SDK
The code snippet below highlights the Visa ODA Replenishment.
D1PayWallet d1PayWallet = d1Task.getD1PayWallet();
String d1CardID = "";
D1PayDigitalCard[] dCards = new D1PayDigitalCard[]{ null };
d1PayWallet.getDigitalCard(d1CardID,
new D1Task.Callback<D1PayDigitalCard>() {
@Override
public void onSuccess(@NonNull D1PayDigitalCard digitalCard) {
dCards[0] = digitalCard;
}
@Override
public void onError(@NonNull D1Exception exception) {
///Refer to D1 SDK Integration – Error Management section
}
}
);
// wait for the getDigitalCard to complete
D1PayDigitalCard d1PayDigitalCard = dCards[0];
if (d1PayDigitalCard.isODAReplenishmentNeeded()) {
d1PayWallet.replenishODA(d1CardID,
new D1Task.Callback<Void>() {
@Override
public void onSuccess(Void data) {
// VISA ODA Replenishment Success
}
@Override
public void onError(@NonNull D1Exception exception) {
// Refer to D1 SDK Integration – Error Management section
}
}
);
}Last updated
Was this helpful?