mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fix for auto-bill failure emails
This commit is contained in:
parent
a3f43a09e7
commit
3e035410dd
@ -11,6 +11,7 @@ use App\Ninja\Datatables\PaymentDatatable;
|
|||||||
use App\Ninja\Repositories\AccountRepository;
|
use App\Ninja\Repositories\AccountRepository;
|
||||||
use App\Ninja\Repositories\PaymentRepository;
|
use App\Ninja\Repositories\PaymentRepository;
|
||||||
use Auth;
|
use Auth;
|
||||||
|
use App;
|
||||||
use Exception;
|
use Exception;
|
||||||
use Utils;
|
use Utils;
|
||||||
|
|
||||||
@ -141,7 +142,7 @@ class PaymentService extends BaseService
|
|||||||
$message = sprintf('%s: %s', ucwords($paymentDriver->providerName()), $exception->getMessage());
|
$message = sprintf('%s: %s', ucwords($paymentDriver->providerName()), $exception->getMessage());
|
||||||
//$message .= $exception->getTraceAsString();
|
//$message .= $exception->getTraceAsString();
|
||||||
Utils::logError($message, 'PHP', true);
|
Utils::logError($message, 'PHP', true);
|
||||||
if (! Auth::check()) {
|
if (App::runningInConsole()) {
|
||||||
$mailer = app('App\Ninja\Mailers\UserMailer');
|
$mailer = app('App\Ninja\Mailers\UserMailer');
|
||||||
$mailer->sendMessage($invoice->user, $subject, $message, [
|
$mailer->sendMessage($invoice->user, $subject, $message, [
|
||||||
'invoice' => $invoice
|
'invoice' => $invoice
|
||||||
|
Loading…
x
Reference in New Issue
Block a user