CardInformation

public class CardInformation

This represents the data that is shared between the terminal and the Android application Setting the fields is only relevant when sending the data to the terminal, and conversely, getting the fields is only relevant when receiving this object from the terminal.

Fields

AMEX

public static final String AMEX

The constant value for the American Express Payment Brand.

DINERS_CLUB

public static final String DINERS_CLUB

The constant value for the Diners Club Payment Brand.

DISCOVER

public static final String DISCOVER

The constant value for the Discover Payment Brand.

INTERAC

public static final String INTERAC

The constant value for the Interac Payment Brand.

JCB

public static final String JCB

The constant value for the JCB Payment Brand.

MASTER_CARD

public static final String MASTER_CARD

The constant value for the Master Card Payment Brand.

NON_PCI_CARD_STATUS

public static final String NON_PCI_CARD_STATUS

The card status for a card that is not regulated, often times a loyalty card or membership card.

PCI_CARD

public static final String PCI_CARD

The card status for a card that must be treated according to PCI regulations.

UNKNOWN_PAYMENT_BRAND

public static final String UNKNOWN_PAYMENT_BRAND

The constant value when the payment brand is not recognized but present.

UNSET_PAYMENT_BRAND

public static final String UNSET_PAYMENT_BRAND

The default constant value for the payment brand, instead of null.

UPI

public static final String UPI

The constant value for the Union Pay International Payment Brand.

VISA

public static final String VISA

The constant value for the Visa Payment Brand.

Methods

create

public static CardInformation create()

create CardInformation

getAccountReference

public String getAccountReference()

Reference of the PAN, which identifies the PAN or the card uniquely, named also PAR (Payment Account Reference). This reference may be defined by the card issuer or by a token service provider under the control of the card issuer, and cannot be used for a payment transaction.

getAccountType

public AccountType getAccountType()

The account type used to complete this payment. This may be empty.

getAvailableBalance

public Decimal getAvailableBalance()

The balance remaining on the card.

getBankUserData

public String getBankUserData()

Deprecated on 2022-03-01. Please use getTokens() and Token.getScheme() instead.

getBin

public String getBin()

The first six digits of the card holder PAN. This might not be provided.

getCardCountry

public String getCardCountry()

Present only with EMV cards and is representation of EMV Tag5F28.

getCardCurrency

public String getCardCurrency()

Present only with EMV cards and is representation of EMV Tag9F42.

getCardExpiry

public String getCardExpiry()

The card expiry when specifically requested.

getCardHolderName

public String getCardHolderName()

This is included only when specifically requested.

getCardPan

public String getCardPan()

Returns the masked PAN when the card status is PCI_CARD or the clear PAN if the card status is NON_PCI_CARD.

getCardPreferredLanguages

public String getCardPreferredLanguages()

Present only with EMV cards and is representation of EMV Tag5F2D.

getCardStatus

public String getCardStatus()

The status of the card when the card data is requested specifically.

getCardToken

public String getCardToken()

Deprecated on 2022-03-01. Please use getTokens() and Token.getValue() instead.

getCardTokenizationMethod

public TokenizationMethod getCardTokenizationMethod()

Deprecated on 2022-03-01. Please use getTokens() and Token.getType() instead.

getCardTrack1

public String getCardTrack1()

Card track1. This value is only populated when the payment terminal is explicitly configured to pass back this information.

getCardTrack2

public String getCardTrack2()

Card track2. This value is only populated when the payment terminal is explicitly configured to pass back this information.

getCardTrack3

public String getCardTrack3()

Card track3. This value is only populated when the payment terminal is explicitly configured to pass back this information.

getCvv2

public String getCvv2()

Refer to setCvv2(String).

getEmvTags

public HashMap<String, String> getEmvTags()

Present only with EMV cards, this is the relevant EMV Tags necessary for record keeping. The key is the tag, e.g. “9F26”, and the value is a string encoding of the EMV value.

getEncryptedPan

public String getEncryptedPan()

This is included only when specifically requested.

getEncryptedPanKsn

public String getEncryptedPanKsn()

This is included only when specifically requested.

getEncryptedTracks

public String getEncryptedTracks()

This is included only when specifically requested.

getEncryptedTracksKsn

public String getEncryptedTracksKsn()

This is included only when specifically requested.

getFullVasResponse

public String getFullVasResponse()

Returns Full VAS Response string

getIssuerId

public String getIssuerId()

Returns an ID for this issuer, as assigned by the host or payment application. Generally null, since it’s normally enough to refer to the payment brand.

getPanFirst2

public String getPanFirst2()

The first two digits of the card holder PAN. This might not be provided.

getPanHandle

public String getPanHandle()

A reference returned by the Payment Application to refer to the PAN in question. A Commerce Application may choose to use PAN_Handle to request an encrypted PAN via API CP_APP_REQUESTS_ENCRYPTED_CARD.

getPanLast4

public String getPanLast4()

The last four digits of the card holder PAN. This might not be provided.

getPaymentBrand

public String getPaymentBrand()

The brand for the card. Returns a constant value, see VISA as an example, or the literal string received from the terminal if the constant is unrecognized.

getPinBypassed

public Boolean getPinBypassed()

True if PIN entry was bypassed during contactless payment.

getPresentationMethod

