Skip to content

Commit 6697f4d

Browse files
Merge remote-tracking branch 'origin/MAGETWO-66895' into MPI-PR-705
2 parents 5c9e57d + 0b30eea commit 6697f4d

File tree

1 file changed

+1
-25
lines changed

1 file changed

+1
-25
lines changed

app/code/Magento/Paypal/Model/Express/Checkout.php

Lines changed: 1 addition & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,10 @@
77

88
use Magento\Customer\Api\Data\CustomerInterface as CustomerDataObject;
99
use Magento\Customer\Model\AccountManagement;
10-
use Magento\Framework\App\ObjectManager;
1110
use Magento\Framework\DataObject;
1211
use Magento\Paypal\Model\Cart as PaypalCart;
1312
use Magento\Paypal\Model\Config as PaypalConfig;
1413
use Magento\Quote\Model\Quote\Address;
15-
use Magento\Sales\Api\OrderRepositoryInterface;
1614
use Magento\Sales\Model\Order\Email\Sender\OrderSender;
1715

1816
/**
@@ -270,11 +268,6 @@ class Checkout
270268
*/
271269
protected $totalsCollector;
272270

273-
/**
274-
* @var OrderRepositoryInterface
275-
*/
276-
private $orderRepository;
277-
278271
/**
279272
* @param \Psr\Log\LoggerInterface $logger
280273
* @param \Magento\Customer\Model\Url $customerUrl
@@ -796,8 +789,7 @@ public function place($token, $shippingMethodCode = null)
796789

797790
$this->ignoreAddressValidation();
798791
$this->_quote->collectTotals();
799-
$orderId = $this->quoteManagement->placeOrder($this->_quote->getId());
800-
$order = $this->getOrderRepository()->get($orderId);
792+
$order = $this->quoteManagement->submit($this->_quote);
801793

802794
if (!$order) {
803795
return;
@@ -1149,20 +1141,4 @@ protected function prepareGuestQuote()
11491141
->setCustomerGroupId(\Magento\Customer\Model\Group::NOT_LOGGED_IN_ID);
11501142
return $this;
11511143
}
1152-
1153-
/**
1154-
* Returns order repository instance
1155-
*
1156-
* @return OrderRepositoryInterface
1157-
* @deprecated
1158-
*/
1159-
private function getOrderRepository()
1160-
{
1161-
if ($this->orderRepository === null) {
1162-
$this->orderRepository = ObjectManager::getInstance()
1163-
->get(OrderRepositoryInterface::class);
1164-
}
1165-
1166-
return $this->orderRepository;
1167-
}
11681144
}

0 commit comments

Comments
 (0)