mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for payment notifications
This commit is contained in:
parent
9174b7e628
commit
af39d5e50c
@ -53,11 +53,11 @@ class EntityPaidMailer extends BaseMailerJob implements ShouldQueue
|
|||||||
* @param $user
|
* @param $user
|
||||||
* @param $company
|
* @param $company
|
||||||
*/
|
*/
|
||||||
public function __construct($payment, $company)
|
public function __construct($payment, $company, $user)
|
||||||
{
|
{
|
||||||
$this->company = $company;
|
$this->company = $company;
|
||||||
|
|
||||||
$this->user = $payment->user;
|
$this->user = $user;
|
||||||
|
|
||||||
$this->payment = $payment;
|
$this->payment = $payment;
|
||||||
|
|
||||||
@ -84,7 +84,7 @@ class EntityPaidMailer extends BaseMailerJob implements ShouldQueue
|
|||||||
try {
|
try {
|
||||||
|
|
||||||
$mail_obj = (new EntityPaidObject($this->payment))->build();
|
$mail_obj = (new EntityPaidObject($this->payment))->build();
|
||||||
$mail_obj->from = [$this->payment->user->email, $this->payment->user->present()->name()];
|
$mail_obj->from = [$this->user->email, $this->user->present()->name()];
|
||||||
|
|
||||||
//send email
|
//send email
|
||||||
Mail::to($this->user->email)
|
Mail::to($this->user->email)
|
||||||
@ -96,7 +96,7 @@ class EntityPaidMailer extends BaseMailerJob implements ShouldQueue
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (count(Mail::failures()) > 0) {
|
if (count(Mail::failures()) > 0) {
|
||||||
$this->logMailError(Mail::failures(), $this->entity->client);
|
$this->logMailError(Mail::failures(), $this->payment->client);
|
||||||
} else {
|
} else {
|
||||||
// $this->entityEmailSucceeded();
|
// $this->entityEmailSucceeded();
|
||||||
}
|
}
|
||||||
|
@ -63,7 +63,7 @@ class PaymentNotification implements ShouldQueue
|
|||||||
if (($key = array_search('mail', $methods)) !== false) {
|
if (($key = array_search('mail', $methods)) !== false) {
|
||||||
unset($methods[$key]);
|
unset($methods[$key]);
|
||||||
|
|
||||||
EntityPaidMailer::dispatch($payment, $payment->company);
|
EntityPaidMailer::dispatch($payment, $payment->company, $user);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user