From c1de31c1871d9de85941ca8e764f6e5dde856efb Mon Sep 17 00:00:00 2001 From: Gytautas Date: Thu, 21 Sep 2023 17:10:37 +0300 Subject: [PATCH 1/2] fix: added additional validation if company name is empty --- src/Service/API/ShipmentApiService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Service/API/ShipmentApiService.php b/src/Service/API/ShipmentApiService.php index aca8034..b1e1da1 100644 --- a/src/Service/API/ShipmentApiService.php +++ b/src/Service/API/ShipmentApiService.php @@ -90,7 +90,7 @@ public function __construct( public function createShipment($addressId, ShipmentData $shipmentData, $orderId) { $address = new Address($addressId); - $isCompany = $shipmentData->getCompany() ? true : false; + $isCompany = trim($shipmentData->getCompany()) ? true : false; //todo $firstName = $shipmentData->getName(); if ($isCompany) { $firstName = $shipmentData->getCompany(); From 15d88fbd68db3babc2ff9b4d8836453209b88f6d Mon Sep 17 00:00:00 2001 From: Gytautas Date: Thu, 21 Sep 2023 17:13:44 +0300 Subject: [PATCH 2/2] fix: comment deleted --- src/Service/API/ShipmentApiService.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Service/API/ShipmentApiService.php b/src/Service/API/ShipmentApiService.php index b1e1da1..84b1489 100644 --- a/src/Service/API/ShipmentApiService.php +++ b/src/Service/API/ShipmentApiService.php @@ -90,7 +90,7 @@ public function __construct( public function createShipment($addressId, ShipmentData $shipmentData, $orderId) { $address = new Address($addressId); - $isCompany = trim($shipmentData->getCompany()) ? true : false; //todo + $isCompany = trim($shipmentData->getCompany()) ? true : false; $firstName = $shipmentData->getName(); if ($isCompany) { $firstName = $shipmentData->getCompany();