Payment Failure

This commit is contained in:
David Bomba 2021-10-13 18:56:10 +11:00
parent 2b20d079ba
commit fc276970a0
2 changed files with 2 additions and 2 deletions

View File

@ -62,7 +62,7 @@ class ClientPaymentFailureObject
/* Init a new copy of the translator*/
$t = app('translator');
/* Set the locale*/
App::setLocale($this->company->getLocale());
App::setLocale($this->client->locale());
/* Set customized translations _NOW_ */
$t->replace(Ninja::transformTranslations($this->company->settings));

View File

@ -378,7 +378,7 @@ class BaseDriver extends AbstractPaymentDriver
$this->payment_hash
);
if (!is_null($this->payment_hash)) {
if ($this->payment_hash && is_array($this->payment_hash->invoices())) {
$nmo = new NinjaMailerObject;
$nmo->mailable = new NinjaMailer((new ClientPaymentFailureObject($gateway->client, $error, $gateway->client->company, $this->payment_hash))->build());