PHP Class Omnipay\Common\CreditCard

This class defines and abstracts all of the credit card types used throughout the Omnipay system.
Afficher le fichier Open project: omnipay/common Class Usage Examples

Protected Properties

Свойство Type Description
$parameters Symfony\Component\HttpFoundation\ParameterBag Internal storage of all of the card parameters.
$supported_cards

Méthodes publiques

Méthode Description
__construct ( array $parameters = null ) Create a new CreditCard object using the specified parameters
addSupportedBrand ( string $name, string $expression ) : boolean Set a custom supported card brand with a regular expression to match it.
getAddress1 ( ) : string Get the billing address, line 1.
getAddress2 ( ) : string Get the billing address, line 2.
getBillingAddress1 ( ) : string Get the billing address, line 1.
getBillingAddress2 ( ) : string Get the billing address, line 2.
getBillingCity ( ) : string Get the billing city.
getBillingCompany ( ) : string Get the billing company name.
getBillingCountry ( ) : string Get the billing country name.
getBillingFax ( ) : string Get the billing fax number.
getBillingFirstName ( ) : string Get the first part of the card billing name.
getBillingLastName ( ) : string Get the last part of the card billing name.
getBillingName ( ) : string Get the card billing name.
getBillingPhone ( ) : string Get the billing phone number.
getBillingPhoneExtension ( ) : string Get the billing phone number extension.
getBillingPostcode ( ) : string Get the billing postcode.
getBillingState ( ) : string Get the billing state.
getBillingTitle ( ) : string Get the card billing title.
getBirthday ( $format = 'Y-m-d' ) : string Get the cardholder's birthday.
getBrand ( ) : string Credit Card Brand
getCity ( ) : string Get the billing city.
getCompany ( ) : string Get the card billing company name.
getCountry ( ) : string Get the billing country.
getCvv ( ) : string Get the card CVV.
getEmail ( ) : string Get the cardholder's email address.
getExpiryDate ( string $format ) : string Get the card expiry date, using the specified date format string.
getExpiryMonth ( ) : integer Get the card expiry month.
getExpiryYear ( ) : integer Get the card expiry year.
getFax ( ) : string Get the billing fax number.
getFirstName ( ) : string Get Card First Name.
getGender ( ) : string Get the cardholder's gender.
getIssueNumber ( ) : string Get the card issue number.
getLastName ( ) : string Get Card Last Name.
getName ( ) : string Get Card Name.
getNumber ( ) : string Get Card Number.
getNumberLastFour ( ) : string Get the last 4 digits of the card number.
getNumberMasked ( string $mask = 'X' ) : string Returns a masked credit card number with only the last 4 chars visible
getParameters ( ) : array Get all parameters.
getPhone ( ) : string Get the billing phone number.
getPhoneExtension ( ) : string Get the billing phone number extension.
getPostcode ( ) : string Get the billing postcode.
getShippingAddress1 ( ) : string Get the shipping address, line 1.
getShippingAddress2 ( ) : string Get the shipping address, line 2.
getShippingCity ( ) : string Get the shipping city.
getShippingCompany ( ) : string Get the shipping company name.
getShippingCountry ( ) : string Get the shipping country.
getShippingFax ( ) : string Get the shipping fax number.
getShippingFirstName ( ) : string Get the first part of the card shipping name.
getShippingLastName ( ) : string Get the last part of the card shipping name.
getShippingName ( ) : string Get the card shipping name.
getShippingPhone ( ) : string Get the shipping phone number.
getShippingPhoneExtension ( ) : string Get the shipping phone number extension.
getShippingPostcode ( ) : string Get the shipping postcode.
getShippingState ( ) : string Get the shipping state.
getShippingTitle ( ) : string Get the title of the card shipping name.
getStartDate ( string $format ) : string Get the card start date, using the specified date format string
getStartMonth ( ) : string Get the card start month.
getStartYear ( ) : integer Get the card start year.
getState ( ) : string Get the billing state.
getSupportedBrands ( ) : array All known/supported card brands, and a regular expression to match them.
getTitle ( ) : string Get Card Title.
getTrack1 ( ) : string Get raw data for track 1 on the credit card magnetic strip.
getTrack2 ( ) : string Get raw data for track 2 on the credit card magnetic strip.
getTracks ( ) : string Get raw data for all tracks on the credit card magnetic strip.
initialize ( array $parameters = null ) : CreditCard Initialize the object with parameters.
setAddress1 ( string $value ) : CreditCard Sets the billing and shipping address, line 1.
setAddress2 ( string $value ) : CreditCard Sets the billing and shipping address, line 2.
setBillingAddress1 ( string $value ) : CreditCard Sets the billing address, line 1.
setBillingAddress2 ( string $value ) : CreditCard Sets the billing address, line 2.
setBillingCity ( string $value ) : CreditCard Sets billing city.
setBillingCompany ( string $value ) : CreditCard Sets the billing company name.
setBillingCountry ( string $value ) : CreditCard Sets the billing country name.
setBillingFax ( string $value ) : CreditCard Sets the billing fax number.
setBillingFirstName ( string $value ) : CreditCard Sets the first part of the card billing name.
setBillingLastName ( string $value ) : CreditCard Sets the last part of the card billing name.
setBillingName ( string $value ) : CreditCard Sets the card billing name.
setBillingPhone ( string $value ) : CreditCard Sets the billing phone number.
setBillingPhoneExtension ( string $value ) : CreditCard Sets the billing phone number extension.
setBillingPostcode ( string $value ) : CreditCard Sets the billing postcode.
setBillingState ( string $value ) : CreditCard Sets the billing state.
setBillingTitle ( string $value ) : CreditCard Sets the card billing title.
setBirthday ( string $value ) : CreditCard Sets the cardholder's birthday.
setCity ( string $value ) : CreditCard Sets the billing and shipping city.
setCompany ( string $value ) : CreditCard Sets the billing and shipping company name.
setCountry ( string $value ) : CreditCard Sets the billing and shipping country.
setCvv ( string $value ) : CreditCard Sets the card CVV.
setEmail ( string $value ) : CreditCard Sets the cardholder's email address.
setExpiryMonth ( string $value ) : CreditCard Sets the card expiry month.
setExpiryYear ( string $value ) : CreditCard Sets the card expiry year.
setFax ( string $value ) : CreditCard Sets the billing and shipping fax number.
setFirstName ( string $value ) : CreditCard Set Card First Name (Billing and Shipping).
setGender ( string $value ) : CreditCard Sets the cardholder's gender.
setIssueNumber ( string $value ) : CreditCard Sets the card issue number.
setLastName ( string $value ) : CreditCard Set Card Last Name (Billing and Shipping).
setName ( string $value ) : CreditCard Set Card Name (Billing and Shipping).
setNumber ( string $value ) : CreditCard Set Card Number
setPhone ( string $value ) : CreditCard Sets the billing and shipping phone number.
setPhoneExtension ( string $value ) : CreditCard Sets the billing and shipping phone number extension.
setPostcode ( string $value ) : CreditCard Sets the billing and shipping postcode.
setShippingAddress1 ( string $value ) : CreditCard Sets the shipping address, line 1.
setShippingAddress2 ( string $value ) : CreditCard Sets the shipping address, line 2.
setShippingCity ( string $value ) : CreditCard Sets the shipping city.
setShippingCompany ( string $value ) : CreditCard Sets the shipping company name.
setShippingCountry ( string $value ) : CreditCard Sets the shipping country.
setShippingFax ( string $value ) : CreditCard Sets the shipping fax number.
setShippingFirstName ( string $value ) : CreditCard Sets the first part of the card shipping name.
setShippingLastName ( string $value ) : CreditCard Sets the last part of the card shipping name.
setShippingName ( string $value ) : CreditCard Sets the card shipping name.
setShippingPhone ( string $value ) : CreditCard Sets the shipping phone number.
setShippingPhoneExtension ( string $value ) : CreditCard Sets the shipping phone number extension.
setShippingPostcode ( string $value ) : CreditCard Sets the shipping postcode.
setShippingState ( string $value ) : CreditCard Sets the shipping state.
setShippingTitle ( string $value ) : CreditCard Sets the title of the card shipping name.
setStartMonth ( string $value ) : CreditCard Sets the card start month.
setStartYear ( string $value ) : CreditCard Sets the card start year.
setState ( string $value ) : CreditCard Sets the billing and shipping state.
setTitle ( string $value ) : CreditCard Set Card Title.
setTracks ( $value ) : CreditCard Sets raw data from all tracks on the credit card magnetic strip. Used by gateways that support card-present transactions.
validate ( ) : void Validate this credit card. If the card is invalid, InvalidCreditCardException is thrown.

