This commit is contained in:
2024-11-25 22:18:15 +05:00
parent a7d3f47e04
commit d060432c7f

View File

@@ -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(<<<HTML
<div class="w-full border text-left appearance-none rounded text-sm font-bold focus:outline-none focus:ring ring-primary-200 dark:ring-gray-600 relative inline-flex items-center justify-center shadow h-9 px-3 bg-primary-500 border-primary-500 text-white dark:text-gray-900">
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" class="stroke-current shrink-0 w-6 h-6 mr-2">
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"></path>
</svg>
<span>$payment_warning_text->value</span>
</div>
HTML))->asHtml(),
];
}