Package com.gemalto.mfs.mwsdk.dcm
Interface DigitalizedCard
public interface DigitalizedCard
Interface describing the digitalized card.
The use cases include:
- Determines if this particular digitalized card is the default card for payment.
- If this is not the default card for payment, set this digitalized card as the default payment card.
- Retrieves the specific card details.
- Retrieves the tokenized card ID that is associated with this card.
- Retrieves the current state of the card.
-
Method Summary
Modifier and TypeMethodDescriptionclearAdditionalPaymentDataSet(PaymentType paymentType, AbstractAsyncHandler<Void> handler) This method is used to clear the previously set additional payment data usingsetAdditionalPaymentData(PaymentType, AbstractAsyncHandler, String, byte[]).getAdditionalPaymentDataSet(PaymentType paymentType, AbstractAsyncHandler<DigitalizedCardAdditionalPaymentData> handler) This method is used to get the previously set additional payment data usingsetAdditionalPaymentData(PaymentType, AbstractAsyncHandler, String, byte[]).Deprecated.Retrieves the Payment Account Reference (PAR) for the auxiliary card in a co-badge scenario.Retrieves the auxiliary PPSE (Proximity Payment System Environment) for the digitalized card, if available.Retrieves the digital card detailsDigitalizedCardDetails.Retrieves the digitalized card stateDigitalizedCardState.Retrieves the custom PPSE (Proximity Payment System Environment) for the digitalized card.Retrieves the Payment Account Reference (PAR) for the primary card.getPpse()Retrieves the PPSE (Proximity Payment System Environment) for the digitalized card.Retrieves the tokenized card ID.Deprecated.since 6.14.0.booleanChecks if the current card has an auxiliary scheme.isDefault(PaymentType paymentType, AbstractAsyncHandler<Boolean> handler) Checks if DigitalizedCard is set as the default payment card for the given PaymentType.booleanChecks if the current card supports multipleAid.byte[]Returns the wallet transaction data that is configured usingsetWalletTransactionData(byte[]).setAdditionalPaymentData(PaymentType type, AbstractAsyncHandler<Void> handler, String path, byte[] value) This method is used to complement with PaymentService#setData() where the data is set only once during the transaction.voidSets the custom PPSE (Proximity Payment System Environment) for the digitalized card.setDefault(PaymentType paymentType, AbstractAsyncHandler<Void> handler) Sets the DigitalizedCard as the default payment card in the default PaymentTypevoidsetWalletTransactionData(byte[] walletTransactionData) Allows the MPA to set the wallet transaction data that will be used during the transaction.voidsetWalletTransactionData(WalletTransactionData walletTransactionData) Deprecated.since 6.14.0.voidupdateAidList(List<Aid> aids) Deprecated.since 6.15.0 UsesetCustomPpse(PpseFciTemplate)instead.
-
Method Details
-
isDefault
Checks if DigitalizedCard is set as the default payment card for the given PaymentType.- Parameters:
paymentType-PaymentTypehandler- Responsible for processing the result of the operation.AbstractAsyncHandler- Returns:
- AsyncToken
The token that can be used to make this method synchronous.If the return value is NULL,it means that the card no longer exists in the database.(It may due to the "wipe card" command performed in the background)
-
setDefault
Sets the DigitalizedCard as the default payment card in the default PaymentType- Parameters:
paymentType-PaymentTypehandler- The handler that is responsible for processing the result of the operation.- Returns:
- AsyncToken
The token that may be used to wait for the result of the asynchronous operation.
-
getCardDetails
AsyncToken<DigitalizedCardDetails> getCardDetails(AbstractAsyncHandler<DigitalizedCardDetails> handler) Retrieves the digital card detailsDigitalizedCardDetails.- Parameters:
handler- The handler that is responsible for processing the result of the operation.- Returns:
- AsyncToken
The token that may be used to wait for the result of the asynchronous operation.
-
getTokenizedCardID
String getTokenizedCardID()Retrieves the tokenized card ID.- Returns:
- string The tokenized card ID.
-
getCardState
Retrieves the digitalized card stateDigitalizedCardState. The card state is dictated by the CPS server.- Parameters:
handler- The handler that is responsible for processing the result of the operation.- Returns:
- AsyncToken
The token that may be used to wait for the result of the asynchronous operation.
-
setAdditionalPaymentData
AsyncToken<Void> setAdditionalPaymentData(PaymentType type, AbstractAsyncHandler<Void> handler, String path, byte[] value) This method is used to complement with PaymentService#setData() where the data is set only once during the transaction. This method is used if MPA wants to set an additional payment data before the transaction starts. This data will be persisted by the SDK and will be used in future transactions.- Parameters:
type-PaymentTypehandler- The handler that will be responsible for processing the result of the operationpath- One of the predefined paths in the card profile that allows update. Refer to the list of paths in ProfileUpdatablePaths.value- The value to update. The validity of the data depends on the path.- Returns:
AsyncToken
-
clearAdditionalPaymentDataSet
AsyncToken<Void> clearAdditionalPaymentDataSet(PaymentType paymentType, AbstractAsyncHandler<Void> handler) This method is used to clear the previously set additional payment data usingsetAdditionalPaymentData(PaymentType, AbstractAsyncHandler, String, byte[]).- Parameters:
paymentType-PaymentTypehandler- the handler that will be responsible for processing the result of the operation- Returns:
AsyncToken
-
getAdditionalPaymentDataSet
AsyncToken<DigitalizedCardAdditionalPaymentData> getAdditionalPaymentDataSet(PaymentType paymentType, AbstractAsyncHandler<DigitalizedCardAdditionalPaymentData> handler) This method is used to get the previously set additional payment data usingsetAdditionalPaymentData(PaymentType, AbstractAsyncHandler, String, byte[]).- Parameters:
paymentType-PaymentTypehandler- The handler that will be responsible for processing the result of the operation.- Returns:
DigitalizedCardAdditionalPaymentData
-
isMultiAids
boolean isMultiAids()Checks if the current card supports multipleAid.Note: This API is only applicable for Visa scheme.
- Returns:
- The
trueif it has multiple AIDS, or elsefalseis returned.
-
hasAuxiliaryScheme
boolean hasAuxiliaryScheme()Checks if the current card has an auxiliary scheme.- Returns:
trueif the auxiliary scheme is supported, else returnfalse.
-
getAllAids
Deprecated.since 6.15.0 UsegetPpse()instead.- Changes made via
updateAidList(List)will be reflected ingetPpse()andgetAllAids()but NOT ingetCustomPpse().- If Custom Ppse is set, it will take precedence during payment
- Recommended: Migrate to new PPSE APIs for all new implementations to ensure compatibility with future SDK versions and multi-scheme support
Gets all theAidsupported in PPSE FCI response in card profile. The element is sorted in descending order according to its priority, that is, the first element has the highest priority while the last element has the lowest priority.Note: This API is only applicable for Visa scheme.
- Returns:
- The list of
Aidobjects. - Throws:
InternalComponentException- InternalComponentException such as invalid profile fields.- Since:
- 6.3.1
- Changes made via
-
updateAidList
Deprecated.since 6.15.0 UsesetCustomPpse(PpseFciTemplate)instead.- Changes made via
updateAidList(List)will be reflected ingetPpse()andgetAllAids()but NOT ingetCustomPpse().- DO NOT call this method after using
setCustomPpse(PpseFciTemplate)- the custom PPSE will take precedence during payment- Recommended: Migrate to new PPSE APIs for all new implementations to ensure compatibility with future SDK versions and multi-scheme support
Updates the list ofAidto card profile.Note: This API is only applicable for Visa.
- Parameters:
aids- The list ofAidto be updated where the first element has the highest priority while the last element has the lowest priority.- Throws:
InternalComponentException- InternalComponentException such as changingAidpriority is not supported.- Since:
- 6.3.1
- Changes made via
-
setWalletTransactionData
@Deprecated void setWalletTransactionData(@NonNull WalletTransactionData walletTransactionData) throws InternalComponentException Deprecated.since 6.14.0. UsesetWalletTransactionData(byte[])instead.Allows the MPA to set the wallet transaction data that will be used during the transaction.- Parameters:
walletTransactionData- a non-null parameter. SeeWalletTransactionData.- Throws:
InternalComponentException- if SDK is not initialized or if the exceeds 14 bytes. SeeWalletTransactionData.Builderfor other errors
-
getWalletTransactionData
@Deprecated @Nullable WalletTransactionData getWalletTransactionData() throws InternalComponentExceptionDeprecated.since 6.14.0. UseretrieveWalletTransactionData()instead.Returns the wallet transaction data that is configured usingsetWalletTransactionData(WalletTransactionData).- Returns:
- the
WalletTransactionDatainstance containing the configured details, ornullif no data has been set. - Throws:
InternalComponentException- if SDK is not initialized. SeeWalletTransactionDatafor other errors
-
setWalletTransactionData
void setWalletTransactionData(@Nullable byte[] walletTransactionData) throws InternalComponentException Allows the MPA to set the wallet transaction data that will be used during the transaction. This method is supported only for the Mastercard 2.x and above or Pure.- Parameters:
walletTransactionData- the wallet transaction data to set or pass null to clear the stored value for the digital card.- Throws:
InternalComponentException- if SDK is not initialized or if the exceeds 14 bytes for MasterCard or 15 bytes for Pure or if the card scheme is unsupported.
-
retrieveWalletTransactionData
Returns the wallet transaction data that is configured usingsetWalletTransactionData(byte[]).- Returns:
- the wallet proprietary data, or
nullif not set - Throws:
InternalComponentException- if SDK is not initialized or if the card scheme is unsupported.
-
getPpse
Retrieves the PPSE (Proximity Payment System Environment) for the digitalized card.- Returns:
- The PPSE FCI template.
- Throws:
InternalComponentException- if SDK is not initialized or if there is any error while retrieving and parsing Contactless data- Since:
- 6.15.0
-
getAuxiliaryPpse
Retrieves the auxiliary PPSE (Proximity Payment System Environment) for the digitalized card, if available.- Returns:
- The auxiliary PPSE FCI template, or
nullif not available. - Throws:
InternalComponentException- if SDK is not initialized or if there is any error while retrieving and parsing Contactless data- Since:
- 6.15.0
-
getCustomPpse
Retrieves the custom PPSE (Proximity Payment System Environment) for the digitalized card.- Returns:
- The custom PPSE FCI template.
- Throws:
InternalComponentException- if SDK is not initialized or if there is any error while retrieving and parsing Contactless data- Since:
- 6.15.0
-
setCustomPpse
Sets the custom PPSE (Proximity Payment System Environment) for the digitalized card.- Parameters:
fci- The custom PPSE FCI template to set, ornullto clear the custom PPSE.- Throws:
InternalComponentException- if SDK is not initialized or if there is an error while validating thefcifor mandatory/valid tags.- Since:
- 6.15.0
-
getPaymentAccountReference
Retrieves the Payment Account Reference (PAR) for the primary card.This method extracts the Primary PAR value directly from the contactless data stored in the card profile.
- Returns:
- The 29-character alphanumeric PAR string for the card, or
nullif:- Contactless data is unavailable
- PAR is unavailable in contactless data
- Throws:
InternalComponentException- if the SDK is not initialized or if card does not exist or if there is an error retrieving the PAR- Since:
- 6.15.0
-
getAuxiliaryPaymentAccountReference
Retrieves the Payment Account Reference (PAR) for the auxiliary card in a co-badge scenario.This method extracts the Auxiliary PAR value directly from the contactless data stored in the card profile. It is only applicable for cards that support auxiliary schemes (co-badge).
- Returns:
- The 29-character alphanumeric PAR string for the auxiliary card, or
nullif:- The card does not have an auxiliary scheme
- Contactless data is unavailable
- PAR is unavailable in contactless data
- Throws:
InternalComponentException- if the SDK is not initialized or if card does not exist or if there is an error retrieving the PAR- Since:
- 6.15.0
-
getPpse()instead.