@@ -46,8 +46,8 @@ public static function create(SEPAAccount $account, string $painMessage): SendSE
4646
4747 protected function createRequest (BPD $ bpd , ?UPD $ upd )
4848 {
49- //ANALYSE XML FOR RECEIPTS AND PAYMENT DATE
50- $ xmlAsObject = simplexml_load_string ($ this ->painMessage , " SimpleXMLElement " , LIBXML_NOCDATA );
49+ // ANALYSE XML FOR RECEIPTS AND PAYMENT DATE
50+ $ xmlAsObject = simplexml_load_string ($ this ->painMessage , ' SimpleXMLElement ' , LIBXML_NOCDATA );
5151 $ numberOfTransactions = $ xmlAsObject ->CstmrCdtTrfInitn ->GrpHdr ->NbOfTxs ;
5252 $ hasReqdExDates = false ;
5353 foreach ($ xmlAsObject ->CstmrCdtTrfInitn ?->PmtInf as $ pmtInfo ) {
@@ -58,25 +58,21 @@ protected function createRequest(BPD $bpd, ?UPD $upd)
5858 }
5959 }
6060
61- //NOW READ OUT, WICH SEGMENT SHOULD BE USED:
61+ // NOW READ OUT, WICH SEGMENT SHOULD BE USED:
6262 if ($ numberOfTransactions > 1 && $ hasReqdExDates ) {
63-
6463 // Terminierte SEPA-Sammelüberweisung (Segment HKCME / Kennung HICMES)
6564 $ segmentID = 'HICMES ' ;
6665 $ segment = \Fhp \Segment \CME \HKCMEv1::createEmpty ();
6766 } elseif ($ numberOfTransactions == 1 && $ hasReqdExDates ) {
68-
6967 // Terminierte SEPA-Überweisung (Segment HKCSE / Kennung HICSES)
7068 $ segmentID = 'HICSES ' ;
7169 $ segment = \Fhp \Segment \CSE \HKCSEv1::createEmpty ();
7270 } elseif ($ numberOfTransactions > 1 && !$ hasReqdExDates ) {
73-
7471 // SEPA-Sammelüberweisungen (Segment HKCCM / Kennung HICSES)
7572 $ segmentID = 'HICSES ' ;
7673 $ segment = \Fhp \Segment \CCM \HKCCMv1::createEmpty ();
7774 } else {
78-
79- //SEPA Einzelüberweisung (Segment HKCCS / Kennung HICCSS).
75+ // SEPA Einzelüberweisung (Segment HKCCS / Kennung HICCSS).
8076 $ segmentID = 'HICCSS ' ;
8177 $ segment = \Fhp \Segment \CCS \HKCCSv1::createEmpty ();
8278 }
@@ -92,7 +88,7 @@ protected function createRequest(BPD $bpd, ?UPD $upd)
9288 // Sometimes the Bank reports supported schemas with a "_GBIC_X" postfix.
9389 // GIBC_X stands for German Banking Industry Committee and a version counter.
9490 $ xmlSchema = $ this ->xmlSchema ;
95- $ matchingSchemas = array_filter ($ supportedSchemas , function ($ value ) use ($ xmlSchema ) {
91+ $ matchingSchemas = array_filter ($ supportedSchemas , function ($ value ) use ($ xmlSchema ) {
9692 // For example urn:iso:std:iso:20022:tech:xsd:pain.001.001.09 from the xml matches
9793 // urn:iso:std:iso:20022:tech:xsd:pain.001.001.09_GBIC_4
9894 return str_starts_with ($ value , $ xmlSchema );
0 commit comments