diff --git a/src/Services/InfoProviderSystem/Providers/DigikeyProvider.php b/src/Services/InfoProviderSystem/Providers/DigikeyProvider.php index fedda2257..2de2a0e8a 100644 --- a/src/Services/InfoProviderSystem/Providers/DigikeyProvider.php +++ b/src/Services/InfoProviderSystem/Providers/DigikeyProvider.php @@ -157,7 +157,7 @@ public function searchByKeyword(string $keyword, array $options = []): array public function getDetails(string $id, array $options = []): PartDetailDTO { try { - $response = $this->digikeyClient->request('GET', '/products/v4/search/' . urlencode($id) . '/productdetails', [ + $response = $this->digikeyClient->request('GET', '/products/v4/search/' . rawurlencode($id) . '/productdetails', [ 'auth_bearer' => $this->authTokenManager->getAlwaysValidTokenString(self::OAUTH_APP_NAME) ]); } catch (\InvalidArgumentException $exception) { @@ -302,7 +302,7 @@ private function mediaToDTOs(string $id): array $datasheets = []; $images = []; - $response = $this->digikeyClient->request('GET', '/products/v4/search/' . urlencode($id) . '/media', [ + $response = $this->digikeyClient->request('GET', '/products/v4/search/' . rawurlencode($id) . '/media', [ 'auth_bearer' => $this->authTokenManager->getAlwaysValidTokenString(self::OAUTH_APP_NAME) ]); diff --git a/src/Services/InfoProviderSystem/Providers/OEMSecretsProvider.php b/src/Services/InfoProviderSystem/Providers/OEMSecretsProvider.php index edeb5f719..0b05d8c80 100644 --- a/src/Services/InfoProviderSystem/Providers/OEMSecretsProvider.php +++ b/src/Services/InfoProviderSystem/Providers/OEMSecretsProvider.php @@ -1249,7 +1249,7 @@ private function generateInquiryUrl(string $partNumber, string $oemInquiry = 'co { $baseUrl = rtrim($this->getProviderInfo()->url, '/') . '/'; $inquiryPath = trim($oemInquiry, '/') . '/'; - $encodedPartNumber = urlencode(trim($partNumber)); + $encodedPartNumber = rawurlencode(trim($partNumber)); return $baseUrl . $inquiryPath . $encodedPartNumber; } diff --git a/src/Services/LabelSystem/BarcodeScanner/BarcodeScanResultHandler.php b/src/Services/LabelSystem/BarcodeScanner/BarcodeScanResultHandler.php index afc590381..75e6c3bed 100644 --- a/src/Services/LabelSystem/BarcodeScanner/BarcodeScanResultHandler.php +++ b/src/Services/LabelSystem/BarcodeScanner/BarcodeScanResultHandler.php @@ -348,7 +348,7 @@ private function getCreationInfoForEIGP114(EIGP114BarcodeScanResult $scanResult) if ($vendor === 'digikey') { return [ 'providerKey' => 'digikey', - 'providerId' => $scanResult->supplierPartNumber ?? throw new \RuntimeException('Digikey barcode does not contain required supplier part number'), + 'providerId' => $scanResult->digikeyPartNumber ?? $scanResult->supplierPartNumber ?? throw new \RuntimeException('Digikey barcode does not contain required supplier part number'), 'lotAmount' => $scanResult->quantity, 'lotName' => $scanResult->digikeyInvoiceNumber ?? $scanResult->digikeySalesOrderNumber ?? $scanResult->customerPO, 'lotUserBarcode' => $scanResult->rawInput,