Class Card
java.lang.Object
org.jpos.core.Card
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intLength of the BIN (Bank Identification Number) in digits. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Card.Builderbuilder()Returns a newCard.Builderfor constructing aCard.booleangetBin()Returns the traditional 6-digit BIN from the PAN.getBin(int len) Returns the firstlendigits from the PAN.getCvv2()Returns the CVV2 / CVC2 value.getExp()Returns the card expiry date.getPan()Returns the primary account number.Returns the primary account number as aBigInteger.Returns the ISO service code.Returns the Track 1 data.Returns the Track 2 data.booleanReturns true if both track 1 and track 2 data are present.inthashCode()booleanReturns true if track 1 data is present.booleanReturns true if track 2 data is present.booleanReturns true if the card is expired relative to the given date.toString()
-
Field Details
-
BINLEN
-
-
Constructor Details
-
Card
Creates a Card from the given Builder.- Parameters:
builder- the builder
-
-
Method Details
-
getPan
-
getPanAsNumber
Returns the primary account number as aBigInteger.- Returns:
- the PAN as a BigInteger
-
getExp
-
getCvv2
-
getServiceCode
-
hasTrack1
Returns true if track 1 data is present.- Returns:
- true if track 1 is available
-
hasTrack2
Returns true if track 2 data is present.- Returns:
- true if track 2 is available
-
hasBothTracks
Returns true if both track 1 and track 2 data are present.- Returns:
- true if both tracks are available
-
getBin
-
getBin
-
toString
-
equals
-
hashCode
-
getTrack1
-
getTrack2
-
isExpired
-
builder
Returns a newCard.Builderfor constructing aCard.- Returns:
- a new Builder
-