Overview

Namespaces

  • Guzzle
    • Batch
      • Exception
    • Cache
    • Common
      • Exception
    • Http
      • Curl
      • Exception
      • Message
        • Header
      • QueryAggregator
    • Inflection
    • Iterator
    • Log
    • Parser
      • Cookie
      • Message
      • UriTemplate
      • Url
    • Plugin
      • Async
      • Backoff
      • Cache
      • Cookie
        • CookieJar
        • Exception
      • CurlAuth
      • ErrorResponse
        • Exception
      • History
      • Log
      • Md5
      • Mock
      • Oauth
    • Service
      • Builder
      • Command
        • Factory
        • LocationVisitor
          • Request
          • Response
      • Description
      • Exception
      • Resource
    • Stream
    • Tests
      • Batch
      • Cache
      • Common
        • Cache
        • Exception
      • Http
        • Curl
        • Exception
        • Message
          • Header
      • Inflection
      • Iterator
      • Log
      • Message
      • Mock
      • Parser
        • Cookie
        • Message
      • Parsers
        • UriTemplate
      • Plugin
        • Async
        • Backoff
        • Cache
        • Cookie
          • CookieJar
        • CurlAuth
        • ErrorResponse
        • History
        • Log
        • Md5
        • Mock
        • Oauth
        • Redirect
      • Service
        • Builder
        • Command
          • LocationVisitor
            • Request
            • Response
        • Description
        • Exception
        • Mock
          • Command
            • Sub
          • Model
        • Resource
      • Stream
  • None
  • Omnipay
    • Common
      • Exception
      • Message
    • Dummy
      • Message
    • VivaPayments
      • Message
  • PHP

Classes

  • AbstractGateway
  • CreditCard
  • Currency
  • GatewayFactory
  • Helper
  • Issuer
  • Item
  • ItemBag
  • PaymentMethod

Interfaces

  • GatewayInterface
  • ItemInterface
  • Overview
  • Namespace
  • Class
  • Tree

Class CreditCard

Credit Card class

This class defines and abstracts all of the credit card types used throughout the Omnipay system.

Example:

// Define credit card parameters, which should look like this
  $parameters = [
      'firstName' => 'Bobby',
      'lastName' => 'Tables',
      'number' => '4444333322221111',
      'cvv' => '123',
      'expiryMonth' => '12',
      'expiryYear' => '2017',
      'email' => 'testcard@gmail.com',
  ];

  // Create a credit card object
  $card = new CreditCard($parameters);

The full list of card attributes that may be set via the parameter to new is as follows:

  • title
  • firstName
  • lastName
  • name
  • company
  • address1
  • address2
  • city
  • postcode
  • state
  • country
  • phone
  • phoneExtension
  • fax
  • number
  • expiryMonth
  • expiryYear
  • startMonth
  • startYear
  • cvv
  • tracks
  • issueNumber
  • billingTitle
  • billingName
  • billingFirstName
  • billingLastName
  • billingCompany
  • billingAddress1
  • billingAddress2
  • billingCity
  • billingPostcode
  • billingState
  • billingCountry
  • billingPhone
  • billingFax
  • shippingTitle
  • shippingName
  • shippingFirstName
  • shippingLastName
  • shippingCompany
  • shippingAddress1
  • shippingAddress2
  • shippingCity
  • shippingPostcode
  • shippingState
  • shippingCountry
  • shippingPhone
  • shippingFax
  • email
  • birthday
  • gender

If any unknown parameters are passed in, they will be ignored. No error is thrown.

Namespace: Omnipay\Common
Located at Common/CreditCard.php
Methods summary
public
# __construct( array $parameters = null )

Create a new CreditCard object using the specified parameters

Create a new CreditCard object using the specified parameters

Parameters

$parameters
An array of parameters to set on the new object
public array
# getSupportedBrands( )

All known/supported card brands, and a regular expression to match them.

All known/supported card brands, and a regular expression to match them.

Note: The fact that this class knows about a particular card brand does not imply that your gateway supports it.

Returns

array

See

self::$supported_cards
public boolean
# addSupportedBrand( string $name, string $expression )

Set a custom supported card brand with a regular expression to match it.

Set a custom supported card brand with a regular expression to match it.

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

Parameters

$name
The name of the new supported brand.
$expression
The regular expression to check if a card is supported.

Returns

boolean
success
public Omnipay\Common\CreditCard
# initialize( array $parameters = null )