Méthodes protégées

Méthode Description
getParameter ( $key ) : mixed Get one parameter.
setParameter ( string $key, mixed $value ) : CreditCard Set one parameter.
setYearParameter ( string $key, mixed $value ) : CreditCard Set the credit card year.

Method Details

__construct() public méthode

Create a new CreditCard object using the specified parameters
public __construct ( array $parameters = null )
$parameters array An array of parameters to set on the new object

addSupportedBrand() public méthode

Note: The fact that a particular card is known does not imply that your gateway supports it. Set $add_to_front to true if the key should be added to the front of the array
public addSupportedBrand ( string $name, string $expression ) : boolean
$name string The name of the new supported brand.
$expression string The regular expression to check if a card is supported.
Résultat boolean success

getAddress1() public méthode

Get the billing address, line 1.
public getAddress1 ( ) : string
Résultat string

getAddress2() public méthode

Get the billing address, line 2.
public getAddress2 ( ) : string
Résultat string

getBillingAddress1() public méthode

Get the billing address, line 1.
public getBillingAddress1 ( ) : string
Résultat string

getBillingAddress2() public méthode

Get the billing address, line 2.
public getBillingAddress2 ( ) : string
Résultat string

getBillingCity() public méthode

Get the billing city.
public getBillingCity ( ) : string
Résultat string

