Skip to content

Commit 5ef3f40

Browse files
committed
Merge branch 'MAGETWO-71821' into MPI-PR-2.1.10
2 parents d8d701c + c680f1c commit 5ef3f40

File tree

1 file changed

+1
-28
lines changed

1 file changed

+1
-28
lines changed

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

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
use Magento\Quote\Model\Quote\Address;
1313
use Magento\Framework\DataObject;
1414
use Magento\Paypal\Model\Cart as PaypalCart;
15-
use Magento\Framework\App\ObjectManager;
16-
use Magento\Sales\Api\OrderRepositoryInterface;
1715

1816
/**
1917
* Wrapper that performs Paypal Express and Checkout communication
@@ -270,13 +268,6 @@ class Checkout
270268
*/
271269
protected $totalsCollector;
272270

273-
/**
274-
* Order repository interface.
275-
*
276-
* @var OrderRepositoryInterface
277-
*/
278-
private $orderRepository;
279-
280271
/**
281272
* @param \Psr\Log\LoggerInterface $logger
282273
* @param \Magento\Customer\Model\Url $customerUrl
@@ -805,8 +796,7 @@ public function place($token, $shippingMethodCode = null)
805796

806797
$this->ignoreAddressValidation();
807798
$this->_quote->collectTotals();
808-
$orderId = $this->quoteManagement->placeOrder($this->_quote->getId());
809-
$order = $this->getOrderRepository()->get($orderId);
799+
$order = $this->quoteManagement->submit($this->_quote);
810800

811801
if (!$order) {
812802
return;
@@ -1174,21 +1164,4 @@ protected function prepareGuestQuote()
11741164
->setCustomerGroupId(\Magento\Customer\Model\Group::NOT_LOGGED_IN_ID);
11751165
return $this;
11761166
}
1177-
1178-
/**
1179-
* Returns order repository instance.
1180-
*
1181-
* @return OrderRepositoryInterface
1182-
*
1183-
* @deprecated
1184-
*/
1185-
private function getOrderRepository()
1186-
{
1187-
if ($this->orderRepository === null) {
1188-
$this->orderRepository = ObjectManager::getInstance()
1189-
->get(OrderRepositoryInterface::class);
1190-
}
1191-
1192-
return $this->orderRepository;
1193-
}
11941167
}

0 commit comments

Comments
 (0)