protected function sendOnNewSaleNotificationEmail(Pap_Contexts_Action $context) { if (!$this->isSendingMailNotificationEnabled($context)) { $context->debug('Sending Sale summary mail not enabled. STOPPED'); return; } $mail = new Pap_Mail_SplitCommissionsMerchantOnSale($context->getTransaction()->getSaleId()); $mail->addRecipient(Pap_Common_User::getMerchantEmail()); try { $mail->send(); } catch (Gpf_Exception $e) { $context->debug('Sending Sale summary mail failed, possibly there was no transaction recorded during sale processing. STOPPED'); return; } $context->debug('Sending Sale summary mail sended. Ended'); }
private function insertMailTemplateToDb() { $template = new Pap_Mail_SplitCommissionsMerchantOnSale(); $template->setup(Gpf_Session::getAuthUser()->getAccountId()); }
public function execute() { if (in_array(Pap_Features_SplitCommissions_Definition::CODE ,Gpf_Plugins_Engine::getInstance()->getConfiguration()->getActivePlugins())) { $template = new Pap_Mail_SplitCommissionsMerchantOnSale(); $template->setup(Gpf_Session::getAuthUser()->getAccountId()); } }