wip
This commit is contained in:
@@ -38,6 +38,12 @@ class MakePaymentNovaVisaMaster extends Action
|
|||||||
*/
|
*/
|
||||||
public function handle(ActionFields $fields, Collection $models)
|
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();
|
$resource = $models->first();
|
||||||
|
|
||||||
if (! $resource->branch || ! $resource->branch->billing_visa_master_username) {
|
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');
|
$usd_to_tmt = CurrencyRate::where('currency_from', 'USD')->where('currency_to', 'TMT')->first('value');
|
||||||
|
|
||||||
if ($usd_to_tmt) {
|
if (! $usd_to_tmt) {
|
||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user