public static function validateDDType($type) { $types = array("FRST", "RCUR", "FNAL", "OOFF"); if (in_array($type, $types)) { return true; } else { return $type . " is not a valid Sepa Direct Debit Transaction Type."; } }