product = 'V01PAK'; $this->shipmentDate = $shipmentDate; $this->weight = $weight; $this->length = $length; $this->width = $width; $this->height = $height; $this->name1 = $name1; $this->name2 = $name2; $this->name3 = $name3; $this->street = $street; $this->streetNo = $streetNo; $this->zip = $zip; $this->city = $city; $this->country = $country; $this->email = $email; $this->printOnlyIfCodeable = $printOnlyIfCodeable; } /** * @param string $username * @param string $password * @param string $accountNumber * @param string $senderName * @param string $senderStreetName * @param string $senderStreetNo * @param string $senderZip * @param string $senderCity * @param string $senderCountry * @param string $senderEmail * * @return string */ public function toXml($username, $password, $accountNumber, $senderName, $senderStreetName, $senderStreetNo, $senderZip, $senderCity, $senderCountry, $senderEmail) { $printOnlyIfCodeableActive = $this->printOnlyIfCodeable ? '1' : '0'; $payload = << {$username} {$password} 3 0 1 ? {$this->product} {$accountNumber} {$this->shipmentDate} {$this->weight} {$this->length} {$this->width} {$this->height} {$senderName}
{$senderStreetName} {$senderStreetNo} {$senderZip} {$senderCity} {$senderCountry}
{$senderEmail}
{$this->name1}
{$this->name2} {$this->name3} {$this->street} {$this->streetNo} {$this->zip} {$this->city} {$this->country}
{$this->email}
B64
XML; return $payload; } }