Skip to content

Commit 75fd49a

Browse files
committed
AC-9030::Fedex API Upgrade - Fix for International Shipment
1 parent 8506f8a commit 75fd49a

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

app/code/Magento/Fedex/Model/Carrier.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -636,9 +636,11 @@ protected function _getRateAmountOriginBased($rate) : null|float
636636
foreach ($rate['ratedShipmentDetails'] as $ratedShipmentDetail) {
637637
$netAmount = (string)$ratedShipmentDetail['totalNetCharge'];
638638
$currencyCode = (string)$ratedShipmentDetail['shipmentRateDetail']['currency'];
639-
$rateType = (string)reset($ratedShipmentDetail['ratedPackages'])
639+
if(!empty($ratedShipmentDetail['ratedPackages'])){
640+
$rateType = (string)reset($ratedShipmentDetail['ratedPackages'])
640641
['packageRateDetail']['rateType'];
641-
$rateTypeAmounts[$rateType] = $netAmount;
642+
$rateTypeAmounts[$rateType] = $netAmount;
643+
}
642644
}
643645

644646
foreach ($this->_ratesOrder as $rateType) {

0 commit comments

Comments
 (0)