From b10d3907a2f622f58611c8f4fcf4cc0c6ceecb53 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Despont?= Date: Fri, 23 Mar 2018 18:16:44 +0100 Subject: [PATCH] Fix StructuredPostalAddress regression The test is inversed, so the street and the buillding number are not longer added to the XML! --- src/Z38/SwissPayment/StructuredPostalAddress.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Z38/SwissPayment/StructuredPostalAddress.php b/src/Z38/SwissPayment/StructuredPostalAddress.php index 9efc4a2..8acca1f 100644 --- a/src/Z38/SwissPayment/StructuredPostalAddress.php +++ b/src/Z38/SwissPayment/StructuredPostalAddress.php @@ -57,10 +57,10 @@ public function asDom(\DOMDocument $doc) { $root = $doc->createElement('PstlAdr'); - if (!strlen($this->street)) { + if (strlen($this->street)) { $root->appendChild($doc->createElement('StrtNm', $this->street)); } - if (!strlen($this->buildingNo)) { + if (strlen($this->buildingNo)) { $root->appendChild($doc->createElement('BldgNb', $this->buildingNo)); } $root->appendChild($doc->createElement('PstCd', $this->postCode));