@@ -47,7 +47,7 @@ class SepaUtilities
47
47
const SEPA_PAIN_001_003_03 = 100303 ;
48
48
const SEPA_PAIN_001_001_03 = 100103 ;
49
49
const SEPA_PAIN_001_001_03_GBIC = 1001031 ;
50
- const SEPA_PAIN_001_001_03_CH_02 = 1001032 ;
50
+ const SEPA_PAIN_001_001_03_CH_02 = 1001032 ;
51
51
// direct debit versions
52
52
const SEPA_PAIN_008_002_02 = 800202 ;
53
53
const SEPA_PAIN_008_003_02 = 800302 ;
@@ -640,7 +640,7 @@ private static function getValFromMultiDimInput(array &$input, $keys)
640
640
*
641
641
* @param string $field Valid fields are: 'orgnlcdtrschmeid_id','ci','msgid','pmtid','pmtinfid',
642
642
* 'orgnlmndtid','mndtid','initgpty','cdtr','dbtr','orgnlcdtrschmeid_nm',
643
- * 'ultmtcdrt ','ultmtdbtr','rmtinf','orgnldbtracct_iban','iban','bic',
643
+ * 'ultmtcdtr ','ultmtdbtr','rmtinf','orgnldbtracct_iban','iban','bic',
644
644
* 'ccy','amendment', 'btchbookg','instdamt','seqtp','lclinstrm',
645
645
* 'elctrncsgntr','reqdexctndt','purp','ctgypurp','orgnldbtragt', 'adrline'
646
646
* 'ctry', 'dbtrpstladr', 'cdtrpstladr', 'pstladr'
@@ -698,6 +698,7 @@ public static function check(string $field, $input, array $options = null)
698
698
return in_array (false , $ input , true ) ? false : array_values ($ input );
699
699
} // if not => fall through
700
700
case 'orgnlcdtrschmeid_nm ' :
701
+ case 'ultmtcdrt ' : // deprecated, just here for backwards compatibility
701
702
case 'ultmtcdtr ' :
702
703
case 'ultmtdbtr ' :
703
704
return ( self ::checkLength ($ input , self ::TEXT_LENGTH_SHORT )
@@ -865,7 +866,7 @@ public static function sanitizeText(int $length, string $input, bool $allowEmpty
865
866
/**
866
867
* Tries to sanitize the the input so it fits in the field.
867
868
*
868
- * @param string $field Valid fields are: 'ultmtcdrt ', 'ultmtdbtr',
869
+ * @param string $field Valid fields are: 'ultmtcdtr ', 'ultmtdbtr',
869
870
* 'orgnlcdtrschmeid_nm', 'initgpty', 'cdtr', 'dbtr', 'rmtinf', 'adrline'
870
871
* @param mixed $input
871
872
* @param int $flags Flags used in replaceSpecialChars()
@@ -887,7 +888,8 @@ public static function sanitize(string $field, $input, int $flags = 0)
887
888
888
889
return in_array (false , $ input , true ) ? false : $ input ;
889
890
}
890
- case 'ultmtcdrt ' :
891
+ case 'ultmtcdrt ' : // deprecated, just here for backwards compatibility
892
+ case 'ultmtcdtr ' :
891
893
case 'ultmtdbtr ' :
892
894
case 'ultmtdebtr ' : // deprecated, just here for backwards compatibility
893
895
return self ::sanitizeText (self ::TEXT_LENGTH_SHORT , $ input , true , $ flags );
@@ -1282,7 +1284,7 @@ public static function version2string(int $version)
1282
1284
switch ($ version )
1283
1285
{ // fall-through's are on purpose
1284
1286
case self ::SEPA_PAIN_001_001_03_GBIC :
1285
- case self ::SEPA_PAIN_001_001_03_CH_02 :
1287
+ case self ::SEPA_PAIN_001_001_03_CH_02 :
1286
1288
case self ::SEPA_PAIN_001_001_03 : return 'pain.001.001.03 ' ;
1287
1289
case self ::SEPA_PAIN_001_002_03 : return 'pain.001.002.03 ' ;
1288
1290
case self ::SEPA_PAIN_001_003_03 : return 'pain.001.003.03 ' ;
0 commit comments