Interface DigitalizedCard


  • public interface DigitalizedCard
    Interface describing the digitalized card. Normal use cases of using this component include:
    • Determining 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.
    • Retrieve specific card details
    • Retrieve the tokenized card id associated with this card
    • Retrieve the current state of the card
    • Method Detail

      • isDefault

        AsyncToken<java.lang.Boolean> isDefault​(PaymentType paymentType,
                                                AbstractAsyncHandler<java.lang.Boolean> handler)
        Check if the DigitalizedCard is set as the default payment card for the given PaymentType.
        Parameters:
        paymentType - PaymentType
        handler - that will be responsible for processing the result of the operation AbstractAsyncHandler
        Returns:
        AsyncToken token that can be used to make this method synchronous.If the return value is NULL,it means the card is no longer exist in the database.(It may due to the "wipe card" command performed in the background)
      • setDefault

        AsyncToken<java.lang.Void> setDefault​(PaymentType paymentType,
                                              AbstractAsyncHandler<java.lang.Void> handler)
        Set the DigitalizedCard as the default payment card with the default PaymentType
        Parameters:
        paymentType - PaymentType
        handler - the handler that will be responsible for processing the result of the operation
        Returns:
        AsyncToken token that may be used to wait for the result of the asynchronous operation.
      • getTokenizedCardID

        java.lang.String getTokenizedCardID()
        Retrieve tokenized card ID.
        Returns:
        string representing the tokenized card id
      • setAdditionalPaymentData

        AsyncToken<java.lang.Void> setAdditionalPaymentData​(PaymentType type,
                                                            AbstractAsyncHandler<java.lang.Void> handler,
                                                            java.lang.String path,
                                                            byte[] value)
        This method is used in compliment with PaymentService#setData() where data is set one time 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 - PaymentType
        handler - the handler that will be responsible for processing the result of the operation
        path - One of the predefined path in the card profile that allows update. Refer to the list in ProfileUpdatablePaths.
        value - The value to update. The validity of the data depends on the path.
        Returns:
        AsyncToken
      • isMultiAids

        boolean isMultiAids()
        Check if current card supports multiple Aid.

        Note: This API is only applicable for VISA.

        Returns:
        true if support, or else return false.
      • getAllAids

        java.util.List<Aid> getAllAids()
                                throws InternalComponentException
        Get all the Aid supported in PPSE FCI response in card profile. The element is sorted in descending order according to its priority, i.e. the first element has the highest priority while the last element has the lowest priority.

        Note: This API is only applicable for VISA.

        Returns:
        The list of Aid object.
        Throws:
        InternalComponentException - InternalComponentException such as invalid profile fields.
        Since:
        6.3.1
      • updateAidList

        void updateAidList​(java.util.List<Aid> aids)
                    throws InternalComponentException
        Update the list of Aid to card profile.

        Note: This API is only applicable for VISA.

        Parameters:
        aids - the list of Aid to be updated, the first element has the highest priority while the last element has the lowest priority.
        Throws:
        InternalComponentException - InternalComponentException such as changing Aid priority is not supported.
        Since:
        6.3.1