cartTotalManagement = $cartTotalManagement; $this->quoteIdMaskFactory = $quoteIdMaskFactory; } /** * {@inheritDoc} */ public function collectTotals( $cartId, \Magento\Quote\Api\Data\PaymentInterface $paymentMethod, $shippingCarrierCode = null, $shippingMethodCode = null, \Magento\Quote\Api\Data\TotalsAdditionalDataInterface $additionalData = null ) { $quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id'); return $this->cartTotalManagement->collectTotals( $quoteIdMask->getQuoteId(), $paymentMethod, $shippingCarrierCode, $shippingMethodCode, $additionalData ); } }