From 7cd3dddbde78bdf08d33d50d103960563b110250 Mon Sep 17 00:00:00 2001 From: Nena Furtmeier Date: Mon, 6 Jan 2025 09:42:46 +0100 Subject: [PATCH 1/4] fix usage of kundensystemId can now be set on FinTsOptions and will be used on next login to prevent having to re-authenticate --- lib/Fhp/FinTs.php | 2 ++ lib/Fhp/Options/FinTsOptions.php | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/lib/Fhp/FinTs.php b/lib/Fhp/FinTs.php index 426ff10c..1a503548 100644 --- a/lib/Fhp/FinTs.php +++ b/lib/Fhp/FinTs.php @@ -589,6 +589,8 @@ public function selectTanMode($tanMode, $tanMedium = null) } $this->selectedTanMode = $tanMode instanceof TanMode ? $tanMode->getId() : $tanMode; $this->selectedTanMedium = $tanMedium instanceof TanMedium ? $tanMedium->getName() : $tanMedium; + + $this->kundensystemId = $this->options->kundensystemId; } /** diff --git a/lib/Fhp/Options/FinTsOptions.php b/lib/Fhp/Options/FinTsOptions.php index 378a1c30..ed531734 100644 --- a/lib/Fhp/Options/FinTsOptions.php +++ b/lib/Fhp/Options/FinTsOptions.php @@ -45,6 +45,14 @@ class FinTsOptions /** @var int */ public $timeoutResponse = 30; + /** + * The Kundensystem-Id as returned by the bank and persisted by the application code + * Prevents having to re-authenticate every time on login + * Use DialogInitialization::getKundensystemId() on the return-object of FinTs::login(), to get the new one + * @var string + */ + public $kundensystemId; + /** * @throws \InvalidArgumentException If the options are invalid. */ From 03f1b34955a4ba4095bd6d2f8e2dee8f9c65714a Mon Sep 17 00:00:00 2001 From: Nena Furtmeier Date: Mon, 6 Jan 2025 10:56:42 +0100 Subject: [PATCH 2/4] fix indentation --- lib/Fhp/FinTs.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Fhp/FinTs.php b/lib/Fhp/FinTs.php index 1a503548..591a2221 100644 --- a/lib/Fhp/FinTs.php +++ b/lib/Fhp/FinTs.php @@ -590,7 +590,7 @@ public function selectTanMode($tanMode, $tanMedium = null) $this->selectedTanMode = $tanMode instanceof TanMode ? $tanMode->getId() : $tanMode; $this->selectedTanMedium = $tanMedium instanceof TanMedium ? $tanMedium->getName() : $tanMedium; - $this->kundensystemId = $this->options->kundensystemId; + $this->kundensystemId = $this->options->kundensystemId; } /** From 515f9b5b227137a87bc7c4bd28792f8771702af7 Mon Sep 17 00:00:00 2001 From: Nena Furtmeier Date: Mon, 6 Jan 2025 10:57:18 +0100 Subject: [PATCH 3/4] fix indentation --- lib/Fhp/Options/FinTsOptions.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/Fhp/Options/FinTsOptions.php b/lib/Fhp/Options/FinTsOptions.php index ed531734..2ec308a2 100644 --- a/lib/Fhp/Options/FinTsOptions.php +++ b/lib/Fhp/Options/FinTsOptions.php @@ -46,12 +46,12 @@ class FinTsOptions public $timeoutResponse = 30; /** - * The Kundensystem-Id as returned by the bank and persisted by the application code - * Prevents having to re-authenticate every time on login - * Use DialogInitialization::getKundensystemId() on the return-object of FinTs::login(), to get the new one - * @var string - */ - public $kundensystemId; + * The Kundensystem-Id as returned by the bank and persisted by the application code + * Prevents having to re-authenticate every time on login + * Use DialogInitialization::getKundensystemId() on the return-object of FinTs::login(), to get the new one + * @var string + */ + public $kundensystemId; /** * @throws \InvalidArgumentException If the options are invalid. From 5063003a92cd9cbbb0c8b0c8493363b0efd4b91c Mon Sep 17 00:00:00 2001 From: Nena Furtmeier Date: Mon, 6 Jan 2025 11:01:30 +0100 Subject: [PATCH 4/4] fix description --- lib/Fhp/Options/FinTsOptions.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/Fhp/Options/FinTsOptions.php b/lib/Fhp/Options/FinTsOptions.php index 2ec308a2..a86f4d44 100644 --- a/lib/Fhp/Options/FinTsOptions.php +++ b/lib/Fhp/Options/FinTsOptions.php @@ -47,8 +47,9 @@ class FinTsOptions /** * The Kundensystem-Id as returned by the bank and persisted by the application code - * Prevents having to re-authenticate every time on login - * Use DialogInitialization::getKundensystemId() on the return-object of FinTs::login(), to get the new one + * This is optional, but it prevents having to re-authenticate every time on login + * if not using a persisted instance with FinTs::persist() + * Use DialogInitialization::getKundensystemId() on the return object of FinTs::login(), to get the current Kundensystem-Id * @var string */ public $kundensystemId;