Beispiel #1
0
 /**
  * Called after a successful checkout, sends mail, etc.
  */
 protected function handleCompleteCheckout()
 {
     // shop owner notification address
     $notificationAddress = $this->settings->getEmailNotificationAdr();
     if ($notificationAddress == '') {
         throw new \RuntimeException($this->translator->translate('doCheckout.fail'));
     }
     $buyerEmail = $this->checkout->getBuyerEmail();
     $confirmation = $this->createCheckoutConfirmation();
     // send notification email to shop owner
     $this->sendNotificationMail($confirmation, $buyerEmail, $notificationAddress);
     // send confirmation email to buyer
     $this->sendConfirmationMail($confirmation, $buyerEmail, $notificationAddress);
 }