<?php
//Obfuscated by YAK Pro - Php Obfuscator 2.0.13 at 2025-05-27 11:01:56
 namespace App\Http\Controllers\Admin; use App\Http\Controllers\Controller; use Illuminate\Http\Request; use Illuminate\Support\Arr; use App\Http\Resources\Admin\PaymentResource; use App\Helpers\Helper; use App\Payment; use Validator; class PaymentController extends Controller { const ITEM_PER_PAGE = 100; public function index(Request $request) { goto eUAAb; LkhCG: $gW0mT = Arr::get($IET8I, "\x69\144", ''); $tkGYe = Arr::get($IET8I, "\x6b\145\x79\167\157\162\x64", ''); $swbSG = Arr::get($IET8I, "\x73\164\141\164\165\163", ''); goto MjqTP; eUAAb: $IET8I = $request->all(); $iMHvY = Payment::notDeleted(); $REFft = Arr::get($IET8I, "\x6c\x69\x6d\151\164", static::ITEM_PER_PAGE); goto LkhCG; qeZEi: if (!($swbSG != '')) { goto fHcrJ; } $iMHvY->where("\x73\x74\x61\x74\165\x73", $swbSG); fHcrJ: goto X0QO4; zOMcd: if (empty($tkGYe)) { goto l4XG8; } $iMHvY->where("\x63\x6f\x64\145", "\x4c\111\113\x45", "\x25" . $tkGYe . "\x25"); l4XG8: goto qeZEi; MjqTP: if (empty($gW0mT)) { goto X3GYj; } $iMHvY->where("\x69\144", $gW0mT); X3GYj: goto zOMcd; X0QO4: $iMHvY->orderBy("\x69\x64", "\x44\105\x53\x43"); return PaymentResource::collection($iMHvY->paginate($REFft)); goto AlyeG; AlyeG: } public function all(Request $request) { $IET8I = $request->all(); $REFft = Arr::get($IET8I, "\154\151\x6d\x69\x74", static::ITEM_PER_PAGE); $iMHvY = Payment::select("\151\144", "\156\x61\x6d\145", "\163\154\x75\x67")->notDeleted()->orderBy("\151\144"); return PaymentResource::collection($iMHvY->paginate($REFft)); } public function available(Request $request) { goto E0XSq; E0XSq: $R0Pin = Arr::get($request->all(), "\x69\147\x6e\157\x72\145\111\144", ''); $iMHvY = Payment::select("\x69\144", "\x6e\141\155\145")->isPublished(); if (!($R0Pin != null && $R0Pin != '')) { goto WdJIE; } goto ju1gs; AJySL: return PaymentResource::collection($iMHvY->get()); goto mgdvB; ju1gs: $iMHvY->where("\151\x64", "\41\75", $R0Pin); WdJIE: $iMHvY->orderBy("\x69\x64"); goto AJySL; mgdvB: } public function show($gW0mT = 0) { $i1Kib = Payment::notDeleted()->where("\x69\144", $gW0mT)->first(); if (isset($i1Kib)) { goto bNeKA; } return response()->json(["\x65\162\162\x6f\162\163" => "\x50\x61\x79\155\x65\156\x74\40\151\x73\40\x6e\157\164\40\166\141\x6c\x69\x64"], 403); bNeKA: return new PaymentResource($i1Kib); } public function update(Request $request, $gW0mT = 0) { goto voKgy; PPF5f: wWvXY: $i1Kib = Payment::notDeleted()->where("\151\144", $gW0mT)->first(); if (isset($i1Kib)) { goto YG1BQ; } goto qPNtM; l7Py3: $vFb0d = $params["\160\x61\x72\145\x6e\x74\x5f\x69\144"][array_key_last($params["\x70\141\162\145\x6e\164\137\x69\144"])]; tkkgC: $i1Kib->update(["\x6e\x61\155\145" => $params["\156\x61\155\x65"], "\163\x6c\x75\147" => Helper::slug($S2Vrm), "\x70\141\x72\x65\156\x74\137\151\144" => $vFb0d, "\151\x6d\x61\x67\145" => $params["\x69\x6d\141\147\145"], "\x73\x75\x62\137\164\151\x74\154\x65" => $params["\163\x75\142\x5f\x74\x69\x74\154\145"], "\x67\x72\157\x75\x70" => $params["\x67\162\157\x75\160"], "\144\x65\x73\143\162\151\x70\x74\151\157\156" => $params["\144\145\163\x63\162\151\x70\164\x69\x6f\156"], "\x69\163\137\x61\x63\x74\151\166\x61\164\145\x64" => $params["\151\x73\x5f\141\x63\164\x69\x76\141\x74\145\x64"] === true ? 1 : 0, "\165\160\144\x61\164\x65\144\x5f\141\x74" => date("\131\55\155\x2d\x64\x20\110\72\x69\x3a\163")]); goto qTga9; qTga9: return response()->json(null, 204); goto P95Qh; voKgy: $OwlEY = Validator::make($request->all(), ["\x6e\x61\155\x65" => ["\x72\x65\x71\165\x69\162\x65\144"], "\x69\x73\x5f\x61\x63\x74\151\x76\141\164\x65\x64" => ["\x72\x65\161\165\x69\162\145\144"]]); if (!$OwlEY->fails()) { goto wWvXY; } return response()->json(["\x65\162\162\x6f\x72\163" => $OwlEY->errors()], 403); goto PPF5f; qPNtM: return response()->json(["\145\162\162\157\x72\163" => "\x50\x61\x79\x6d\145\156\164\x20\151\163\x20\x6e\157\x74\x20\166\141\154\151\144"], 403); YG1BQ: $params = $request->all(); goto FTFa0; Sr8yG: ppXEf: $vFb0d = 0; if (!(is_array($params["\160\x61\x72\145\156\x74\x5f\151\x64"]) && isset($params["\160\x61\x72\145\x6e\164\x5f\x69\x64"][array_key_last($params["\x70\x61\162\x65\x6e\164\137\151\x64"])]))) { goto tkkgC; } goto l7Py3; FTFa0: $S2Vrm = $params["\163\154\165\147"]; if (!($S2Vrm == null || $S2Vrm == '')) { goto ppXEf; } $S2Vrm = Helper::slug($params["\156\141\x6d\x65"]); goto Sr8yG; P95Qh: } public function destroy($gW0mT = 0) { $i1Kib = Payment::notDeleted()->where("\151\x64", $gW0mT)->first(); if (isset($i1Kib)) { goto G4JBH; } response()->json(["\x65\162\x72\157\162" => "\105\150\150\150\x21\x20\103\x61\x6e\x20\156\x6f\164\x20\x64\x65\154\145\x74\145\40\164\150\x69\163\x20\x50\x61\x79\155\x65\156\164"], 403); G4JBH: try { $i1Kib->update(["\x69\x73\137\144\x65\x6c\x65\x74\x65\144" => true]); } catch (\Exception $ZYUu_) { response()->json(["\x65\162\x72\157\162" => $ZYUu_->getMessage()], 403); } return response()->json(null, 204); } public function destroyMultiple(Request $request) { goto npRk4; kzT_f: LORdN: $hPfc1 = $request->get("\x69\x64\x73", []); $rQ2G3 = Payment::notDeleted()->whereIn("\x69\x64", $hPfc1)->get(); goto bNs3c; npRk4: $OwlEY = Validator::make($request->all(), ["\x69\x64\x73" => "\x72\x65\161\165\151\x72\145\144"]); if (!$OwlEY->fails()) { goto LORdN; } return response()->json(["\145\x72\162\157\x72\163" => $OwlEY->errors()], 403); goto kzT_f; bNs3c: if (!($rQ2G3->count() <= 0)) { goto Eldf8; } response()->json(["\145\162\162\157\x72" => "\120\141\x79\155\x65\x6e\x74\x20\x69\x73\40\156\x6f\x74\x20\166\141\x6c\151\144\56"], 403); Eldf8: goto zkMUy; zkMUy: try { Payment::notDeleted()->whereIn("\151\x64", $hPfc1)->update(["\x69\163\x5f\x64\145\x6c\145\164\145\x64" => true]); } catch (\Exception $ZYUu_) { response()->json(["\x65\x72\x72\x6f\x72" => $ZYUu_->getMessage()], 403); } return response()->json(null, 204); goto lntA0; lntA0: } public function activateMultiple(Request $request) { goto WNR6_; WNR6_: $OwlEY = Validator::make($request->all(), ["\151\144\163" => "\162\145\x71\x75\x69\x72\145\x64"]); if (!$OwlEY->fails()) { goto Nl2Vb; } return response()->json(["\145\162\162\157\x72\x73" => $OwlEY->errors()], 403); goto FjL1z; yTB2h: if (!($rQ2G3->count() <= 0)) { goto BX5w0; } response()->json(["\x65\162\162\157\x72" => "\x50\x61\171\x6d\x65\156\x74\x20\x69\163\40\156\157\x74\40\166\141\x6c\x69\144\x2e"], 403); BX5w0: goto qsxDg; FjL1z: Nl2Vb: $hPfc1 = $request->get("\151\144\163", []); $rQ2G3 = Payment::notDeleted()->whereIn("\151\x64", $hPfc1)->get(); goto yTB2h; qsxDg: try { Payment::notDeleted()->whereIn("\x69\x64", $hPfc1)->update(["\151\x73\x5f\141\143\164\x69\x76\x61\164\145\144" => true]); } catch (\Exception $ZYUu_) { response()->json(["\x65\x72\x72\x6f\162" => $ZYUu_->getMessage()], 403); } return response()->json(null, 204); goto MTBzH; MTBzH: } public function deactivateMultiple(Request $request) { goto UxXSn; Cqxy3: if (!($rQ2G3->count() <= 0)) { goto jaxf8; } response()->json(["\x65\x72\162\157\x72" => "\120\141\171\x6d\x65\x6e\164\x20\151\x73\x20\156\157\x74\x20\x76\x61\x6c\151\144\x2e"], 403); jaxf8: goto pwBqs; JlZOC: ZZHGV: $hPfc1 = $request->get("\151\144\163", []); $rQ2G3 = Payment::notDeleted()->whereIn("\151\144", $hPfc1)->get(); goto Cqxy3; pwBqs: try { Payment::notDeleted()->whereIn("\x69\x64", $hPfc1)->update(["\151\x73\x5f\141\143\164\151\x76\x61\164\x65\144" => false]); } catch (\Exception $ZYUu_) { response()->json(["\145\x72\x72\x6f\162" => $ZYUu_->getMessage()], 403); } return response()->json(null, 204); goto urx8l; UxXSn: $OwlEY = Validator::make($request->all(), ["\151\x64\x73" => "\162\x65\161\165\151\x72\145\x64"]); if (!$OwlEY->fails()) { goto ZZHGV; } return response()->json(["\145\162\162\157\162\x73" => $OwlEY->errors()], 403); goto JlZOC; urx8l: } }