From 4026daab79b6f93c3ab06bd1f969250c8ee190b4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20M=C3=BCller?= Date: Sun, 23 Aug 2026 22:33:01 +0200 Subject: [PATCH] fix: parse all Ustrd tags --- src/CAMT/CAMT.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/CAMT/CAMT.php b/src/CAMT/CAMT.php index ed82b2ce..6e6334d2 100644 --- a/src/CAMT/CAMT.php +++ b/src/CAMT/CAMT.php @@ -337,7 +337,10 @@ private function parseRemittanceInfo(\SimpleXMLElement $remittanceInfo, string $ // Unstructured remittance info - this is the main "Verwendungszweck" $unstructured = $remittanceInfo->xpath('.//c:Ustrd'); if ($unstructured !== false && !empty($unstructured)) { - $ustrd = (string) $unstructured[0]; + $ustrd = ''; + foreach ($unstructured as $tag) { + $ustrd .= (string) $tag; + } // Parse structured SEPA fields from unstructured text $structuredFields = $this->extractStructuredFieldsFromText($ustrd);