Android initialization
Overview
Configure the D1 SDK
Examples
// Ask Thales delivery team for the following information
String d1ServiceUrl = "https://www.123.com";
String issuerID = "IssuerID";
byte[] rsaExponent = new byte[]{};
byte[] rsaModulus = new byte[]{};
String digitalCardUrl = "https://www.456.com";
Context applicationContext = null; // Issuer application should assign the application context.
// Initialize all necessary settings for D1 SDK.
D1Task d1Task = new D1Task.Builder()
.setContext(applicationContext)
.setD1ServiceURL(d1ServiceUrl)
.setIssuerID(issuerID)
.setD1ServiceRSAExponent(rsaExponent)
.setD1ServiceRSAModulus(rsaModulus)
.setDigitalCardURL(digitalCardUrl)
.build();
// Initialize the required SDKs.
// Application is required to provide consumerId.
String consumerID = "consumerID";
D1Params coreConfig = ConfigParams.buildConfigCore(consumerID);
// Required for Card Processing & Wallet Pay
// Since D1 SDK 3.2.0 version, the first parameter activity is not mandatory during configuration part, user should assign it when calling D1PushWallet.addDigitalCardToOEM() API, which is used to receive callback. D1Task.handleCardResult
// Third parameter is mandatory for Samsung Pay Service ID (Samsung Pay only).
// Last parameter is Visa Client App ID, if the value is not set, then it is assumed that the value is similar with Issuer ID.
D1Params cardConfig = ConfigParams.buildConfigCard(null, OEMPayType.GOOGLE_PAY, null, "visaClientAppId");
D1Task.ConfigCallback<Void> configCallback = new D1Task.ConfigCallback<Void>() {
@Override
public void onSuccess(@Nullable Void ignored) {
// D1 configuration is successful.
}
@Override
public void onError(@NonNull List<D1Exception> exceptions) {
// D1 configuration failed, check the exception for more details.
}
};
d1Task.configure(configCallback, coreConfig, cardConfig);Wallet-specific requirements
Google Pay
Samsung Pay
Last updated
Was this helpful?