Changeset View
Changeset View
Standalone View
Standalone View
src/app/Jobs/PaymentEmail.php
Show First 20 Lines • Show All 74 Lines • ▼ Show 20 Lines | public function handle() | ||||
$mail = new \App\Mail\PaymentFailure($this->payment, $this->controller); | $mail = new \App\Mail\PaymentFailure($this->payment, $this->controller); | ||||
$label = "Failure"; | $label = "Failure"; | ||||
} else { | } else { | ||||
return; | return; | ||||
} | } | ||||
list($to, $cc) = \App\Mail\Helper::userEmails($this->controller); | list($to, $cc) = \App\Mail\Helper::userEmails($this->controller); | ||||
if (!empty($to)) { | if (!empty($to) || !empty($cc)) { | ||||
$params = [ | $params = [ | ||||
'to' => $to, | 'to' => $to, | ||||
'cc' => $cc, | 'cc' => $cc, | ||||
'add' => " for {$wallet->id}", | 'add' => " for {$wallet->id}", | ||||
]; | ]; | ||||
\App\Mail\Helper::sendMail($mail, $this->controller->tenant_id, $params); | \App\Mail\Helper::sendMail($mail, $this->controller->tenant_id, $params); | ||||
} | } | ||||
Show All 11 Lines |