From 6be2828abf4690e082e0f67b9f5aee7e0e3181ff Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 8 Aug 2022 07:54:31 +1000 Subject: [PATCH] Minor fixes --- app/Jobs/Mail/PaymentFailedMailer.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/app/Jobs/Mail/PaymentFailedMailer.php b/app/Jobs/Mail/PaymentFailedMailer.php index 9fb6b53d31f3..6b09f5f80845 100644 --- a/app/Jobs/Mail/PaymentFailedMailer.php +++ b/app/Jobs/Mail/PaymentFailedMailer.php @@ -41,7 +41,7 @@ class PaymentFailedMailer implements ShouldQueue public ?PaymentHash $payment_hash; - public string $error; + public $error; public Company $company; @@ -55,7 +55,7 @@ class PaymentFailedMailer implements ShouldQueue * @param $company * @param $amount */ - public function __construct(?PaymentHash $payment_hash, Company $company, Client $client, string $error) + public function __construct(?PaymentHash $payment_hash, Company $company, Client $client, $error) { $this->payment_hash = $payment_hash; $this->client = $client; @@ -70,6 +70,10 @@ class PaymentFailedMailer implements ShouldQueue */ public function handle() { + if(!is_string($this->error)){ + $this->error = "Payment failed, no reason given."; + } + //Set DB MultiDB::setDb($this->company->db); App::setLocale($this->client->locale());