mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Refund payment receipts
This commit is contained in:
parent
c56a9688e8
commit
c1bf578658
@ -83,8 +83,8 @@ class EmailRefundPayment implements ShouldQueue
|
|||||||
App::setLocale($this->contact->preferredLocale());
|
App::setLocale($this->contact->preferredLocale());
|
||||||
$t->replace(Ninja::transformTranslations($this->settings));
|
$t->replace(Ninja::transformTranslations($this->settings));
|
||||||
|
|
||||||
$template_data['body'] = '';
|
$template_data['body'] = ctrans('texts.refunded_payment') . ' $amount <br><br>$invoices';
|
||||||
$template_data['subject'] = '';
|
$template_data['subject'] = ctrans('texts.refunded_payment');
|
||||||
|
|
||||||
$email_builder = (new PaymentEmailEngine($this->payment, $this->contact, $template_data))->build();
|
$email_builder = (new PaymentEmailEngine($this->payment, $this->contact, $template_data))->build();
|
||||||
|
|
||||||
|
@ -15,6 +15,7 @@ use App\Exceptions\PaymentRefundFailed;
|
|||||||
use App\Factory\CreditFactory;
|
use App\Factory\CreditFactory;
|
||||||
use App\Factory\InvoiceItemFactory;
|
use App\Factory\InvoiceItemFactory;
|
||||||
use App\Jobs\Ninja\TransactionLog;
|
use App\Jobs\Ninja\TransactionLog;
|
||||||
|
use App\Jobs\Payment\EmailRefundPayment;
|
||||||
use App\Models\Activity;
|
use App\Models\Activity;
|
||||||
use App\Models\Credit;
|
use App\Models\Credit;
|
||||||
use App\Models\Invoice;
|
use App\Models\Invoice;
|
||||||
@ -66,7 +67,10 @@ class RefundPayment
|
|||||||
|
|
||||||
|
|
||||||
if(array_key_exists('email_receipt', $this->refund_data) && $this->refund_data['email_receipt'] == 'true'){
|
if(array_key_exists('email_receipt', $this->refund_data) && $this->refund_data['email_receipt'] == 'true'){
|
||||||
// $this->payment->service()->sendEmail();
|
|
||||||
|
$contact = $this->payment->client->contacts()->whereNotNull('email')->first();
|
||||||
|
EmailRefundPayment::dispatch($this->payment, $this->payment->company, $contact);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$transaction = [
|
$transaction = [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user