本文整理汇总了PHP中Magento\Sales\Model\Order::getEmailSent方法的典型用法代码示例。如果您正苦于以下问题:PHP Order::getEmailSent方法的具体用法?PHP Order::getEmailSent怎么用?PHP Order::getEmailSent使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Magento\Sales\Model\Order
的用法示例。
在下文中一共展示了Order::getEmailSent方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: _registerPaymentAuthorization
/**
* Register authorized payment
*
* @return void
*/
protected function _registerPaymentAuthorization()
{
/** @var $payment \Magento\Sales\Model\Order\Payment */
$payment = $this->_order->getPayment();
if ($this->_order->canFetchPaymentReviewUpdate()) {
$payment->update(true);
} else {
$this->_importPaymentInformation();
$payment->setPreparedMessage($this->_createIpnComment(''))->setTransactionId($this->getRequestData('txn_id'))->setParentTransactionId($this->getRequestData('parent_txn_id'))->setCurrencyCode($this->getRequestData('mc_currency'))->setIsTransactionClosed(0)->registerAuthorizationNotification($this->getRequestData('mc_gross'));
}
if (!$this->_order->getEmailSent()) {
$this->orderSender->send($this->_order);
}
$this->_order->save();
}
示例2: _createInvoice
protected function _createInvoice($params)
{
try {
if ($this->_order->canInvoice()) {
$payment = $this->_order->getPayment();
$payment->setTransactionId($params['invoice_id']);
$payment->setCurrencyCode($params['list_currency']);
$payment->setParentTransactionId($params['sale_id']);
$payment->setShouldCloseParentTransaction(true);
$payment->setIsTransactionClosed(0);
$payment->registerCaptureNotification($params['invoice_list_amount'], true);
$this->_order->save();
// notify customer
$invoice = $payment->getCreatedInvoice();
if ($invoice && !$this->_order->getEmailSent()) {
$this->orderSender->send($this->_order);
$this->_order->addStatusHistoryComment(__('You notified customer about invoice #%1.', $invoice->getIncrementId()))->setIsCustomerNotified(true)->save();
}
}
} catch (Exception $e) {
throw new Exception(sprintf('Error Creating Invoice: "%s"', $e->getMessage()));
}
}
示例3: _authorizePayment
/**
* authorize payment
*/
protected function _authorizePayment()
{
$this->_adyenLogger->addAdyenNotificationCronjob('Authorisation of the order');
$fraudManualReviewStatus = $this->_getFraudManualReviewStatus();
// If manual review is active and a seperate status is used then ignore the pre authorized status
if ($this->_fraudManualReview != true || $fraudManualReviewStatus == "") {
$this->_setPrePaymentAuthorized();
} else {
$this->_adyenLogger->addAdyenNotificationCronjob('Ignore the pre authorized status because the order is ' . 'under manual review and use the Manual review status');
}
$this->_prepareInvoice();
$_paymentCode = $this->_paymentMethodCode();
// for boleto confirmation mail is send on order creation
if ($this->_paymentMethod != "adyen_boleto") {
// send order confirmation mail after invoice creation so merchant can add invoicePDF to this mail
if (!$this->_order->getEmailSent()) {
$this->_orderSender->send($this->_order);
$this->_adyenLogger->addAdyenNotificationCronjob('Send orderconfirmation email to shopper');
}
}
if ($this->_paymentMethod == "c_cash" && $this->_getConfigData('create_shipment', 'adyen_cash', $this->_order->getStoreId()) || $this->_getConfigData('create_shipment', 'adyen_pos', $this->_order->getStoreId()) && $_paymentCode == "adyen_pos") {
$this->_createShipment();
}
}