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[]).Gets all theAidsupported in PPSE FCI response in card profile.Retrieves the digital card detailsDigitalizedCardDetails.Retrieves the digitalized card stateDigitalizedCardState.Retrieves the tokenized card ID.Returns the wallet transaction data that is configured usingsetWalletTransactionData(WalletTransactionData).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.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.setDefault(PaymentType paymentType, AbstractAsyncHandler<Void> handler) Sets the DigitalizedCard as the default payment card in the default PaymentTypevoidsetWalletTransactionData(WalletTransactionData walletTransactionData) Allows the MPA to set the wallet transaction data that will be used during the transaction.voidupdateAidList(List<Aid> aids) Updates the list ofAidto card profile.
-
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
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
-
updateAidList
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
-
setWalletTransactionData
void setWalletTransactionData(@NonNull WalletTransactionData walletTransactionData) throws InternalComponentException Allows the MPA to set the wallet transaction data that will be used during the transaction. Also refer toWalletTransactionDatafor more information on the values to configure.- 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
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
-