diff --git a/lib/Fhp/FinTs.php b/lib/Fhp/FinTs.php index e69ef2af..bd0f6d6e 100644 --- a/lib/Fhp/FinTs.php +++ b/lib/Fhp/FinTs.php @@ -375,6 +375,16 @@ private function processServerResponse(BaseAction $action, Message $response): v if ($action instanceof PaginateableAction && $action->hasMorePages()) { $this->execute($action); } + + // Check whether the server requested a Kundensystem-ID refresh. + if ($response->findRueckmeldung(Rueckmeldungscode::NEUE_KUNDENSYSTEM_ID_HOLEN) !== null) { + // TODO Properly implement the refresh here, see https://github.com/nemiah/phpFinTS/issues/458. + $this->logger->warning( + 'The server asked us to refresh the Kundensystem-ID in response to a ' . gettype($action) . + ' action, but that is not implemented yet. This could result in authentication errors or extraneous ' . + ' re-authentication prompts from the bank.' + ); + } } /** diff --git a/lib/Fhp/Segment/HIRMS/Rueckmeldungscode.php b/lib/Fhp/Segment/HIRMS/Rueckmeldungscode.php index 8136e0d3..d401cbbb 100644 --- a/lib/Fhp/Segment/HIRMS/Rueckmeldungscode.php +++ b/lib/Fhp/Segment/HIRMS/Rueckmeldungscode.php @@ -2,6 +2,8 @@ namespace Fhp\Segment\HIRMS; +use Fhp\Protocol\DialogInitialization; + /** * Enum for the response codes that the server can send. * @@ -128,6 +130,12 @@ public static function isError(int $code): bool */ public const TEILWEISE_FEHLERHAFT = 9050; + /** + * Neue Kundensystem-ID anfordern. + * Als Antwort auf eine Dialoginitialisierungsnachricht ({@link DialogInitialization}). + */ + public const NEUE_KUNDENSYSTEM_ID_HOLEN = 9391; + /** * Kreditinstitutsseitige Beendigung des Dialoges */