getBillingCompany() public méthode

Get the billing company name.
public getBillingCompany ( ) : string
Résultat string

getBillingCountry() public méthode

Get the billing country name.
public getBillingCountry ( ) : string
Résultat string

getBillingFax() public méthode

Get the billing fax number.
public getBillingFax ( ) : string
Résultat string

getBillingFirstName() public méthode

Get the first part of the card billing name.
public getBillingFirstName ( ) : string
Résultat string

getBillingLastName() public méthode

Get the last part of the card billing name.
public getBillingLastName ( ) : string
Résultat string

getBillingName() public méthode

Get the card billing name.
public getBillingName ( ) : string
Résultat string

getBillingPhone() public méthode

Get the billing phone number.
public getBillingPhone ( ) : string
Résultat string

getBillingPhoneExtension() public méthode

Get the billing phone number extension.
public getBillingPhoneExtension ( ) : string
Résultat string

getBillingPostcode() public méthode

Get the billing postcode.
public getBillingPostcode ( ) : string
Résultat string

getBillingState() public méthode

Get the billing state.
public getBillingState ( ) : string
Résultat string

getBillingTitle() public méthode

Get the card billing title.
public getBillingTitle ( ) : string
Résultat string

getBirthday() public méthode

Get the cardholder's birthday.
public getBirthday ( $format = 'Y-m-d' ) : string
Résultat string

getBrand() public méthode

Iterates through known/supported card brands to determine the brand of this card
public getBrand ( ) : string
Résultat string