public PresentationMethod getPresentationMethod()

The method used to obtain the card data

getPreviousBalance

public Decimal getPreviousBalance()

The previous balance remaining on the card.

getProcessorCardNetwork

public String getProcessorCardNetwork()

Get Processor card network code from the host payment if the processor has sent the data to the host. Examples of a card network include Star, Pulse, etc.

getTokens

public ArrayList<Token> getTokens()

Get the list of tokens.

getVasData

public String getVasData()

Returns base64-encoded VAS string

getVclCryptoInformation

public HashMap<String, String> getVclCryptoInformation()

Present only when VCL Encryption is enabled. The keys are EPARMS,Track1 and Track2 and the values are strings

setAccountReference

public void setAccountReference(String accountReference)

Reference of the PAN, which identifies the PAN or the card uniquely, named also PAR (Payment Account Reference). This reference may be defined by the card issuer or by a token service provider under the control of the card issuer, and cannot be used for a payment transaction.

setAccountType

public void setAccountType(AccountType accountType)

The account type used to complete this payment.

setAvailableBalance

public void setAvailableBalance(Decimal availableBalance)

The balance remaining on the card.

setBankUserData

public void setBankUserData(String bankUserData)

Deprecated on 2022-03-01. Please use setTokens() instead.

setBin

public void setBin(String bin)

Set the first six digits of the PAN.

setCardCountry

public void setCardCountry(String cardCountry)

Set the card country. Set only with EMV cards and is representation of EMV Tag5F28.

setCardCurrency

public void setCardCurrency(String cardCurrency)

Set the card currency. Set only with EMV cards and is representation of EMV Tag9F42.

setCardExpiry

public void setCardExpiry(String cardExpiry)

The card expiry when specifically requested.

setCardHolderName

public void setCardHolderName(String cardHolderName)

This is included only when specifically requested.

setCardPan

public void setCardPan(String cardPan)

Sets the masked PAN when the card status is PCI_CARD or the clear PAN if the card status is NON_PCI_CARD.

setCardPreferredLanguages

public void setCardPreferredLanguages(String languages)

Set the card preferred languages. Set only with EMV cards and is representation of EMV Tag5F2D.

setCardStatus

public void setCardStatus(String cardStatus)

The status of the card when the card data is requested specifically.

setCardToken

public void setCardToken(String cardToken)

Deprecated on 2022-03-01. Please use setTokens() instead.

setCardTokenizationMethod

public void setCardTokenizationMethod(TokenizationMethod tokenizationMethod)

Deprecated on 2022-03-01. Please use setTokens() instead.

setCardTrack1

public void setCardTrack1(String cardTrack1)

Card track1. This value is only populated when the payment terminal is explicitly configured to pass back this information.

setCardTrack2

public void setCardTrack2(String cardTrack2)

Card track2. This value is only populated when the payment terminal is explicitly configured to pass back this information.

setCardTrack3

public void setCardTrack3(String cardTrack3)

Card track3. This value is only populated when the payment terminal is explicitly configured to pass back this information.

setCvv2

public void setCvv2(String cvv2)

When performing an action for stored value, use this field to set the CVV when it is collected by the POS.

setEmvTags

public void setEmvTags(HashMap<String, String> emvTags)

Set the Emv Tags for the current card.

setEncryptedPan

public void setEncryptedPan(String encryptedPan)

This is included only when specifically requested.

setEncryptedPanKsn

public void setEncryptedPanKsn(String encryptedPanKsn)

This is included only when specifically requested.

setEncryptedTracks

public void setEncryptedTracks(String encryptedTracks)

This is included only when specifically requested.

setEncryptedTracksKsn

public void setEncryptedTracksKsn(String encryptedTracksKsn)

This is included only when specifically requested.

setFullVasResponse

public void setFullVasResponse(String fullVasResponse)

Set Full VAS Response string

setIssuerId

public void setIssuerId(String issuerId)

The issuer id of the card

setPanFirst2

public void setPanFirst2(String panFirst2)

Set the first two digits of the PAN.

setPanHandle

public void setPanHandle(String panHandle)

A reference set by the Payment Application to refer to a specific PAN, only used while processing CP Triggers. A Commerce Application may choose to use PAN_Handle to request an encrypted PAN via API CP_APP_REQUESTS_ENCRYPTED_CARD.

setPanLast4

public void setPanLast4(String panLast4)

Set the last four digits of the PAN

setPaymentBrand

public void setPaymentBrand(String paymentBrand)

The brand for the card. A constant value, see VISA as an example, or the literal string received from the terminal if the constant is unrecognized.

setPresentationMethod

public void setPresentationMethod(PresentationMethod presentationMethod)

Set the presentation method. The method used to set the card data

setPreviousBalance

public void setPreviousBalance(Decimal previousBalance)

The previous balance remaining on the card.

setProcessorCardNetwork

public void setProcessorCardNetwork(String processorCardNetwork)

Set the processor card network. Refer to getProcessorCardNetwork.

setTokens

public void setTokens(ArrayList<Token> tokens)

Set tokens of the payment with a list.

setVasData

public void setVasData(String vasData)

Set base64-encoded VAS string

setVclCryptoInformation

public void setVclCryptoInformation(HashMap<String, String> cryptoInformation)

Set the VCL crypto information for the current card.