From 56d836e3ca07240f5947865f7275956d2db3806e Mon Sep 17 00:00:00 2001 From: David Bomba Date: Fri, 29 Apr 2022 09:45:16 +1000 Subject: [PATCH] Allow the variable to be used with custom payment driver --- app/PaymentDrivers/CustomPaymentDriver.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/PaymentDrivers/CustomPaymentDriver.php b/app/PaymentDrivers/CustomPaymentDriver.php index be18fb6e50a5..55f92e5f8711 100644 --- a/app/PaymentDrivers/CustomPaymentDriver.php +++ b/app/PaymentDrivers/CustomPaymentDriver.php @@ -17,6 +17,7 @@ use App\Models\GatewayType; use App\Models\Invoice; use App\Models\Payment; use App\Utils\HtmlEngine; +use App\Utils\Number; use App\Utils\Traits\MakesHash; /** @@ -66,6 +67,9 @@ class CustomPaymentDriver extends BaseDriver $variables = (new HtmlEngine($invoice->invitations->first()))->generateLabelsAndValues(); } + $variables['values']['$invoices'] = collect($this->payment_hash->invoices())->pluck('invoice_number')->implode(','); + $variables['labels']['$invoices_label'] = ctrans('texts.invoice_number_short'); + $data['title'] = $this->company_gateway->getConfigField('name'); $data['instructions'] = strtr($this->company_gateway->getConfigField('text'), $variables['values']);