File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -71,16 +71,16 @@ function () use ($statement_format) {
7171 } else {
7272 Logger::info("Parsing CAMT XML format");
7373 $camt_xml_array = $finished_action->getBookedXML();
74+ Logger::trace("CAMT XML raw data received from bank:" . print_r($camt_xml_array, true));
7475
7576 Logger::trace("CAMT XML array count: " . count($camt_xml_array));
7677 if (!empty($camt_xml_array) && isset($camt_xml_array[0])) {
7778 Logger::trace("First CAMT XML length: " . strlen($camt_xml_array[0]));
7879 }
7980
80- $camt_xml = $camt_xml_array[0] ?? '';
81-
82- if (!empty(trim($camt_xml))) {
83- $transactions = \App\StatementOfAccountHelper::parse_camt_xml($camt_xml);
81+ foreach ($camt_xml_array as $camt_xml) {
82+ $camt_transactions = \App\StatementOfAccountHelper::parse_camt_xml($camt_xml);
83+ $transactions = array_merge($transactions, $camt_transactions);
8484 }
8585 }
8686
@@ -117,6 +117,7 @@ function () use ($statement_format) {
117117 } catch (UnexpectedResponseException $e) {
118118 // Check if this is a "format not supported" error
119119 $message = $e->getMessage();
120+ Logger::debug("Caught UnexpectedResponseException: " . $message);
120121
121122 if (strpos($message, 'HICAZS') !== false && !$use_mt940_fallback) {
122123 // CAMT not supported, try MT940
You can’t perform that action at this time.
0 commit comments