Skip to content

Commit

Permalink
#116
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Proske committed Jun 8, 2022
1 parent 789c832 commit 841df2c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
10 changes: 5 additions & 5 deletions lib/Order/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@ public function __construct($address)
{
parent::__construct($address);

$this->title = substr(trim(($address->cAnrede === 'm' ? Shop::Lang()->get('mr') : Shop::Lang()->get('mrs')) . ' ' . $address->cTitel), 0, 20) ?? null;
$this->givenName = $address->cVorname;
$this->familyName = $address->cNachname;
$this->email = $address->cMail ?? null;
$this->title = html_entity_decode(substr(trim(($address->cAnrede === 'm' ? Shop::Lang()->get('mr') : Shop::Lang()->get('mrs')) . ' ' . $address->cTitel), 0, 20)) ?? null;
$this->givenName = html_entity_decode($address->cVorname);
$this->familyName = html_entity_decode($address->cNachname);
$this->email = html_entity_decode($address->cMail) ?? null;

if ($organizationName = trim($address->cFirma)) {
$this->organizationName = $organizationName;
$this->organizationName = html_entity_decode($organizationName);
}
}
}
10 changes: 5 additions & 5 deletions lib/Payment/Address.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,16 @@ class Address implements JsonSerializable
*/
public function __construct($address)
{
$this->streetAndNumber = $address->cStrasse . ' ' . $address->cHausnummer;
$this->postalCode = $address->cPLZ;
$this->city = $address->cOrt;
$this->country = $address->cLand;
$this->streetAndNumber = html_entity_decode($address->cStrasse . ' ' . $address->cHausnummer);
$this->postalCode = html_entity_decode($address->cPLZ);
$this->city = html_entity_decode($address->cOrt);
$this->country = html_entity_decode($address->cLand);

if (
isset($adresse->cAdressZusatz)
&& trim($adresse->cAdressZusatz) !== ''
) {
$this->streetAdditional = trim($adresse->cAdressZusatz);
$this->streetAdditional = html_entity_decode(trim($adresse->cAdressZusatz));
}
}
}

0 comments on commit 841df2c

Please sign in to comment.