Payment.php
7.2 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
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
<?php
namespace Faker\Provider\ms_MY;
class Payment extends \Faker\Provider\Payment
{
protected static $bankFormats = [
'{{localBank}}',
'{{foreignBank}}',
'{{governmentBank}}',
];
/**
* @see http://www.muamalat.com.my/consumer-banking/internet-banking/popup-ibg.html
*/
protected static $bankAccountNumberFormats = [
'##########',
'###########',
'############',
'#############',
'##############',
'###############',
'################',
];
/**
* @see https://en.wikipedia.org/wiki/List_of_banks_in_Malaysia
*/
protected static $localBanks = [
'Affin Bank',
'Alliance Bank',
'AmBank',
'CIMB Bank',
'Hong Leong Bank ',
'Maybank',
'Public Bank',
'RHB Bank',
];
/**
* @see https://en.wikipedia.org/wiki/List_of_banks_in_Malaysia#List_of_foreign_banks_(commercial)
*/
protected static $foreignBanks = [
'Bangkok Bank Berhad',
'Bank of America Malaysia Berhad',
'Bank of China (Malaysia) Berhad',
'Bank of Tokyo-Mitsubishi UFJ (Malaysia) Berhad',
'BNP Paribas Malaysia Berhad',
'China Construction Bank',
'Citibank Berhad',
'Deutsche Bank (Malaysia) Berhad',
'HSBC Bank Malaysia Berhad',
'India International Bank (Malaysia) Berhad',
'Industrial and Commercial Bank of China (Malaysia) Berhad',
'J.P. Morgan Chase Bank Berhad',
'Mizuho Bank (Malaysia) Berhad',
'National Bank of Abu Dhabi Malaysia Berhad',
'OCBC Bank (Malaysia) Berhad',
'Standard Chartered Bank Malaysia Berhad',
'Sumitomo Mitsui Banking Corporation Malaysia Berhad',
'The Bank of Nova Scotia Berhad',
'United Overseas Bank (Malaysia) Bhd.',
];
/**
* @see https://en.wikipedia.org/wiki/List_of_banks_in_Malaysia#Development_Financial_Institutions_(Government-owned_banks)_(full_list)
*/
protected static $governmentBanks = [
'Agro Bank Malaysia',
'Bank Pembangunan Malaysia Berhad (BPMB) (The development bank of Malaysia)',
'Bank Rakyat',
'Bank Simpanan Nasional',
'Credit Guarantee Corporation Malaysia Berhad (CGC)',
'Export-Import Bank of Malaysia Berhad (Exim Bank)',
'Malaysia Debt Ventures Berhad',
'Malaysian Industrial Development Finance Berhad (MIDF)',
'SME Bank Berhad',
'Sabah Development Bank Berhad (SDB)',
'Sabah Credit Corporation (SCC)',
'Tabung Haji',
];
/**
* @see https://en.wikipedia.org/wiki/List_of_banks_in_Malaysia#Investment-Link_Funds_(Insurance_Companies_-_Takaful_included)
*/
protected static $insuranceCompanies = [
'AIA Malaysia',
'AIG Malaysia',
'Allianz Malaysia',
'AXA AFFIN Life Insurance',
'Berjaya General Insurance',
'Etiqa Insurance',
'Great Eastern Insurance',
'Hong Leong Assurance',
'Kurnia Insurans Malaysia',
'Manulife Malaysia Insurance',
'MSIG Malaysia',
'Prudential Malaysia',
'Tokio Marine Life Malaysia Insurance',
'UNI.ASIA General Insurance',
'Zurich Insurance Malaysia',
];
/**
* @see http://www.bankswiftcode.org/malaysia/
*/
protected static $swiftCodes = [
'ABNAMY2AXXX', 'ABNAMYKLPNG', 'ABNAMYKLXXX', 'AFBQMYKLXXX', 'AIBBMYKLXXX',
'AISLMYKLXXX', 'AMMBMYKLX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XXX',
'NOSCMY2LXXX', 'NOSCMYKLXXX',
'OABBMYKLXXX', 'OCBCMYKLXXX', 'OSKIMYKLXXX',
'PBBEMYKLXXX', 'PBLLMYKAXXX', 'PCGLMYKLXXX', 'PERMMYKLXXX', 'PHBMMYKLXXX',
'PTRDMYKLXXX', 'PTROMYKLFSD', 'PTROMYKLXXX',
'RHBAMYKLXXX', 'RHBBMYKAXXX', 'RHBBMYKLXXX', 'RJHIMYKLXXX',
'SCBLMYKXLAB', 'SCBLMYKXXXX', 'SMBCMYKAXXX',
'UIIBMYKLXXX', 'UOVBMYKLCND', 'UOVBMYKLXXX',
];
/**
* @see https://en.wikipedia.org/wiki/Malaysian_ringgit
*/
protected static $currencySymbol = [
'RM',
];
/**
* Return a Malaysian Bank
*
* @example 'Maybank'
*
* @return string
*/
public function bank()
{
$formats = static::randomElement(static::$bankFormats);
return $this->generator->parse($formats);
}
/**
* Return a Malaysian Bank account number
*
* @example '1234567890123456'
*
* @return string
*/
public function bankAccountNumber()
{
$formats = static::randomElement(static::$bankAccountNumberFormats);
return static::numerify($formats);
}
/**
* Return a Malaysian Local Bank
*
* @example 'Public Bank'
*
* @return string
*/
public static function localBank()
{
return static::randomElement(static::$localBanks);
}
/**
* Return a Malaysian Foreign Bank
*
* @example 'Citibank Berhad'
*
* @return string
*/
public static function foreignBank()
{
return static::randomElement(static::$foreignBanks);
}
/**
* Return a Malaysian Government Bank
*
* @example 'Bank Simpanan Nasional'
*
* @return string
*/
public static function governmentBank()
{
return static::randomElement(static::$governmentBanks);
}
/**
* Return a Malaysian insurance company
*
* @example 'AIA Malaysia'
*
* @return string
*/
public static function insurance()
{
return static::randomElement(static::$insuranceCompanies);
}
/**
* Return a Malaysian Bank SWIFT Code
*
* @example 'MBBEMYKLXXX'
*
* @return string
*/
public static function swiftCode()
{
return static::toUpper(static::lexify(static::randomElement(static::$swiftCodes)));
}
/**
* Return the Malaysian currency symbol
*
* @example 'RM'
*
* @return string
*/
public static function currencySymbol()
{
return static::randomElement(static::$currencySymbol);
}
}