mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Update payment failure mailer to include text template
This commit is contained in:
parent
b0f5c0c43e
commit
f8f094d0a5
@ -75,6 +75,7 @@ class ClientPaymentFailureObject
|
|||||||
$mail_obj->data = $this->getData();
|
$mail_obj->data = $this->getData();
|
||||||
$mail_obj->markdown = 'email.client.generic';
|
$mail_obj->markdown = 'email.client.generic';
|
||||||
$mail_obj->tag = $this->company->company_key;
|
$mail_obj->tag = $this->company->company_key;
|
||||||
|
$mail_obj->text_view = 'email.template.text';
|
||||||
|
|
||||||
return $mail_obj;
|
return $mail_obj;
|
||||||
}
|
}
|
||||||
@ -122,10 +123,13 @@ class ClientPaymentFailureObject
|
|||||||
'button' => ctrans('texts.pay_now'),
|
'button' => ctrans('texts.pay_now'),
|
||||||
'additional_info' => false,
|
'additional_info' => false,
|
||||||
'company' => $this->company,
|
'company' => $this->company,
|
||||||
|
'text_body' => ctrans('texts.client_payment_failure_body', ['invoice' => implode(',', $this->invoices->pluck('number')->toArray()), 'amount' => $this->getAmount()]),
|
||||||
|
'additional_info' => $this->error ?? '',
|
||||||
];
|
];
|
||||||
|
|
||||||
if (strlen($this->error > 1)) {
|
if (strlen($this->error > 1)) {
|
||||||
$data['content'] .= "\n\n".$this->error;
|
// $data['content'] .= "\n\n{$this->error}";
|
||||||
|
$data['text_body'] .= "\n\n".$this->error;
|
||||||
}
|
}
|
||||||
|
|
||||||
return $data;
|
return $data;
|
||||||
|
Loading…
Reference in New Issue
Block a user