diff --git a/app/code/Magento/Ups/Model/Carrier.php b/app/code/Magento/Ups/Model/Carrier.php index f96e595acfab2..0db72e5f8fcdd 100644 --- a/app/code/Magento/Ups/Model/Carrier.php +++ b/app/code/Magento/Ups/Model/Carrier.php @@ -1118,8 +1118,7 @@ protected function _getRestQuotes() "AddressLine" => ["{$params['49_residential']}"], "StateProvinceCode" => "{$params['destRegionCode']}", "PostalCode" => "{$params['19_destPostal']}", - "CountryCode" => "{$params['22_destCountry']}", - "ResidentialAddressIndicator" => "{$residentialAddressIndicator}" + "CountryCode" => "{$params['22_destCountry']}" ] ], "ShipFrom" => [ @@ -1134,6 +1133,11 @@ protected function _getRestQuotes() ] ]; + if ($params['49_residential'] === '01') { + $rateParams['RateRequest']['Shipment']['ShipTo']['Address']['ResidentialAddressIndicator'] + = $residentialAddressIndicator; + } + if ($this->getConfigFlag('negotiated_active')) { $rateParams['RateRequest']['Shipment']['ShipmentRatingOptions']['TPFCNegotiatedRatesIndicator'] = "Y"; $rateParams['RateRequest']['Shipment']['ShipmentRatingOptions']['NegotiatedRatesIndicator'] = "Y";