This commit is contained in:
David Bomba 2021-04-06 19:07:21 +10:00
parent fcac89a92c
commit db5e896e46
4 changed files with 12 additions and 12 deletions

View File

@ -1 +1 @@
5.1.34
5.1.35

View File

@ -38,7 +38,7 @@ class PaymentFailureMailer implements ShouldQueue
public $company;
public $payment_hash;
public $amount;
public $settings;
@ -50,7 +50,7 @@ class PaymentFailureMailer implements ShouldQueue
* @param $company
* @param $amount
*/
public function __construct($client, $error, $company, $payment_hash)
public function __construct($client, $error, $company, $amount)
{
$this->company = $company;
@ -58,7 +58,7 @@ class PaymentFailureMailer implements ShouldQueue
$this->client = $client;
$this->payment_hash = $payment_hash;
$this->amount = $amount;
$this->company = $company;
@ -86,7 +86,7 @@ class PaymentFailureMailer implements ShouldQueue
if (($key = array_search('mail', $methods)) !== false) {
unset($methods[$key]);
$mail_obj = (new PaymentFailureObject($this->client, $this->error, $this->company, $this->payment_hash))->build();
$mail_obj = (new PaymentFailureObject($this->client, $this->error, $this->company, $this->amount))->build();
$nmo = new NinjaMailerObject;
$nmo->mailable = new NinjaMailer($mail_obj);

View File

@ -26,9 +26,9 @@ class PaymentFailureObject
public $company;
public $payment_hash;
public $amount;
private $invoices;
// private $invoices;
/**
* Create a new job instance.
@ -38,7 +38,7 @@ class PaymentFailureObject
* @param $company
* @param $amount
*/
public function __construct($client, $error, $company, $payment_hash)
public function __construct($client, $error, $company, $amount)
{
$this->client = $client;
@ -46,7 +46,7 @@ class PaymentFailureObject
$this->company = $company;
$this->payment_hash = $payment_hash;
$this->amount = $amount;
$this->company = $company;
@ -55,7 +55,7 @@ class PaymentFailureObject
public function build()
{
$this->invoices = Invoice::whereIn('id', $this->transformKeys(array_column($this->payment_hash->invoices(), 'invoice_id')))->get();
// $this->invoices = Invoice::whereIn('id', $this->transformKeys(array_column($this->payment_hash->invoices(), 'invoice_id')))->get();
$mail_obj = new stdClass;
$mail_obj->amount = $this->getAmount();
@ -70,7 +70,7 @@ class PaymentFailureObject
private function getAmount()
{
return array_sum(array_column($this->payment_hash->invoices(), 'amount')) + $this->payment_hash->fee_total;
return $this->amount;
}

View File

@ -14,7 +14,7 @@ return [
'require_https' => env('REQUIRE_HTTPS', true),
'app_url' => rtrim(env('APP_URL', ''), '/'),
'app_domain' => env('APP_DOMAIN', ''),
'app_version' => '5.1.34',
'app_version' => '5.1.35',
'minimum_client_version' => '5.0.16',
'terms_version' => '1.0.1',
'api_secret' => env('API_SECRET', false),