Payment.php
4.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
<?php
namespace Faker\Provider\pt_BR;
class Payment extends \Faker\Provider\Payment
{
protected static $cardVendors = [
'Visa', 'Visa', 'Visa', 'Visa', 'Visa',
'MasterCard', 'MasterCard', 'MasterCard', 'MasterCard', 'MasterCard',
'American Express', 'Discover Card', 'Diners', 'Elo', 'Hipercard',
];
// see https://gist.github.com/erikhenrique/5931368 / http://pt.stackoverflow.com/q/3715/26461
protected static $cardParams = [
'Visa' => [
'4##############',
],
'MasterCard' => [
'5##############',
],
'American Express' => [
'34############',
'37############',
],
'Discover Card' => [
'6011###########',
'622############',
'64#############',
'65#############',
],
'Diners' => [
'301############',
'301##########',
'305############',
'305##########',
'36#############',
'36###########',
'38#############',
'38###########',
],
'Elo' => [
'636368#########',
'438935#########',
'504175#########',
'451416#########',
'636297#########',
'5067###########',
'4576###########',
'4011###########',
],
'Hipercard' => [
'38#############',
'60#############',
],
'Aura' => [
'50#############',
],
];
/**
* International Bank Account Number (IBAN)
*
* @see http://en.wikipedia.org/wiki/International_Bank_Account_Number
*
* @param string $prefix for generating bank account number of a specific bank
* @param string $countryCode ISO 3166-1 alpha-2 country code
* @param int $length total length without country code and 2 check digits
*
* @return string
*/
public static function bankAccountNumber($prefix = '', $countryCode = 'BR', $length = null)
{
return static::iban($countryCode, $prefix, $length);
}
/**
* @see list of Brazilians banks (2018-02-15), source: https://pt.wikipedia.org/wiki/Lista_de_bancos_do_Brasil
*/
protected static $banks = [
'BADESUL Desenvolvimento S.A. – Agência de Fomento/RS',
'Banco Central do Brasil',
'Banco da Amazônia',
'Banco de Brasília',
'Banco de Desenvolvimento de Minas Gerais',
'Banco de Desenvolvimento do Espírito Santo',
'Banco de Desenvolvimento do Paraná',
'Banco do Brasil',
'Banco do Estado de Sergipe Banese Estadual',
'Banco do Estado do Espírito Santo Banestes',
'Banco do Estado do Pará',
'Banco do Estado do Rio Grande do Sul',
'Banco do Nordeste do Brasil',
'Banco Nacional de Desenvolvimento Econômico e Social',
'Banco Regional de Desenvolvimento do Extremo Sul',
'Caixa Econômica Federal',
'Banco ABN Amro S.A.',
'Banco Alfa',
'Banco Banif',
'Banco BBM',
'Banco BMG',
'Banco Bonsucesso',
'Banco BTG Pactual',
'Banco Cacique',
'Banco Caixa Geral - Brasil',
'Banco Citibank',
'Banco Credibel',
'Banco Credit Suisse',
'Góis Monteiro & Co',
'Banco Fator',
'Banco Fibra',
'Agibank',
'Banco Guanabara',
'Banco Industrial do Brasil',
'Banco Industrial e Comercial',
'Banco Indusval',
'Banco Inter',
'Banco Itaú BBA',
'Banco ItaúBank',
'Banco Itaucred Financiamentos',
'Banco Mercantil do Brasil',
'Banco Modal Modal',
'Banco Morada',
'Banco Pan',
'Banco Paulista',
'Banco Pine',
'Banco Renner',
'Banco Ribeirão Preto',
'Banco Safra',
'Banco Santander',
'Banco Sofisa',
'Banco Topázio',
'Banco Votorantim',
'Bradesco Bradesco',
'Itaú Unibanco',
'Banco Original',
'Banco Neon',
'Nu Pagamentos S.A',
'XP Investimentos Corretora de Câmbio Títulos e Valores Mobiliários S.A',
];
/**
* @example 'Banco Neon'
*/
public static function bank()
{
return static::randomElement(static::$banks);
}
}