organic: Enhance external apis

This commit is contained in:
2025-12-22 16:56:23 +01:00
parent 551ddd3c11
commit 0cd3b3de8e
10 changed files with 350 additions and 110 deletions

View File

@@ -224,8 +224,21 @@ if ($format === 'text') {
$certNr = $m[0];
}
}
$operator = ['lfbisNr' => null];
if ($authorityId === 'AT-BIO-301') {
// TODO
} else if ($authorityId === 'AT-BIO-302') {
if (preg_match("/^lfbis[^0-9]*([0-9]{7})$/im", $text, $matches) === 1)
$operator['lfbisNr'] = $matches[1];
} else if ($authorityId === 'AT-BIO-401') {
// TODO
} else if ($authorityId === 'AT-BIO-402') {
// TODO
} else if ($authorityId === 'AT-BIO-903') {
// TODO
}
echo "{\"type\":\"$authorityId\",\"lang\":\"de\",\"id\":" . jenc($certId) . ",\"nr\":" . jenc($certNr);
echo ",\n \"operator\":{},\n \"authority\":{\"id\":" . jenc($authorityId) . "}}\n";
echo ",\n \"operator\":" . jenc($operator) . ",\n \"authority\":{\"id\":" . jenc($authorityId) . "}}\n";
exit;
}