From 377acc18cf81532b3b9c8c8c7a4d8a6d2d73fe66 Mon Sep 17 00:00:00 2001 From: Nurmuhammet Allanov Date: Fri, 13 Mar 2026 14:48:03 +0500 Subject: [PATCH] wip --- .../Controllers/OnlinePaymentController.php | 26 ----- .../Resources/Warnings/IgnoreSberPayment.php | 96 +++++++++++++++++++ .../Resources/Warnings/IgnoreVisaPayment.php | 96 +++++++++++++++++++ 3 files changed, 192 insertions(+), 26 deletions(-) create mode 100644 app/Nova/Resources/Warnings/IgnoreSberPayment.php create mode 100644 app/Nova/Resources/Warnings/IgnoreVisaPayment.php diff --git a/app/Http/Controllers/OnlinePaymentController.php b/app/Http/Controllers/OnlinePaymentController.php index 08ef71e..1ee7da3 100644 --- a/app/Http/Controllers/OnlinePaymentController.php +++ b/app/Http/Controllers/OnlinePaymentController.php @@ -25,23 +25,6 @@ class OnlinePaymentController extends Controller { $data = OnlinePaymentRepo::checkPaymentVisaMaster($request); - /** @var \App\Models\Payment\OnlinePaymentHistory */ - // $paymentHistory = $data['paymentHistory']; - - // /** @var \App\Models\Branch\Branch */ - // $bank = $data['bank_branch']; - - // /** @var \App\Modules\VisaMasterPaymentOrder\Models\VisaMasterPaymentOrderItem */ - // $resource = $data['resource']; - - // if ($data['success'] === true) { - // OnlinePaymentRepo::syncWithBilling( - // uuid: $request->orderId, - // bank_code: $bank->unique_code, - // terminal_id: - // ); - // } - return view(OnlinePaymentRepo::statusView(), $data); } @@ -52,15 +35,6 @@ class OnlinePaymentController extends Controller { $data = OnlinePaymentRepo::checkPaymentSber($request); - // /** @var \App\Models\Payment\OnlinePaymentHistory */ - // $paymentHistory = $data['paymentHistory']; - - // /** @var \App\Models\Branch\Branch */ - // $bank = $data['bank_branch']; - - // /** @var \App\Modules\SberPaymentOrder\Models\SberPaymentOrderItem */ - // $resource = $data['resource']; - return view(OnlinePaymentRepo::statusView(), $data); } } diff --git a/app/Nova/Resources/Warnings/IgnoreSberPayment.php b/app/Nova/Resources/Warnings/IgnoreSberPayment.php new file mode 100644 index 0000000..13d3cb9 --- /dev/null +++ b/app/Nova/Resources/Warnings/IgnoreSberPayment.php @@ -0,0 +1,96 @@ + + */ + public static $model = \App\Models\Resources\Warnings\IgnoreSberPayment::class; + + /** + * The single value that should be used to represent the resource when being displayed. + * + * @var string + */ + public static $title = 'id'; + + /** + * The columns that should be searched. + * + * @var array + */ + public static $search = [ + 'id', + ]; + + /** + * Get the fields displayed by the resource. + * + * @param \Laravel\Nova\Http\Requests\NovaRequest $request + * @return array + */ + public function fields(NovaRequest $request) + { + return [ + ID::make()->sortable(), + + Text::make('message'), + Number::make('payment_id'), + ]; + } + + /** + * Get the cards available for the request. + * + * @param \Laravel\Nova\Http\Requests\NovaRequest $request + * @return array + */ + public function cards(NovaRequest $request) + { + return []; + } + + /** + * Get the filters available for the resource. + * + * @param \Laravel\Nova\Http\Requests\NovaRequest $request + * @return array + */ + public function filters(NovaRequest $request) + { + return []; + } + + /** + * Get the lenses available for the resource. + * + * @param \Laravel\Nova\Http\Requests\NovaRequest $request + * @return array + */ + public function lenses(NovaRequest $request) + { + return []; + } + + /** + * Get the actions available for the resource. + * + * @param \Laravel\Nova\Http\Requests\NovaRequest $request + * @return array + */ + public function actions(NovaRequest $request) + { + return []; + } +} diff --git a/app/Nova/Resources/Warnings/IgnoreVisaPayment.php b/app/Nova/Resources/Warnings/IgnoreVisaPayment.php new file mode 100644 index 0000000..76eb0ae --- /dev/null +++ b/app/Nova/Resources/Warnings/IgnoreVisaPayment.php @@ -0,0 +1,96 @@ + + */ + public static $model = \App\Models\Resources\Warnings\IgnoreVisaPayment::class; + + /** + * The single value that should be used to represent the resource when being displayed. + * + * @var string + */ + public static $title = 'id'; + + /** + * The columns that should be searched. + * + * @var array + */ + public static $search = [ + 'id', + ]; + + /** + * Get the fields displayed by the resource. + * + * @param \Laravel\Nova\Http\Requests\NovaRequest $request + * @return array + */ + public function fields(NovaRequest $request) + { + return [ + ID::make()->sortable(), + + Text::make('message'), + Number::make('payment_id'), + ]; + } + + /** + * Get the cards available for the request. + * + * @param \Laravel\Nova\Http\Requests\NovaRequest $request + * @return array + */ + public function cards(NovaRequest $request) + { + return []; + } + + /** + * Get the filters available for the resource. + * + * @param \Laravel\Nova\Http\Requests\NovaRequest $request + * @return array + */ + public function filters(NovaRequest $request) + { + return []; + } + + /** + * Get the lenses available for the resource. + * + * @param \Laravel\Nova\Http\Requests\NovaRequest $request + * @return array + */ + public function lenses(NovaRequest $request) + { + return []; + } + + /** + * Get the actions available for the resource. + * + * @param \Laravel\Nova\Http\Requests\NovaRequest $request + * @return array + */ + public function actions(NovaRequest $request) + { + return []; + } +}