Initialize the object with parameters.

Initialize the object with parameters.

If any unknown parameters passed, they will be ignored.

Parameters

$parameters
An associative array of parameters

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public array
# getParameters( )

Get all parameters.

Get all parameters.

Returns

array
An associative array of parameters.
protected mixed
# getParameter( $key )

Get one parameter.

Get one parameter.

Returns

mixed
A single parameter value.
protected Omnipay\Common\CreditCard
# setParameter( string $key, mixed $value )

Set one parameter.

Set one parameter.

Parameters

$key
Parameter key
$value
Parameter value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
protected Omnipay\Common\CreditCard
# setYearParameter( string $key, mixed $value )

Set the credit card year.

Set the credit card year.

The input value is normalised to a 4 digit number.

Parameters

$key
Parameter key, e.g. 'expiryYear'
$value
Parameter value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public
# validate( )

Validate this credit card. If the card is invalid, InvalidCreditCardException is thrown.

Validate this credit card. If the card is invalid, InvalidCreditCardException is thrown.

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.

Throws

Omnipay\Common\Exception\InvalidCreditCardException
public string
# getTitle( )

Get Card Title.

Get Card Title.

Returns

string
public Omnipay\Common\CreditCard
# setTitle( string $value )

Set Card Title.

Set Card Title.

Parameters

$value
Parameter value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getFirstName( )

Get Card First Name.

Get Card First Name.

Returns

string
public Omnipay\Common\CreditCard
# setFirstName( string $value )

Set Card First Name (Billing and Shipping).

Set Card First Name (Billing and Shipping).

Parameters

$value
Parameter value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getLastName( )

Get Card Last Name.

Get Card Last Name.

Returns

string
public Omnipay\Common\CreditCard
# setLastName( string $value )

Set Card Last Name (Billing and Shipping).

Set Card Last Name (Billing and Shipping).

Parameters

$value
Parameter value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getName( )

Get Card Name.

Get Card Name.

Returns

string
public Omnipay\Common\CreditCard
# setName( string $value )

Set Card Name (Billing and Shipping).

Set Card Name (Billing and Shipping).

Parameters

$value
Parameter value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getNumber( )

Get Card Number.

Get Card Number.

Returns

string
public Omnipay\Common\CreditCard
# setNumber( string $value )

Set Card Number

Set Card Number

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.

Parameters

$value
Parameter value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getNumberLastFour( )

Get the last 4 digits of the card number.

Get the last 4 digits of the card number.

Returns

string
public string
# getNumberMasked( string $mask = 'X' )

Returns a masked credit card number with only the last 4 chars visible

Returns a masked credit card number with only the last 4 chars visible

Parameters

$mask
Character to use in place of numbers

Returns

string
public string
# getBrand( )

Credit Card Brand

Credit Card Brand

Iterates through known/supported card brands to determine the brand of this card

Returns

string
public integer
# getExpiryMonth( )

Get the card expiry month.

Get the card expiry month.

Returns

integer
public Omnipay\Common\CreditCard
# setExpiryMonth( string $value )

Sets the card expiry month.

Sets the card expiry month.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public integer
# getExpiryYear( )

Get the card expiry year.

Get the card expiry year.

Returns

integer
public Omnipay\Common\CreditCard
# setExpiryYear( string $value )

Sets the card expiry year.

Sets the card expiry year.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getExpiryDate( string $format )

Get the card expiry date, using the specified date format string.

Get the card expiry date, using the specified date format string.

Parameters

$format

Returns

string
public string
# getStartMonth( )

Get the card start month.

Get the card start month.

Returns

string
public Omnipay\Common\CreditCard
# setStartMonth( string $value )

Sets the card start month.

Sets the card start month.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public integer
# getStartYear( )

Get the card start year.

Get the card start year.

Returns

integer
public Omnipay\Common\CreditCard
# setStartYear( string $value )

Sets the card start year.

Sets the card start year.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getStartDate( string $format )

Get the card start date, using the specified date format string

Get the card start date, using the specified date format string

Parameters

$format

Returns

string
public string
# getCvv( )

Get the card CVV.

Get the card CVV.

Returns

string
public Omnipay\Common\CreditCard
# setCvv( string $value )

Sets the card CVV.

Sets the card CVV.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getTracks( )

Get raw data for all tracks on the credit card magnetic strip.

