PHP Класс Faker\Provider\Payment

Наследование: extends Faker\Provider\Base
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
$expirationDateFormat

Защищенные свойства (Protected)

Свойство Тип Описание
$cardParams see http://en.wikipedia.org/wiki/Bank_card_number for a reference of existing prefixes
$cardVendors
$ibanFormats list of IBAN formats, source: @link https://www.swift.com/standards/data-standards/iban

Открытые методы

Метод Описание
creditCardDetails ( boolean $valid = true ) : array
creditCardExpirationDate ( boolean $valid = true ) : Faker\Provider\DateTime
creditCardExpirationDateString ( boolean $valid = true, string $expirationDateFormat = null ) : string
creditCardNumber ( string $type = null, boolean $formatted = false, string $separator = '-' ) : string Returns the String of a credit card number.
creditCardType ( ) : string
iban ( string $countryCode, string $prefix = '', integer $length = null ) : string International Bank Account Number (IBAN)
swiftBicNumber ( ) : string Return the String of a SWIFT/BIC number

Защищенные методы

Метод Описание
addBankCodeChecksum ( string $iban, string $countryCode = '' ) : string Calculates a checksum for the national bank and branch code part in the IBAN.

Описание методов

addBankCodeChecksum() защищенный статический Метод

Calculates a checksum for the national bank and branch code part in the IBAN.
protected static addBankCodeChecksum ( string $iban, string $countryCode = '' ) : string
$iban string randomly generated $iban
$countryCode string ISO 3166-1 alpha-2 country code
Результат string IBAN with one character altered to a proper checksum

creditCardDetails() публичный Метод

public creditCardDetails ( boolean $valid = true ) : array
$valid boolean True (by default) to get a valid expiration date, false to get a maybe valid date
Результат array

creditCardExpirationDate() публичный Метод

public creditCardExpirationDate ( boolean $valid = true ) : Faker\Provider\DateTime
$valid boolean True (by default) to get a valid expiration date, false to get a maybe valid date
Результат Faker\Provider\DateTime

creditCardExpirationDateString() публичный Метод

public creditCardExpirationDateString ( boolean $valid = true, string $expirationDateFormat = null ) : string
$valid boolean True (by default) to get a valid expiration date, false to get a maybe valid date
$expirationDateFormat string
Результат string

creditCardNumber() публичный статический Метод

Returns the String of a credit card number.
public static creditCardNumber ( string $type = null, boolean $formatted = false, string $separator = '-' ) : string
$type string Supporting any of 'Visa', 'MasterCard', 'American Express', and 'Discover'
$formatted boolean Set to true if the output string should contain one separator every 4 digits
$separator string Separator string for formatting card number. Defaults to dash (-).
Результат string

creditCardType() публичный статический Метод

public static creditCardType ( ) : string
Результат string Returns a credit card vendor name

iban() публичный статический Метод

International Bank Account Number (IBAN)
public static iban ( string $countryCode, string $prefix = '', integer $length = null ) : string
$countryCode string ISO 3166-1 alpha-2 country code
$prefix string for generating bank account number of a specific bank
$length integer total length without country code and 2 check digits
Результат string

swiftBicNumber() публичный статический Метод

Return the String of a SWIFT/BIC number
public static swiftBicNumber ( ) : string
Результат string Swift/Bic number

Описание свойств

$cardParams защищенное статическое свойство

see http://en.wikipedia.org/wiki/Bank_card_number for a reference of existing prefixes
protected static $cardParams

$cardVendors защищенное статическое свойство

protected static $cardVendors

$expirationDateFormat публичное статическое свойство

public static $expirationDateFormat

$ibanFormats защищенное статическое свойство

list of IBAN formats, source: @link https://www.swift.com/standards/data-standards/iban
protected static $ibanFormats