API Documentation

Validate/CreditCard.php

Includes Classes 
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Validate
version
$Id: CreditCard.php 22697 2010-07-26 21:14:47Z alexander $
Classes
Zend_Validate_CreditCard

Description

Zend Framework

LICENSE

This source file is subject to the new BSD license that is bundled with this package in the file LICENSE.txt. It is also available through the world-wide-web at this URL: http://framework.zend.com/license/new-bsd If you did not receive a copy of the license and are unable to obtain it through the world-wide-web, please send an email to license@zend.com so we can send you a copy immediately.

Zend_Validate_CreditCard

Extends from
Zend_Validate_Abstract
category
Zend
copyright
Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
license
http://framework.zend.com/license/new-bsd New BSD License
package
Zend_Validate
Constants
ALL
AMERICAN_EXPRESS
UNIONPAY
DINERS_CLUB
DINERS_CLUB_US
DISCOVER
JCB
LASER
MAESTRO
MASTERCARD
SOLO
VISA
CHECKSUM
CONTENT
INVALID
LENGTH
PREFIX
SERVICE
SERVICEFAILURE
Properties
$_messageTemplates
$_cardLength
$_cardType
$_type
$_service
Methods
__construct
getType
setType
addType
getService
setService
isValid

Description

Constants

ALL

string ALL = 'All'

Detected CCI list

Details

value
All
ALL
string

AMERICAN_EXPRESS

 AMERICAN_EXPRESS = 'American_Express'

Details

value
American_Express

UNIONPAY

 UNIONPAY = 'Unionpay'

Details

value
Unionpay

DINERS_CLUB

 DINERS_CLUB = 'Diners_Club'

Details

value
Diners_Club

DINERS_CLUB_US

 DINERS_CLUB_US = 'Diners_Club_US'

Details

value
Diners_Club_US

DISCOVER

 DISCOVER = 'Discover'

Details

value
Discover

JCB

 JCB = 'JCB'

Details

value
JCB

LASER

 LASER = 'Laser'

Details

value
Laser

MAESTRO

 MAESTRO = 'Maestro'

Details

value
Maestro

MASTERCARD

 MASTERCARD = 'Mastercard'

Details

value
Mastercard

SOLO

 SOLO = 'Solo'

Details

value
Solo

VISA

 VISA = 'Visa'

Details

value
Visa

CHECKSUM

 CHECKSUM = 'creditcardChecksum'

Details

value
creditcardChecksum

CONTENT

 CONTENT = 'creditcardContent'

Details

value
creditcardContent

INVALID

 INVALID = 'creditcardInvalid'

Details

value
creditcardInvalid

LENGTH

 LENGTH = 'creditcardLength'

Details

value
creditcardLength

PREFIX

 PREFIX = 'creditcardPrefix'

Details

value
creditcardPrefix

SERVICE

 SERVICE = 'creditcardService'

Details

value
creditcardService

SERVICEFAILURE

 SERVICEFAILURE = 'creditcardServiceFailure'

Details

value
creditcardServiceFailure

Properties

$_cardLength

array $_cardLength = 'array'

List of allowed CCV lengths

Details

$_cardLength
array
visibility
protected
default
array
final
false
static
false

$_cardType

array $_cardType = 'array'

List of accepted CCV provider tags

Details

$_cardType
array
visibility
protected
default
array
final
false
static
false

$_messageTemplates

array $_messageTemplates = 'array'

Validation failure message template definitions

Details

$_messageTemplates
array
visibility
protected
default
array
final
false
static
false

$_service

callback $_service = ''

Service callback for additional validation

Details

$_service
callback
visibility
protected
default
final
false
static
false

$_type

array $_type = 'array'

CCIs which are accepted by validation

Details

$_type
array
visibility
protected
default
array
final
false
static
false

Methods

__construct

__construct(  $options = array ) :

Constructor

Arguments
$options
Details
visibility
public
final
false
static
false

addType

addType( string|array $type ) : Zend_Validate_CreditCard

Adds a CCI to be accepted by validation

Arguments
$type
stringarray
Type to allow for validation
Output
Zend_Validate_CreditCard
Provides a fluid interface
Details
visibility
public
final
false
static
false

getService

getService( ) : callback

Returns the actual set service

Output
callback
Details
visibility
public
final
false
static
false

getType

getType( ) : array

Returns a list of accepted CCIs

Output
array
Details
visibility
public
final
false
static
false

isValid

isValid( string $value ) : boolean

Defined by Zend_Validate_Interface

Returns true if and only if $value follows the Luhn algorithm (mod-10 checksum)

Arguments
$value
string
Output
boolean
Details
visibility
public
final
false
static
false

setService

setService( unknown_type $service ) :

Sets a new callback for service validation

Arguments
$service
unknown_type
Details
visibility
public
final
false
static
false

setType

setType( string|array $type ) : Zend_Validate_CreditCard

Sets CCIs which are accepted by validation

Arguments
$type
stringarray
Type to allow for validation
Output
Zend_Validate_CreditCard
Provides a fluid interface
Details
visibility
public
final
false
static
false
Documentation was generated by DocBlox.