getCity() public méthode

Get the billing city.
public getCity ( ) : string
Résultat string

getCompany() public méthode

Get the card billing company name.
public getCompany ( ) : string
Résultat string

getCountry() public méthode

Get the billing country.
public getCountry ( ) : string
Résultat string

getCvv() public méthode

Get the card CVV.
public getCvv ( ) : string
Résultat string

getEmail() public méthode

Get the cardholder's email address.
public getEmail ( ) : string
Résultat string

getExpiryDate() public méthode

Get the card expiry date, using the specified date format string.
public getExpiryDate ( string $format ) : string
$format string
Résultat string

getExpiryMonth() public méthode

Get the card expiry month.
public getExpiryMonth ( ) : integer
Résultat integer

getExpiryYear() public méthode

Get the card expiry year.
public getExpiryYear ( ) : integer
Résultat integer

getFax() public méthode

.
public getFax ( ) : string
Résultat string

getFirstName() public méthode

Get Card First Name.
public getFirstName ( ) : string
Résultat string

getGender() public méthode

Get the cardholder's gender.
public getGender ( ) : string
Résultat string

getIssueNumber() public méthode

Get the card issue number.
public getIssueNumber ( ) : string
Résultat string

getLastName() public méthode

Get Card Last Name.
public getLastName ( ) : string
Résultat string

getName() public méthode

Get Card Name.
public getName ( ) : string
Résultat string

getNumber() public méthode

Get Card Number.
public getNumber ( ) : string
Résultat string

getNumberLastFour() public méthode

Get the last 4 digits of the card number.
public getNumberLastFour ( ) : string
Résultat string

getNumberMasked() public méthode

Returns a masked credit card number with only the last 4 chars visible
public getNumberMasked ( string $mask = 'X' ) : string
$mask string Character to use in place of numbers
Résultat string

getParameter() protected méthode

Get one parameter.
protected getParameter ( $key ) : mixed
Résultat mixed A single parameter value.

getParameters() public méthode

Get all parameters.
public getParameters ( ) : array
Résultat array An associative array of parameters.

getPhone() public méthode

Get the billing phone number.
public getPhone ( ) : string
Résultat string

getPhoneExtension() public méthode

Get the billing phone number extension.
public getPhoneExtension ( ) : string
Résultat string

getPostcode() public méthode

Get the billing postcode.
public getPostcode ( ) : string
Résultat string

getShippingAddress1() public méthode

Get the shipping address, line 1.
public getShippingAddress1 ( ) : string
Résultat string

getShippingAddress2() public méthode

Get the shipping address, line 2.
public getShippingAddress2 ( ) : string
Résultat string

getShippingCity() public méthode

Get the shipping city.
public getShippingCity ( ) : string
Résultat string

getShippingCompany() public méthode

Get the shipping company name.
public getShippingCompany ( ) : string
Résultat string

getShippingCountry() public méthode

Get the shipping country.
public getShippingCountry ( ) : string
Résultat string

getShippingFax() public méthode

Get the shipping fax number.
public getShippingFax ( ) : string
Résultat string

getShippingFirstName() public méthode

Get the first part of the card shipping name.
public getShippingFirstName ( ) : string
Résultat string

getShippingLastName() public méthode

Get the last part of the card shipping name.
public getShippingLastName ( ) : string
Résultat string

getShippingName() public méthode

Get the card shipping name.
public getShippingName ( ) : string
Résultat string

getShippingPhone() public méthode

Get the shipping phone number.
public getShippingPhone ( ) : string
Résultat string

getShippingPhoneExtension() public méthode

Get the shipping phone number extension.
public getShippingPhoneExtension ( ) : string
Résultat string

getShippingPostcode() public méthode

Get the shipping postcode.
public getShippingPostcode ( ) : string
Résultat string

getShippingState() public méthode

Get the shipping state.
public getShippingState ( ) : string
Résultat string

