Skip to content

Commit

Permalink
fix: ensure signature for europlus and parcel connect (#460)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mark-Ernst authored Oct 4, 2023
1 parent 8b32e21 commit 87a6931
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/Services/ConsignmentEncode.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@

use InvalidArgumentException;
use MyParcelNL\Sdk\src\Exception\MissingFieldException;
use MyParcelNL\Sdk\src\Model\Carrier\CarrierDHLEuroplus;
use MyParcelNL\Sdk\src\Model\Carrier\CarrierDHLForYou;
use MyParcelNL\Sdk\src\Model\Carrier\CarrierDHLParcelConnect;
use MyParcelNL\Sdk\src\Model\Consignment\AbstractConsignment;
use MyParcelNL\Sdk\src\Model\MyParcelCustomsItem;
use MyParcelNL\Sdk\src\Support\Arr;
Expand Down Expand Up @@ -107,6 +109,10 @@ public static function encodeExtraOptions(array $consignmentEncoded, AbstractCon
$consignmentEncoded['options']['hide_sender'] = 0;
}

if (in_array($consignment->getCarrierName(), [CarrierDHLEuroplus::NAME, CarrierDHLParcelConnect::NAME])) {
$consignmentEncoded['options']['signature'] = 1;
}

if ($consignment->getDeliveryDate()) {
$consignmentEncoded['options']['delivery_date'] = $consignment->getDeliveryDate();
}
Expand Down

0 comments on commit 87a6931

Please sign in to comment.