getShippingAddress() ->setShippingMethod('flatrate_flatrate') ->setCollectShippingRates(true); $quote->getPayment() ->setMethod(ConfigProvider::PAYPAL_VAULT_CODE) ->setAdditionalInformation( [ 'customer_id' => $quote->getCustomerId(), 'public_hash' => $paymentToken->getPublicHash() ] ); $quote->collectTotals(); /** @var CartRepositoryInterface $quoteRepository */ $quoteRepository = $objectManager->get(CartRepositoryInterface::class); $quoteRepository->save($quote);