getShippingTitle() public méthode

Get the title of the card shipping name.
public getShippingTitle ( ) : string
Résultat string

getStartDate() public méthode

Get the card start date, using the specified date format string
public getStartDate ( string $format ) : string
$format string
Résultat string

getStartMonth() public méthode

Get the card start month.
public getStartMonth ( ) : string
Résultat string

getStartYear() public méthode

Get the card start year.
public getStartYear ( ) : integer
Résultat integer

getState() public méthode

Get the billing state.
public getState ( ) : string
Résultat string

getSupportedBrands() public méthode

Note: The fact that this class knows about a particular card brand does not imply that your gateway supports it.
See also: self::$supported_cards
public getSupportedBrands ( ) : array
Résultat array

getTitle() public méthode

Get Card Title.
public getTitle ( ) : string
Résultat string

getTrack1() public méthode

Get raw data for track 1 on the credit card magnetic strip.
public getTrack1 ( ) : string
Résultat string

getTrack2() public méthode

Get raw data for track 2 on the credit card magnetic strip.
public getTrack2 ( ) : string
Résultat string

getTracks() public méthode

Get raw data for all tracks on the credit card magnetic strip.
public getTracks ( ) : string
Résultat string

initialize() public méthode

If any unknown parameters passed, they will be ignored.
public initialize ( array $parameters = null ) : CreditCard
$parameters array An associative array of parameters
Résultat CreditCard provides a fluent interface.

setAddress1() public méthode

Sets the billing and shipping address, line 1.
public setAddress1 ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setAddress2() public méthode

Sets the billing and shipping address, line 2.
public setAddress2 ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setBillingAddress1() public méthode

Sets the billing address, line 1.
public setBillingAddress1 ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setBillingAddress2() public méthode

Sets the billing address, line 2.
public setBillingAddress2 ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setBillingCity() public méthode

Sets billing city.
public setBillingCity ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setBillingCompany() public méthode

Sets the billing company name.
public setBillingCompany ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setBillingCountry() public méthode

Sets the billing country name.
public setBillingCountry ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setBillingFax() public méthode

Sets the billing fax number.
public setBillingFax ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setBillingFirstName() public méthode

Sets the first part of the card billing name.
public setBillingFirstName ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setBillingLastName() public méthode

Sets the last part of the card billing name.
public setBillingLastName ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setBillingName() public méthode

Sets the card billing name.
public setBillingName ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setBillingPhone() public méthode

Sets the billing phone number.
public setBillingPhone ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setBillingPhoneExtension() public méthode

Sets the billing phone number extension.
public setBillingPhoneExtension ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setBillingPostcode() public méthode

Sets the billing postcode.
public setBillingPostcode ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setBillingState() public méthode

Sets the billing state.
public setBillingState ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setBillingTitle() public méthode

Sets the card billing title.
public setBillingTitle ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setBirthday() public méthode

Sets the cardholder's birthday.
public setBirthday ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setCity() public méthode

Sets the billing and shipping city.
public setCity ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setCompany() public méthode

Sets the billing and shipping company name.
public setCompany ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setCountry() public méthode

Sets the billing and shipping country.
public setCountry ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setCvv() public méthode

Sets the card CVV.
public setCvv ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setEmail() public méthode

Sets the cardholder's email address.
public setEmail ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setExpiryMonth() public méthode

Sets the card expiry month.
public setExpiryMonth ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setExpiryYear() public méthode

Sets the card expiry year.
public setExpiryYear ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setFax() public méthode

Sets the billing and shipping fax number.
public setFax ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setFirstName() public méthode

Set Card First Name (Billing and Shipping).
public setFirstName ( string $value ) : CreditCard
$value string Parameter value
Résultat CreditCard provides a fluent interface.

setGender() public méthode

Sets the cardholder's gender.
public setGender ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setIssueNumber() public méthode