Get raw data for all tracks on the credit card magnetic strip.

Returns

string
public string
# getTrack1( )

Get raw data for track 1 on the credit card magnetic strip.

Get raw data for track 1 on the credit card magnetic strip.

Returns

string
public string
# getTrack2( )

Get raw data for track 2 on the credit card magnetic strip.

Get raw data for track 2 on the credit card magnetic strip.

Returns

string
public Omnipay\Common\CreditCard
# setTracks( $value )

Sets raw data from all tracks on the credit card magnetic strip. Used by gateways that support card-present transactions.

Sets raw data from all tracks on the credit card magnetic strip. Used by gateways that support card-present transactions.

Parameters

$value

Returns

Omnipay\Common\CreditCard
public string
# getIssueNumber( )

Get the card issue number.

Get the card issue number.

Returns

string
public Omnipay\Common\CreditCard
# setIssueNumber( string $value )

Sets the card issue number.

Sets the card issue number.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getBillingTitle( )

Get the card billing title.

Get the card billing title.

Returns

string
public Omnipay\Common\CreditCard
# setBillingTitle( string $value )

Sets the card billing title.

Sets the card billing title.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getBillingName( )

Get the card billing name.

Get the card billing name.

Returns

string
public Omnipay\Common\CreditCard
# setBillingName( string $value )

Sets the card billing name.

Sets the card billing name.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getBillingFirstName( )

Get the first part of the card billing name.

Get the first part of the card billing name.

Returns

string
public Omnipay\Common\CreditCard
# setBillingFirstName( string $value )

Sets the first part of the card billing name.

Sets the first part of the card billing name.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getBillingLastName( )

Get the last part of the card billing name.

Get the last part of the card billing name.

Returns

string
public Omnipay\Common\CreditCard
# setBillingLastName( string $value )

Sets the last part of the card billing name.

Sets the last part of the card billing name.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getBillingCompany( )

Get the billing company name.

Get the billing company name.

Returns

string
public Omnipay\Common\CreditCard
# setBillingCompany( string $value )

Sets the billing company name.

Sets the billing company name.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getBillingAddress1( )

Get the billing address, line 1.

Get the billing address, line 1.

Returns

string
public Omnipay\Common\CreditCard
# setBillingAddress1( string $value )

Sets the billing address, line 1.

Sets the billing address, line 1.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getBillingAddress2( )

Get the billing address, line 2.

Get the billing address, line 2.

Returns

string
public Omnipay\Common\CreditCard
# setBillingAddress2( string $value )

Sets the billing address, line 2.

Sets the billing address, line 2.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getBillingCity( )

Get the billing city.

Get the billing city.

Returns

string
public Omnipay\Common\CreditCard
# setBillingCity( string $value )

Sets billing city.

Sets billing city.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getBillingPostcode( )

Get the billing postcode.

Get the billing postcode.

Returns

string
public Omnipay\Common\CreditCard
# setBillingPostcode( string $value )

Sets the billing postcode.

Sets the billing postcode.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getBillingState( )

Get the billing state.

Get the billing state.

Returns

string
public Omnipay\Common\CreditCard
# setBillingState( string $value )

Sets the billing state.

Sets the billing state.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getBillingCountry( )

Get the billing country name.

Get the billing country name.

Returns

string
public Omnipay\Common\CreditCard
# setBillingCountry( string $value )

Sets the billing country name.

Sets the billing country name.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getBillingPhone( )

Get the billing phone number.

Get the billing phone number.

Returns

string
public Omnipay\Common\CreditCard
# setBillingPhone( string $value )

Sets the billing phone number.

Sets the billing phone number.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getBillingPhoneExtension( )

Get the billing phone number extension.

Get the billing phone number extension.

Returns

string
public Omnipay\Common\CreditCard
# setBillingPhoneExtension( string $value )

Sets the billing phone number extension.

Sets the billing phone number extension.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getBillingFax( )

Get the billing fax number.

Get the billing fax number.

Returns

string
public Omnipay\Common\CreditCard
# setBillingFax( string $value )

Sets the billing fax number.

Sets the billing fax number.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getShippingTitle( )

Get the title of the card shipping name.

Get the title of the card shipping name.

Returns

string
public Omnipay\Common\CreditCard
# setShippingTitle( string $value )

Sets the title of the card shipping name.

Sets the title of the card shipping name.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getShippingName( )

Get the card shipping name.

Get the card shipping name.

