Class CardDetails


  • public final class CardDetails
    extends Object
    The Card details for D1 Core.

    For security reason, CardDetails use byte[] as variables type which can be wiped (refer wipe()).

    Please use following example to covert the variable from byte[] to String if need: String pan = new String(cardDetails.getPan(), StandardCharsets.UTF_8);

    Since:
    1.0.0
    • Constructor Detail

      • CardDetails

        public CardDetails​(@NonNull
                           byte[] pan,
                           @NonNull
                           byte[] expiryDate,
                           @NonNull
                           byte[] cvv,
                           @NonNull
                           byte[] cardHolderName)
        Public Constructor

        Constructing new object

        Parameters:
        pan - The PAN value
        expiryDate - The expiry date
        cvv - The CVV value
        cardHolderName - The card holder name
    • Method Detail

      • getPan

        @NonNull
        public byte[] getPan()
        Get full pan number of the card
      • getExpiryDate

        @NonNull
        public byte[] getExpiryDate()
        Get expiry date of the card, in MMYY format
      • getCvv

        @NonNull
        public byte[] getCvv()
        Get cvv number of the card
      • getCardHolderName

        @NonNull
        public byte[] getCardHolderName()
        Get card holder name of the card
      • wipe

        public void wipe()
        Wipe the sensitive data of the object