Sets the card issue number.
public setIssueNumber ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setLastName() public méthode

Set Card Last Name (Billing and Shipping).
public setLastName ( string $value ) : CreditCard
$value string Parameter value
Résultat CreditCard provides a fluent interface.

setName() public méthode

Set Card Name (Billing and Shipping).
public setName ( string $value ) : CreditCard
$value string Parameter value
Résultat CreditCard provides a fluent interface.

setNumber() public méthode

Non-numeric characters are stripped out of the card number, so it's safe to pass in strings such as "4444-3333 2222 1111" etc.
public setNumber ( string $value ) : CreditCard
$value string Parameter value
Résultat CreditCard provides a fluent interface.

setParameter() protected méthode

Set one parameter.
protected setParameter ( string $key, mixed $value ) : CreditCard
$key string Parameter key
$value mixed Parameter value
Résultat CreditCard provides a fluent interface.

setPhone() public méthode

Sets the billing and shipping phone number.
public setPhone ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setPhoneExtension() public méthode

Sets the billing and shipping phone number extension.
public setPhoneExtension ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setPostcode() public méthode

Sets the billing and shipping postcode.
public setPostcode ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setShippingAddress1() public méthode

Sets the shipping address, line 1.
public setShippingAddress1 ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setShippingAddress2() public méthode

Sets the shipping address, line 2.
public setShippingAddress2 ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setShippingCity() public méthode

Sets the shipping city.
public setShippingCity ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setShippingCompany() public méthode

Sets the shipping company name.
public setShippingCompany ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setShippingCountry() public méthode

Sets the shipping country.
public setShippingCountry ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setShippingFax() public méthode

Sets the shipping fax number.
public setShippingFax ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setShippingFirstName() public méthode

Sets the first part of the card shipping name.
public setShippingFirstName ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setShippingLastName() public méthode

Sets the last part of the card shipping name.
public setShippingLastName ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setShippingName() public méthode

Sets the card shipping name.
public setShippingName ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setShippingPhone() public méthode

Sets the shipping phone number.
public setShippingPhone ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setShippingPhoneExtension() public méthode

Sets the shipping phone number extension.
public setShippingPhoneExtension ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setShippingPostcode() public méthode

Sets the shipping postcode.
public setShippingPostcode ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setShippingState() public méthode

Sets the shipping state.
public setShippingState ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setShippingTitle() public méthode

Sets the title of the card shipping name.
public setShippingTitle ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setStartMonth() public méthode

Sets the card start month.
public setStartMonth ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setStartYear() public méthode

Sets the card start year.
public setStartYear ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setState() public méthode

Sets the billing and shipping state.
public setState ( string $value ) : CreditCard
$value string
Résultat CreditCard provides a fluent interface.

setTitle() public méthode

Set Card Title.
public setTitle ( string $value ) : CreditCard
$value string Parameter value
Résultat CreditCard provides a fluent interface.

setTracks() public méthode

Sets raw data from all tracks on the credit card magnetic strip. Used by gateways that support card-present transactions.
public setTracks ( $value ) : CreditCard
$value
Résultat CreditCard

setYearParameter() protected méthode

The input value is normalised to a 4 digit number.
protected setYearParameter ( string $key, mixed $value ) : CreditCard
$key string Parameter key, e.g. 'expiryYear'
$value mixed Parameter value
Résultat CreditCard provides a fluent interface.

validate() public méthode

This method is called internally by gateways to avoid wasting time with an API call when the credit card is clearly invalid. Generally if you want to validate the credit card yourself with custom error messages, you should use your framework's validation library, not this method.
public validate ( ) : void
Résultat void

Property Details

$parameters protected_oe property

Internal storage of all of the card parameters.
protected ParameterBag,Symfony\Component\HttpFoundation $parameters
Résultat Symfony\Component\HttpFoundation\ParameterBag

$supported_cards protected_oe property

protected $supported_cards