コード例 #1
0
 /**
  * Send the confirmation message only if the order is paid.
  *
  * @param OrderEvent $event
  */
 public function checkSendOrderConfirmationMessageToCustomer(OrderEvent $event)
 {
     if (Paybox::getConfigValue('send_confirmation_email_on_successful_payment', false)) {
         $paybox = new Paybox();
         if ($paybox->isPaymentModuleFor($event->getOrder())) {
             if (!$event->getOrder()->isPaid()) {
                 $event->stopPropagation();
             }
         }
     }
 }