Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed UPS Rest API bugs #3976

Merged
merged 11 commits into from
May 12, 2024
4 changes: 2 additions & 2 deletions app/code/core/Mage/Usa/Model/Shipping/Carrier/Ups.php
Original file line number Diff line number Diff line change
Expand Up @@ -1201,7 +1201,7 @@ protected function _parseRestTrackingResponse($trackingValue, $jsonResponse)
if ($jsonResponse) {
$responseData = json_decode($jsonResponse, true);

if ($responseData['trackResponse']['shipment']) {
if (isset($responseData['trackResponse']['shipment'])) {
fballiano marked this conversation as resolved.
Show resolved Hide resolved
$activityTags = $responseData['trackResponse']['shipment'][0]['package'][0]['activity'] ?? [];
if ($activityTags) {
fballiano marked this conversation as resolved.
Show resolved Hide resolved
$index = 1;
Expand Down Expand Up @@ -1256,7 +1256,7 @@ protected function _parseRestTrackingResponse($trackingValue, $jsonResponse)
$resultArr['progressdetail'] = $packageProgress;
}
} else {
$errorTitle = $responseData['errors']['message'];
$errorTitle = $responseData['response']['errors'][0]['message'];
}
}

Expand Down
Loading