6 declare(strict_types=1);
60 private $connectionPool;
99 $salesConnection = $this->connectionPool->getConnection(
'sales');
100 $checkoutConnection = $this->connectionPool->getConnection(
'checkout');
101 $salesConnection->beginTransaction();
102 $checkoutConnection->beginTransaction();
107 $orderId = $this->cartManagement->placeOrder(
$cartId);
110 __($e->getMessage()),
114 $this->getLogger()->critical($e);
116 __(
'An error occurred on the server. Please try to place the order again.'),
120 $salesConnection->commit();
121 $checkoutConnection->commit();
123 $salesConnection->rollBack();
124 $checkoutConnection->rollBack();
146 $quote->removeAddress(
$quote->getBillingAddress()->getId());
148 $quote->setDataChanges(
true);
152 $this->limitShippingCarrier(
$quote);
154 $this->paymentMethodManagement->set(
$cartId, $paymentMethod);
164 return $this->paymentInformationManagement->getPaymentInformation(
$quoteIdMask->getQuoteId());
173 private function getLogger()
175 if (!$this->logger) {
178 return $this->logger;
189 private function limitShippingCarrier(Quote
$quote) : void
194 $shippingCarrier = array_shift($shippingDataArray);