FinancialCard

This class represents the parsed magnetic strip data from a financial (credit) card.

see

http://en.wikipedia.org/wiki/Magnetic_stripe_card

package

Application

Methods

Gets the card issuer determined based on card number patterns.

getIssuer() : \com\scriptel\FianacialCardIssuer

Response

\com\scriptel\FianacialCardIssuer

the credit card issuer.

Gets whether or not the credit card number passes Luhn's algorithm.

getNumberValid() : mixed

Response

mixed

Gets track one.

getTrackOne() : \com\scriptel\FinancialCardTrackOne

Response

\com\scriptel\FinancialCardTrackOne

Parsed track one.

Gets track two.

getTrackTwo() : \com\scriptel\FinancialCardTrackTwo

Response

\com\scriptel\FinancialCardTrackTwo

Parsed track two.

This method takes the raw card data from the swipe and attempts to extract financial card data.

parse(mixedcardData) : \FinancialCard
static

Arguments

cardData

mixed

Response

\FinancialCard

Sets the card issuer.

setIssuer(\com\scriptel\FinancialCardIssuerissuer) : mixed

Arguments

issuer

\com\scriptel\FinancialCardIssuer

Response

mixed

Sets whether or not the credit card number passes Luhn's algorithm.

setNumberValid(\com\scriptel\typenumberValid) : mixed

Arguments

numberValid

\com\scriptel\type

Response

mixed

Sets track one.

setTrackOne(\com\scriptel\FinancialCardTrackOnetrackOne) : mixed

Arguments

trackOne

\com\scriptel\FinancialCardTrackOne

Response

mixed

Sets track two.

setTrackTwo(\com\scriptel\FinancialCardTrackTwotrackTwo) : mixed

Arguments

trackTwo

\com\scriptel\FinancialCardTrackTwo

Response

mixed

Returns this object as a human readable string.

toString() : mixed

Response

mixed

This method takes a card number and applies Luhn's algorithm to verify the card checksum. This method can detect minor transpositions and obviously invalid card numbers, but it cannot detect fake credit card numbers.

verifyCardChecksum(\com\scriptel\typecardNumber) : \com\scriptel\type
static

Arguments

cardNumber

\com\scriptel\type

Response

\com\scriptel\type

Properties

Parsed first track from the magnetic strip.

trackOne : \com\scriptel\FinancialCardTrackOne
var

Type(s)

FinancialCardTrackOne

Parsed second track from the magnetic strip.

trackTwo : \com\scriptel\FinancialCardTrackTwo
var

Type(s)

FinancialCardTrackTwo

Indicates whether or not the parsed card number passes the Luhn checksum algorithm.

numberValid : bool

Used to detect minor errors in card entry.

var

Type(s)

bool

Stores the financial card issuer if it can be identified.

issuer : \com\scriptel\FinancialCardIssuer
var

Type(s)

FinancialCardIssuer