@@ 28-45 (lines=18) @@ | ||
25 | * |
|
26 | * {@inheritdoc} |
|
27 | */ |
|
28 | protected function parseTransactionAccount() |
|
29 | { |
|
30 | $results = []; |
|
31 | // SEPA MT940 Structured |
|
32 | if (preg_match('/^:61:.*\n(.*?)(\n|\:8)/im', $this->getCurrentTransactionData(), $results) |
|
33 | && !empty($results[1]) |
|
34 | ) { |
|
35 | return $this->sanitizeAccount($results[1]); |
|
36 | } |
|
37 | ||
38 | if (preg_match('/^:61:.{26}(.{16})/im', $this->getCurrentTransactionData(), $results) |
|
39 | && !empty($results[1]) |
|
40 | ) { |
|
41 | return $this->sanitizeAccount($results[1]); |
|
42 | } |
|
43 | ||
44 | return ''; |
|
45 | } |
|
46 | ||
47 | /** |
|
48 | * Overloaded: Rabo has different way of storing account name. |
@@ 240-257 (lines=18) @@ | ||
237 | * |
|
238 | * @return string accountnumber |
|
239 | */ |
|
240 | protected function parseStatementAccount() |
|
241 | { |
|
242 | $results = []; |
|
243 | if (preg_match('/:25:([\d\.]+)*/', $this->getCurrentStatementData(), $results) |
|
244 | && !empty($results[1]) |
|
245 | ) { |
|
246 | return $this->sanitizeAccount($results[1]); |
|
247 | } |
|
248 | ||
249 | // SEPA / IBAN |
|
250 | if (preg_match('/:25:([A-Z0-9]{8}[\d\.]+)*/', $this->getCurrentStatementData(), $results) |
|
251 | && !empty($results[1]) |
|
252 | ) { |
|
253 | return $this->sanitizeAccount($results[1]); |
|
254 | } |
|
255 | ||
256 | return ''; |
|
257 | } |
|
258 | ||
259 | /** |
|
260 | * uses field 60F to gather starting amount. |