mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Minor fixes
This commit is contained in:
parent
15991c9b5b
commit
6be2828abf
@ -41,7 +41,7 @@ class PaymentFailedMailer implements ShouldQueue
|
|||||||
|
|
||||||
public ?PaymentHash $payment_hash;
|
public ?PaymentHash $payment_hash;
|
||||||
|
|
||||||
public string $error;
|
public $error;
|
||||||
|
|
||||||
public Company $company;
|
public Company $company;
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ class PaymentFailedMailer implements ShouldQueue
|
|||||||
* @param $company
|
* @param $company
|
||||||
* @param $amount
|
* @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->payment_hash = $payment_hash;
|
||||||
$this->client = $client;
|
$this->client = $client;
|
||||||
@ -70,6 +70,10 @@ class PaymentFailedMailer implements ShouldQueue
|
|||||||
*/
|
*/
|
||||||
public function handle()
|
public function handle()
|
||||||
{
|
{
|
||||||
|
if(!is_string($this->error)){
|
||||||
|
$this->error = "Payment failed, no reason given.";
|
||||||
|
}
|
||||||
|
|
||||||
//Set DB
|
//Set DB
|
||||||
MultiDB::setDb($this->company->db);
|
MultiDB::setDb($this->company->db);
|
||||||
App::setLocale($this->client->locale());
|
App::setLocale($this->client->locale());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user