This commit is contained in:
2024-10-14 14:08:27 +05:00
parent ce2ed6ad0d
commit e77d30d1df

View File

@@ -38,6 +38,12 @@ class MakePaymentNovaVisaMaster extends Action
*/
public function handle(ActionFields $fields, Collection $models)
{
$usd_to_tmt = CurrencyRate::where('currency_from', 'USD')->where('currency_to', 'TMT')->first('value');
if (! $usd_to_tmt) {
return ActionResponse::danger('Walýuta hasaby girizilmedik, operator bilen habarlaşmagyňyzy haýyş edýärin.');
}
$resource = $models->first();
if (! $resource->branch || ! $resource->branch->billing_visa_master_username) {
@@ -61,7 +67,7 @@ class MakePaymentNovaVisaMaster extends Action
{
$usd_to_tmt = CurrencyRate::where('currency_from', 'USD')->where('currency_to', 'TMT')->first('value');
if ($usd_to_tmt) {
if (! $usd_to_tmt) {
return [];
}