Returns

string
public Omnipay\Common\CreditCard
# setShippingName( string $value )

Sets the card shipping name.

Sets the card shipping name.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getShippingFirstName( )

Get the first part of the card shipping name.

Get the first part of the card shipping name.

Returns

string
public Omnipay\Common\CreditCard
# setShippingFirstName( string $value )

Sets the first part of the card shipping name.

Sets the first part of the card shipping name.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getShippingLastName( )

Get the last part of the card shipping name.

Get the last part of the card shipping name.

Returns

string
public Omnipay\Common\CreditCard
# setShippingLastName( string $value )

Sets the last part of the card shipping name.

Sets the last part of the card shipping name.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getShippingCompany( )

Get the shipping company name.

Get the shipping company name.

Returns

string
public Omnipay\Common\CreditCard
# setShippingCompany( string $value )

Sets the shipping company name.

Sets the shipping company name.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getShippingAddress1( )

Get the shipping address, line 1.

Get the shipping address, line 1.

Returns

string
public Omnipay\Common\CreditCard
# setShippingAddress1( string $value )

Sets the shipping address, line 1.

Sets the shipping address, line 1.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getShippingAddress2( )

Get the shipping address, line 2.

Get the shipping address, line 2.

Returns

string
public Omnipay\Common\CreditCard
# setShippingAddress2( string $value )

Sets the shipping address, line 2.

Sets the shipping address, line 2.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getShippingCity( )

Get the shipping city.

Get the shipping city.

Returns

string
public Omnipay\Common\CreditCard
# setShippingCity( string $value )

Sets the shipping city.

Sets the shipping city.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getShippingPostcode( )

Get the shipping postcode.

Get the shipping postcode.

Returns

string
public Omnipay\Common\CreditCard
# setShippingPostcode( string $value )

Sets the shipping postcode.

Sets the shipping postcode.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getShippingState( )

Get the shipping state.

Get the shipping state.

Returns

string
public Omnipay\Common\CreditCard
# setShippingState( string $value )

Sets the shipping state.

Sets the shipping state.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getShippingCountry( )

Get the shipping country.

Get the shipping country.

Returns

string
public Omnipay\Common\CreditCard
# setShippingCountry( string $value )

Sets the shipping country.

Sets the shipping country.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getShippingPhone( )

Get the shipping phone number.

Get the shipping phone number.

Returns

string
public Omnipay\Common\CreditCard
# setShippingPhone( string $value )

Sets the shipping phone number.

Sets the shipping phone number.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getShippingPhoneExtension( )

Get the shipping phone number extension.

Get the shipping phone number extension.

Returns

string
public Omnipay\Common\CreditCard
# setShippingPhoneExtension( string $value )

Sets the shipping phone number extension.

Sets the shipping phone number extension.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getShippingFax( )

Get the shipping fax number.

Get the shipping fax number.

Returns

string
public Omnipay\Common\CreditCard
# setShippingFax( string $value )

Sets the shipping fax number.

Sets the shipping fax number.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getAddress1( )

Get the billing address, line 1.

Get the billing address, line 1.

Returns

string
public Omnipay\Common\CreditCard
# setAddress1( string $value )

Sets the billing and shipping address, line 1.

Sets the billing and shipping address, line 1.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getAddress2( )

Get the billing address, line 2.

Get the billing address, line 2.

Returns

string
public Omnipay\Common\CreditCard
# setAddress2( string $value )

Sets the billing and shipping address, line 2.

Sets the billing and shipping address, line 2.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getCity( )

Get the billing city.

Get the billing city.

Returns

string
public Omnipay\Common\CreditCard
# setCity( string $value )

Sets the billing and shipping city.

Sets the billing and shipping city.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getPostcode( )

Get the billing postcode.

Get the billing postcode.

Returns

string
public Omnipay\Common\CreditCard
# setPostcode( string $value )

Sets the billing and shipping postcode.

Sets the billing and shipping postcode.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getState( )

Get the billing state.

Get the billing state.

Returns

string
public Omnipay\Common\CreditCard
# setState( string $value )

Sets the billing and shipping state.

Sets the billing and shipping state.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getCountry( )

Get the billing country.

Get the billing country.

Returns

string
public Omnipay\Common\CreditCard
# setCountry( string $value )

Sets the billing and shipping country.

Sets the billing and shipping country.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getPhone( )

Get the billing phone number.

