This commit is contained in:
2025-02-03 01:45:28 +05:00
parent b79be739fe
commit a14a99b04a
2 changed files with 13 additions and 2 deletions

View File

@@ -6,6 +6,7 @@ use App\Modules\VisaMasterPaymentOrder\Models\VisaMasterPaymentOrder;
use App\Nova\Resources\Branch\Branch; use App\Nova\Resources\Branch\Branch;
use App\Repos\Order\OrderRepo; use App\Repos\Order\OrderRepo;
use App\Repos\System\Settings\Location\RegionRepo; use App\Repos\System\Settings\Location\RegionRepo;
use Closure;
use Laravel\Nova\Fields\Badge; use Laravel\Nova\Fields\Badge;
use Laravel\Nova\Fields\BelongsTo; use Laravel\Nova\Fields\BelongsTo;
use Laravel\Nova\Fields\DateTime; use Laravel\Nova\Fields\DateTime;
@@ -61,6 +62,18 @@ class VisaMasterPaymentOrderFieldsForIndex
->withIcons() ->withIcons()
->icons(OrderRepo::statusIcons()) ->icons(OrderRepo::statusIcons())
->sortable(), ->sortable(),
Text::make(__('Paid'), static::paidField()),
]; ];
} }
/**
* Paid field
*/
public static function paidField(): Closure
{
return function () {
return 'OK';
};
}
} }

View File

@@ -200,8 +200,6 @@ class MakeSberPaymentAction extends Action
$orderNumber = $onlinePaymentRepo->generateOrderNumber($resource); $orderNumber = $onlinePaymentRepo->generateOrderNumber($resource);
info(['userName' => $resource->branch->billing_sber_username, 'password' => $resource->branch->billing_sber_password]);
$paymentResponse = Http::get('https://mpi.gov.tm/payment/rest/register.do', [ $paymentResponse = Http::get('https://mpi.gov.tm/payment/rest/register.do', [
'orderNumber' => $orderNumber, 'orderNumber' => $orderNumber,
'amount' => number_format($amount, 2, '', ''), 'amount' => number_format($amount, 2, '', ''),