Ticket #463: banktransfer_validation.diff

File banktransfer_validation.diff, 3.5 KB (added by Mediagenie System, 11 years ago)

Banktransfer patch

  • includes/classes/banktransfer_validation.php

     includes/classes/banktransfer_validation.php | 21 ++++++++++++---------
     1 file changed, 12 insertions(+), 9 deletions(-)
    
    diff --git a/includes/classes/banktransfer_validation.php b/includes/classes/banktransfer_validation.php
    index d235143..d15f99b 100644
    a b var $PRZ; //Enth  
    302302       $Method16 = 0;
    303303     }
    304304     if ($Help == 1) {
    305        if ($Checksum == substr($AccountNo,Checkpoint - 2,1)) {
     305       if ($Checksum == substr($AccountNo,$Checkpoint - 2,1)) {
    306306         $Method16 = 0;
    307307       }
    308308     }
    var $PRZ; //Enth  
    10051005      $Gewicht = HexDec(substr($Significance,5,1));
    10061006
    10071007      $PZ = -1;
     1008      $Help2 = $Rest + ($PZ * $Gewicht);
    10081009      while ($Help2 % 11 <>10) {  //franky_n
    10091010        $PZ++;
    10101011        $Help2 = $Rest + ($PZ * $Gewicht);
    var $PRZ; //Enth  
    10611062
    10621063      $Gewicht = HexDec(substr($Significance,5, 1));
    10631064      $PZ = -1;
     1065      $Help2 = $Rest + ($PZ * $Gewicht);
    10641066      while ($Help2 % 11 <> 10 or $PZ > 9) { //franky_n
    10651067        $PZ++;
    10661068        $Help2 = $Rest + ($PZ * $Gewicht);
    var $PRZ; //Enth  
    12041206      case ($help01 == 91):
    12051207      case ($help01 == 99):
    12061208        // Variante 3: Methode 09 (Keine Berechnung).
    1207         $PResult = $this->Mark09($AccountNo);;
     1209        $PResult = $this->Mark09($AccountNo);
    12081210        break;
    1209       case ($help01 >= 01 && $help <= 31):
     1211      case ($help01 >= 01 && $help01 <= 31):
    12101212        // Variante 4: Dritte und vierte Stelle zwischen 01 und 12
    12111213        // -UND- siebte bis neunte Stelle kleiner 500.
    12121214        $help03 = substr($AccountNo,2,2);
    var $PRZ; //Enth  
    12181220          }
    12191221        }
    12201222        // Ausnahme: Diese Kontonummer ist als richtig zu bewerten.
    1221         if ($AccountNo == 0185125434) {
     1223        if ((string)$AccountNo == '0185125434') {
    12221224          $PResult = 0;
    12231225        }
    12241226        break;
    var $PRZ; //Enth  
    18181820        }
    18191821      }
    18201822      if ($D2 == 0) {
    1821         $P = $TAB1[$A5];
     1823        $P = $Tab1[$A5];
    18221824      } else {
    1823         $P = $TAB2[$A5];
     1825        $P = $Tab2[$A5];
    18241826      }
    18251827      if ($P == $AccountNoTemp[10]) {
    18261828        $Result = 0;
    var $PRZ; //Enth  
    19181920        }
    19191921      }
    19201922    }
    1921     return $Help;;
     1923    return $Help;
    19221924  }  /* End of Mark91 */
    19231925
    19241926  private function Mark92($AccountNo) {
    var $PRZ; //Enth  
    22792281    // Variante 1 - Zwei führende Nullen
    22802282    if ((substr($AccountNo,0,2) == "00")And (substr($AccountNo,2,1) != "0")){
    22812283      $Significance = '1231231';
     2284          $Step3 = 0;
    22822285      for ($Run = 0;$Run < strlen($Significance);$Run++) {
    22832286        $Step1 = (substr($AccountNo,$Run + 2,1) * substr($Significance,$Run,1));
    22842287        $Step2 = $Step1 + substr($Significance,$Run,1);
    var $PRZ; //Enth  
    23002303    // Variante 2 - Drei führende Nullen
    23012304    } elseif ((substr($AccountNo,0,3) == "000")And (substr($AccountNo,3,1) != "0")){
    23022305      $Significance = '654321';
     2306          $Step1 = 0;
    23032307      for ($Run = 0;$Run < strlen($Significance);$Run++) {
    23042308        $Step1 += (substr($AccountNo,$Run + 3,1) * substr($Significance,$Run,1));
    23052309      }
    var $PRZ; //Enth  
    28542858
    28552859
    28562860class IbanAccountCheck extends AccountCheck {
     2861        private $ibanstructure = Array();
    28572862
    28582863/*
    28592864   -----------------------------------------------------------------------------------------
    class IbanAccountCheck extends AccountCheck {  
    38663871   
    38673872}  /* End Class IbanAccountCheck */
    38683873
    3869  
    3870 ?>
    3871  No newline at end of file