Skip to content

Commit

Permalink
qenta-cee#46 Prevent duplicate order confirmation emails
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Heilmann authored Nov 30, 2018
1 parent 42d8cf0 commit 899c7dc
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions Model/OrderManagement.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,6 @@ class OrderManagement
*/
protected $_transactionBuilder;

/**
* @var \Magento\Sales\Model\Order\Email\Sender\OrderSender;
*/
protected $_orderSender;

/**
* @var \Magento\Sales\Model\Order\Payment\Transaction\Repository
*/
Expand Down Expand Up @@ -88,7 +83,6 @@ public function __construct(
\Psr\Log\LoggerInterface $logger,
\Wirecard\CheckoutPage\Helper\Data $helper,
\Magento\Sales\Model\Order\Payment\Transaction\BuilderInterface $transactionBuilder,
\Magento\Sales\Model\Order\Email\Sender\OrderSender $orderSender,
\Magento\Sales\Api\TransactionRepositoryInterface $transactionRepository,
\Magento\Quote\Api\CartManagementInterface $quoteManagement,
\Magento\Quote\Api\CartRepositoryInterface $quoteRepository,
Expand All @@ -97,7 +91,6 @@ public function __construct(
$this->_logger = $logger;
$this->_dataHelper = $helper;
$this->_transactionRepository = $transactionRepository;
$this->_orderSender = $orderSender;
$this->_transactionBuilder = $transactionBuilder;
$this->_quoteManagement = $quoteManagement;
$this->_objectManager = $objectManager;
Expand Down Expand Up @@ -387,8 +380,6 @@ public function confirmOrder($order, $return, $fraudDetected)

$order->addRelatedObject($invoice);
}

$this->_orderSender->send($order);
}

$type = $doCapture ? Transaction::TYPE_CAPTURE : Transaction::TYPE_AUTH;
Expand Down Expand Up @@ -447,4 +438,4 @@ function saveTransaction(
return $transaction;
}

}
}

0 comments on commit 899c7dc

Please sign in to comment.