|
|
@@ -15,6 +15,8 @@ class MailMailjetNotification extends SovMailMailjetNotification |
|
|
|
{ |
|
|
|
protected MerchantResolver $merchantResolver; |
|
|
|
|
|
|
|
const MERCHANT = 'merchant'; |
|
|
|
|
|
|
|
public function __construct( |
|
|
|
MailjetTransport $mailjetTransport, |
|
|
|
Environment $templating, |
|
|
@@ -29,10 +31,10 @@ class MailMailjetNotification extends SovMailMailjetNotification |
|
|
|
|
|
|
|
public function send($params = []) |
|
|
|
{ |
|
|
|
$merchantCurrent = $this->merchantResolver->getCurrent(); |
|
|
|
$merchant = isset($params[self::MERCHANT]) ? $params[self::MERCHANT] : $this->merchantResolver->getCurrent(); |
|
|
|
|
|
|
|
$merchantConfigEmailFrom = $this->settingSolver->getSettingValue( |
|
|
|
$merchantCurrent, |
|
|
|
$merchant, |
|
|
|
MerchantSettingDefinition::SETTING_EMAIL_FROM |
|
|
|
); |
|
|
|
$emailFrom = (isset($params[self::FROM_EMAIL]) && $params[self::FROM_EMAIL] && strlen( |
|
|
@@ -40,13 +42,13 @@ class MailMailjetNotification extends SovMailMailjetNotification |
|
|
|
)) ? $params[self::FROM_EMAIL] : $merchantConfigEmailFrom; |
|
|
|
|
|
|
|
$merchantConfigEmailFromName = $this->settingSolver->getSettingValue( |
|
|
|
$merchantCurrent, |
|
|
|
$merchant, |
|
|
|
MerchantSettingDefinition::SETTING_EMAIL_FROM_NAME |
|
|
|
); |
|
|
|
$emailFromName = isset($params[self::FROM_NAME]) ? $params[self::FROM_NAME] : $merchantConfigEmailFromName; |
|
|
|
|
|
|
|
$merchantConfigEmailSubjectPrefix = $this->settingSolver->getSettingValue( |
|
|
|
$merchantCurrent, |
|
|
|
$merchant, |
|
|
|
MerchantSettingDefinition::SETTING_EMAIL_SUBJECT_PREFIX |
|
|
|
); |
|
|
|
$emailSubjectPrefix = isset($params[self::SUBJECT_PREFIX]) ? $params[self::SUBJECT_PREFIX] : $merchantConfigEmailSubjectPrefix; |