Get the billing phone number.

Returns

string
public Omnipay\Common\CreditCard
# setPhone( string $value )

Sets the billing and shipping phone number.

Sets the billing and shipping phone number.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getPhoneExtension( )

Get the billing phone number extension.

Get the billing phone number extension.

Returns

string
public Omnipay\Common\CreditCard
# setPhoneExtension( string $value )

Sets the billing and shipping phone number extension.

Sets the billing and shipping phone number extension.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getFax( )

Get the billing fax number..

Get the billing fax number..

Returns

string
public Omnipay\Common\CreditCard
# setFax( string $value )

Sets the billing and shipping fax number.

Sets the billing and shipping fax number.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getCompany( )

Get the card billing company name.

Get the card billing company name.

Returns

string
public Omnipay\Common\CreditCard
# setCompany( string $value )

Sets the billing and shipping company name.

Sets the billing and shipping company name.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getEmail( )

Get the cardholder's email address.

Get the cardholder's email address.

Returns

string
public Omnipay\Common\CreditCard
# setEmail( string $value )

Sets the cardholder's email address.

Sets the cardholder's email address.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getBirthday( $format = 'Y-m-d' )

Get the cardholder's birthday.

Get the cardholder's birthday.

Returns

string
public Omnipay\Common\CreditCard
# setBirthday( string $value )

Sets the cardholder's birthday.

Sets the cardholder's birthday.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
public string
# getGender( )

Get the cardholder's gender.

Get the cardholder's gender.

Returns

string
public Omnipay\Common\CreditCard
# setGender( string $value )

Sets the cardholder's gender.

Sets the cardholder's gender.

Parameters

$value

Returns

Omnipay\Common\CreditCard
provides a fluent interface.
Constants summary
string BRAND_VISA
# 'visa'
string BRAND_MASTERCARD
# 'mastercard'
string BRAND_DISCOVER
# 'discover'
string BRAND_AMEX
# 'amex'
string BRAND_DINERS_CLUB
# 'diners_club'
string BRAND_JCB
# 'jcb'
string BRAND_SWITCH
# 'switch'
string BRAND_SOLO
# 'solo'
string BRAND_DANKORT
# 'dankort'
string BRAND_MAESTRO
# 'maestro'
string BRAND_FORBRUGSFORENINGEN
# 'forbrugsforeningen'
string BRAND_LASER
# 'laser'
array REGEX_MASTERCARD

All known/supported card brands, and a regular expression to match them.

All known/supported card brands, and a regular expression to match them.

The order of the card brands is important, as some of the regular expressions overlap.

Note: The fact that a particular card brand has been added to this array does not imply that a selected gateway will support the card.

Link

https://github.com/Shopify/active_merchant/blob/master/lib/active_merchant/billing/credit_card_methods.rb
# '/^(5[1-5]\d{4}|677189)\d{10}$|^2(?:2(?:2[1-9]|[3-9]\d)|[3-6]\d\d|7(?:[01]\d|20))\d{12}$/'
Properties summary
protected array $supported_cards
# array( self::BRAND_VISA => '/^4\d{12}(\d{3})?$/', self::BRAND_MASTERCARD => self::REGEX_MASTERCARD, self::BRAND_DISCOVER => '/^(6011|65\d{2}|64[4-9]\d)\d{12}|(62\d{14})$/', self::BRAND_AMEX => '/^3[47]\d{13}$/', self::BRAND_DINERS_CLUB => '/^3(0[0-5]|[68]\d)\d{11}$/', self::BRAND_JCB => '/^35(28|29|[3-8]\d)\d{12}$/', self::BRAND_SWITCH => '/^6759\d{12}(\d{2,3})?$/', self::BRAND_SOLO => '/^6767\d{12}(\d{2,3})?$/', self::BRAND_DANKORT => '/^5019\d{12}$/', self::BRAND_MAESTRO => '/^(5[06-8]|6\d)\d{10,17}$/', self::BRAND_FORBRUGSFORENINGEN => '/^600722\d{10}$/', self::BRAND_LASER => '/^(6304|6706|6709|6771(?!89))\d{8}(\d{4}|\d{6,7})?$/', )
protected Symfony\Component\HttpFoundation\ParameterBag $parameters

Internal storage of all of the card parameters.

Internal storage of all of the card parameters.

#
Omnipay Viva Payments Gateway Module API Documentation API documentation generated by ApiGen