update
This commit is contained in:
@@ -133,7 +133,7 @@ final class ApaczkaApiClient
|
||||
throw new ApaczkaApiException('API Apaczka HTTP ' . $httpCode . ': ' . $message);
|
||||
}
|
||||
if ($status !== 200) {
|
||||
$responsePreview = substr(json_encode($decoded, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) ?: '', 0, 240);
|
||||
$responsePreview = substr(json_encode($decoded, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) ?: '', 0, 1000);
|
||||
throw new ApaczkaApiException(
|
||||
'Blad API Apaczka (status ' . $status . '): ' . $message . '. Odpowiedz: ' . $responsePreview
|
||||
);
|
||||
@@ -144,7 +144,7 @@ final class ApaczkaApiClient
|
||||
|
||||
if ($lastSignatureError !== null) {
|
||||
[$decoded, $status, $message] = $lastSignatureError;
|
||||
$responsePreview = substr(json_encode($decoded, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) ?: '', 0, 240);
|
||||
$responsePreview = substr(json_encode($decoded, JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) ?: '', 0, 1000);
|
||||
throw new ApaczkaApiException(
|
||||
'Blad API Apaczka (status ' . $status . '): ' . $message . '. Odpowiedz: ' . $responsePreview
|
||||
);
|
||||
|
||||
@@ -214,7 +214,9 @@ final class ApaczkaShipmentService implements ShipmentProviderInterface
|
||||
return str_contains($message, 'pickup not available for selected day')
|
||||
|| str_contains($message, "can\\u2019t place an order today")
|
||||
|| str_contains($message, "can't place an order today")
|
||||
|| str_contains($message, 'change its date to another working day');
|
||||
|| str_contains($message, 'change its date to another working day')
|
||||
|| str_contains($message, 'time between cut-off hours for pickup is too short')
|
||||
|| str_contains($message, 'an order for the same day can be placed up till');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user