From d060432c7f33519e4818b96f58bbc38107f40de3 Mon Sep 17 00:00:00 2001 From: Nurmuhammet Allanov Date: Mon, 25 Nov 2024 22:18:15 +0500 Subject: [PATCH] wip --- app/Nova/Actions/MakeSberPaymentAction.php | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/app/Nova/Actions/MakeSberPaymentAction.php b/app/Nova/Actions/MakeSberPaymentAction.php index 6ab631a..e4e500d 100644 --- a/app/Nova/Actions/MakeSberPaymentAction.php +++ b/app/Nova/Actions/MakeSberPaymentAction.php @@ -6,6 +6,7 @@ use App\Models\CurrencyRate; use App\Models\Payment\OnlinePaymentHistory; use App\Modules\SberPaymentOrder\Models\SberPaymentOrder; use App\Modules\SberPaymentOrder\Models\SberPaymentOrderItem; +use App\Modules\VisaMasterSettings\Models\VisaMasterSettings; use App\Repos\Payment\OnlinePaymentRepo; use Illuminate\Bus\Queueable; use Illuminate\Queue\InteractsWithQueue; @@ -109,7 +110,9 @@ class MakeSberPaymentAction extends Action $usd_to_rub = floatval(CurrencyRate::where('currency_from', 'USD')->where('currency_to', 'RUB')->first('value')?->value); $rub_to_tmt = floatval(CurrencyRate::where('currency_from', 'RUB')->where('currency_to', 'TMT')->first('value')?->value); - if (! $usd_to_tmt || ! $usd_to_rub || ! $rub_to_tmt) { + $payment_warning_text = VisaMasterSettings::where('name', 'sber_payment_warning')->first(); + + if (! $usd_to_tmt || ! $usd_to_rub || ! $rub_to_tmt || ! $payment_warning_text) { return []; } @@ -176,6 +179,15 @@ class MakeSberPaymentAction extends Action $field->setValue(''); } }), + + Heading::make(Blade::render(<< + + + + $payment_warning_text->value + + HTML))->asHtml(), ]; }