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));