Skip to content

Commit

Permalink
fix: fix error physical properties DHLForYou (#504)
Browse files Browse the repository at this point in the history
  • Loading branch information
GravendeelJochem authored Sep 19, 2024
1 parent 44ccb0c commit 7159c79
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/Services/ConsignmentEncode.php
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,13 @@ private function encodePhysicalProperties(): self
throw new MissingFieldException('Weight in physical properties must be set for digital stamp shipments.');
}

if (CarrierDHLForYou::NAME === $consignment->getCarrier()->getName()) {
$consignment->setPhysicalProperties([
'weight' => $consignment->getTotalWeight(),
'volume' => 1,
]);
}

$this->consignmentEncoded['physical_properties'] = $consignment->getPhysicalProperties();

return $this;
Expand Down

0 comments on commit 7159c79

Please sign in to comment.