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 Details

    • isDefault

      AsyncToken<Boolean> isDefault(PaymentType paymentType, AbstractAsyncHandler<Boolean> handler)
      Checks if DigitalizedCard is set as the default payment card for the given PaymentType.
      Parameters:
      paymentType - PaymentType
      handler - 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

      AsyncToken<Void> setDefault(PaymentType paymentType, AbstractAsyncHandler<Void> handler)
      Sets the DigitalizedCard as the default payment card in the default PaymentType
      Parameters:
      paymentType - PaymentType
      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.
    • getCardDetails

      Retrieves the digital card details DigitalizedCardDetails.
      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 state DigitalizedCardState. 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 - PaymentType
      handler - The handler that will be responsible for processing the result of the operation
      path - 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 using setAdditionalPaymentData(PaymentType, AbstractAsyncHandler, String, byte[]).
      Parameters:
      paymentType - PaymentType
      handler - the handler that will be responsible for processing the result of the operation
      Returns:
      AsyncToken
    • getAdditionalPaymentDataSet

      This method is used to get the previously set additional payment data using setAdditionalPaymentData(PaymentType, AbstractAsyncHandler, String, byte[]).
      Parameters:
      paymentType - PaymentType
      handler - The handler that will be responsible for processing the result of the operation.
      Returns:
      DigitalizedCardAdditionalPaymentData
    • isMultiAids

      boolean isMultiAids()
      Checks if the current card supports multiple Aid.

      Note: This API is only applicable for Visa scheme.

      Returns:
      The true if it has multiple AIDS, or else false is returned.
    • hasAuxiliaryScheme

      boolean hasAuxiliaryScheme()
      Checks if the current card has an auxiliary scheme.
      Returns:
      true if the auxiliary scheme is supported, else return false.
    • getAllAids

      List<Aid> getAllAids() throws InternalComponentException
      Gets all the Aid supported 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 Aid objects.
      Throws:
      InternalComponentException - InternalComponentException such as invalid profile fields.
      Since:
      6.3.1
    • updateAidList

      void updateAidList(List<Aid> aids) throws InternalComponentException
      Updates the list of Aid to card profile.

      Note: This API is only applicable for Visa.

      Parameters:
      aids - The list of Aid to be updated where 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