Class CardDetails


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

    For security reasons, CardDetails uses byte[] as a variable type which can be wiped (refer to wipe()).

    Use the following example to convert the variable from byte[] to String if necessary: 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,
                           @Nullable
                           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()
        Gets the full PAN number of the card.
      • getExpiryDate

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

        @NonNull
        public byte[] getCvv()
        Gets the CVV number of the card.
      • getCardHolderName

        @Nullable
        public byte[] getCardHolderName()
        Gets the name of the cardholder.
      • wipe

        public void wipe()
        Wipes the sensitive data of the object.