Ejemplo n.º 1
0
 /**
  * Overloaded: ABN Amro shows the GIRO
  * includes fix for 'for GIRO 1234567 TEST 201009063689 CLIEOP 21-9' and translates that into 1234567
  * @inheritdoc
  */
 protected function parseTransactionAccount()
 {
     $results = parent::parseTransactionAccount();
     if (empty($results)) {
         $giroMatch = $ibanMatch = [];
         preg_match('/IBAN:(.*)/m', $this->getCurrentTransactionData(), $ibanMatch);
         //  print_r($ibanMatch);
         if (preg_match('/^:86:GIRO(.{9})/im', $this->getCurrentTransactionData(), $giroMatch) && !empty($giroMatch[1])) {
             $results = $giroMatch[1];
         } else {
             if (preg_match('/IBAN:(.*)/m', $this->getCurrentTransactionData(), $ibanMatch) && !empty($ibanMatch[1])) {
                 // echo $this->getCurrentTransactionData();
                 $results = $ibanMatch[1];
                 //  echo $ibanMatch[1];
             } else {
                 if (preg_match('!^:86:/.*/IBAN/(.*?)/!m', $this->getCurrentTransactionData(), $ibanMatch) && !empty($ibanMatch[1])) {
                     $results = $ibanMatch[1];
                     //  echo $ibanMatch[1];
                 } else {
                     if (strpos($this->getCurrentTransactionData(), ':86:BEA') !== false) {
                         $results = "Betaalautomaat";
                     } else {
                         if (strpos($this->getCurrentTransactionData(), ':86:GEA') !== false) {
                             $results = "Geldautomaat";
                         }
                     }
                 }
             }
         }
     }
     //  echo $results."\n";
     return $this->sanitizeAccount($results);
 }
Ejemplo n.º 2
0
 /**
  * Overloaded: ABN Amro shows the GIRO
  * includes fix for 'for GIRO 1234567 TEST 201009063689 CLIEOP 21-9' and translates that into 1234567
  * @inheritdoc
  */
 protected function parseTransactionAccount()
 {
     $results = parent::parseTransactionAccount();
     if (empty($results)) {
         $giroMatch = $ibanMatch = [];
         if (preg_match('/^:86:GIRO(.{9})/im', $this->getCurrentTransactionData(), $giroMatch) && !empty($giroMatch[1])) {
             $results = $giroMatch[1];
         }
         if (preg_match('!^:86:/.*/IBAN/(.*?)/!m', $this->getCurrentTransactionData(), $ibanMatch) && !empty($ibanMatch[1])) {
             $results = $ibanMatch[1];
         }
     }
     return $this->sanitizeAccount($results);
 }
Ejemplo n.º 3
0
 /**
  * Overloaded: Added simple IBAN transaction handling
  * @inheritdoc
  */
 protected function parseTransactionAccount()
 {
     $account = parent::parseTransactionAccount();
     if ($account !== '') {
         return $account;
     }
     // IBAN
     $transactionData = str_replace('Europese Incasso, doorlopend ', '', $this->getCurrentTransactionData());
     $transactionData = preg_replace('![\\r\\n]+!', '', $transactionData);
     if (preg_match('#/CNTP/(.*?)/#', $transactionData, $results)) {
         $account = trim($results[1]);
         if (!empty($account)) {
             return $this->sanitizeAccount($account);
         }
     }
     if (preg_match('#:86:([A-Z]{2}[0-9]{2}[A-Z]{4}[\\d]+?) [A-Z]{6}[A-Z0-9]{0,4} #', $transactionData, $results)) {
         $account = trim($results[1]);
         if (!empty($account)) {
             return $this->sanitizeAccount($account);
         }
     }
     return '';
 }