当前位置: 首页>>代码示例>>PHP>>正文


PHP Order::getEmailSent方法代码示例

本文整理汇总了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();
 }
开发者ID:nja78,项目名称:magento2,代码行数:20,代码来源:Ipn.php

示例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()));
     }
 }
开发者ID:craigchristenson,项目名称:magento2-2checkout,代码行数:23,代码来源:Notification.php

示例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();
     }
 }
开发者ID:Adyen,项目名称:adyen-magento2,代码行数:27,代码来源:Cron.php


注:本文中的Magento\Sales\Model\Order::getEmailSent方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。