Class CardDetails

java.lang.Object
com.thalesgroup.gemalto.d1.card.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 Summary

    Constructors
    Constructor
    Description
    CardDetails(byte[] pan, byte[] expiryDate, byte[] cvv, byte[] cardHolderName)
    Public Constructor
  • Method Summary

    Modifier and Type
    Method
    Description
    byte[]
    Gets the name of the cardholder.
    byte[]
    Gets the CVV number of the card.
    byte[]
    Gets the expiry date of the card in MMYY format.
    byte[]
    Gets the full PAN number of the card.
    void
    Wipes the sensitive data of the object.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • 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 Details

    • 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.