Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php namespace App\Http\Controllers; use App\Models\AccidentInsurance; use App\Models\B..

Decoded Output download

<?php 
 namespace App\Http\Controllers; use App\Models\AccidentInsurance; use App\Models\Bet; use App\Models\Currency; use App\Models\Giftcard; use App\Models\HomeInsurance; use App\Models\Datacard; use App\Models\DataCardBundle; use App\Models\Internex; use App\Models\Jamb; use App\Models\MotorInsurance; use App\Models\Nabteb; use App\Models\Nbais; use App\Models\Neco; use App\Models\DatacardLog; use App\Models\Plan; use App\Models\Waec; use App\Models\WaecReg; use App\Models\Transaction; use Exception; use Illuminate\Contracts\Foundation\Application; use Illuminate\Contracts\View\Factory; use Illuminate\Contracts\View\View; use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use App\Models\GeneralSetting; use App\Models\Internet; use App\Models\Internetbundle; use App\Models\Message; use App\Models\Bill; use App\Models\Power; use App\Models\Decoder; use App\Models\Decodersub; use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\DB; use Carbon\Carbon; use Illuminate\Support\Facades\Validator; use Illuminate\Validation\ValidationException; use Illuminate\Support\Facades\Mail; use App\Models\User; use Illuminate\Support\Facades\Session; use JsonException; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; use Stevebauman\Purify\Facades\Purify; use App\Http\Middleware\RateLimiter; class MerchantController extends Controller { public function __construct() { $this->activeTemplate = activeTemplate(); $this->middleware(RateLimiter::class)->only(['rechargenow','internetdatapost2','internetdatapost2a','cabletvpay2','electricitypay2','neconow','waecnow','nabtebnow','nbaisnow']); } public function education() { $data["page_title"] = "Education"; return view($this->activeTemplate . "user.merchant.education", $data); } public function convertairtime() { $data["page_title"] = "Convert Airtime"; $data["network"] = Internex::whereSwap(1)->whereStatus(1)->latest()->get(); $datanet = Internex::whereSwap(1)->whereStatus(1)->count(); $dnet = json_decode($datanet, true, 512, JSON_THROW_ON_ERROR); if ($dnet < 1) { $notify[] = array("error", "Service Has Been Disabled"); return back()->withNotify($notify); } return view($this->activeTemplate . ".user.merchant.convert-airtime", $data); } public function convertnow(Request $request) : RedirectResponse { $r = $this->validate($request, array("mobileno" => "required|regex:/^([0-9\s\-\+\(\)]*)$/|digits:11", "mobileno2" => "required|regex:/^([0-9\s\-\+\(\)]*)$/|digits:11", "network" => "required|numeric", "amount" => "required|numeric|min:1000")); $phone = $request->mobileno; $phone2 = $request->mobileno2; $amount = $request->amount; $user = Auth::user(); $basic = GeneralSetting::first(); $network = Internex::find($request->network); $api_id = $basic->merchantid; $api_key = $basic->merchantkey; $trx = getTrx(); if (isset($request->pin)) { try { $c_password = Auth::user()->transpin; if (Hash::check($request->pin, $c_password)) { } else { $notify[] = array("error", "Transaction Pin Is Incorrect"); return back()->withNotify($notify); } } catch (\PDOException $e) { $notify[] = array("error", $e->getMessage()); return back()->withNotify($notify); } } if ($phone !== $phone2) { $notify[] = array("error", "Your Phone Number Confirmation Is Wrong. Please try again"); return back()->withNotify($notify); } Message::create(array("user_id" => $user->id, "title" => "Airtime Conversion", "details" => "Your {$network->name} Airtime Conversion From Phone Number {$phone} Has Been Successfully Sent To The Admin For Confirmation. The Unit Price Of Your Airtime Will Be Credited To Your Deposit Balance Once We Verify Your Conversion, Thank You For Choosing {$basic->sitename}", "admin" => 1, "status" => 0)); Bill::create(array("user_id" => $user->id, "charge" => $amount * $network->rate / 100, "amount" => $amount, "mobileno" => $phone, "trx" => $trx, "network" => $request->network, "newbalance" => $user->balance, "airtime_type" => 5, "status" => 0)); $data = array("name" => $user->username, "email" => $user->email, "body" => "Your {$network->name} Airtime Conversion From Phone Number {$phone} Has Been Successfully Sent To The Admin For Confirmation. The Unit Price Of Your Airtime Will Be Credited To Your Deposit Balance Once We Verify Your Conversion, Thank You For Choosing {$basic->sitename}", "heading" => "Airtime Conversion"); Mail::send("partials.pmail", $data, static function ($message) { $user = User::find(Auth::user()->id); $message->to($user->email, $user->username)->subject("Airtime Conversion"); }); $notify[] = array("success", "Airtime Conversion Process Was Successful"); return redirect()->route("user.home")->withNotify($notify); } public function printvoucher() { $data["page_title"] = "Print Voucher"; $data["network"] = Internex::wherePhone(1)->whereStatus(1)->latest()->get(); $datanet = Internex::wherePhone(1)->whereStatus(1)->count(); $dnet = json_decode($datanet, true, 512, JSON_THROW_ON_ERROR); if ($dnet < 1) { $notify[] = array("error", "Service Has Been Disabled"); return back()->withNotify($notify); } return view($this->activeTemplate . ".user.merchant.voucherprint", $data); } public function printvouchernow(Request $request) : RedirectResponse { $t = $this->validate($request, array("quantity" => "required|numeric", "network" => "required|string", "amount" => "required|numeric|min:100")); $quantity = $request->quantity; $amount = $request->amount; $networks = $request->network; $trx = getTrx(); $user = Auth::user(); $basic = GeneralSetting::first(); $api_id = $basic->cuid; $api_key = $basic->ckapi; $dis = $basic->airtimediscount; $dis2 = $basic->datadiscount; $fee = $amount / 100 * $dis2; $pay = $amount - $fee; $cost = $pay * $quantity; if (str_starts_with((string) $amount, "-")) { $notify[] = array("error", "You Are A thief"); return redirect()->back()->withNotify($notify); } if ($amount <= 0) { $notify[] = array("error", "Invalid Amount"); return redirect()->back()->withNotify($notify); } if ($user->balance < $cost) { $notify[] = array("error", "You Dont Have Enough Fund in Your Wallet to Complete This Transaction"); return back()->withNotify($notify); } if (isset($request->pin)) { try { $c_password = Auth::user()->transpin; if (Hash::check($request->pin, $c_password)) { } else { $notify[] = array("error", "Transaction Pin Is Incorrect"); return back()->withNotify($notify); } } catch (\PDOException $e) { $notify[] = array("error", $e->getMessage()); return back()->withNotify($notify); } } $ini_balance = $user->balance; $user->balance -= $cost; $user->save(); $userID = $api_id; $APIKey = $api_key; $ip = "162.0.209.38"; $curl = curl_init(); curl_setopt_array($curl, array(CURLOPT_URL => "https://www.nellobytesystems.com/APIEPINV1.asp?UserID={$userID}&APIKey={$APIKey}&MobileNetwork={$networks}&Value={$amount}&Quantity={$quantity}&RequestID={$trx}&CallBackURL=https://coderzbillz.tk/", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => array("Cookie: ASPSESSIONIDCETDSAQD=OCCFPHJCGDKKDKFAGGPBKGHK"))); $r = curl_exec($curl); curl_close($curl); $result = json_decode($r, true); if (!isset($result["TXN_EPIN"][0]["transactionid"])) { Bill::create(array("user_id" => $user->id, "amount" => $amount, "trx" => $trx, "ini_balance" => $ini_balance, "gateway" => $r, "number" => $quantity, "fee" => $pay, "charge" => $cost, "airtime_type" => 18, "newbalance" => $user->balance, "status" => 2)); $notify[] = array("error", "Transaction Failed."); } else { Bill::create(array("user_id" => $user->id, "amount" => $amount, "trx" => $trx, "ini_balance" => $ini_balance, "gateway" => $r, "number" => $quantity, "fee" => $pay, "charge" => $cost, "airtime_type" => 18, "newbalance" => $user->balance, "status" => 1)); $auth = Auth::user(); $to_name = $auth->username; $sitename = env("APP_NAME"); $to_email = $auth->email; $heading = "Recharge Printing"; $data = array("name" => $auth->username, "heading" => "Recharge Printing", "body" => "Your {$networks} {$basic->cur_text} {$amount} Voucher Printing Of {$quantity} Units Has Been Successfully Processed. Thank you for choosing {$sitename}"); Mail::send("partials.pmail", $data, static function ($message) use($to_name, $heading, $to_email) { $message->to($to_email, $to_name, $heading)->subject("Transaction Successful"); $message->from(env("MAIL_USERNAME"), env("APP_NAME")); }); $notify[] = array("success", "Airtime Voucher Purchased Successfully!!"); } return back()->withNotify($notify); } public function moto() { $data["page_title"] = "Moto Insurance"; $data["network"] = MotorInsurance::whereStatus(1)->get(); $datanet = MotorInsurance::whereStatus(1)->count(); $dnet = json_decode($datanet, true, 512, JSON_THROW_ON_ERROR); if ($dnet < 1) { $notify[] = array("error", "Service Has Been Disabled"); return back()->withNotify($notify); } return view($this->activeTemplate . ".user.merchant.moto", $data); } public function motonow(Request $request) : RedirectResponse { $u = $this->validate($request, array("type" => "required|string", "serviceID" => "required|string", "Insured_Name" => "required|string", "Engine_Number" => "required", "Chasis_Number" => "required", "Plate_Number" => "required", "Vehicle_Make" => "required", "Vehicle_Color" => "required", "Vehicle_Model" => "required", "Year_of_Make" => "required", "Contact_Address" => "required", "mobileno" => "required|regex:/^([0-9\s\-\+\(\)]*)$/|digits:11", "email" => "required|email|string", "variation_code" => "required|numeric", "amount" => "required|numeric")); $amount = $request->amount; $serviceID = $request->serviceID; $type = $request->type; $email = $request->email; $Engine_Number = $request->Engine_Number; $Chasis_Number = $request->Chasis_Number; $Plate_Number = $request->Plate_Number; $Vehicle_Make = $request->Vehicle_Make; $Vehicle_Color = $request->Vehicle_Color; $Vehicle_Model = $request->Vehicle_Model; $Year_of_Make = $request->Year_of_Make; $Contact_Address = $request->Contact_Address; $mobileno = $request->mobileno; $variation_code = $request->variation_code; $Insured_Name = $request->Insured_Name; $user = Auth::user(); $basic = GeneralSetting::first(); $api_id = $basic->merchantid; $api_key = $basic->merchantkey; $tokenpass = $basic->tokenpass; if ($user->balance < $amount) { $notify[] = array("error", "You Dont Have Enough Fund in Your Wallet to Complete This Transaction"); return back()->withNotify($notify); } if (isset($request->pin)) { try { $c_password = Auth::user()->transpin; if (Hash::check($request->pin, $c_password)) { } else { $notify[] = array("error", "Transaction Pin Is Incorrect"); return back()->withNotify($notify); } } catch (\PDOException $e) { $notify[] = array("error", $e->getMessage()); return back()->withNotify($notify); } } if (str_starts_with((string) $amount, "-")) { $notify[] = array("error", "You Are A thief"); return redirect()->back()->withNotify($notify); } if ($amount <= 0) { $notify[] = array("error", "Invalid Amount"); return redirect()->back()->withNotify($notify); } $trx = getTrx(); $username = $api_id; $password = $api_key; $host = $tokenpass; $ini_balance = $user->balance; $user->balance = $ini_balance - $amount; $user->save(); $data = array("serviceID" => $serviceID, "variation_code" => $variation_code, "Insured_Name" => $Insured_Name, "Engine_Number" => $Engine_Number, "Chasis_Number" => $Chasis_Number, "Plate_Number" => $Plate_Number, "billersCode" => $Plate_Number, "Vehicle_Make" => $Vehicle_Make, "Vehicle_Color" => $Vehicle_Color, "Vehicle_Model" => $Vehicle_Model, "Year_of_Make" => $Year_of_Make, "Contact_Address" => $Contact_Address, "phone" => $mobileno, "request_id" => $trx); $curl = curl_init(); curl_setopt_array($curl, array(CURLOPT_URL => $host, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_USERPWD => $username . ":" . $password, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => $data)); $content = curl_exec($curl); $result = json_decode($content, true); curl_close($curl); if ($result === '' || $result["code"] !== "000") { $user->balance += $amount; $user->save(); $transaction = new Transaction(); $transaction->user_id = $user->id; $transaction->amount = getAmount($amount); $transaction->post_balance = getAmount($ini_balance); $transaction->final_balance = getAmount($user->balance); $transaction->trx_type = "+"; $transaction->type = 12; $transaction->remark = "Refunded"; $transaction->details = "You Have Been Refunded"; $transaction->email = $user->email; $transaction->trx = $trx; $transaction->saveOrFail(); Bill::create(array("user_id" => $user->id, "amount" => $amount, "trx" => $trx, "mobileno" => $mobileno, "ini_balance" => $ini_balance, "gateway" => $content, "airtime_type" => 12, "newbalance" => $user->balance, "status" => 0)); $notify[] = array("error", "You Have Been Refunded"); } else { Bill::create(array("user_id" => $user->id, "amount" => $amount, "trx" => $trx, "mobileno" => $mobileno, "ini_balance" => $ini_balance, "gateway" => $content, "airtime_type" => 12, "newbalance" => $user->balance, "status" => 1)); $j = getAmount($ini_balance); Message::create(array("user_id" => $user->id, "title" => "Vehicle Insurance Purchased", "details" => "You Have Successfully Purchased Third Party Motor Insurance - Universal Insurance For {$Insured_Name} With Engine and Chassis Number {$Engine_Number}, {$Chasis_Number}. ' Worth of '.{$basic->cur_text} {$amount}, Your Initial Balance Was {$basic->cur_text} {$j} and Your Final Balance is {$basic->cur_text} {$user->balance}. Thank you for choosing {$basic->sitename}", "admin" => 1, "status" => 0)); $auth = Auth::user(); $to_name = $auth->username; $sitename = env("APP_NAME"); $to_email = $auth->email; $heading = "Vehicle Insurance Purchase"; $data = array("name" => $auth->username, "heading" => "Vehicle Insurance", "body" => "You Have Successfully Purchased Third Party Motor Insurance - Universal Insurance For {$Insured_Name} With Engine and Chassis Number {$Engine_Number}, {$Chasis_Number} Worth of {$basic->cur_text} {$amount}, Your Initial Balance Was {$basic->cur_text} {$j} and Your Final Balance is {$basic->cur_text} {$user->balance}. Thank you for choosing {$sitename}"); Mail::send("partials.pmail", $data, static function ($message) use($to_name, $heading, $to_email) { $message->to($to_email, $to_name, $heading)->subject("Transaction Successful"); $message->from(env("MAIL_USERNAME"), env("APP_NAME")); }); $notify[] = array("success", "Vehicle Insurance Purchased Successfully!!"); } return redirect()->route("user.home")->withNotify($notify); } public function homei() { $data["page_title"] = "Home Insurance"; $data["network"] = HomeInsurance::whereStatus(1)->get(); $datanet = HomeInsurance::whereStatus(1)->count(); $dnet = json_decode($datanet, true, 512, JSON_THROW_ON_ERROR); if ($dnet < 1) { $notify[] = array("error", "Service Has Been Disabled"); return back()->withNotify($notify); } return view($this->activeTemplate . ".user.merchant.homei", $data); } public function homenow(Request $request) : RedirectResponse { $this->validate($request, array("mobileno" => "required|regex:/^([0-9\s\-\+\(\)]*)$/|digits:11", "serviceID" => "required", "full_name" => "required|string", "variation_code" => "required", "amount" => "required", "address" => "required|string", "type_building" => "required|string", "business_occupation" => "required|string", "date_of_birth" => "required", "type" => "required")); $mobileno = $request->mobileno; $serviceID = $request->serviceID; $amount = $request->amount; $type = $request->type; $full_name = $request->full_name; $variation_code = $request->variation_code; $address = $request->address; $type_building = $request->type_building; $business_occupation = $request->business_occupation; $date_of_birth = $request->date_of_birth; $user = Auth::user(); $basic = GeneralSetting::first(); $api_id = $basic->merchantid; $api_key = $basic->merchantkey; $tokenpass = $basic->tokenpass; if (str_starts_with((string) $amount, "-")) { $notify[] = array("error", "You Are A thief"); return redirect()->back()->withNotify($notify); } if ($amount <= 0) { $notify[] = array("error", "Invalid Amount"); return redirect()->back()->withNotify($notify); } if ($user->balance < $amount) { $notify[] = array("error", "You Dont Have Enough Fund in Your Wallet to Complete This Transaction"); return back()->withNotify($notify); } if (isset($request->pin)) { try { $c_password = Auth::user()->transpin; if (Hash::check($request->pin, $c_password)) { } else { $notify[] = array("error", "Transaction Pin Is Incorrect"); return back()->withNotify($notify); } } catch (\PDOException $e) { $notify[] = array("error", $e->getMessage()); return back()->withNotify($notify); } } $trx = getTrx(); $username = $api_id; $password = $api_key; $host = $tokenpass; $ini_balance = $user->balance; $user->balance = $ini_balance - $amount; $user->save(); $data = array("serviceID" => $serviceID, "variation_code" => $variation_code, "phone" => $mobileno, "billersCode" => $full_name, "full_name" => $full_name, "address" => $address, "type_building" => $type_building, "business_occupation" => $business_occupation, "date_of_birth" => $date_of_birth, "request_id" => $trx); $curl = curl_init(); curl_setopt_array($curl, array(CURLOPT_URL => $host, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_USERPWD => $username . ":" . $password, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => $data)); $content = curl_exec($curl); $result = json_decode($content, true); curl_close($curl); if ($result === '' || $result["code"] !== "000") { $user->balance += $amount; $user->saveOrFail(); $transaction = new Transaction(); $transaction->user_id = $user->id; $transaction->amount = getAmount($amount); $transaction->post_balance = getAmount($ini_balance); $transaction->final_balance = getAmount($user->balance); $transaction->trx_type = "+"; $transaction->type = 13; $transaction->remark = "Refunded"; $transaction->details = "You Have Been Refunded"; $transaction->email = $user->email; $transaction->trx = $trx; $transaction->saveOrFail(); Bill::create(array("user_id" => $user->id, "amount" => $amount, "trx" => $trx, "mobileno" => $mobileno, "ini_balance" => $ini_balance, "gateway" => $content, "airtime_type" => 13, "newbalance" => $user->balance, "status" => 0)); $notify[] = array("error", "You Have Been Refunded"); } else { Bill::create(array("user_id" => $user->id, "amount" => $amount, "trx" => $trx, "mobileno" => $mobileno, "ini_balance" => $ini_balance, "gateway" => $content, "airtime_type" => 13, "newbalance" => $user->balance, "status" => 1)); $j = getAmount($ini_balance); Message::create(array("user_id" => $user->id, "title" => "Home Cover Insurance Purchased", "details" => "You Have Successfully Purchased Home Cover Insurance For {$full_name} Worth of {$basic->cur_text} {$amount}, Your Initial Balance Was {$basic->cur_text} {$j} and Your Final Balance is  {$basic->cur_text} {$user->balance}. Thank you for choosing {$basic->sitename}", "admin" => 1, "status" => 0)); $auth = Auth::user(); $to_name = $auth->username; $sitename = env("APP_NAME"); $to_email = $auth->email; $heading = "Home Cover Insurance Purchase"; $data = array("name" => $auth->username, "heading" => "Home Cover Insurance", "body" => "You Have Successfully Purchased Home Cover Insurance For {$full_name} Worth of {$basic->cur_text} {$amount}, Your Initial Balance Was {$basic->cur_text} {$j} and Your Final Balance is  {$basic->cur_text} {$user->balance}. Thank you for choosing {$sitename}"); Mail::send("partials.pmail", $data, static function ($message) use($to_name, $heading, $to_email) { $message->to($to_email, $to_name, $heading)->subject("Transaction Successful"); $message->from(env("MAIL_USERNAME"), env("APP_NAME")); }); $notify[] = array("success", "Home Cover Insurance Purchased Successfully!!"); } return redirect()->route("user.home")->withNotify($notify); } public function accident() { $data["page_title"] = "Accident Insurance"; $data["network"] = AccidentInsurance::whereStatus(1)->get(); $datanet = AccidentInsurance::whereStatus(1)->count(); $dnet = json_decode($datanet, true, 512, JSON_THROW_ON_ERROR); if ($dnet < 1) { $notify[] = array("error", "Service Has Been Disabled"); return back()->withNotify($notify); } return view($this->activeTemplate . ".user.merchant.accident", $data); } public function accidentnow(Request $request) : RedirectResponse { $i = $this->validate($request, array("mobileno" => "required|regex:/^([0-9\s\-\+\(\)]*)$/|digits:11", "serviceID" => "required", "full_name" => "required|string", "variation_code" => "required", "amount" => "required", "address" => "required|string", "next_kin_name" => "required|string", "business_occupation" => "required|string", "next_kin_phone" => "required|regex:/^([0-9\s\-\+\(\)]*)$/|digits:11", "dob" => "required", "type" => "required")); $mobileno = $request->mobileno; $serviceID = $request->serviceID; $amount = $request->amount; $type = $request->type; $full_name = $request->full_name; $variation_code = $request->variation_code; $address = $request->address; $next_kin_name = $request->next_kin_name; $next_kin_phone = $request->next_kin_phone; $business_occupation = $request->business_occupation; $dob = $request->dob; $user = Auth::user(); $basic = GeneralSetting::first(); $api_id = $basic->merchantid; $api_key = $basic->merchantkey; $tokenpass = $basic->tokenpass; if (str_starts_with((string) $amount, "-")) { $notify[] = array("error", "You Are A thief"); return redirect()->back()->withNotify($notify); } if ($amount <= 0) { $notify[] = array("error", "Invalid Amount"); return redirect()->back()->withNotify($notify); } if ($user->balance < $amount) { $notify[] = array("error", "You Dont Have Enough Fund in Your Wallet to Complete This Transaction"); return back()->withNotify($notify); } if (isset($request->pin)) { try { $c_password = Auth::user()->transpin; if (Hash::check($request->pin, $c_password)) { } else { $notify[] = array("error", "Transaction Pin Is Incorrect"); return back()->withNotify($notify); } } catch (\PDOException $e) { $notify[] = array("error", $e->getMessage()); return back()->withNotify($notify); } } $trx = getTrx(); $username = $api_id; $password = $api_key; $host = $tokenpass; $ini_balance = $user->balance; $user->balance = $ini_balance - $amount; $user->saveOrFail(); $data = array("serviceID" => $serviceID, "variation_code" => $variation_code, "phone" => $mobileno, "billersCode" => $full_name, "full_name" => $full_name, "address" => $address, "next_kin_name" => $next_kin_name, "next_kin_phone" => $next_kin_phone, "business_occupation" => $business_occupation, "dob" => $dob, "request_id" => $trx); $curl = curl_init(); curl_setopt_array($curl, array(CURLOPT_URL => $host, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_USERPWD => $username . ":" . $password, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => $data)); $content = curl_exec($curl); $result = json_decode($content, true); curl_close($curl); if ($result === '' || $result["code"] !== "000") { $user->balance += $amount; $user->saveOrFail(); $transaction = new Transaction(); $transaction->user_id = $user->id; $transaction->amount = getAmount($amount); $transaction->post_balance = getAmount($ini_balance); $transaction->final_balance = getAmount($user->balance); $transaction->trx_type = "+"; $transaction->type = 14; $transaction->remark = "Refunded"; $transaction->details = "You Have Been Refunded"; $transaction->email = $user->email; $transaction->trx = $trx; $transaction->saveOrFail(); Bill::create(array("user_id" => $user->id, "amount" => $amount, "trx" => $trx, "mobileno" => $mobileno, "ini_balance" => $ini_balance, "gateway" => $content, "airtime_type" => 14, "newbalance" => $user->balance, "status" => 0)); $notify[] = array("error", "You Have Been Refunded"); } else { Bill::create(array("user_id" => $user->id, "amount" => $amount, "trx" => $trx, "mobileno" => $mobileno, "ini_balance" => $ini_balance, "gateway" => $content, "airtime_type" => 14, "newbalance" => $user->balance, "status" => 1)); $notify[] = array("success", "Transaction Successful"); $j = getAmount($ini_balance); Message::create(array("user_id" => $user->id, "title" => "Personal Accident Insurance Purchased", "details" => "You Have Successfully Purchased Personal Accident Insurance For {$full_name} Worth of {$basic->cur_text} {$amount}, Your Initial Balance Was {$basic->cur_text} {$j}, And Your Final Balance Is {$basic->cur_text} {$user->balance}. Thank You For Choosing {$basic->sitename} ", "admin" => 1, "status" => 0)); $auth = Auth::user(); $to_name = $auth->username; $sitename = env("APP_NAME"); $to_email = $auth->email; $heading = "Personal Accident Insurance Purchase"; $data = array("name" => $auth->username, "heading" => "Personal Accident Insurance", "body" => "You Have Successfully Purchased Personal Accident Insurance For {$full_name} Worth of {$basic->cur_text} {$amount}, Your Initial Balance Was {$basic->cur_text} {$j}, And Your Final Balance Is {$basic->cur_text} {$user->balance}. Thank You For Choosing {$sitename} "); Mail::send("partials.pmail", $data, static function ($message) use($to_name, $heading, $to_email) { $message->to($to_email, $to_name, $heading)->subject("Transaction Successful"); $message->from(env("MAIL_USERNAME"), env("APP_NAME")); }); $notify[] = array("success", "Personal Accident Insurance Purchased Successfully!!"); } return redirect()->route("user.home")->withNotify($notify); } public function nbais() { $data["page_title"] = "Nbais"; $data["network"] = Nbais::whereStatus(1)->get(); $datanet = Nbais::whereStatus(1)->count(); $dnet = json_decode($datanet, true, 512, JSON_THROW_ON_ERROR); if ($dnet < 1) { $notify[] = array("error", "Service Has Been Disabled"); return back()->withNotify($notify); } return view($this->activeTemplate . ".user.merchant.nbais", $data); } public function nbaisnow(Request $request) : RedirectResponse { $this->validate($request, array("no_of_pins" => "required|numeric", "amount" => "required|numeric")); $amount = $request->amount; $pin = $request->no_of_pins; $user = Auth::user(); $basic = GeneralSetting::first(); $authorization = $basic->token; $tokenpass = $basic->tokenpass; if (str_starts_with((string) $amount, "-")) { $notify[] = array("error", "You Are A thief"); return redirect()->back()->withNotify($notify); } if ($amount <= 0) { $notify[] = array("error", "Invalid Amount"); return redirect()->back()->withNotify($notify); } if ($user->balance < $amount) { $notify[] = array("error", "You Dont Have Enough Fund in Your Wallet to Complete This Transaction"); return back()->withNotify($notify); } if (isset($request->pin)) { try { $c_password = Auth::user()->transpin; if (Hash::check($request->pin, $c_password)) { } else { $notify[] = array("error", "Transaction Pin Is Incorrect"); return back()->withNotify($notify); } } catch (\PDOException $e) { $notify[] = array("error", $e->getMessage()); return back()->withNotify($notify); } } $ini_balance = $user->balance; $user->balance = $ini_balance - $amount; $user->save(); $trx = getTrx(); $host = "https://www.vtumobileshops.com.ng/developer-api-V1/nbais/{$basic->gladtid}/{$pin}/{$amount}"; $curl = curl_init(); curl_setopt_array($curl, array(CURLOPT_URL => $host, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => array("cache-control: no-cache"))); $response = curl_exec($curl); curl_close($curl); $content = json_decode($response, true); $status = $content["status"] ?? null; $api_response = $content["api_response"] ?? null; if ($status === "failed") { $user->balance += $amount; $user->save(); Bill::create(array("user_id" => $user->id, "amount" => $amount, "trx" => $trx, "ini_balance" => $ini_balance, "gateway" => $response, "airtime_type" => 15, "newbalance" => $user->balance, "status" => 0)); $notify[] = array("error", $api_response); } else { Bill::create(array("user_id" => $user->id, "amount" => $amount, "trx" => $trx, "ini_balance" => $ini_balance, "gateway" => $response, "airtime_type" => 15, "newbalance" => $user->balance, "status" => 1)); $j = getAmount($ini_balance); $t = $content["token"] ?? null; Message::create(array("user_id" => $user->id, "title" => "Pin Purchased", "details" => "You Have Successfully Purchased {$pin} Nbais Pin Worth of {$basic->cur_text} {$amount}, Your Pin is {$t}. Your Initial Balance Was {$basic->cur_text} {$j}, And Your Final Balance Is {$basic->cur_text} {$user->balance}. Thank You For Choosing {$basic->sitename}", "admin" => 1, "status" => 0)); $auth = Auth::user(); $to_name = $auth->username; $sitename = env("APP_NAME"); $to_email = $auth->email; $heading = "Pin Purchase"; $data = array("name" => $auth->username, "heading" => "Nbais Pin Purchase", "body" => "You Have Successfully Purchase {$pin} Nbais Pin Worth of {$basic->cur_text} {$amount}, Your Pin is {$t}. Your Initial Balance Was {$basic->cur_text} {$j} and Your Final Balance is {$basic->cur_text} {$user->balance}. Thank you for choosing {$sitename}"); Mail::send("partials.pmail", $data, static function ($message) use($to_name, $heading, $to_email) { $message->to($to_email, $to_name, $heading)->subject("Transaction Successful"); $message->from(env("MAIL_USERNAME"), env("APP_NAME")); }); $notify[] = array("success", "Nbais Pin Purchased Successfully!!"); } return redirect()->route("user.home")->withNotify($notify); } public function neco() { $data["page_title"] = "Neco"; $data["network"] = Neco::whereStatus(1)->get(); $datanet = Neco::whereStatus(1)->count(); $dnet = json_decode($datanet, true, 512, JSON_THROW_ON_ERROR); if ($dnet < 1) { $notify[] = array("error", "Service Has Been Disabled"); return back()->withNotify($notify); } return view($this->activeTemplate . ".user.merchant.neco", $data); } public function neconow(Request $request) : RedirectResponse { $userData = Purify::clean($request->except("_token", "_method")); $rules = array("no_of_pins" => "required|numeric", "amount" => "required|numeric", "pin" => "required|numeric|min:4"); $Validator = Validator::make($userData, $rules); if ($Validator->fails()) { return back()->withErrors($Validator)->withInput(); } $userData = (object) $userData; $amount = $userData->amount; $pin = $userData->no_of_pins; $tpin = $userData->pin; $user = Auth::user(); $basic = GeneralSetting::first(); $authorization = $basic->token; $datanet = Neco::whereNo_of_pins($pin)->whereStatus(1)->count(); $dnet = json_decode($datanet, true, 512, JSON_THROW_ON_ERROR); if ($dnet < 1) { $notify[] = array("error", "Service Has Been Disabled"); return redirect()->route("user.home")->withNotify($notify); } if ($basic->neco < 1) { $notify[] = array("error", "Service Has Been Disabled"); return redirect()->route("user.home")->withNotify($notify); } if (str_starts_with((string) $amount, "-")) { $notify[] = array("error", "You Are A thief"); return redirect()->back()->withNotify($notify); } if ($amount <= 0) { $notify[] = array("error", "Invalid Amount"); return redirect()->back()->withNotify($notify); } if ($user->balance < $amount) { $notify[] = array("error", "You Dont Have Enough Fund in Your Wallet to Complete This Transaction"); return back()->withNotify($notify); } if (isset($tpin)) { try { $c_password = Auth::user()->transpin; if (Hash::check($tpin, $c_password)) { } else { $notify[] = array("error", "Transaction Pin Is Incorrect"); return back()->withNotify($notify); } } catch (\PDOException $e) { $notify[] = array("error", $e->getMessage()); return back()->withNotify($notify); } } $po = Carbon::now()->format("Y-m-d H:i:s"); $r = Bill::where("user_id", $user->id)->latest()->first(); $dnet2 = json_decode($r, true); $ti = $dnet2["timer"] ?? 0; $mo = $dnet2["amount"] ?? 0; $finishTime = Carbon::parse($ti)->addSeconds(60)->format("Y-m-d H:i:s"); if ($po < $finishTime && $mo === $amount) { $notify[] = array("error", "Duplicate Transaction, kindly wait for A minute"); return back()->withNotify($notify); } $ini_balance = getAmount($user->balance ?? null); $user->balance = $ini_balance - (int) $amount; $user->save(); $trx = getTrx(); $parameters = array("no_of_pins" => $pin); $url = "https://vtumobileshops.com.ng/api/V2/neco"; $headers = array("Accept: application/json", "Authorization: Bearer {$basic->gladtid}"); $ch = curl_init(); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($parameters)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $content = json_decode($response, true); $p = $content["token"] ?? null; $status = $content["status"] ?? null; $api_response = $content["api_response"] ?? null; if ($status === "failed") { $user->balance += $amount; $user->save(); Bill::create(array("user_id" => $user->id, "amount" => $amount, "trx" => $trx, "timer" => $po, "ini_balance" => $ini_balance, "gateway" => $response, "airtime_type" => "neco", "newbalance" => $user->balance, "status" => 0)); $notify[] = array("error", $api_response); return redirect()->back()->withNotify($notify); } Bill::create(array("user_id" => $user->id, "amount" => $amount, "trx" => $trx, "timer" => $po, "ini_balance" => $ini_balance, "gateway" => $response, "airtime_type" => "neco", "newbalance" => $user->balance, "status" => 1)); $j = getAmount($ini_balance); $t = $content["token"] ?? null; Message::create(array("user_id" => $user->id, "title" => "Pin Purchased", "details" => "You Have Successfully Purchased {$pin} Neco Pin Worth of {$basic->cur_text} {$amount}, Your Pin is {$t}. Your Initial Balance Was {$basic->cur_text} {$j}, And Your Final Balance Is {$basic->cur_text} {$user->balance}. Thank You For Choosing {$basic->sitename}", "admin" => 1, "status" => 0)); $auth = Auth::user(); $to_name = $auth->username; $sitename = env("APP_NAME"); $to_email = $auth->email; $heading = "Pin Purchase"; $data = array("name" => $auth->username, "heading" => "Pin Purchase", "body" => "You Have Successfully Purchase {$pin} Neco Pin Worth of {$basic->cur_text} {$amount}, Your Pin is {$p}. Your Initial Balance Was {$basic->cur_text} {$j} and Your Final Balance is {$basic->cur_text} {$user->balance}. Thank you for choosing {$sitename}"); Mail::send("partials.pmail", $data, static function ($message) use($to_name, $heading, $to_email) { $message->to($to_email, $to_name, $heading)->subject("Transaction Successful"); $message->from(env("MAIL_USERNAME"), env("APP_NAME")); }); $notify[] = array("success", "Neco Pin Purchased Successfully!!"); return redirect()->route("user.necolog")->withNotify($notify); } public function waec() { $data["page_title"] = "WAEC"; $data["network"] = Waec::whereStatus(1)->get(); return view($this->activeTemplate . ".user.merchant.waec", $data); } public function waecnow(Request $request) : RedirectResponse { $userData = Purify::clean($request->except("_token", "_method")); $rules = array("no_of_pins" => "required|numeric", "amount" => "required|numeric", "pin" => "required|numeric|min:4"); $Validator = Validator::make($userData, $rules); if ($Validator->fails()) { return back()->withErrors($Validator)->withInput(); } $userData = (object) $userData; $amount = $userData->amount; $pin = $userData->no_of_pins; $tpin = $userData->pin; $user = Auth::user(); $basic = GeneralSetting::first(); $authorization = $basic->token; if (str_starts_with((string) $amount, "-")) { $notify[] = array("error", "You Are A thief"); return redirect()->back()->withNotify($notify); } if ($amount <= 0) { $notify[] = array("error", "Invalid Amount"); return redirect()->back()->withNotify($notify); } if ($user->balance < $amount) { $notify[] = array("error", "You Dont Have Enough Fund in Your Wallet to Complete This Transaction"); return back()->withNotify($notify); } if (isset($tpin)) { try { $c_password = Auth::user()->transpin; if (Hash::check($tpin, $c_password)) { } else { $notify[] = array("error", "Transaction Pin Is Incorrect"); return back()->withNotify($notify); } } catch (\PDOException $e) { $notify[] = array("error", $e->getMessage()); return back()->withNotify($notify); } } $po = Carbon::now()->format("Y-m-d H:i:s"); $r = Bill::where("user_id", $user->id)->latest()->first(); $dnet2 = json_decode($r, true); $ti = $dnet2["timer"] ?? 0; $mo = $dnet2["amount"] ?? 0; $finishTime = Carbon::parse($ti)->addSeconds(60)->format("Y-m-d H:i:s"); if ($po < $finishTime && $mo === $amount) { $notify[] = array("error", "Duplicate Transaction, kindly wait for A minute"); return back()->withNotify($notify); } $ini_balance = $user->balance; $user->balance = $ini_balance - $amount; $user->save(); $trx = getTrx(); $parameters = array("no_of_pins" => $pin); $url = "https://vtumobileshops.com.ng/api/V2/waec"; $headers = array("Accept: application/json", "Authorization: Bearer {$basic->gladtid}"); $ch = curl_init(); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($parameters)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $content = json_decode($response, true); $status = $content["status"] ?? null; $api_response = $content["api_response"] ?? null; if ($status === "failed") { $user->balance += $amount; $user->save(); Bill::create(array("user_id" => $user->id, "amount" => $amount, "trx" => $trx, "timer" => $po, "ini_balance" => $ini_balance, "gateway" => $response, "airtime_type" => "waec", "newbalance" => $user->balance, "status" => 0)); $notify[] = array("error", $api_response); return redirect()->back()->withNotify($notify); } Bill::create(array("user_id" => $user->id, "amount" => $amount, "trx" => $trx, "timer" => $po, "ini_balance" => $ini_balance, "gateway" => $response, "airtime_type" => "waec", "newbalance" => $user->balance, "status" => 1)); $j = getAmount($ini_balance); $t = $content["token"] ?? null; Message::create(array("user_id" => $user->id, "title" => "Pin Purchased", "details" => "You Have Successfully Purchased {$pin} Waec Pin Worth of {$basic->cur_text} {$amount}, Your Pin is {$t}. Your Initial Balance Was {$basic->cur_text} {$j}, And Your Final Balance Is {$basic->cur_text} {$user->balance}. Thank You For Choosing {$basic->sitename}", "admin" => 1, "status" => 0)); $auth = Auth::user(); $to_name = $auth->username; $sitename = env("APP_NAME"); $to_email = $auth->email; $heading = "Pin Purchase"; $data = array("name" => $auth->username, "heading" => "Pin Purchase", "body" => "You Have Successfully Purchase {$pin} Waec Pin Worth of {$basic->cur_text} {$amount}, Your Pin is {$t}. Your Initial Balance Was {$basic->cur_text}  {$j} and Your Final Balance is {$basic->cur_text} {$user->balance} . Thank you for choosing {$sitename}"); Mail::send("partials.pmail", $data, static function ($message) use($to_name, $heading, $to_email) { $message->to($to_email, $to_name, $heading)->subject("Transaction Successful"); $message->from(env("MAIL_USERNAME"), env("APP_NAME")); }); $notify[] = array("success", "Waec Pin Purchased Successfully!!"); return redirect()->route("user.waeclog")->withNotify($notify); } public function waecreg() { $data["page_title"] = "WAEC Registration"; $data["network"] = WaecReg::whereStatus(1)->get(); return view($this->activeTemplate . ".user.merchant.waecreg", $data); } public function waecregnow(Request $request) : RedirectResponse { $u = $this->validate($request, array("serviceID" => "required", "variation_code" => "required", "mobileno" => "required|regex:/^([0-9\s\-\+\(\)]*)$/|digits:11", "amount" => "required|numeric")); $amount = $request->amount; $mobileno = $request->mobileno; $serviceID = $request->serviceID; $variation_code = $request->variation_code; $user = Auth::user(); $basic = GeneralSetting::first(); $api_id = $basic->merchantid; $api_key = $basic->merchantkey; $tokenpass = $basic->tokenpass; if (str_starts_with((string) $amount, "-")) { $notify[] = array("error", "You Are A thief"); return redirect()->back()->withNotify($notify); } if ($amount <= 0) { $notify[] = array("error", "Invalid Amount"); return redirect()->back()->withNotify($notify); } if ($user->balance < $amount) { $notify[] = array("error", "You Dont Have Enough Fund in Your Wallet to Complete This Transaction"); return back()->withNotify($notify); } if (isset($request->pin)) { try { $c_password = Auth::user()->transpin; if (Hash::check($request->pin, $c_password)) { } else { $notify[] = array("error", "Transaction Pin Is Incorrect"); return back()->withNotify($notify); } } catch (\PDOException $e) { $notify[] = array("error", $e->getMessage()); return back()->withNotify($notify); } } $po = Carbon::now()->format("Y-m-d H:i:s"); $r = Bill::where("user_id", $user->id)->latest()->first(); $dnet2 = json_decode($r, true); $ti = $dnet2["timer"] ?? 0; $mo = $dnet2["amount"] ?? 0; $finishTime = Carbon::parse($ti)->addSeconds(60)->format("Y-m-d H:i:s"); if ($po < $finishTime && $mo === $amount) { $notify[] = array("error", "Duplicate Transaction, kindly wait for A minute"); return back()->withNotify($notify); } $trx = getTrx(); $username = $api_id; $password = $api_key; $host = $tokenpass; $ini_balance = $user->balance; $user->balance = $ini_balance - $amount; $user->save(); $data = array("serviceID" => $serviceID, "variation_code" => $variation_code, "phone" => $mobileno, "request_id" => $trx); $curl = curl_init(); curl_setopt_array($curl, array(CURLOPT_URL => $host, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_USERPWD => $username . ":" . $password, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => $data)); $content = curl_exec($curl); $result = json_decode($content, true); curl_close($curl); $status = $result["status"] ?? null; $api_response = $result["api_response"] ?? null; if ($status === "failed") { $user->balance += $amount; $user->save(); Bill::create(array("user_id" => $user->id, "amount" => $amount, "trx" => $trx, "timer" => $po, "ini_balance" => $ini_balance, "gateway" => $content, "airtime_type" => "waecr", "newbalance" => $user->balance, "status" => 0)); $notify[] = array("error", $api_response); return redirect()->back()->withNotify($notify); } Bill::create(array("user_id" => $user->id, "amount" => $amount, "trx" => $trx, "timer" => $po, "ini_balance" => $ini_balance, "gateway" => $content, "airtime_type" => "waecr", "newbalance" => $user->balance, "status" => 1)); $j = getAmount($ini_balance); Message::create(array("user_id" => $user->id, "title" => "Pin Purchased", "details" => "You Have Successfully Purchased WAEC Registration PIN Worth Of {$basic->cur_text} {$amount}, Your Initial Balance Was {$basic->cur_text} {$j}, And Your Final Balance Is {$basic->cur_text} {$user->balance}. Thank you for choosing {$basic->sitename}", "admin" => 1, "status" => 0)); $auth = Auth::user(); $to_name = $auth->username; $sitename = env("APP_NAME"); $to_email = $auth->email; $heading = "Pin Purchase"; $data = array("name" => $auth->username, "heading" => "Pin Purchase", "body" => "You Have Successfully Purchased WAEC Registration PIN Worth of {$basic->cur_text} {$amount}, Your Initial Balance Was {$basic->cur_text}  {$j} and Your Final Balance is {$basic->cur_text} {$user->balance} . Thank you for choosing {$sitename}"); Mail::send("partials.pmail", $data, static function ($message) use($to_name, $heading, $to_email) { $message->to($to_email, $to_name, $heading)->subject("Transaction Successful"); $message->from(env("MAIL_USERNAME"), env("APP_NAME")); }); $notify[] = array("success", "Waec Registration Pin Purchased Successfully!!"); return redirect()->route("user.waecrlog")->withNotify($notify); } public function nabteb() { $data["page_title"] = "NABTEB"; $data["network"] = Nabteb::whereStatus(1)->get(); return view($this->activeTemplate . "user.merchant.nabteb", $data); } public function nabtebnow(Request $request) : RedirectResponse { $this->validate($request, array("no_of_pins" => "required|numeric", "amount" => "required|numeric")); $amount = $request->amount; $pin = $request->no_of_pins; $user = Auth::user(); $basic = GeneralSetting::first(); $authorization = $basic->token; if (str_starts_with((string) $amount, "-")) { $notify[] = array("error", "You Are A thief"); return redirect()->back()->withNotify($notify); } if ($amount <= 0) { $notify[] = array("error", "Invalid Amount"); return redirect()->back()->withNotify($notify); } if ($user->balance < $amount) { $notify[] = array("error", "You Dont Have Enough Fund in Your Wallet to Complete This Transaction"); return back()->withNotify($notify); } if (isset($request->pin)) { try { $c_password = Auth::user()->transpin; if (Hash::check($request->pin, $c_password)) { } else { $notify[] = array("error", "Transaction Pin Is Incorrect"); return back()->withNotify($notify); } } catch (\PDOException $e) { $notify[] = array("error", $e->getMessage()); return back()->withNotify($notify); } } $po = Carbon::now()->format("Y-m-d H:i:s"); $r = Bill::where("user_id", $user->id)->latest()->first(); $dnet2 = json_decode($r, true); $ti = $dnet2["timer"] ?? 0; $mo = $dnet2["amount"] ?? 0; $finishTime = Carbon::parse($ti)->addSeconds(60)->format("Y-m-d H:i:s"); if ($po < $finishTime && $mo === $amount) { $notify[] = array("error", "Duplicate Transaction, kindly wait for A minute"); return back()->withNotify($notify); } $ini_balance = $user->balance; $user->balance = $ini_balance - $amount; $user->save(); $trx = getTrx(); $host = "https://www.vtumobileshops.com.ng/developer-api-V1/nabteb/{$basic->gladtid}/{$pin}/{$amount}"; $curl = curl_init(); curl_setopt_array($curl, array(CURLOPT_URL => $host, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => array("cache-control: no-cache"))); $response = curl_exec($curl); curl_close($curl); $content = json_decode($response, true); $status = $content["status"] ?? null; $api_response = $content["api_response"] ?? null; if ($status === "failed") { $user->balance += $amount; $user->save(); Bill::create(array("user_id" => $user->id, "amount" => $amount, "trx" => $trx, "timer" => $po, "ini_balance" => $ini_balance, "gateway" => $response, "airtime_type" => "nabteb", "newbalance" => $user->balance, "status" => 0)); $notify[] = array("error", $api_response); return redirect()->back()->withNotify($notify); } Bill::create(array("user_id" => $user->id, "amount" => $amount, "trx" => $trx, "timer" => $po, "ini_balance" => $ini_balance, "gateway" => $response, "airtime_type" => "nabteb", "newbalance" => $user->balance, "status" => 1)); $j = getAmount($ini_balance); $t = $content["token"] ?? null; Message::create(array("user_id" => $user->id, "title" => "Pin Purchased", "details" => "You Have Successfully Purchased {$pin} Nabteb Pin Worth Of {$basic->cur_text} {$amount}, Your Pin is {$t}. Your Initial Balance Was {$basic->cur_text} {$j}, And Your Final Balance Is {$basic->cur_text} {$user->balance}. Thank You For Choosing {$basic->sitename}", "admin" => 1, "status" => 0)); $auth = Auth::user(); $to_name = $auth->username; $sitename = env("APP_NAME"); $to_email = $auth->email; $heading = "Pin Purchase"; $data = array("name" => $auth->username, "heading" => "Pin Purchase", "body" => "You Have Successfully Purchased {$pin} Nabteb Pin Worth Of {$basic->cur_text} {$amount}, Your Pin is {$t}. Your Initial Balance Was {$basic->cur_text} {$j}, And Your Final Balance Is {$basic->cur_text} {$user->balance}. Thank You For Choosing {$sitename}"); Mail::send("partials.pmail", $data, static function ($message) use($to_name, $heading, $to_email) { $message->to($to_email, $to_name, $heading)->subject("Transaction Successful"); $message->from(env("MAIL_USERNAME"), env("APP_NAME")); }); $notify[] = array("success", "Nabteb Pin Purchased Successfully!!"); return redirect()->route("user.nabteblog")->withNotify($notify); } public function jamb() { $data["page_title"] = "JAMB"; $data["network"] = Jamb::whereStatus(1)->get(); return view($this->activeTemplate . ".user.merchant.jamb", $data); } public function jambnow(Request $request) : RedirectResponse { $u = $this->validate($request, array("amount" => "required|numeric", "candidates_name_email" => "required", "candidates_jamb_regno" => "required")); $amount = $request->amount; $candi = $request->candidates_name_email; $regno = $request->candidates_jamb_regno; $user = Auth::user(); $basic = GeneralSetting::first(); $authorization = $basic->token; if (str_starts_with((string) $amount, "-")) { $notify[] = array("error", "You Are A thief"); return redirect()->back()->withNotify($notify); } if ($amount <= 0) { $notify[] = array("error", "Invalid Amount"); return redirect()->back()->withNotify($notify); } if ($user->balance < $amount) { $notify[] = array("error", "You Dont Have Enough Fund in Your Wallet to Complete This Transaction"); return back()->withNotify($notify); } if (isset($request->pin)) { try { $c_password = Auth::user()->transpin; if (Hash::check($request->pin, $c_password)) { } else { $notify[] = array("error", "Transaction Pin Is Incorrect"); return back()->withNotify($notify); } } catch (\PDOException $e) { $notify[] = array("error", $e->getMessage()); return back()->withNotify($notify); } } $po = Carbon::now()->format("Y-m-d H:i:s"); $r = Bill::where("user_id", $user->id)->latest()->first(); $dnet2 = json_decode($r, true); $ti = $dnet2["timer"] ?? 0; $mo = $dnet2["amount"] ?? 0; $finishTime = Carbon::parse($ti)->addSeconds(60)->format("Y-m-d H:i:s"); if ($po < $finishTime && $mo === $amount) { $notify[] = array("error", "Duplicate Transaction, kindly wait for A minute"); return back()->withNotify($notify); } $ini_balance = $user->balance; $user->balance = $ini_balance - $amount; $user->save(); $trx = getTrx(); $curl = curl_init(); curl_setopt_array($curl, array(CURLOPT_URL => "https://easyaccessapi.com.ng/api/reset_jamb_password.php", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "POST", CURLOPT_POSTFIELDS => "candidates_name_email=" . $candi . "candidates_jamb_regno=" . $regno . "&reference_no=" . $trx . '', CURLOPT_HTTPHEADER => array("AuthorizationToken: " . $authorization, "cache-control: no-cache"))); $response = curl_exec($curl); curl_close($curl); $content = json_decode($response, true); Bill::create(array("user_id" => $user->id, "amount" => $amount, "trx" => $trx, "timer" => $po, "ini_balance" => $ini_balance, "gateway" => $response, "airtime_type" => 11, "newbalance" => $user->balance, "status" => 1)); if (!isset($content["message"])) { $notify[] = array("error", "Invalid API Response"); return back()->withNotify($notify); } if ($content["success"] !== "true") { $notify[] = array("error", $content["message"]); return back()->withNotify($notify); } $j = getAmount($ini_balance); Message::create(array("user_id" => $user->id, "title" => "Pin Purchased", "details" => "You Have Successfully Requested For Jamb Password Reset of {$candi} With Registration Number {$regno}, Your Initial Balance Was {$basic->cur_text} {$j}, And Your Final Balance Is {$basic->cur_text} {$user->balance}. Thank You For Choosing {$basic->sitename}", "admin" => 1, "status" => 0)); $auth = Auth::user(); $to_name = $auth->username; $sitename = env("APP_NAME"); $to_email = $auth->email; $heading = "Pin Purchase"; $data = array("name" => $auth->username, "heading" => "Password Reset", "body" => "You Have Successfully Requested For Jamb Password Reset of {$candi} With Registration Number {$regno}, Your Initial Balance Was {$basic->cur_text} {$j}, And Your Final Balance Is {$basic->cur_text} {$user->balance}. Thank You For Choosing {$sitename}"); Mail::send("partials.pmail", $data, static function ($message) use($to_name, $heading, $to_email) { $message->to($to_email, $to_name, $heading)->subject("Transaction Successful"); $message->from(env("MAIL_USERNAME"), env("APP_NAME")); }); $notify[] = array("success", "Password Reset Submitted Successfully!!"); return redirect()->route("user.home")->withNotify($notify); } public function mobilerecharge() { $data["page_title"] = "Mobile Recharge"; $data["network"] = Internex::wherePhone(1)->whereStatus(1)->latest()->get(); $datanet = Internex::wherePhone(1)->whereStatus(1)->count(); $dnet = json_decode($datanet, true, 512, JSON_THROW_ON_ERROR); if ($dnet < 1) { $notify[] = array("error", "Service Has Been Disabled"); return back()->withNotify($notify); } return view($this->activeTemplate . ".user.merchant.mobile", $data); } public function rechargenow(Request $request) : RedirectResponse { $userData = Purify::clean($request->except("_token", "_method")); $rules = array("mobileno" => "required|regex:/^([0-9\s\-\+\(\)]*)$/|digits:11", "airtime_type" => "required|numeric", "network" => "required|string", "amount" => "required|numeric|min:50|max:2000", "pin" => "required|numeric|min:4", "validate" => "nullable"); $Validator = Validator::make($userData, $rules); if ($Validator->fails()) { return back()->withErrors($Validator)->withInput(); } $userData = (object) $userData; $mobileno = $userData->mobileno ?? null; $airtime_type = $userData->airtime_type ?? null; $amount = $userData->amount ?? null; $network = $userData->network ?? null; $pin = $userData->pin ?? null; $val = $userData->validate ?? null; if (!$val) { $validate = substr($mobileno, 0, 4); if ($network === "mtn") { if (!str_contains(" 0702 0703 0713 0704 0706 0716 0802 0803 0806 0810 0813 0814 0816 0903 0913 0906 0916 0804 ", $validate)) { $notify[] = array("error", "This Number is not an {$network} Number, Check Your Number"); return back()->withNotify($notify); } } else { if ($network === "glo") { if (!str_contains(" 0805 0705 0905 0807 0907 0707 0817 0917 0717 0715 0815 0915 0811 0711 0911 ", $validate)) { $notify[] = array("error", "This Number is not a {$network} Number, Check Your Number"); return back()->withNotify($notify); } } else { if ($network === "airtel") { if (!str_contains(" 0904 0802 0902 0702 0808 0908 0708 0918 0818 0718 0812 0912 0712 0801 0701 0901 0907 0917 ", $validate)) { $notify[] = array("error", "This Number is not an {$network} Number, Check Your Number"); return back()->withNotify($notify); } } else { if ($network === "etisalat" && !str_contains($validate, " 0809 0909 0709 0819 0919 0719 0817 0917 0717 0718 0918 0818 0808 0708 0908 ")) { $notify[] = array("error", "This Number is not an {$network} Number, Check Your Number"); return back()->withNotify($notify); } } } } } $user = Auth::user(); $basic = GeneralSetting::first(); if (str_starts_with((string) $amount, "-")) { $notify[] = array("error", "You Are A thief"); return redirect()->back()->withNotify($notify); } if ($amount <= 0) { $notify[] = array("error", "Invalid Amount"); return redirect()->back()->withNotify($notify); } if ($user->balance < $amount) { $notify[] = array("error", "You Dont Have Enough Funds in Your Wallet to Complete this Transaction"); return back()->withNotify($notify); } if (isset($pin)) { try { $c_password = Auth::user()->transpin ?? null; if (Hash::check($pin, $c_password)) { } else { $notify[] = array("error", "Transaction Pin Is Incorrect"); return back()->withNotify($notify); } } catch (\PDOException $e) { $notify[] = array("error", $e->getMessage()); return back()->withNotify($notify); } } $po = Carbon::now()->format("Y-m-d H:i:s"); $r = Bill::where("user_id", $user->id)->latest()->first(); $dnet2 = json_decode($r, true); $ti = $dnet2["timer"] ?? 0; $mo = $dnet2["mobileno"] ?? null; $amt = $dnet2["amount"] ?? null; $finishTime = Carbon::parse($ti)->addSeconds(60)->format("Y-m-d H:i:s"); if ($po < $finishTime && $mo === $mobileno && $amt === $amount) { $notify[] = array("error", "Duplicate Transaction, kindly wait for 60secs"); return back()->withNotify($notify); } $basic = GeneralSetting::first(); $dis2 = $basic->airtimediscount; $fee = $amount / 100 * $dis2; $pay = (double) $amount - (double) $fee; $ini_balance = getAmount($user->balance ?? null); $user->balance = (double) $ini_balance - $pay; $user->save(); $trx = getTrx(); $parameters = array("mobileno" => $mobileno, "network" => $network, "amount" => $amount); $url = "https://vtumobileshops.com.ng/api/V2/airtime"; $headers = array("Accept: application/json", "Authorization: Bearer {$basic->gladtid}"); $ch = curl_init(); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($parameters)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $result = json_decode($response, true); $status = $result["status"] ?? null; $api_response = $result["api_response"] ?? null; if ($status === "failed") { $user->balance += $pay; $user->save(); Bill::create(array("user_id" => $user->id ?? null, "name" => $user->username ?? null, "amount" => $amount, "timer" => $po, "mobileno" => $mobileno, "trx" => $trx, "network" => $network, "charge" => $pay, "ini_balance" => getAmount($ini_balance), "gateway" => $response ?? null, "airtime_type" => $airtime_type, "newbalance" => getAmount($user->balance ?? null), "status" => 0)); $notify[] = array("error", $api_response); return redirect()->back()->withNotify($notify); } Bill::create(array("user_id" => $user->id ?? null, "name" => $user->username ?? null, "amount" => $amount, "timer" => $po, "mobileno" => $mobileno, "trx" => $trx, "network" => $network, "charge" => $pay, "bonus" => $fee, "ini_balance" => getAmount($ini_balance), "gateway" => $response ?? null, "airtime_type" => $airtime_type, "newbalance" => getAmount($user->balance ?? null), "status" => 1)); Message::create(array("user_id" => $user->id ?? null, "title" => "Airtime Recharged", "details" => "Your Mobile Number {$mobileno} Has Been Successfully Recharged With The Sum Of {$basic->cur_text} {$amount} Worth Of {$network} Airtime, {$basic->cur_text} {$pay} Has Been Deducted From Your Wallet, Your Initial Balance Was {$basic->cur_text} {$ini_balance}, And Your Final Balance is {$basic->cur_text} {$user->balance}. Thank You For Choosing {$basic->sitename}", "admin" => 1, "status" => 0)); $notify[] = array("success", "Airtime Purchased Successfully!!"); return redirect()->route("user.rechargelog")->withNotify($notify); } public function cabletv() { $data["page_title"] = "Cable TV"; $data["network"] = Decoder::whereStatus(1)->latest()->get(); return view($this->activeTemplate . ".user.merchant.cabletv", $data); } public function cabletvpost(Request $request) : RedirectResponse { $l = $request->validate(array("network" => "required|string")); Session::put("Track", $request->network); return redirect()->route("user.cabletvpost2"); } public function cabletvpost2() { $data["page_title"] = "Cable TV"; $track = Session::get("Track"); $basic = GeneralSetting::first(); $data["network"] = Decoder::whereServiceid($track)->whereStatus(1)->first(); $data["plans"] = Decodersub::whereServiceid($track)->whereStatus(1)->whereStatus(1)->get(); $user = Auth::user(); $gnl = GeneralSetting::first(); return view($this->activeTemplate . ".user.merchant.cabletv_buy", $data); } public function cabletvpost3(Request $request) : RedirectResponse { $userData = Purify::clean($request->except("_token", "_method")); $rules = array("company" => "required|string", "amount" => "required|numeric", "iucno" => "required|numeric", "mobileno" => "required|regex:/^([0-9\s\-\+\(\)]*)$/|digits:11", "pin" => "required|numeric|min:4", "variation_code" => "required|string", "subscription_type" => "nullable|string"); $Validator = Validator::make($userData, $rules); if ($Validator->fails()) { return back()->withErrors($Validator)->withInput(); } $userData = (object) $userData; $company = $userData->company ?? null; $iucno = $userData->iucno ?? null; $variation_code = $userData->variation_code ?? null; $mobileno = $userData->mobileno ?? null; $amount = $userData->amount ?? null; $pin = $userData->pin ?? null; $subscription_type = "change"; $user = Auth::user(); $basic = GeneralSetting::first(); $api_id = $basic->merchantid; $api_key = $basic->merchantkey; $authorization = $basic->tokenverify; if (str_starts_with((string) $amount, "-")) { $notify[] = array("error", "You Are A thief"); return redirect()->back()->withNotify($notify); } if ($amount <= 0) { $notify[] = array("error", "Invalid Amount"); return redirect()->back()->withNotify($notify); } if ($user->balance < $amount) { $notify[] = array("error", "You Dont Have Enough Fund in Your Wallet to Complete This Transaction"); return back()->withNotify($notify); } if (isset($pin)) { try { $c_password = Auth::user()->transpin; if (Hash::check($pin, $c_password)) { } else { $notify[] = array("error", "Transaction Pin Is Incorrect"); return back()->withNotify($notify); } } catch (\PDOException $e) { $notify[] = array("error", $e->getMessage()); return back()->withNotify($notify); } } $trx = getTrx(); $parameters = array("company" => $company, "iucno" => $iucno); $url = "https://vtumobileshops.com.ng/api/V2/cable_verify"; $headers = array("Accept: application/json", "Authorization: Bearer {$basic->gladtid}"); $ch = curl_init(); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($parameters)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $content = json_decode($response, true); $status = $content["status"] ?? null; $api_response = $content["api_response"] ?? null; if ($status === "failed") { $notify[] = array("error", $api_response); return back()->withNotify($notify); } Session::put("variation_code", $variation_code); Session::put("name", $content); Session::put("iucno", $iucno); Session::put("mobileno", $mobileno); Session::put("company", $company); Session::put("planname", $userData->name); Session::put("amount", $amount); Session::put("subscription_type", $subscription_type); Session::put("trx", $trx); return redirect()->route("user.cabletvpay"); } public function cabletvpay() { $data["page_title"] = "Cable TV"; $data["name"] = Session::get("name"); $data["decoder"] = Session::get("company"); $data["amount"] = Session::get("amount"); $data["mobileno"] = Session::get("mobileno"); $data["variation_code"] = Session::get("variation_code"); $data["planname"] = Session::get("planname"); $data["number"] = Session::get("iucno"); $data["subscription_type"] = Session::get("subscription_type"); $data["trxcode"] = Session::get("trx"); $data["time"] = Carbon::now(); $data["plan2"] = $data["planname"]; $data["power"] = Decoder::whereServiceid($data["decoder"])->whereStatus(1)->first(); return view($this->activeTemplate . ".user.merchant.cabletvpay", $data); } public function cabletvpay2(Request $request) : RedirectResponse { $userData = Purify::clean($request->except("_token", "_method")); $rules = array("amount" => "required|numeric", "number" => "required|numeric", "variation_code" => "required|string", "trx" => "required"); $Validator = Validator::make($userData, $rules); if ($Validator->fails()) { return back()->withErrors($Validator)->withInput(); } $userData = (object) $userData; $number = $userData->number; $amount = $userData->amount; $amount2 = $userData->amount2; $code = $userData->code; $trx = getTrx(); $decoder = Session::get("company"); $data["name"] = Session::get("name"); $planname = Session::get("planname"); $mobileno = Session::get("mobileno"); $variation_code = Session::get("variation_code"); $subscription_type = Session::get("subscription_type"); $user = Auth::user(); $basic = GeneralSetting::first(); $api_id = $basic->merchantid; $api_key = $basic->merchantkey; $authorization = $basic->tokenpass; $basic = GeneralSetting::first(); $pay = $amount; if (str_starts_with((string) $pay, "-")) { $notify[] = array("error", "You Are A thief"); return redirect()->back()->withNotify($notify); } if ($pay <= 0) { $notify[] = array("error", "Invalid Amount"); return redirect()->back()->withNotify($notify); } if ($user->balance < $pay) { $notify[] = array("error", "You Dont Have Enough Funds in Your Wallet to Complete this Transaction"); return back()->withNotify($notify); } $po = Carbon::now()->format("Y-m-d H:i:s"); $r = Bill::where("user_id", $user->id)->latest()->first(); $dnet2 = json_decode($r, true); $ti = $dnet2["timer"] ?? 0; $to = $dnet2["network"] ?? null; $so = $dnet2["number"] ?? null; $mo = $dnet2["amount"] ?? 0; $finishTime = Carbon::parse($ti)->addSeconds(120)->format("Y-m-d H:i:s"); if ($po < $finishTime && $to === $code && $mo === $pay && $so === $number) { $notify[] = array("error", "Duplicate Transaction, kindly wait for 2minutes"); return back()->withNotify($notify)->withInput(); } $ini_balance = getAmount($user->balance ?? null); $user->balance = $ini_balance - $pay; $user->save(); $parameters = array("serviceID" => $decoder, "billersCode" => $number, "variation_code" => $variation_code, "subscription_type" => $subscription_type, "amount" => $amount2, "phone" => $mobileno); $url = "https://vtumobileshops.com.ng/api/V2/cable_pay"; $headers = array("Accept: application/json", "Authorization: Bearer {$basic->gladtid}"); $ch = curl_init(); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($parameters)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $content = curl_exec($ch); curl_close($ch); $result = json_decode($content, true); $basic = GeneralSetting::first(); $na = $planname ?? null; $status = $result["status"] ?? null; $api_response = $result["api_response"] ?? null; if ($status === "failed") { $user->balance += $pay; $user->save(); Bill::create(array("user_id" => $user->id ?? null, "amount" => $pay, "timer" => $po, "name" => $na, "number" => $number, "trx" => $trx, "network" => $code, "mobileno" => $data["mobileno"] ?? null, "gateway" => $content, "accountname" => $data["subscription_type"] ?? null, "ini_balance" => $ini_balance, "newbalance" => $user->balance ?? null, "airtime_type" => "cable", "status" => 0)); $notify[] = array("error", $api_response); return redirect()->back()->withNotify($notify); } Bill::create(array("user_id" => $user->id ?? null, "amount" => $pay, "timer" => $po, "name" => $na, "number" => $number, "trx" => $trx, "network" => $code, "mobileno" => $data["mobileno"] ?? null, "gateway" => $content, "accountname" => $data["subscription_type"] ?? null, "ini_balance" => $ini_balance, "newbalance" => $user->balance ?? null, "airtime_type" => "cable", "status" => 1)); $j = getAmount($ini_balance); Message::create(array("user_id" => $user->id ?? null, "title" => "TV Subscription", "details" => "Your {$na} with decoder Number {$number} has been successfully recharged with {$code} (NGN {$pay}) Subscription Plan, Your Initial Balance Was {$basic->cur_text} {$j}, and Your Final Balance is {$basic->cur_text} {$user->balance}. Thank you for choosing {$basic->sitename}", "admin" => 1, "status" => 0)); $notify[] = array("success", "Transaction Successful"); return redirect()->route("user.tvlog")->withNotify($notify); } public function internetdata() { $data["page_title"] = "Internet Data"; $data["network"] = Internet::whereStatus(1)->latest()->get(); $datanet = Internet::whereStatus(1)->latest()->count(); $dnet = json_decode($datanet, true, 512, JSON_THROW_ON_ERROR); $basic = GeneralSetting::first(); if ($dnet < 1) { $notify[] = array("error", "Service Has Been Disabled"); return back()->withNotify($notify); } if ($basic->internet < 1) { $notify[] = array("error", "Service Has Been Disabled"); return redirect()->route("user.home")->withNotify($notify); } return view($this->activeTemplate . "user.merchant.internet", $data); } public function internetdatapost(Request $request) : RedirectResponse { $userData = Purify::clean($request->except("_token", "_method")); $e = $rules = array("network" => "required", "site" => "required"); $Validator = Validator::make($userData, $rules); if ($Validator->fails()) { return back()->withErrors($Validator)->withInput(); } $userData = (object) $userData; Session::put("Track", $userData->network); $basic = GeneralSetting::first(); $datanet = Internet::whereCode($userData->network)->whereSite($userData->site)->whereStatus(1)->latest()->count(); if ($datanet < 1) { return redirect()->route("user.home")->with("error", "Service Has Been Disabled"); } if ($basic->internet < 1) { return redirect()->route("user.home")->with("error", "Service Has Been Disabled"); } return redirect()->route("user.internetdata2"); } public function internetdata2(Request $request) { $data["page_title"] = "Internet Data"; $track = Session::get("Track"); $basic = GeneralSetting::first(); $data["network"] = Internet::wherecode($track)->whereStatus(1)->get(); $data["network"] = json_decode($data["network"], true, 512, JSON_THROW_ON_ERROR); $datanet = Internet::wherecode($track)->whereStatus(1)->count(); if ($datanet < 1) { $notify[] = array("error", "Service Has Been Disabled"); return redirect()->route("user.home")->withNotify($notify); } if ($basic->internet < 1) { $notify[] = array("error", "Service Has Been Disabled"); return redirect()->route("user.home")->withNotify($notify); } $data["plans"] = Internetbundle::whereCode($track)->whereStatus(1)->get(); return view($this->activeTemplate . "user.merchant.internet_buy", $data); } public function internetdatapost2(Request $request) : RedirectResponse { $userData = Purify::clean($request->except("_token", "_method")); $rules = array("mobileno" => "required|regex:/^([0-9\s\-\+\(\)]*)$/|digits:11", "network" => "required|numeric", "plan" => "required|numeric", "lite" => "required|numeric", "dataplan" => "required|numeric", "plansize" => "required", "amount" => "gt:0", "pin" => "required|numeric", "validate" => "nullable"); $Validator = Validator::make($userData, $rules); if ($Validator->fails()) { return back()->withErrors($Validator)->withInput(); } $userData = (object) $userData; $mobileno = $userData->mobileno ?? null; $network2 = $userData->network ?? null; $network1 = $userData->network ?? null; $plan = $userData->plan ?? null; $lite = $userData->lite ?? null; $dataplan = $userData->dataplan ?? null; $plansize = $userData->plansize ?? null; $pin = $userData->pin ?? null; $val = $userData->validate ?? null; if (!$val) { $validate = substr($mobileno, 0, 4); if ($network1 === "01") { if (!str_contains(" 0702 0703 0713 0704 0706 0716 0802 0803 0806 0810 0813 0814 0816 0903 0913 0906 0916 0804 ", $validate)) { $notify[] = array("error", "This Number is not an MTN Number, Check Your Number"); return back()->withNotify($notify); } } else { if ($network1 === "05") { if (!str_contains(" 0702 0703 0713 0704 0706 0716 0802 0803 0806 0810 0813 0814 0816 0903 0913 0906 0916 0804 ", $validate)) { $notify[] = array("error", "This Number is not an MTN Number, Check Your Number"); return back()->withNotify($notify); } } else { if ($network1 === "02") { if (!str_contains(" 0805 0705 0905 0807 0907 0707 0817 0917 0717 0715 0815 0915 0811 0711 0911 ", $validate)) { $notify[] = array("error", "This Number is not a GLO Number, Check Your Number"); return back()->withNotify($notify); } } else { if ($network1 === "03") { if (!str_contains(" 0904 0802 0902 0702 0808 0908 0708 0918 0818 0718 0812 0912 0712 0801 0701 0901 0907 0917 ", $validate)) { $notify[] = array("error", "This Number is not an AIRTEL Number, Check Your Number"); return back()->withNotify($notify); } } else { if ($network1 === "06") { if (!str_contains(" 0809 0909 0709 0819 0919 0719 0817 0917 0717 0718 0918 0818 0808 0708 0908 ", $validate)) { $notify[] = array("error", "This Number is not an ETISALAT Number, Check Your Number"); return back()->withNotify($notify); } } else { if ($network1 === "07") { if (!str_contains(" 0904 0802 0902 0702 0808 0908 0708 0918 0818 0718 0812 0912 0712 0801 0701 0901 0907 0917 ", $validate)) { $notify[] = array("error", "This Number is not an AIRTEL Number, Check Your Number"); return back()->withNotify($notify); } } else { if ($network1 === "04" && !str_contains(" 0809 0909 0709 0819 0919 0719 0817 0917 0717 0718 0918 0818 0808 0708 0908 ", $validate)) { $notify[] = array("error", "This Number is not an ETISALAT Number, Check Your Number"); return back()->withNotify($notify); } } } } } } } } $user = Auth::user(); $basic = GeneralSetting::first(); $network = Internet::whereCode($network2)->get(); $authorize = $basic->gladtid; $trx = getTrx(); $bundle = Internetbundle::whereCode($network1)->wherePlan($plan)->whereStatus(1)->sharedLock()->latest()->first(); if ($user->apiPro) { $amount = $bundle->apiPro ?? 0; } elseif ($user->apiUser) { $amount = $bundle->apicost ?? 0; } elseif ($user->apiGold) { $amount = $bundle->apiGold ?? 0; } elseif ($user->apiSilver) { $amount = $bundle->apiSilver ?? 0; } elseif ($user->vip) { $amount = $bundle->vip ?? 0; } elseif ($user->posUser) { $amount = $bundle->poscost ?? 0; } elseif ($user->agent) { $amount = $bundle->agent ?? 0; } elseif ($user->affyUser) { $amount = $bundle->affycost ?? 0; } elseif ($user->Reseller) { $amount = $bundle->rprice ?? 0; } else { $amount = $bundle->cost ?? 0; } if (str_starts_with((string) $amount, "-")) { $notify[] = array("error", "You Are A thief"); return redirect()->back()->withNotify($notify); } if ($amount <= 0) { $notify[] = array("error", "Invalid Amount"); return redirect()->back()->withNotify($notify); } if ($user->balance < $amount) { $notify[] = array("error", "You Dont Have Enough Fund in Your Wallet to Complete This Transaction"); return back()->withNotify($notify); } if (isset($pin)) { try { $c_password = Auth::user()->transpin ?? null; if (Hash::check($pin, $c_password)) { } else { $notify[] = array("error", "Transaction Pin Is Incorrect"); return back()->withNotify($notify); } } catch (\PDOException $e) { $notify[] = array("error", $e->getMessage()); return back()->withNotify($notify); } } $checkTime = Bill::where(array("user_id" => $user->id, "mobileno" => $mobileno, "plan" => $plansize, "dataplan" => $dataplan, "network" => $network1, "status" => 1))->lockForUpdate()->latest()->first(); $created_at = $checkTime->created_at ?? ''; $from_time = strtotime($created_at); $to_time = strtotime(date("Y-m-d H:i:s")); $timeDifference = round(abs($to_time - $from_time) / 60, 2); if ($timeDifference <= 1) { $notify[] = array("error", "Duplicate Transaction, kindly wait for 60secs"); return back()->withNotify($notify); } $pay = (double) $amount; $ini_balance = getAmount($user->balance ?? 0); $user_balance = $ini_balance - $pay; DB::transaction(function () use($user, $user_balance) { DB::table("users")->whereId($user->id)->lockForUpdate()->update(array("balance" => $user_balance)); }); process_data($user, $amount, $mobileno, $trx, $network1, $plansize, $dataplan, $lite, $ini_balance, $user_balance); $rr = query_process_data($user, $trx); if (empty($rr) && $trx != $rr->trx && $user->id != $rr->user_id) { $notify[] = array("error", "An Error Occurred, Kindly try again"); return back()->withNotify($notify); } $netw = $rr->network; $b_charge = $rr->ini_balance; $p_balance = $user_balance; $data_url = "https://vtumobileshops.com.ng/api/V2/process"; $payload = array("mobileno" => $rr->mobileno, "lite" => $rr->lite, "dataplan" => $rr->dataplan); $response = data_api_call($authorize, $payload, $data_url); $net = $network[0]->name ?? null; $con = $response["status"] ?? null; $err = $response["message"] ?? null; $plan_amount = $response["amount"] ?? 0; if (empty($plan_amount)) { $bonus = 0; } else { $bonus = (double) $amount - $plan_amount; } $api_response = $response["api_response"] ?? null; if ($con === "failed" || $err === "Server Error") { $newb = $p_balance + $rr->amount; DB::table("users")->whereId($user->id)->lockForUpdate()->update(array("balance" => $newb)); DB::table("bills")->whereTrx($trx)->update(array("ini_balance" => getAmount($b_charge), "newbalance" => getAmount($newb ?? 0), "airtime_type" => 2, "gateway" => $response, "status" => 0)); $notify[] = array("error", "{$api_response} But You Have Been Refunded"); return redirect()->back()->withNotify($notify); } DB::table("bills")->whereTrx($trx)->update(array("ini_balance" => getAmount($b_charge), "newbalance" => getAmount($p_balance ?? 0), "bonus" => $bonus ?? 0, "airtime_type" => 2, "gateway" => $response, "status" => 1)); $j = getAmount($ini_balance ?? 0); Message::create(array("user_id" => $user->id ?? null, "title" => "Data Bundle Recharged", "details" => "Your Mobile Number {$mobileno} Has Been Successfully Recharged With The Sum Of {$basic->cur_text} {$amount} worth of {$plansize} {$net} Data Bundle, Your Initial Balance Was {$basic->cur_text} {$j}, and Your Final Balance is {$basic->cur_text} {$user->balance}. Thank you for choosing {$basic->sitename}. Api Response is: {$api_response}", "admin" => 1, "status" => 0)); $notify[] = array("success", $api_response ?? "Transaction Successful"); return redirect()->back()->withNotify($notify); } public function internetdataa() { $data["page_title"] = "Datacard"; $data["network"] = Datacard::whereStatus(1)->latest()->get(); $datanet = Datacard::whereStatus(1)->latest()->count(); $dnet = json_decode($datanet, true, 512, JSON_THROW_ON_ERROR); $basic = GeneralSetting::first(); if ($dnet < 1) { $notify[] = array("error", "Service Has Been Disabled"); return back()->withNotify($notify); } if ($basic->interneta < 1) { $notify[] = array("error", "Service Has Been Disabled"); return redirect()->route("user.home")->withNotify($notify); } return view($this->activeTemplate . ".user.merchant.interneta", $data); } public function internetdataposta(Request $request) : RedirectResponse { $e = $request->validate(array("network" => "required")); Session::put("Track", $request->network); return redirect()->route("user.internetdata2a"); } public function internetdata2a(Request $request) { $data["page_title"] = "Internet Data"; $track = Session::get("Track"); $basic = GeneralSetting::first(); $data["network"] = Datacard::whereCode($track)->whereStatus(1)->get(); $data["network"] = json_decode($data["network"], true, 512, JSON_THROW_ON_ERROR); $datanet = DataCardBundle::whereCode($track)->whereStatus(1)->count(); $dnet = json_decode($datanet, true, 512, JSON_THROW_ON_ERROR); if ($dnet < 1) { $notify[] = array("error", "Service Has Been Disabled"); return redirect()->route("user.home")->withNotify($notify); } $data["plans"] = DataCardBundle::whereCode($track)->whereStatus(1)->get(); if ($basic->interneta < 1) { $notify[] = array("error", "Service Has Been Disabled"); return redirect()->route("user.home")->withNotify($notify); } return view($this->activeTemplate . "user.merchant.internet_buya", $data); } public function internetdatapost2a(Request $request) : RedirectResponse { $userData = Purify::clean($request->except("_token", "_method")); $rules = array("network" => "required|numeric", "plan" => "required", "dataplan" => "required", "plansize" => "required", "quantity" => "required|integer", "pin" => "required|numeric|min:4", "card_name" => "nullable"); $Validator = Validator::make($userData, $rules); if ($Validator->fails()) { return back()->withErrors($Validator)->withInput(); } $userData = (object) $userData; $network2 = $userData->network ?? null; $network1 = $userData->network ?? null; $plan = $userData->plan ?? null; $dataplan = $userData->dataplan ?? null; $plansize = $userData->plansize ?? null; $amount1 = $userData->amount ?? null; $pin = $userData->pin ?? null; $card_name = $userData->card_name ?? null; $quantity = $userData->quantity ?? null; $amount = $amount1 * $quantity; $user = Auth::user(); $basic = GeneralSetting::first(); $network = Datacard::whereCode($network2)->get(); $datanet = DataCardBundle::whereCode($network1)->whereStatus(1)->latest()->count(); $dnet = json_decode($datanet, true, 512, JSON_THROW_ON_ERROR); if ($dnet < 1) { $notify[] = array("error", "Service Has Been Disabled"); return redirect()->route("user.home")->withNotify($notify); } if ($basic->interneta < 1) { $notify[] = array("error", "Service Has Been Disabled"); return redirect()->route("user.home")->withNotify($notify); } if (str_starts_with((string) $amount, "-")) { $notify[] = array("error", "You Are A thief"); return redirect()->back()->withNotify($notify); } if ($amount <= 0) { $notify[] = array("error", "Invalid Amount"); return redirect()->back()->withNotify($notify); } if ($user->balance < $amount) { $notify[] = array("error", "You Dont Have Enough Fund in Your Wallet to Complete This Transaction"); return back()->withNotify($notify); } if (isset($pin)) { try { $c_password = Auth::user()->transpin ?? null; if (Hash::check($pin, $c_password)) { } else { $notify[] = array("error", "Transaction Pin Is Incorrect"); return back()->withNotify($notify); } } catch (\PDOException $e) { $notify[] = array("error", $e->getMessage()); return back()->withNotify($notify); } } $checkTime = Bill::where(array("user_id" => $user->id, "quantity" => $quantity, "network" => $network1, "status" => 1))->latest()->first(); $created_at = $checkTime->created_at ?? ''; $from_time = strtotime($created_at); $to_time = strtotime(date("Y-m-d H:i:s")); $timeDifference = round(abs($to_time - $from_time) / 60, 2); if ($timeDifference <= 1) { $notify[] = array("error", "Duplicate Transaction, kindly wait for 60secs"); return back()->withNotify($notify); } $trx = getTrx(); $pay = (int) $amount; $ini_balance = getAmount($user->balance ?? 0); $user->balance = (int) $ini_balance - $pay; $user->save(); $parameters = array("lite" => $network2, "dataplan" => $plan, "quantity" => $quantity, "card_name" => $card_name); $url = "https://vtumobileshops.com.ng/api/V2/data_card"; $headers = array("Accept: application/json", "Authorization: Bearer {$basic->gladtid}"); $ch = curl_init(); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($parameters)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $content = json_decode($response, true); $con = $content["status"] ?? null; $plan_amount = $content["amount"] ?? 0; $net = $network[0]->name ?? null; if (empty($plan_amount)) { $bonus = 0; } else { $bonus = $pay - $plan_amount; } if ($con === "failed") { $user->balance += $pay; $user->save(); $bill = new Bill(); $bill->user_id = $user->id ?? null; $bill->email = $user->email ?? null; $bill->name = $user->username ?? null; $bill->transaction_id = $trx; $bill->amount = $amount; $bill->charge = $pay; $bill->card_name = $card_name; $bill->trx = $trx; $bill->ini_balance = $ini_balance ?? 0; $bill->newbalance = getAmount($user->balance ?? 0); $bill->airtime_type = "datacard"; $bill->gateway = $response ?? null; $bill->status = 0; $bill->save(); $notify[] = array("error", " But You Have Been Refunded"); return redirect()->back()->withNotify($notify); } $t = $content["pin"] ?? null; $netw = $content["network"] ?? null; $load_pin = $content["load_pin"] ?? null; $check_balance = $content["check_balance"] ?? null; $serial = $content["serial"] ?? null; $card_name = $content["card_name"] ?? null; $bill = new Bill(); $bill->user_id = $user->id ?? null; $bill->email = $user->email ?? null; $bill->name = $user->username ?? null; $bill->transaction_id = $trx; $bill->amount = $amount; $bill->charge = $pay; $bill->bonus = $bonus; $bill->pin = $t ?? null; $bill->serial = $serial ?? null; $bill->card_name = $card_name; $bill->load_pin = $load_pin; $bill->check_balance = $check_balance; $bill->network = $netw; $bill->trx = $trx; $bill->ini_balance = $ini_balance ?? 0; $bill->newbalance = getAmount($user->balance ?? 0); $bill->airtime_type = "datacard"; $bill->gateway = $response ?? null; $bill->status = 1; $bill->save(); $bill->data_card_logs()->saveMany(array(new DatacardLog(array("transaction_id" => $bill->id, "pin" => $t, "card_name" => $card_name, "load_pin" => $load_pin, "check_balance" => $check_balance, "pin_value" => $plansize ?? null, "serial_no" => $serial, "network" => $netw)))); $j = getAmount($ini_balance ?? 0); Message::create(array("user_id" => $user->id ?? null, "title" => "Pin Purchased", "details" => "You Have Successfully Purchased {$quantity} Datacard Pin Worth of {$basic->cur_text} {$amount}, Your Pin is {$t}, You can load Your Pin By Dialing {$load_pin} and Check Your Balance with {$check_balance}. Your Initial Balance Was {$basic->cur_text} {$j}, And Your Final Balance Is {$basic->cur_text} {$user->balance}. Thank You For Choosing {$basic->sitename}", "admin" => 1, "status" => 0)); $notify[] = array("success", "Transaction Successful"); return redirect()->back()->withNotify($notify); } public function internetdata2b(Request $request) { $data["page_title"] = "Internet Data"; $track = Session::get("Track"); $basic = GeneralSetting::first(); $data["network"] = Internet::wherecode($track)->whereStatus(1)->get(); $data["network"] = json_decode($data["network"], true, 512, JSON_THROW_ON_ERROR); $datanet = Internet::wherecode($track)->whereStatus(1)->count(); $dnet = json_decode($datanet, true, 512, JSON_THROW_ON_ERROR); if ($dnet < 1) { $notify[] = array("error", "Service Has Been Disabled"); return redirect()->route("user.home")->withNotify($notify); } if ($basic->internet < 1) { $notify[] = array("error", "Service Has Been Disabled"); return redirect()->route("user.home")->withNotify($notify); } $data["plans"] = Internetbundle::whereCode($track)->whereStatus(1)->get(); return view($this->activeTemplate . "user.merchant.internet_buyb", $data); } public function electricity() { $data["page_title"] = "Electricity Bill"; $data["power"] = Power::whereStatus(1)->latest()->get(); $datanet = Power::whereStatus(1)->count(); $dnet = json_decode($datanet, true, 512, JSON_THROW_ON_ERROR); if ($dnet < 1) { $notify[] = array("error", "Service Has Been Disabled"); return back()->withNotify($notify); } return view($this->activeTemplate . ".user.merchant.power", $data); } public function electricitypost(Request $request) : RedirectResponse { $userData = Purify::clean($request->except("_token", "_method")); $rules = array("code" => "required|string", "amount" => "required|numeric", "metertype" => "required", "number" => "required|numeric", "mobileno" => "required|regex:/^([0-9\s\-\+\(\)]*)$/|digits:11"); $Validator = Validator::make($userData, $rules); if ($Validator->fails()) { return back()->withErrors($Validator)->withInput(); } $userData = (object) $userData; $code = $userData->code ?? null; $amount = $userData->amount ?? null; $metertype = $userData->metertype ?? null; $number = $userData->number ?? null; $mobileno = $userData->mobileno ?? null; $pin = $userData->pin ?? null; $user = Auth::user(); $basic = GeneralSetting::first(); $authorization = $basic->tokenpass; if (str_starts_with((string) $amount, "-")) { $notify[] = array("error", "You Are A thief"); return redirect()->back()->withNotify($notify); } if ($amount <= 0) { $notify[] = array("error", "Invalid Amount"); return redirect()->back()->withNotify($notify); } $datanet = Power::whereServiceid($code)->whereStatus(1)->count(); $dnet = json_decode($datanet, true, 512, JSON_THROW_ON_ERROR); if ($dnet < 1) { $notify[] = array("error", "Service Has Been Disabled"); return redirect()->back()->withNotify($notify); } if ($basic->electric < 1) { $notify[] = array("error", "Service Has Been Disabled"); return redirect()->route("user.home")->withNotify($notify); } if (isset($pin)) { try { $c_password = $user->transpin; if (Hash::check($pin, $c_password)) { } else { $notify[] = array("error", "Transaction Pin Is Incorrect"); return back()->withNotify($notify); } } catch (\PDOException $e) { $notify[] = array("error", $e->getMessage()); return back()->withNotify($notify); } } $parameters = array("code" => $code, "number" => $number, "metertype" => $metertype); $url = "https://vtumobileshops.com.ng/api/V2/power_verify"; $headers = array("Accept: application/json", "Authorization: Bearer {$basic->gladtid}"); $ch = curl_init(); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($parameters)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $result = json_decode($response, true); $status = $result["status"] ?? null; $api_response = $result["api_response"] ?? null; if ($status === "failed") { $notify[] = array("error", $api_response); return back()->withNotify($notify); } Session::put("code", $code); Session::put("name", $result); Session::put("number", $number); Session::put("amount", $amount); Session::put("type", $metertype); Session::put("mobileno", $mobileno); Session::put("trx", getTrx()); return redirect()->route("user.powerpay"); } public function electricitypay() { $data["page_title"] = "Electricity Bill"; $data["code"] = Session::get("code"); $data["type"] = Session::get("type"); $data["name"] = Session::get("name"); $data["amount"] = Session::get("amount"); $data["number"] = Session::get("number"); $data["mobileno"] = Session::get("mobileno"); $data["trxcode"] = Session::get("trx"); $data["time"] = Carbon::now(); $data["power"] = Power::whereServiceid($data["code"])->first(); return view($this->activeTemplate . ".user.merchant.powerpay", $data); } public function electricitypay2(Request $request) : RedirectResponse { $userData = Purify::clean($request->except("_token", "_method")); $rules = array("code" => "required|string", "amount" => "required|numeric", "amount2" => "required|numeric", "type" => "required", "number" => "required|numeric"); $Validator = Validator::make($userData, $rules); if ($Validator->fails()) { return back()->withErrors($Validator)->withInput(); } $userData = (object) $userData; $data["mobileno"] = Session::get("mobileno"); $code = $userData->code ?? null; $amount = $userData->amount ?? null; $amount2 = $userData->amount2 ?? null; $metertype = $userData->type ?? null; $number = $userData->number ?? null; $mobileno = $data["mobileno"] ?? null; $user = Auth::user(); $basic = GeneralSetting::first(); $api_id = $basic->merchantid; $api_key = $basic->merchantkey; $authorization = $basic->tokenpass; $pay = $amount2 + $amount; if (str_starts_with((string) $pay, "-")) { $notify[] = array("error", "You Are A thief"); return redirect()->back()->withNotify($notify); } if ($pay <= 0) { $notify[] = array("error", "Invalid Amount"); return redirect()->back()->withNotify($notify); } if ($user->balance < $pay) { $notify[] = array("error", "You Dont Have Enough Fund in Your Wallet to Complete This Transaction"); return back()->withNotify($notify); } $power = Power::whereServiceid($code)->first(); $trox = getTrx(); $po = Carbon::now()->format("Y-m-d H:i:s"); $r = Bill::where("user_id", $user->id)->latest()->first(); $dnet2 = json_decode($r, true); $ti = $dnet2["timer"] ?? 0; $to = $dnet2["network"] ?? null; $so = $dnet2["number"] ?? null; $mo = $dnet2["amount"] ?? 0; $finishTime = Carbon::parse($ti)->addSeconds(120)->format("Y-m-d H:i:s"); if ($po < $finishTime && $to === $code && $mo === $amount && $so === $number) { $notify[] = array("error", "Duplicate Transaction, kindly wait for 2minutes"); return back()->withNotify($notify); } $ini_balance = getAmount($user->balance ?? null); $user->balance = $ini_balance - $pay; $user->save(); $parameters = array("serviceID" => $code, "billersCode" => $number, "variation_code" => $metertype, "amount" => $amount, "phone" => $mobileno); $url = "https://vtumobileshops.com.ng/api/V2/power_pay"; $headers = array("Accept: application/json", "Authorization: Bearer {$basic->gladtid}"); $ch = curl_init(); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($parameters)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $content = curl_exec($ch); curl_close($ch); $result = json_decode($content, true); $status = $result["status"] ?? null; $api_response = $result["api_response"] ?? null; if ($status === "failed") { $user->balance += $pay; $user->save(); Bill::create(array("user_id" => $user->id ?? null, "amount" => $amount, "timer" => $po, "number" => $number, "mobileno" => $mobileno, "trx" => $trox, "network" => $code, "charge" => $pay, "fee" => $power->fee, "gateway" => $content, "ini_balance" => $ini_balance, "newbalance" => getAmount($user->balance ?? null), "plan" => $metertype, "airtime_type" => "power", "status" => 0)); $notify[] = array("error", $api_response); return redirect()->back()->withNotify($notify); } else { $j = getAmount($ini_balance); Bill::create(array("user_id" => $user->id ?? null, "amount" => $amount, "timer" => $po, "number" => $number, "mobileno" => $mobileno, "trx" => $trox, "network" => $code, "charge" => $pay, "fee" => $power->fee, "gateway" => $content, "ini_balance" => $ini_balance, "newbalance" => getAmount($user->balance ?? 0), "plan" => $metertype, "airtime_type" => "power", "status" => 1)); $power = Power::whereServiceid($code)->whereStatus(1)->first(); $t = $result["token"] ?? null; Message::create(array("user_id" => $user->id ?? null, "title" => "Electricity Bill Payment", "details" => "Your {$power->name} PREPAID With Meter Number ({$number}) Has Been Successfully Recharged with {$basic->cur_text} {$amount}, Your Token is {$t}. Your Initial Balance Was {$basic->cur_text} {$j} and Your Final Balance is {$basic->cur_text} {$user->balance}. Thank You For Choosing {$basic->sitename}", "admin" => 1, "status" => 0)); $auth = Auth::user(); $to_name = $auth->username ?? null; $sitename = env("APP_NAME"); $to_email = $auth->email; $heading = "Electricity BIll Payment"; $data = array("name" => $auth->username ?? null, "heading" => "Electricity BIll Payment", "body" => "Your {$power->name} PREPAID With Meter Number ({$number}) Has Been Successfully Recharged with {$basic->cur_text} {$amount}, Your Token is {$t}. Your Initial Balance Was {$basic->cur_text} {$j} and Your Final Balance is {$basic->cur_text} {$user->balance}. Thank You For Choosing {$sitename}. Cheers"); Mail::send("partials.pmail", $data, static function ($message) use($to_name, $heading, $to_email) { $message->to($to_email, $to_name, $heading)->subject("Transaction Successful"); $message->from(env("MAIL_USERNAME"), env("APP_NAME")); }); $notify[] = array("success", "Transaction Successful"); } return redirect()->route("user.powerlog")->withNotify($notify); } public function bet() { $data["page_title"] = "Bet Bill"; $data["bet"] = Bet::whereStatus(1)->latest()->get(); $datanet = Bet::whereStatus(1)->count(); $dnet = json_decode($datanet, true, 512, JSON_THROW_ON_ERROR); if ($dnet < 1) { $notify[] = array("error", "Service Has Been Disabled"); return back()->withNotify($notify); } return view($this->activeTemplate . ".user.merchant.bet", $data); } public function betpost(Request $request) : RedirectResponse { $this->validate($request, array("name" => "required|string", "customerid" => "required", "amount" => "required|numeric")); $name = $request->name; $customerid = $request->customerid; $customerid2 = $request->customerid; $amount = $request->amount; $user = Auth::user(); $basic = GeneralSetting::first(); $api_id = $basic->cuid; $api_key = $basic->ckapi; $authorization = $basic->tokenpass; if (str_starts_with((string) $amount, "-")) { $notify[] = array("error", "You Are A thief"); return redirect()->back()->withNotify($notify); } if ($amount <= 0) { $notify[] = array("error", "Invalid Amount"); return redirect()->back()->withNotify($notify); } if ($user->balance < $amount) { $notify[] = array("error", "You Dont Have Enough Fund in Your Wallet to Complete This Transaction"); return back()->withNotify($notify); } if (isset($request->pin)) { try { $c_password = $user->transpin; if (Hash::check($request->pin, $c_password)) { } else { $notify[] = array("error", "Transaction Pin Is Incorrect"); return back()->withNotify($notify); } } catch (\PDOException $e) { $notify[] = array("error", $e->getMessage()); return back()->withNotify($notify); } } $userID = $api_id; $APIKey = $api_key; $ip = "162.0.209.38"; $curl = curl_init(); curl_setopt_array($curl, array(CURLOPT_URL => "https://www.nellobytesystems.com/APIVerifyBettingV1.asp?UserID={$userID}&APIKey={$APIKey}&BettingCompany={$name}&CustomerID={$customerid}", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => array("Content-Type: application/json"))); $content = curl_exec($curl); $result = json_decode($content, true); $err = curl_errno($curl); $errmsg = curl_error($curl); curl_close($curl); Session::put("name", $name); Session::put("customerid", $result["customer_name"]); Session::put("customerid2", $customerid2); Session::put("amount", $amount); Session::put("trx", getTrx()); return redirect()->route("user.betpay"); } public function betpay() { $data["page_title"] = "Bet Bill"; $data["name"] = Session::get("name"); $data["amount"] = Session::get("amount"); $data["customerid"] = Session::get("customerid"); $data["customerid2"] = Session::get("customerid2"); $data["trxcode"] = Session::get("trx"); $data["time"] = Carbon::now(); $data["bet"] = Bet::whereName($data["name"])->first(); return view($this->activeTemplate . ".user.merchant.betpay", $data); } public function betpay2(Request $request) : RedirectResponse { $l = $this->validate($request, array("name" => "required|string", "amount" => "required|numeric", "amount2" => "required|numeric", "customerid" => "required")); $data["customerid2"] = Session::get("customerid2"); $name = $request->name; $customerid2 = $data["customerid2"]; $amount = $request->amount; $amount2 = $request->amount2; $customerid = $request->customerid; $pay = $amount + $amount2; if (str_starts_with((string) $pay, "-")) { $notify[] = array("error", "You Are A thief"); return redirect()->back()->withNotify($notify); } if ($pay <= 0) { $notify[] = array("error", "Invalid Amount"); return redirect()->back()->withNotify($notify); } $user = Auth::user(); $basic = GeneralSetting::first(); $api_id = $basic->cuid; $api_key = $basic->ckapi; $authorization = $basic->tokenpass; if ($user->balance < $pay) { $notify[] = array("error", "You Dont Have Enough Fund in Your Wallet to Complete This Transaction"); return back()->withNotify($notify); } $bet = Bet::whereName($name)->whereStatus(1)->first(); $trox = getTrx(); $ini_balance = $user->balance; $user->balance = $ini_balance - $pay; $user->save(); $userID = $api_id; $APIKey = $api_key; $ip = "0.0.0.0"; $curl = curl_init(); curl_setopt_array($curl, array(CURLOPT_URL => "https://www.nellobytesystems.com/APIBettingV1.asp?UserID={$userID}&APIKey={$APIKey}&BettingCompany={$name}&CustomerID={$customerid2}&Amount={$amount}&RequestID={$trox}&CallBackURL='https://coderzbillz.tk/bill.php'", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "GET", CURLOPT_HTTPHEADER => array("Content-Type: application/json"))); $content = curl_exec($curl); $result = json_decode($content, true); $err = curl_errno($curl); $errmsg = curl_error($curl); curl_close($curl); if ($result["status"] !== "ORDER_RECEIVED") { Bill::create(array("user_id" => $user->id, "amount" => $amount, "number" => $customerid, "name" => $name, "trx" => $trox, "network" => $customerid2, "charge" => $pay, "fee" => $bet->fee, "gateway" => $content, "ini_balance" => $ini_balance, "newbalance" => $user->balance, "airtime_type" => 22, "status" => 0)); $notify[] = array("error", $result["status"]); } else { $j = getAmount($ini_balance); Bill::create(array("user_id" => $user->id, "amount" => $amount, "number" => $customerid, "name" => $name, "trx" => $trox, "network" => $customerid2, "charge" => $pay, "fee" => $bet->fee, "gateway" => $content, "ini_balance" => $ini_balance, "newbalance" => $user->balance, "airtime_type" => 22, "status" => 1)); $bet = Bet::whereName($name)->whereStatus(1)->first(); Message::create(array("user_id" => $user->id, "title" => "Bet Wallet", "details" => "Your {$bet->name} Wallet Has Been Successfully Recharged with {$basic->cur_text} {$amount}. Your Initial Balance Was {$basic->cur_text} {$j} and Your Final Balance is {$basic->cur_text} {$user->balance}. Thank You For Choosing {$basic->sitename}", "admin" => 1, "status" => 0)); $auth = Auth::user(); $to_name = $auth->username; $sitename = env("APP_NAME"); $to_email = $auth->email; $heading = "Bet BIll Payment"; $data = array("name" => $auth->username, "heading" => "Bet Payment", "body" => "Your {$bet->name} Wallet Has Been Successfully Recharged with {$basic->cur_text} {$amount}. Your Initial Balance Was {$basic->cur_text} {$j} and Your Final Balance is {$basic->cur_text} {$user->balance}. Thank You For Choosing {$sitename}. Cheers"); Mail::send("partials.pmail", $data, static function ($message) use($to_name, $heading, $to_email) { $message->to($to_email, $to_name, $heading)->subject("Transaction Successful"); $message->from(env("MAIL_USERNAME"), env("APP_NAME")); }); $notify[] = array("success", "Transaction Successful"); } return redirect()->route("user.betlog")->withNotify($notify); } public function rechargelog() { $user = User::find(Auth::user()->id); $data["page_title"] = "Recharge Log"; $data["empty_message"] = "No Record Found"; $data["log"] = Bill::whereAirtime_type(1)->whereUser_id($user->id)->latest()->paginate(20); return view($this->activeTemplate . ".user.merchant.recharge-log", $data); } public function voucherlog() { $user = User::find(Auth::user()->id); $data["page_title"] = "Voucher Log"; $data["empty_message"] = "No Record Found"; $data["log"] = Bill::whereAirtime_type(18)->whereUser_id($user->id)->latest()->paginate(20); return view($this->activeTemplate . ".user.merchant.voucher-log", $data); } public function conversionlog() { $user = User::find(Auth::user()->id); $data["page_title"] = "Conversion Log"; $data["empty_message"] = "No Record Found"; $data["log"] = Bill::whereAirtime_type(5)->whereUser_id($user->id)->latest()->paginate(20); return view($this->activeTemplate . ".user.merchant.conversion-log", $data); } public function conversionsearch(Request $request) { $request->validate(array("trx" => "required")); $data["page_title"] = "Conversion Log Result"; $user = User::find(Auth::user()->id); $count = Bill::whereTrx($request->trx)->whereAirtime_type(5)->whereUser_id($user->id)->count(); if ($count > 0) { $data["log"] = Bill::whereTrx($request->trx)->whereAirtime_type(5)->whereUser_id($user->id)->paginate(30); return view($this->activeTemplate . ".user.merchant.conversion-log", $data); } return back()->with("alert", "There is No Transaction With this Entry ."); } public function conversionsearchget() { $user = User::find(Auth::user()->id); $data["page_title"] = "Conversion Log"; $track = Session::get("Track"); $count = Bill::whereTrx($track)->whereAirtime_type(5)->whereUser_id($user->id)->count(); if ($count > 0) { $data["log"] = Bill::whereNetwork($track)->whereAirtime_type(5)->whereUser_id($user->id)->paginate(30); return view($this->activeTemplate . ".user.merchant.conversion-log", $data); } return back()->with("alert", "There is No Transaction With this Entry ."); } public function internetlog() { $user = User::find(Auth::user()->id); $data["page_title"] = "Internet Data Subscriptions"; $data["empty_message"] = "No Record Found"; $data["log"] = Bill::whereAirtime_type(2)->whereUser_id($user->id)->latest()->paginate(20); return view($this->activeTemplate . ".user.merchant.internet-log", $data); } public function internetloga() { $user = User::find(Auth::user()->id); $data["page_title"] = "Datacard Subscriptions"; $data["empty_message"] = "No Record Found"; $data["log"] = Bill::whereAirtime_type("datacard")->whereUser_id($user->id)->latest()->paginate(20); return view($this->activeTemplate . ".user.merchant.internet-loga", $data); } public function tvlog() { $user = User::find(Auth::user()->id); $data["page_title"] = "Cable TV Subscriptions"; $data["empty_message"] = "No Record Found"; $data["log"] = Bill::whereAirtime_type("cable")->whereUser_id($user->id)->latest()->paginate(20); return view($this->activeTemplate . "user.merchant.tv-log", $data); } public function necolog() { $user = User::find(Auth::user()->id); $data["page_title"] = "Neco Result Checker"; $data["empty_message"] = "No Record Found"; $data["log"] = Bill::whereAirtime_type("neco")->whereUser_id($user->id)->latest()->paginate(20); return view($this->activeTemplate . "user.merchant.neco-log", $data); } public function waeclog() { $user = User::find(Auth::user()->id); $data["page_title"] = "WAEC Result Checker"; $data["empty_message"] = "No Record Found"; $data["log"] = Bill::whereAirtime_type("waec")->whereUser_id($user->id)->latest()->paginate(20); return view($this->activeTemplate . "user.merchant.waec-log", $data); } public function waecrlog() { $user = User::find(Auth::user()->id); $data["page_title"] = "WAEC Registration Pin"; $data["empty_message"] = "No Record Found"; $data["log"] = Bill::whereAirtime_type("waecr")->whereUser_id($user->id)->latest()->paginate(20); return view($this->activeTemplate . "user.merchant.waecr-log", $data); } public function nabteblog() { $user = User::find(Auth::user()->id); $data["page_title"] = "Nabteb Result Checker"; $data["empty_message"] = "No Record Found"; $data["log"] = Bill::whereAirtime_type("nabteb")->whereUser_id($user->id)->latest()->paginate(20); return view($this->activeTemplate . "user.merchant.nabteb-log", $data); } public function nbaislog() { $user = User::find(Auth::user()->id); $data["page_title"] = "Nbais Result Checker"; $data["empty_message"] = "No Record Found"; $data["log"] = Bill::whereAirtime_type("nbais")->whereUser_id($user->id)->latest()->paginate(20); return view($this->activeTemplate . "user.merchant.nbais-log", $data); } public function powerlog() { $user = User::find(Auth::user()->id); $data["page_title"] = "Electricity Bill Payments"; $data["empty_message"] = "No Record Found"; $data["log"] = Bill::whereAirtime_type("power")->whereUser_id($user->id)->latest()->paginate(20); return view($this->activeTemplate . ".user.merchant.power-log", $data); } public function betlog() { $user = User::find(Auth::user()->id); $data["page_title"] = "Bet Bill Payments"; $data["empty_message"] = "No Record Found"; $data["log"] = Bill::whereAirtime_type("bet")->whereUser_id($user->id)->latest()->paginate(20); return view($this->activeTemplate . ".user.merchant.bet-log", $data); } public function rechargesearch(Request $request) { $this->validate($request, array("trx" => "required")); $user = User::find(Auth::user()->id); $trx = $request->trx; $data["page_title"] = "Airtime Transactions"; $count = Bill::whereAirtime_type("airtime")->whereUser_id($user->id)->whereTrx($trx)->orWhere("mobileno", $trx)->count(); if ($count < 1) { $notify[] = array("error", "There is no transaction with this transaction number"); return back()->withNotify($notify); } $data["log"] = Bill::whereAirtime_type("airtime")->whereUser_id($user->id)->whereTrx($trx)->orWhere("mobileno", $trx)->latest()->paginate(30); $data["network"] = Internet::latest()->get(); return view($this->activeTemplate . ".user.merchant.recharge-log", $data); } public function rechargesearchget(Request $request) { $user = User::find(Auth::user()->id); $trx = $request->trx; $data["page_title"] = "Airtime Transactions"; $count = Bill::whereAirtime_type("airtime")->whereUser_id($user->id)->whereTrx($trx)->orWhere("mobileno", $trx)->count(); if ($count < 1) { $notify[] = array("error", "There is no transaction with this transaction number"); return back()->withNotify($notify); } $data["log"] = Bill::whereAirtime_type("airtime")->whereUser_id($user->id)->whereTrx($trx)->orWhere("mobileno", $trx)->latest()->paginate(30); $data["network"] = Internet::latest()->get(); return view($this->activeTemplate . ".user.merchant.recharge-log", $data); } public function datasearch(Request $request) { $this->validate($request, array("trx" => "required")); $user = User::find(Auth::user()->id); $trx = $request->trx; $data["page_title"] = "Data Subscription Transactions"; $count = Bill::whereAirtime_type(2)->whereUser_id($user->id)->whereTrx($trx)->orWhere("mobileno", $trx)->count(); if ($count < 1) { $notify[] = array("error", "There is no transaction with this transaction number"); return back()->withNotify($notify); } $data["log"] = Bill::whereAirtime_type(2)->whereUser_id($user->id)->whereTrx($trx)->orWhere("mobileno", $trx)->latest()->paginate(30); $data["network"] = Internet::latest()->get(); return view($this->activeTemplate . ".user.merchant.internet-log", $data); } public function datasearchget(Request $request) { $user = User::find(Auth::user()->id); $trx = $request->trx; $data["page_title"] = "Data Subscription Transactions"; $count = Bill::whereAirtime_type(2)->whereUser_id($user->id)->whereTrx($trx)->orWhere("mobileno", $trx)->count(); if ($count < 1) { $notify[] = array("error", "There is no transaction with this transaction number"); return back()->withNotify($notify); } $data["log"] = Bill::whereAirtime_type(2)->whereUser_id($user->id)->whereTrx($trx)->orWhere("mobileno", $trx)->latest()->paginate(30); $data["network"] = Internet::latest()->get(); return view($this->activeTemplate . ".user.merchant.internet-log", $data); } public function datasearcha(Request $request) { $this->validate($request, array("trx" => "required")); $user = User::find(Auth::user()->id); $trx = $request->trx; $data["page_title"] = "Data Subscription Transactions"; $count = Bill::whereAirtime_type(2)->whereUser_id($user->id)->whereTrx($trx)->orWhere("mobileno", $trx)->count(); if ($count < 1) { $notify[] = array("error", "There is no transaction with this transaction number"); return back()->withNotify($notify); } $data["log"] = Bill::whereAirtime_type(2)->whereUser_id($user->id)->whereTrx($trx)->orWhere("mobileno", $trx)->latest()->paginate(30); $data["network"] = Internet::latest()->get(); return view($this->activeTemplate . ".user.merchant.internet-loga", $data); } public function datasearchgeta(Request $request) { $user = User::find(Auth::user()->id); $trx = $request->trx; $data["page_title"] = "Data Subscription Transactions"; $count = Bill::whereAirtime_type(2)->whereUser_id($user->id)->whereTrx($trx)->orWhere("mobileno", $trx)->count(); if ($count < 1) { $notify[] = array("error", "There is no transaction with this transaction number"); return back()->withNotify($notify); } $data["log"] = Bill::whereAirtime_type(2)->whereUser_id($user->id)->whereTrx($trx)->orWhere("mobileno", $trx)->latest()->paginate(30); $data["network"] = Internet::latest()->get(); return view($this->activeTemplate . "user.merchant.internet-loga", $data); } public function tvsearch(Request $request) : RedirectResponse { $request->validate(array("trx" => "required")); Session::put("Track", $request->trx); return redirect()->route($this->activeTemplate . "tvsearchget"); } public function tvsearchget() { $user = User::find(Auth::user()->id); $data["page_title"] = "TV Subscription"; $track = Session::get("Track"); if ($track == "DSTV") { $code = 1; $count2 = Bill::whereNetwork($code)->whereAirtime_type("cable")->whereUser_id($user->id)->count(); if ($count2 > 0) { $data["log"] = Bill::whereNetwork($code)->whereAirtime_type("cable")->whereUser_id($user->id)->paginate(30); return view($this->activeTemplate . "user.merchant.tv-log", $data); } } if ($track == "GOTV") { $code = 2; $count2 = Bill::whereNetwork($code)->whereAirtime_type("cable")->whereUser_id($user->id)->count(); if ($count2 > 0) { $data["log"] = Bill::whereNetwork($code)->whereAirtime_type("cable")->whereUser_id($user->id)->paginate(30); return view($this->activeTemplate . "user.merchant.tv-log", $data); } } if ($track == "STARTIMES") { $code = 3; $count2 = Bill::whereNetwork($code)->whereAirtime_type("cable")->whereUser_id($user->id)->count(); if ($count2 > 0) { $data["log"] = Bill::whereNetwork($code)->whereAirtime_type("cable")->whereUser_id($user->id)->paginate(30); return view($this->activeTemplate . "user.merchant.tv-log", $data); } } if ($track == "dstv") { $code = 1; $count2 = Bill::whereNetwork($code)->whereAirtime_type("cable")->whereUser_id($user->id)->count(); if ($count2 > 0) { $data["log"] = Bill::whereNetwork($code)->whereAirtime_type("cable")->whereUser_id($user->id)->paginate(30); return view($this->activeTemplate . "user.merchant.tv-log", $data); } } if ($track == "gotv") { $code = 2; $count2 = Bill::whereNetwork($code)->whereAirtime_type("cable")->whereUser_id($user->id)->count(); if ($count2 > 0) { $data["log"] = Bill::whereNetwork($code)->whereAirtime_type("cable")->whereUser_id($user->id)->paginate(30); return view($this->activeTemplate . "user.merchant.tv-log", $data); } } if ($track == "startimes") { $code = 3; $count2 = Bill::whereNetwork($code)->whereAirtime_type("cable")->whereUser_id($user->id)->count(); if ($count2 > 0) { $data["log"] = Bill::whereNetwork($code)->whereAirtime_type("cable")->whereUser_id($user->id)->paginate(30); return view($this->activeTemplate . "user.merchant.tv-log", $data); } } $count1 = Bill::whereTrx($track)->whereAirtime_type(4)->whereUser_id($user->id)->count(); if ($count1 > 0) { $data["log"] = Bill::whereTrx($track)->whereAirtime_type("cable")->whereUser_id($user->id)->paginate(30); return view($this->activeTemplate . "user.merchant.tv-log", $data); } $count3 = Bill::whereTrx($track)->whereAirtime_type("cable")->whereUser_id($user->id)->count(); if ($count3 > 0) { $data["log"] = Bill::whereTrx($track)->whereAirtime_type("cable")->whereUser_id($user->id)->paginate(30); return view($this->activeTemplate . "user.merchant.tv-log", $data); } return back()->with("alert", "There is no transaction with this entry ."); } public function powersearch(Request $request) : RedirectResponse { $request->validate(array("trx" => "required")); Session::put("Track", $request->trx); return redirect()->route($this->activeTemplate . "powersearchget"); } public function powersearchget() { $user = User::find(Auth::user()->id); $data["page_title"] = "Electricity Bills"; $track = Session::get("Track"); if ($track == "EKEDC") { $code = 1; $count2 = Bill::whereNetwork($code)->whereAirtime_type("power")->whereUser_id($user->id)->count(); if ($count2 > 0) { $data["log"] = Bill::whereNetwork($code)->whereAirtime_type("power")->whereUser_id($user->id)->paginate(30); return view($this->activeTemplate . "user.merchant.power-log", $data); } } if ($track == "IKEDC") { $code = 2; $count2 = Bill::whereNetwork($code)->whereAirtime_type("power")->whereUser_id($user->id)->count(); if ($count2 > 0) { $data["log"] = Bill::whereNetwork($code)->whereAirtime_type("power")->whereUser_id($user->id)->paginate(30); return view($this->activeTemplate . "user.merchant.power-log", $data); } } if ($track == "KEDCO") { $code = 4; $count2 = Bill::whereNetwork($code)->whereAirtime_type("power")->whereUser_id($user->id)->count(); if ($count2 > 0) { $data["log"] = Bill::whereNetwork($code)->whereAirtime_type("power")->whereUser_id($user->id)->paginate(30); return view($this->activeTemplate . "user.merchant.power-log", $data); } } if ($track == "PHEDC") { $code = 5; $count2 = Bill::whereNetwork($code)->whereAirtime_type("power")->whereUser_id($user->id)->count(); if ($count2 > 0) { $data["log"] = Bill::whereNetwork($code)->whereAirtime_type("power")->whereUser_id($user->id)->paginate(30); return view($this->activeTemplate . "user.merchant.power-log", $data); } } if ($track == "JED") { $code = 6; $count2 = Bill::whereNetwork($code)->whereAirtime_type("power")->whereUser_id($user->id)->count(); if ($count2 > 0) { $data["log"] = Bill::whereNetwork($code)->whereAirtime_type("power")->whereUser_id($user->id)->paginate(30); return view($this->activeTemplate . "user.merchant.power-log", $data); } } if ($track == "AEDC") { $code = 3; $count2 = Bill::whereNetwork($code)->whereAirtime_type("power")->whereUser_id($user->id)->count(); if ($count2 > 0) { $data["log"] = Bill::whereNetwork($code)->whereAirtime_type("power")->whereUser_id($user->id)->paginate(30); return view($this->activeTemplate . "user.merchant.power-log", $data); } } if ($track == "IBEDC") { $code = 7; $count2 = Bill::whereNetwork($code)->whereAirtime_type("power")->whereUser_id($user->id)->count(); if ($count2 > 0) { $data["log"] = Bill::whereNetwork($code)->whereAirtime_type("power")->whereUser_id($user->id)->paginate(30); return view($this->activeTemplate . "user.merchant.power-log", $data); } } if ($track == "EEDC") { $code = "08"; $count2 = Bill::whereNetwork($code)->whereAirtime_type("power")->whereUser_id($user->id)->count(); if ($count2 > 0) { $data["log"] = Bill::whereNetwork($code)->whereAirtime_type("power")->whereUser_id($user->id)->paginate(30); return view($this->activeTemplate . "user.merchant.power-log", $data); } } $count1 = Bill::whereTrx($track)->whereAirtime_type("power")->whereUser_id($user->id)->count(); if ($count1 > 0) { $data["log"] = Bill::whereTrx($track)->whereAirtime_type("power")->whereUser_id($user->id)->paginate(30); return view($this->activeTemplate . "user.merchant.power-log", $data); } $count3 = Bill::whereTrx($track)->whereAirtime_type("power")->whereUser_id($user->id)->count(); if ($count3 > 0) { $data["log"] = Bill::whereTrx($track)->whereAirtime_type("power")->whereUser_id($user->id)->paginate(30); return view($this->activeTemplate . "user.merchant.power-log", $data); } return back()->with("alert", "There is No Transaction With this Entry ."); } public function developerapi() { $user = User::find(Auth::user()->id); $data["page_title"] = "Developer Api"; if ($user->developer > 0) { return view($this->activeTemplate . "user.developer.index", $data); } $notify[] = array("error", "You Dont Have Developer API Permission Yet. Please Contact Admin For Permission"); return back()->withNotify($notify); } public function developerapiairtime() { $user = User::find(Auth::user()->id); $data["page_title"] = "Api Airtime"; if ($user->developer > 0) { return view($this->activeTemplate . "user.developer.airtime", $data); } $notify[] = array("error", "You Dont Have Developer API Permission Yet. Please Contact Admin For Permission"); return back()->withNotify($notify); } public function developerapidata() { $user = User::find(Auth::user()->id); $data["page_title"] = "Api Internet Data"; if ($user->developer > 0) { $data["bundle"] = Internetbundle::whereStatus(1)->get(); return view($this->activeTemplate . "user.developer.data", $data); } $notify[] = array("error", "You Dont Have Developer API Permission Yet. Please Contact Admin For Permission"); return back()->withNotify($notify); } public function developerapidata2() { $user = User::find(Auth::user()->id); $data["page_title"] = "Api Internet Data2"; if ($user->developer > 0) { $data["bundle"] = Internetbundle2::whereStatus(1)->get(); return view($this->activeTemplate . "user.developer.data2", $data); } $notify[] = array("error", "You Dont Have Developer API Permission Yet. Please Contact Admin For Permission"); return back()->withNotify($notify); } public function developerapicabletv() { $user = User::find(Auth::user()->id); $data["page_title"] = "Api Cable TV"; if ($user->developer > 0) { $data["bundle"] = Decodersub::whereStatus(1)->get(); return view($this->activeTemplate . "user.developer.cabletv", $data); } $notify[] = array("error", "You Dont Have Developer API Permission Yet. Please Contact Admin For Permission"); return back()->withNotify($notify); } public function developerapipower() { $user = User::find(Auth::user()->id); $data["page_title"] = "Api Power"; if ($user->developer > 0) { return view($this->activeTemplate . ".user.developer.power", $data); } $notify[] = array("error", "You Dont Have Developer API Permission Yet. Please Contact Admin For Permission"); return back()->withNotify($notify); } } ?>

Did this file decode correctly?

Original Code

<?php
 namespace App\Http\Controllers; use App\Models\AccidentInsurance; use App\Models\Bet; use App\Models\Currency; use App\Models\Giftcard; use App\Models\HomeInsurance; use App\Models\Datacard; use App\Models\DataCardBundle; use App\Models\Internex; use App\Models\Jamb; use App\Models\MotorInsurance; use App\Models\Nabteb; use App\Models\Nbais; use App\Models\Neco; use App\Models\DatacardLog; use App\Models\Plan; use App\Models\Waec; use App\Models\WaecReg; use App\Models\Transaction; use Exception; use Illuminate\Contracts\Foundation\Application; use Illuminate\Contracts\View\Factory; use Illuminate\Contracts\View\View; use Illuminate\Http\RedirectResponse; use Illuminate\Http\Request; use Illuminate\Support\Facades\Auth; use App\Models\GeneralSetting; use App\Models\Internet; use App\Models\Internetbundle; use App\Models\Message; use App\Models\Bill; use App\Models\Power; use App\Models\Decoder; use App\Models\Decodersub; use Illuminate\Support\Facades\Hash; use Illuminate\Support\Facades\DB; use Carbon\Carbon; use Illuminate\Support\Facades\Validator; use Illuminate\Validation\ValidationException; use Illuminate\Support\Facades\Mail; use App\Models\User; use Illuminate\Support\Facades\Session; use JsonException; use Psr\Container\ContainerExceptionInterface; use Psr\Container\NotFoundExceptionInterface; use Stevebauman\Purify\Facades\Purify; use App\Http\Middleware\RateLimiter; class MerchantController extends Controller { public function __construct() { $this->activeTemplate = activeTemplate(); $this->middleware(RateLimiter::class)->only(['rechargenow','internetdatapost2','internetdatapost2a','cabletvpay2','electricitypay2','neconow','waecnow','nabtebnow','nbaisnow']); } public function education() { $data["\160\141\x67\145\137\164\151\164\154\x65"] = "\x45\144\165\x63\141\164\151\157\156"; return view($this->activeTemplate . "\x75\x73\x65\x72\56\x6d\145\162\143\150\x61\156\164\x2e\145\144\165\x63\x61\x74\x69\157\x6e", $data); } public function convertairtime() { $data["\x70\x61\x67\x65\137\164\x69\x74\x6c\x65"] = "\x43\157\156\166\145\162\164\40\x41\151\x72\x74\x69\155\x65"; $data["\156\145\x74\167\x6f\162\x6b"] = Internex::whereSwap(1)->whereStatus(1)->latest()->get(); $datanet = Internex::whereSwap(1)->whereStatus(1)->count(); $dnet = json_decode($datanet, true, 512, JSON_THROW_ON_ERROR); if ($dnet < 1) { $notify[] = array("\x65\162\162\157\x72", "\x53\145\162\166\x69\143\145\40\x48\141\163\40\x42\x65\145\x6e\40\104\151\163\141\x62\154\145\x64"); return back()->withNotify($notify); } return view($this->activeTemplate . "\x2e\x75\163\x65\162\56\155\145\x72\x63\150\141\x6e\x74\x2e\x63\x6f\156\166\x65\x72\164\55\x61\151\x72\164\151\155\145", $data); } public function convertnow(Request $request) : RedirectResponse { $r = $this->validate($request, array("\155\157\x62\151\x6c\145\x6e\x6f" => "\x72\x65\x71\165\151\162\145\x64\174\x72\x65\147\145\x78\72\57\136\x28\133\60\55\71\134\x73\134\x2d\x5c\53\x5c\x28\134\x29\135\52\51\44\57\x7c\x64\151\147\151\164\x73\x3a\61\x31", "\155\157\x62\x69\x6c\x65\156\x6f\62" => "\x72\x65\161\x75\x69\x72\145\x64\x7c\162\x65\x67\x65\x78\x3a\x2f\x5e\x28\x5b\60\x2d\x39\x5c\x73\x5c\55\134\x2b\x5c\x28\134\x29\x5d\52\x29\x24\x2f\174\x64\151\x67\x69\x74\163\x3a\x31\x31", "\156\x65\x74\167\x6f\162\x6b" => "\x72\x65\161\x75\x69\162\145\x64\174\x6e\x75\155\x65\x72\151\143", "\141\x6d\157\x75\156\164" => "\162\145\x71\x75\151\162\x65\x64\174\156\165\155\x65\162\x69\x63\x7c\155\151\x6e\72\x31\x30\60\x30")); $phone = $request->mobileno; $phone2 = $request->mobileno2; $amount = $request->amount; $user = Auth::user(); $basic = GeneralSetting::first(); $network = Internex::find($request->network); $api_id = $basic->merchantid; $api_key = $basic->merchantkey; $trx = getTrx(); if (isset($request->pin)) { try { $c_password = Auth::user()->transpin; if (Hash::check($request->pin, $c_password)) { } else { $notify[] = array("\x65\x72\x72\157\x72", "\x54\162\x61\x6e\163\141\143\164\x69\157\156\x20\x50\151\156\40\111\163\40\x49\156\x63\157\x72\x72\x65\x63\x74"); return back()->withNotify($notify); } } catch (\PDOException $e) { $notify[] = array("\145\162\162\157\162", $e->getMessage()); return back()->withNotify($notify); } } if ($phone !== $phone2) { $notify[] = array("\x65\x72\162\157\162", "\131\157\165\x72\x20\x50\x68\x6f\x6e\145\40\116\165\155\x62\145\162\40\x43\x6f\x6e\146\151\x72\155\141\x74\x69\x6f\x6e\40\111\163\x20\x57\162\157\156\147\56\40\x50\x6c\145\141\x73\145\x20\164\162\171\x20\141\147\x61\x69\x6e"); return back()->withNotify($notify); } Message::create(array("\x75\x73\x65\162\x5f\151\144" => $user->id, "\x74\x69\x74\154\145" => "\101\x69\162\164\x69\x6d\145\x20\x43\x6f\x6e\x76\145\x72\x73\151\157\156", "\x64\x65\x74\x61\151\x6c\163" => "\x59\x6f\165\x72\x20{$network->name}\40\x41\151\x72\164\x69\x6d\145\x20\x43\157\x6e\x76\145\162\163\151\x6f\x6e\x20\106\x72\157\155\x20\120\150\x6f\156\145\x20\x4e\x75\155\x62\145\x72\x20{$phone}\40\110\141\x73\x20\102\145\145\156\40\x53\165\143\x63\x65\x73\x73\x66\165\x6c\x6c\171\x20\x53\145\156\164\40\x54\x6f\40\x54\150\145\x20\x41\144\x6d\151\156\x20\x46\157\162\40\x43\x6f\156\146\151\x72\155\141\x74\151\x6f\156\x2e\x20\x54\x68\145\40\x55\156\151\x74\x20\120\162\x69\143\x65\x20\117\x66\x20\131\x6f\x75\162\x20\x41\151\x72\x74\151\155\x65\x20\x57\x69\154\154\x20\x42\x65\x20\x43\x72\x65\144\151\x74\x65\x64\40\x54\157\x20\131\x6f\x75\162\x20\x44\x65\160\x6f\x73\151\x74\x20\102\x61\154\141\156\x63\x65\x20\x4f\156\x63\x65\40\x57\x65\40\126\x65\162\x69\x66\171\40\131\x6f\165\162\40\x43\x6f\x6e\166\x65\162\x73\151\x6f\x6e\54\40\124\150\141\x6e\153\x20\x59\x6f\x75\x20\106\x6f\162\40\103\150\x6f\x6f\163\151\156\x67\40{$basic->sitename}", "\141\144\x6d\151\x6e" => 1, "\x73\x74\x61\164\165\163" => 0)); Bill::create(array("\165\x73\x65\x72\137\x69\x64" => $user->id, "\x63\150\141\162\147\145" => $amount * $network->rate / 100, "\x61\155\x6f\165\x6e\x74" => $amount, "\x6d\157\x62\x69\x6c\145\x6e\x6f" => $phone, "\164\x72\x78" => $trx, "\156\x65\x74\167\x6f\x72\x6b" => $request->network, "\x6e\x65\167\142\141\x6c\x61\156\x63\145" => $user->balance, "\x61\151\162\x74\x69\155\145\x5f\164\x79\160\x65" => 5, "\x73\x74\141\164\165\x73" => 0)); $data = array("\156\141\155\145" => $user->username, "\145\x6d\141\x69\154" => $user->email, "\x62\x6f\x64\171" => "\x59\x6f\x75\x72\40{$network->name}\x20\x41\x69\162\164\151\x6d\145\x20\103\157\x6e\x76\x65\162\x73\151\157\x6e\40\106\x72\157\x6d\x20\120\150\157\x6e\x65\x20\x4e\x75\155\142\x65\162\40{$phone}\x20\x48\141\163\x20\x42\145\145\156\40\123\x75\143\143\x65\x73\163\x66\165\154\154\x79\40\123\x65\x6e\x74\x20\x54\157\40\x54\150\145\40\101\144\x6d\151\x6e\40\x46\157\162\x20\x43\x6f\x6e\x66\151\x72\x6d\141\164\x69\x6f\156\x2e\x20\x54\x68\145\40\x55\x6e\151\x74\x20\120\162\x69\x63\x65\40\x4f\146\x20\131\x6f\165\162\40\101\151\x72\164\151\155\x65\x20\x57\x69\x6c\154\x20\102\x65\40\x43\x72\x65\x64\151\164\x65\x64\x20\124\157\40\x59\157\165\162\40\104\x65\160\157\163\151\x74\40\x42\x61\x6c\141\x6e\x63\x65\40\117\x6e\143\x65\40\x57\145\x20\x56\145\162\151\x66\x79\x20\x59\x6f\x75\x72\40\103\x6f\x6e\166\145\x72\163\x69\157\x6e\x2c\x20\x54\x68\141\x6e\x6b\40\x59\x6f\165\x20\x46\x6f\162\x20\x43\150\x6f\157\163\x69\156\147\x20{$basic->sitename}", "\150\145\141\x64\151\x6e\147" => "\101\151\x72\x74\151\x6d\x65\40\103\157\156\x76\x65\x72\x73\x69\157\156"); Mail::send("\160\x61\x72\x74\x69\x61\x6c\x73\56\x70\155\x61\151\154", $data, static function ($message) { $user = User::find(Auth::user()->id); $message->to($user->email, $user->username)->subject("\x41\x69\x72\164\151\x6d\x65\40\x43\x6f\x6e\166\x65\x72\x73\x69\157\156"); }); $notify[] = array("\x73\165\143\x63\145\x73\x73", "\x41\151\162\x74\x69\155\x65\40\103\x6f\x6e\x76\145\162\x73\x69\x6f\x6e\x20\120\x72\157\143\145\163\163\40\x57\x61\163\x20\x53\165\x63\x63\x65\163\163\x66\x75\154"); return redirect()->route("\x75\163\x65\x72\x2e\150\157\155\x65")->withNotify($notify); } public function printvoucher() { $data["\x70\x61\147\145\137\164\x69\164\x6c\145"] = "\x50\x72\x69\x6e\x74\x20\x56\x6f\x75\143\x68\x65\x72"; $data["\x6e\145\x74\x77\157\x72\x6b"] = Internex::wherePhone(1)->whereStatus(1)->latest()->get(); $datanet = Internex::wherePhone(1)->whereStatus(1)->count(); $dnet = json_decode($datanet, true, 512, JSON_THROW_ON_ERROR); if ($dnet < 1) { $notify[] = array("\x65\162\x72\157\x72", "\x53\x65\162\x76\151\x63\145\x20\x48\x61\163\x20\x42\145\x65\x6e\40\104\151\x73\x61\142\x6c\145\144"); return back()->withNotify($notify); } return view($this->activeTemplate . "\56\165\x73\x65\x72\x2e\x6d\145\162\x63\150\141\x6e\x74\56\x76\x6f\x75\x63\x68\x65\162\x70\x72\x69\156\164", $data); } public function printvouchernow(Request $request) : RedirectResponse { $t = $this->validate($request, array("\161\165\x61\x6e\x74\151\164\171" => "\162\x65\x71\x75\151\162\145\144\174\156\165\x6d\x65\162\x69\x63", "\x6e\145\164\167\x6f\x72\153" => "\x72\x65\161\x75\x69\x72\x65\x64\x7c\x73\164\162\151\x6e\x67", "\141\155\x6f\165\156\x74" => "\x72\x65\161\x75\x69\x72\145\144\174\x6e\x75\155\x65\162\x69\x63\174\155\151\156\72\x31\60\x30")); $quantity = $request->quantity; $amount = $request->amount; $networks = $request->network; $trx = getTrx(); $user = Auth::user(); $basic = GeneralSetting::first(); $api_id = $basic->cuid; $api_key = $basic->ckapi; $dis = $basic->airtimediscount; $dis2 = $basic->datadiscount; $fee = $amount / 100 * $dis2; $pay = $amount - $fee; $cost = $pay * $quantity; if (str_starts_with((string) $amount, "\55")) { $notify[] = array("\145\162\162\x6f\x72", "\x59\157\x75\40\x41\x72\x65\40\101\x20\x74\150\x69\145\146"); return redirect()->back()->withNotify($notify); } if ($amount <= 0) { $notify[] = array("\145\162\x72\157\x72", "\111\x6e\x76\x61\154\151\x64\x20\x41\155\x6f\165\156\164"); return redirect()->back()->withNotify($notify); } if ($user->balance < $cost) { $notify[] = array("\145\x72\162\157\x72", "\131\157\165\x20\x44\157\156\164\x20\110\141\x76\x65\x20\x45\x6e\157\165\147\x68\x20\x46\165\x6e\x64\x20\151\156\x20\131\157\x75\x72\40\127\x61\x6c\x6c\145\x74\40\164\157\x20\x43\157\155\x70\154\145\x74\145\40\124\x68\151\x73\40\x54\x72\141\156\163\141\x63\x74\x69\157\x6e"); return back()->withNotify($notify); } if (isset($request->pin)) { try { $c_password = Auth::user()->transpin; if (Hash::check($request->pin, $c_password)) { } else { $notify[] = array("\145\162\162\x6f\162", "\124\x72\x61\x6e\163\141\143\x74\x69\x6f\156\x20\x50\151\x6e\40\111\163\x20\111\156\143\x6f\x72\x72\145\x63\x74"); return back()->withNotify($notify); } } catch (\PDOException $e) { $notify[] = array("\x65\x72\162\x6f\x72", $e->getMessage()); return back()->withNotify($notify); } } $ini_balance = $user->balance; $user->balance -= $cost; $user->save(); $userID = $api_id; $APIKey = $api_key; $ip = "\x31\x36\x32\x2e\60\x2e\x32\60\x39\56\x33\x38"; $curl = curl_init(); curl_setopt_array($curl, array(CURLOPT_URL => "\150\x74\164\x70\163\72\57\57\x77\167\167\x2e\x6e\145\154\x6c\157\142\171\164\x65\163\x79\x73\164\145\155\163\56\143\x6f\155\x2f\101\120\111\x45\120\x49\x4e\126\x31\x2e\x61\x73\160\x3f\125\163\x65\162\x49\x44\x3d{$userID}\x26\101\120\x49\113\x65\x79\75{$APIKey}\46\115\x6f\x62\x69\x6c\x65\x4e\145\x74\167\x6f\x72\153\75{$networks}\46\x56\x61\154\x75\x65\x3d{$amount}\46\x51\x75\x61\156\164\151\x74\x79\75{$quantity}\46\122\145\x71\x75\x65\x73\164\111\104\75{$trx}\46\103\141\x6c\154\102\x61\143\x6b\125\x52\114\75\150\x74\164\x70\x73\72\57\57\x63\x6f\144\145\162\172\x62\x69\154\154\x7a\x2e\164\x6b\x2f", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "\107\105\x54", CURLOPT_HTTPHEADER => array("\x43\x6f\x6f\153\151\145\72\x20\x41\123\x50\x53\x45\123\x53\111\117\116\111\x44\x43\x45\x54\104\x53\101\121\104\x3d\x4f\103\103\106\120\110\112\x43\107\x44\113\113\x44\113\x46\101\x47\x47\x50\x42\x4b\107\110\x4b"))); $r = curl_exec($curl); curl_close($curl); $result = json_decode($r, true); if (!isset($result["\x54\x58\116\x5f\x45\120\111\x4e"][0]["\x74\x72\141\x6e\x73\x61\x63\x74\x69\x6f\156\151\144"])) { Bill::create(array("\165\x73\145\x72\137\151\144" => $user->id, "\x61\x6d\157\x75\x6e\x74" => $amount, "\164\x72\170" => $trx, "\151\156\151\x5f\142\x61\x6c\141\x6e\x63\x65" => $ini_balance, "\x67\141\164\145\167\141\171" => $r, "\156\x75\x6d\x62\145\x72" => $quantity, "\x66\145\145" => $pay, "\x63\x68\141\162\147\145" => $cost, "\141\x69\x72\164\151\155\x65\137\164\171\x70\x65" => 18, "\x6e\x65\x77\x62\141\154\141\156\143\145" => $user->balance, "\x73\x74\x61\164\165\x73" => 2)); $notify[] = array("\145\162\162\x6f\162", "\x54\162\141\x6e\x73\x61\x63\x74\x69\157\x6e\40\x46\x61\x69\154\145\144\56"); } else { Bill::create(array("\x75\163\x65\162\137\151\144" => $user->id, "\x61\x6d\x6f\165\156\164" => $amount, "\164\162\170" => $trx, "\x69\x6e\151\137\142\x61\x6c\x61\x6e\x63\145" => $ini_balance, "\x67\x61\164\145\167\x61\x79" => $r, "\156\165\155\142\x65\162" => $quantity, "\146\145\x65" => $pay, "\x63\x68\141\162\x67\145" => $cost, "\x61\151\x72\164\x69\x6d\145\137\x74\x79\x70\x65" => 18, "\156\x65\x77\142\x61\x6c\141\156\x63\145" => $user->balance, "\163\164\141\x74\x75\163" => 1)); $auth = Auth::user(); $to_name = $auth->username; $sitename = env("\101\x50\120\x5f\x4e\101\115\x45"); $to_email = $auth->email; $heading = "\x52\x65\143\x68\x61\x72\147\145\40\120\162\x69\x6e\164\x69\x6e\147"; $data = array("\156\141\155\145" => $auth->username, "\150\x65\x61\144\151\156\x67" => "\x52\x65\x63\x68\x61\x72\147\145\40\x50\162\151\x6e\164\151\156\x67", "\142\x6f\x64\x79" => "\x59\x6f\x75\162\40{$networks}\40{$basic->cur_text}\x20{$amount}\x20\x56\157\165\x63\150\145\162\40\x50\x72\x69\156\x74\151\x6e\147\x20\117\146\x20{$quantity}\40\125\156\x69\x74\163\x20\110\x61\163\x20\x42\145\x65\x6e\x20\123\165\143\143\x65\x73\163\x66\x75\154\154\x79\x20\x50\162\x6f\143\145\163\163\145\144\56\x20\x54\150\141\x6e\x6b\x20\x79\157\165\x20\146\x6f\162\x20\143\150\157\x6f\x73\x69\x6e\147\x20{$sitename}"); Mail::send("\160\141\162\x74\151\141\x6c\x73\56\x70\155\x61\x69\x6c", $data, static function ($message) use($to_name, $heading, $to_email) { $message->to($to_email, $to_name, $heading)->subject("\x54\162\141\x6e\163\x61\143\x74\x69\157\x6e\x20\123\165\143\143\x65\163\x73\146\165\154"); $message->from(env("\x4d\x41\x49\x4c\x5f\125\123\x45\x52\116\x41\x4d\x45"), env("\101\120\120\x5f\x4e\101\115\x45")); }); $notify[] = array("\163\165\143\x63\x65\163\163", "\101\151\162\x74\151\155\145\40\x56\157\165\x63\150\145\162\x20\x50\165\x72\x63\x68\141\163\x65\x64\40\123\165\x63\x63\x65\x73\x73\x66\x75\x6c\154\x79\41\x21"); } return back()->withNotify($notify); } public function moto() { $data["\160\141\x67\145\137\x74\151\x74\154\x65"] = "\115\157\164\x6f\40\x49\156\x73\x75\x72\x61\x6e\143\x65"; $data["\x6e\x65\164\167\157\x72\x6b"] = MotorInsurance::whereStatus(1)->get(); $datanet = MotorInsurance::whereStatus(1)->count(); $dnet = json_decode($datanet, true, 512, JSON_THROW_ON_ERROR); if ($dnet < 1) { $notify[] = array("\145\162\x72\x6f\162", "\x53\145\x72\166\x69\143\145\40\x48\x61\163\x20\102\145\145\x6e\x20\x44\x69\163\141\142\x6c\x65\x64"); return back()->withNotify($notify); } return view($this->activeTemplate . "\56\165\x73\x65\162\56\155\x65\162\143\x68\x61\156\164\x2e\x6d\157\x74\x6f", $data); } public function motonow(Request $request) : RedirectResponse { $u = $this->validate($request, array("\x74\171\x70\145" => "\x72\145\x71\x75\151\x72\x65\x64\174\x73\164\x72\x69\156\147", "\x73\145\162\x76\x69\x63\x65\x49\x44" => "\162\145\161\x75\x69\x72\145\144\174\x73\164\162\x69\156\x67", "\111\156\x73\165\x72\145\144\137\x4e\141\x6d\x65" => "\162\x65\161\x75\x69\x72\145\144\174\x73\164\x72\x69\156\x67", "\105\x6e\147\x69\x6e\x65\x5f\116\x75\155\x62\145\x72" => "\x72\145\161\165\151\162\x65\144", "\103\x68\x61\x73\151\163\x5f\x4e\165\155\x62\145\162" => "\162\x65\161\165\151\x72\145\x64", "\120\x6c\x61\164\145\137\116\165\155\142\x65\162" => "\162\x65\x71\165\x69\162\145\144", "\x56\145\x68\151\143\154\x65\x5f\115\x61\153\x65" => "\x72\145\161\165\x69\162\x65\x64", "\126\x65\x68\151\143\154\145\137\103\157\154\x6f\x72" => "\162\145\161\165\151\x72\x65\144", "\x56\x65\x68\151\143\x6c\x65\137\115\x6f\x64\x65\x6c" => "\162\145\161\x75\151\162\145\x64", "\x59\145\x61\162\x5f\x6f\x66\x5f\x4d\x61\x6b\145" => "\x72\145\161\x75\x69\x72\x65\x64", "\x43\157\156\x74\141\x63\164\137\101\x64\144\162\145\x73\x73" => "\x72\x65\x71\165\x69\x72\x65\144", "\x6d\x6f\142\x69\x6c\145\x6e\x6f" => "\162\x65\161\x75\151\x72\x65\144\174\x72\145\x67\145\x78\72\57\136\50\x5b\60\x2d\71\134\163\134\55\134\x2b\x5c\50\x5c\51\x5d\52\51\44\x2f\x7c\144\151\x67\151\164\163\72\x31\x31", "\x65\155\141\151\154" => "\162\145\x71\x75\x69\162\145\144\174\x65\155\x61\x69\154\x7c\163\164\x72\151\156\147", "\166\141\162\151\x61\164\x69\157\x6e\137\x63\x6f\x64\145" => "\x72\x65\161\x75\x69\162\x65\144\174\156\165\155\145\162\151\143", "\141\155\157\165\x6e\x74" => "\x72\x65\161\x75\x69\x72\145\144\x7c\156\x75\155\x65\x72\151\x63")); $amount = $request->amount; $serviceID = $request->serviceID; $type = $request->type; $email = $request->email; $Engine_Number = $request->Engine_Number; $Chasis_Number = $request->Chasis_Number; $Plate_Number = $request->Plate_Number; $Vehicle_Make = $request->Vehicle_Make; $Vehicle_Color = $request->Vehicle_Color; $Vehicle_Model = $request->Vehicle_Model; $Year_of_Make = $request->Year_of_Make; $Contact_Address = $request->Contact_Address; $mobileno = $request->mobileno; $variation_code = $request->variation_code; $Insured_Name = $request->Insured_Name; $user = Auth::user(); $basic = GeneralSetting::first(); $api_id = $basic->merchantid; $api_key = $basic->merchantkey; $tokenpass = $basic->tokenpass; if ($user->balance < $amount) { $notify[] = array("\x65\162\162\x6f\x72", "\131\x6f\165\40\x44\x6f\156\164\x20\110\x61\166\145\x20\x45\156\157\165\x67\150\40\x46\165\x6e\144\x20\151\156\x20\x59\157\x75\162\40\127\x61\154\154\145\x74\x20\x74\157\40\103\157\x6d\160\x6c\145\x74\x65\x20\x54\x68\151\x73\40\x54\x72\141\156\x73\x61\x63\164\151\x6f\x6e"); return back()->withNotify($notify); } if (isset($request->pin)) { try { $c_password = Auth::user()->transpin; if (Hash::check($request->pin, $c_password)) { } else { $notify[] = array("\145\162\x72\157\x72", "\124\162\x61\x6e\163\x61\143\x74\151\x6f\156\40\120\151\156\40\x49\163\x20\x49\156\143\157\162\162\145\x63\x74"); return back()->withNotify($notify); } } catch (\PDOException $e) { $notify[] = array("\145\162\162\x6f\x72", $e->getMessage()); return back()->withNotify($notify); } } if (str_starts_with((string) $amount, "\x2d")) { $notify[] = array("\145\162\162\x6f\162", "\x59\x6f\165\x20\x41\x72\x65\x20\x41\40\x74\x68\x69\145\146"); return redirect()->back()->withNotify($notify); } if ($amount <= 0) { $notify[] = array("\145\x72\162\157\x72", "\111\156\166\x61\x6c\151\144\x20\101\155\157\165\156\164"); return redirect()->back()->withNotify($notify); } $trx = getTrx(); $username = $api_id; $password = $api_key; $host = $tokenpass; $ini_balance = $user->balance; $user->balance = $ini_balance - $amount; $user->save(); $data = array("\163\145\162\x76\x69\x63\145\111\104" => $serviceID, "\166\141\x72\x69\141\x74\151\157\x6e\137\x63\157\x64\x65" => $variation_code, "\x49\156\163\165\162\x65\144\x5f\x4e\x61\155\x65" => $Insured_Name, "\105\156\x67\151\x6e\145\137\116\x75\x6d\x62\145\162" => $Engine_Number, "\103\x68\x61\163\x69\x73\x5f\116\x75\x6d\142\x65\162" => $Chasis_Number, "\x50\154\x61\x74\145\x5f\x4e\165\155\142\145\x72" => $Plate_Number, "\142\151\154\154\x65\x72\163\x43\x6f\144\x65" => $Plate_Number, "\126\x65\150\151\143\x6c\x65\x5f\x4d\141\153\145" => $Vehicle_Make, "\x56\x65\150\151\143\154\x65\137\103\157\x6c\157\162" => $Vehicle_Color, "\x56\145\150\x69\143\x6c\145\137\x4d\x6f\144\x65\154" => $Vehicle_Model, "\x59\145\x61\x72\137\x6f\146\137\x4d\141\x6b\145" => $Year_of_Make, "\x43\x6f\x6e\x74\141\143\164\x5f\101\x64\144\162\x65\x73\x73" => $Contact_Address, "\x70\150\x6f\156\145" => $mobileno, "\162\145\161\165\145\163\164\x5f\151\x64" => $trx); $curl = curl_init(); curl_setopt_array($curl, array(CURLOPT_URL => $host, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_USERPWD => $username . "\x3a" . $password, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "\x50\x4f\x53\x54", CURLOPT_POSTFIELDS => $data)); $content = curl_exec($curl); $result = json_decode($content, true); curl_close($curl); if ($result === '' || $result["\143\x6f\144\x65"] !== "\60\60\x30") { $user->balance += $amount; $user->save(); $transaction = new Transaction(); $transaction->user_id = $user->id; $transaction->amount = getAmount($amount); $transaction->post_balance = getAmount($ini_balance); $transaction->final_balance = getAmount($user->balance); $transaction->trx_type = "\x2b"; $transaction->type = 12; $transaction->remark = "\122\x65\x66\165\x6e\144\x65\144"; $transaction->details = "\x59\x6f\165\40\110\141\x76\x65\x20\x42\145\x65\156\40\122\145\x66\165\x6e\x64\x65\144"; $transaction->email = $user->email; $transaction->trx = $trx; $transaction->saveOrFail(); Bill::create(array("\x75\163\x65\x72\x5f\x69\x64" => $user->id, "\141\x6d\x6f\165\156\164" => $amount, "\164\162\x78" => $trx, "\x6d\157\x62\151\154\145\x6e\157" => $mobileno, "\151\156\151\x5f\x62\x61\x6c\x61\x6e\x63\145" => $ini_balance, "\x67\141\164\x65\167\141\x79" => $content, "\141\151\162\164\x69\155\x65\137\164\x79\160\145" => 12, "\156\x65\167\x62\x61\x6c\x61\156\143\145" => $user->balance, "\163\164\x61\164\x75\163" => 0)); $notify[] = array("\145\162\162\x6f\x72", "\131\157\x75\x20\x48\x61\166\x65\x20\x42\145\145\156\x20\122\145\146\165\x6e\144\145\144"); } else { Bill::create(array("\x75\163\x65\x72\x5f\151\x64" => $user->id, "\141\x6d\x6f\x75\156\x74" => $amount, "\164\x72\170" => $trx, "\x6d\157\x62\151\x6c\x65\156\157" => $mobileno, "\151\156\151\x5f\x62\x61\154\141\156\x63\145" => $ini_balance, "\x67\141\x74\x65\167\x61\171" => $content, "\141\x69\x72\164\x69\155\145\137\164\x79\x70\x65" => 12, "\156\145\x77\142\x61\x6c\x61\156\x63\145" => $user->balance, "\x73\164\x61\164\165\x73" => 1)); $j = getAmount($ini_balance); Message::create(array("\165\163\145\162\137\x69\x64" => $user->id, "\164\x69\164\x6c\145" => "\126\x65\x68\x69\143\x6c\x65\x20\111\x6e\x73\x75\x72\141\x6e\x63\x65\x20\120\165\x72\143\150\141\x73\145\144", "\x64\145\x74\141\151\154\x73" => "\x59\157\x75\x20\x48\x61\166\145\x20\123\x75\x63\143\x65\x73\x73\x66\x75\x6c\x6c\x79\40\120\165\162\143\x68\x61\x73\145\144\x20\124\150\151\162\144\40\120\141\x72\164\x79\40\x4d\x6f\164\x6f\162\40\111\156\x73\165\162\141\156\143\145\40\x2d\x20\125\156\x69\x76\145\162\163\141\x6c\40\111\x6e\x73\x75\x72\x61\x6e\x63\145\40\106\157\x72\40{$Insured_Name}\x20\x57\151\x74\150\x20\x45\x6e\147\151\156\x65\x20\x61\x6e\x64\x20\103\x68\141\163\163\x69\163\40\x4e\165\155\x62\x65\162\40{$Engine_Number}\54\x20{$Chasis_Number}\56\40\47\40\x57\157\x72\164\x68\40\157\x66\x20\x27\x2e{$basic->cur_text}\40{$amount}\x2c\x20\131\157\165\162\40\x49\x6e\151\x74\151\x61\x6c\40\x42\141\154\x61\x6e\x63\145\40\x57\x61\163\x20{$basic->cur_text}\40{$j}\40\x61\156\x64\x20\131\157\x75\162\x20\x46\x69\x6e\x61\154\40\x42\141\x6c\x61\x6e\143\145\x20\x69\163\40{$basic->cur_text}\40{$user->balance}\56\40\x54\150\x61\x6e\x6b\x20\x79\157\x75\x20\146\157\x72\x20\x63\x68\157\157\x73\x69\156\x67\x20{$basic->sitename}", "\x61\144\155\x69\156" => 1, "\x73\x74\141\x74\165\163" => 0)); $auth = Auth::user(); $to_name = $auth->username; $sitename = env("\x41\x50\x50\137\x4e\x41\x4d\105"); $to_email = $auth->email; $heading = "\126\x65\x68\x69\143\154\x65\40\x49\156\x73\x75\x72\x61\156\x63\145\x20\120\x75\x72\x63\x68\x61\x73\x65"; $data = array("\x6e\141\x6d\x65" => $auth->username, "\x68\145\x61\144\x69\156\x67" => "\126\145\x68\x69\x63\154\145\x20\111\x6e\163\165\x72\141\x6e\143\145", "\142\157\x64\171" => "\x59\x6f\x75\40\110\141\x76\145\x20\123\165\143\143\x65\x73\x73\146\x75\x6c\x6c\171\40\120\165\162\143\x68\141\163\145\x64\40\x54\150\x69\x72\x64\40\120\141\162\164\171\x20\115\x6f\164\157\x72\40\111\x6e\163\x75\x72\x61\x6e\143\145\x20\55\40\125\156\151\x76\145\x72\x73\141\x6c\x20\x49\x6e\163\x75\x72\x61\x6e\143\145\40\x46\157\x72\x20{$Insured_Name}\x20\x57\x69\164\150\40\x45\156\147\x69\156\x65\40\x61\156\x64\40\103\150\x61\163\x73\x69\x73\40\x4e\x75\x6d\142\145\162\40{$Engine_Number}\x2c\40{$Chasis_Number}\x20\x57\157\x72\x74\x68\40\157\x66\x20{$basic->cur_text}\x20{$amount}\x2c\x20\131\157\x75\162\x20\111\156\151\x74\x69\x61\154\x20\x42\x61\x6c\x61\x6e\x63\145\x20\x57\141\163\x20{$basic->cur_text}\40{$j}\40\x61\x6e\144\x20\131\x6f\x75\162\40\106\151\156\x61\x6c\40\102\x61\154\x61\156\143\145\x20\151\163\x20{$basic->cur_text}\40{$user->balance}\56\x20\124\x68\x61\x6e\153\x20\x79\x6f\x75\x20\x66\x6f\x72\x20\143\150\157\157\163\151\156\x67\40{$sitename}"); Mail::send("\x70\x61\x72\x74\x69\141\154\x73\56\x70\x6d\141\151\x6c", $data, static function ($message) use($to_name, $heading, $to_email) { $message->to($to_email, $to_name, $heading)->subject("\124\162\x61\x6e\x73\141\143\x74\151\x6f\156\40\x53\x75\143\143\x65\163\163\146\x75\x6c"); $message->from(env("\115\101\x49\x4c\137\125\123\x45\122\x4e\101\x4d\105"), env("\101\120\120\137\x4e\101\x4d\105")); }); $notify[] = array("\163\165\x63\143\145\x73\163", "\x56\145\x68\151\143\x6c\145\40\x49\156\163\165\x72\141\156\x63\x65\40\x50\165\162\x63\150\x61\x73\145\144\40\x53\165\143\143\145\163\x73\146\165\154\x6c\x79\x21\41"); } return redirect()->route("\x75\x73\x65\162\56\150\x6f\155\x65")->withNotify($notify); } public function homei() { $data["\160\x61\147\x65\x5f\x74\151\x74\x6c\145"] = "\x48\157\155\x65\x20\x49\x6e\x73\x75\162\141\x6e\x63\x65"; $data["\x6e\145\164\167\x6f\162\153"] = HomeInsurance::whereStatus(1)->get(); $datanet = HomeInsurance::whereStatus(1)->count(); $dnet = json_decode($datanet, true, 512, JSON_THROW_ON_ERROR); if ($dnet < 1) { $notify[] = array("\x65\162\162\157\162", "\x53\145\x72\166\151\143\x65\x20\110\141\x73\x20\x42\x65\x65\x6e\x20\104\151\163\x61\x62\x6c\x65\144"); return back()->withNotify($notify); } return view($this->activeTemplate . "\x2e\x75\163\145\x72\56\x6d\x65\162\x63\150\x61\156\164\56\150\x6f\155\x65\151", $data); } public function homenow(Request $request) : RedirectResponse { $this->validate($request, array("\155\157\142\x69\154\145\x6e\157" => "\162\x65\x71\165\151\162\145\x64\174\x72\145\147\145\x78\72\x2f\136\x28\x5b\60\55\71\x5c\163\134\55\134\x2b\x5c\x28\134\51\135\52\51\44\57\174\x64\151\147\x69\164\x73\72\61\x31", "\163\145\x72\166\x69\x63\x65\x49\x44" => "\162\145\x71\165\151\x72\x65\144", "\146\x75\154\154\x5f\x6e\x61\x6d\145" => "\162\145\x71\165\151\x72\145\x64\174\x73\164\x72\x69\156\147", "\166\141\x72\151\x61\x74\x69\x6f\x6e\137\x63\157\144\145" => "\x72\x65\161\165\x69\162\x65\144", "\x61\x6d\157\165\156\164" => "\x72\145\x71\165\151\x72\x65\144", "\141\x64\144\162\x65\x73\x73" => "\x72\x65\x71\x75\x69\x72\x65\144\x7c\x73\x74\162\x69\x6e\147", "\164\x79\160\x65\x5f\x62\x75\x69\154\144\x69\x6e\147" => "\162\145\x71\x75\151\x72\x65\x64\174\x73\x74\162\151\156\x67", "\x62\x75\x73\151\156\145\163\x73\137\157\143\x63\x75\160\x61\164\x69\x6f\156" => "\162\x65\161\x75\x69\x72\x65\144\174\163\164\x72\151\156\147", "\x64\x61\x74\145\137\x6f\146\x5f\x62\x69\x72\x74\x68" => "\x72\145\x71\x75\x69\162\x65\x64", "\x74\x79\160\x65" => "\x72\x65\161\165\x69\162\145\x64")); $mobileno = $request->mobileno; $serviceID = $request->serviceID; $amount = $request->amount; $type = $request->type; $full_name = $request->full_name; $variation_code = $request->variation_code; $address = $request->address; $type_building = $request->type_building; $business_occupation = $request->business_occupation; $date_of_birth = $request->date_of_birth; $user = Auth::user(); $basic = GeneralSetting::first(); $api_id = $basic->merchantid; $api_key = $basic->merchantkey; $tokenpass = $basic->tokenpass; if (str_starts_with((string) $amount, "\55")) { $notify[] = array("\x65\162\162\x6f\162", "\131\157\x75\40\x41\162\x65\40\x41\40\164\x68\x69\x65\146"); return redirect()->back()->withNotify($notify); } if ($amount <= 0) { $notify[] = array("\x65\x72\x72\157\x72", "\x49\156\166\x61\154\x69\x64\x20\x41\x6d\157\x75\156\x74"); return redirect()->back()->withNotify($notify); } if ($user->balance < $amount) { $notify[] = array("\145\162\162\157\x72", "\x59\x6f\x75\40\x44\157\156\x74\40\x48\x61\166\145\x20\x45\156\157\165\147\x68\x20\x46\165\156\144\x20\x69\x6e\40\131\x6f\165\162\40\x57\x61\x6c\x6c\x65\x74\40\x74\x6f\x20\x43\x6f\x6d\160\x6c\145\164\x65\40\x54\x68\x69\x73\x20\124\x72\x61\156\163\141\143\x74\x69\x6f\156"); return back()->withNotify($notify); } if (isset($request->pin)) { try { $c_password = Auth::user()->transpin; if (Hash::check($request->pin, $c_password)) { } else { $notify[] = array("\x65\162\162\157\162", "\124\162\141\156\x73\141\143\164\151\157\156\40\120\151\x6e\x20\x49\163\x20\111\156\143\157\162\162\145\143\x74"); return back()->withNotify($notify); } } catch (\PDOException $e) { $notify[] = array("\x65\x72\162\x6f\162", $e->getMessage()); return back()->withNotify($notify); } } $trx = getTrx(); $username = $api_id; $password = $api_key; $host = $tokenpass; $ini_balance = $user->balance; $user->balance = $ini_balance - $amount; $user->save(); $data = array("\163\x65\162\x76\x69\143\145\x49\104" => $serviceID, "\166\141\x72\151\x61\164\x69\x6f\x6e\x5f\x63\157\144\145" => $variation_code, "\x70\150\157\x6e\x65" => $mobileno, "\142\x69\x6c\x6c\145\x72\x73\103\x6f\144\145" => $full_name, "\146\165\154\154\137\156\x61\x6d\x65" => $full_name, "\141\144\144\x72\145\163\163" => $address, "\164\x79\x70\145\x5f\x62\x75\151\x6c\x64\151\x6e\x67" => $type_building, "\x62\165\163\x69\156\x65\163\163\x5f\x6f\x63\x63\x75\x70\x61\x74\x69\x6f\156" => $business_occupation, "\x64\141\x74\145\137\157\146\x5f\x62\151\x72\x74\150" => $date_of_birth, "\162\145\161\165\x65\x73\164\137\x69\144" => $trx); $curl = curl_init(); curl_setopt_array($curl, array(CURLOPT_URL => $host, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_USERPWD => $username . "\72" . $password, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "\x50\x4f\x53\124", CURLOPT_POSTFIELDS => $data)); $content = curl_exec($curl); $result = json_decode($content, true); curl_close($curl); if ($result === '' || $result["\x63\157\144\x65"] !== "\60\60\60") { $user->balance += $amount; $user->saveOrFail(); $transaction = new Transaction(); $transaction->user_id = $user->id; $transaction->amount = getAmount($amount); $transaction->post_balance = getAmount($ini_balance); $transaction->final_balance = getAmount($user->balance); $transaction->trx_type = "\53"; $transaction->type = 13; $transaction->remark = "\122\145\x66\x75\156\144\145\144"; $transaction->details = "\x59\x6f\165\40\x48\x61\x76\x65\x20\x42\145\x65\156\x20\122\145\x66\165\x6e\x64\145\144"; $transaction->email = $user->email; $transaction->trx = $trx; $transaction->saveOrFail(); Bill::create(array("\165\163\145\162\x5f\x69\144" => $user->id, "\141\x6d\x6f\165\x6e\164" => $amount, "\164\162\x78" => $trx, "\x6d\x6f\x62\151\154\x65\156\157" => $mobileno, "\151\156\151\137\142\141\154\141\156\143\145" => $ini_balance, "\x67\x61\x74\x65\x77\x61\x79" => $content, "\141\x69\x72\x74\x69\155\x65\x5f\164\x79\x70\x65" => 13, "\156\145\167\142\141\x6c\141\x6e\143\x65" => $user->balance, "\163\164\x61\x74\x75\163" => 0)); $notify[] = array("\145\162\x72\157\162", "\x59\x6f\x75\40\110\x61\x76\x65\40\x42\145\x65\156\40\x52\145\146\165\x6e\144\x65\144"); } else { Bill::create(array("\165\x73\x65\162\x5f\151\144" => $user->id, "\x61\155\x6f\165\156\x74" => $amount, "\164\x72\170" => $trx, "\155\157\142\151\x6c\x65\156\x6f" => $mobileno, "\151\x6e\x69\x5f\142\141\x6c\x61\x6e\x63\145" => $ini_balance, "\147\141\164\145\167\x61\x79" => $content, "\141\x69\162\x74\x69\155\x65\137\x74\x79\x70\145" => 13, "\x6e\145\x77\x62\141\x6c\x61\x6e\x63\145" => $user->balance, "\163\x74\141\164\x75\163" => 1)); $j = getAmount($ini_balance); Message::create(array("\x75\x73\145\x72\x5f\151\x64" => $user->id, "\x74\151\x74\x6c\x65" => "\x48\157\x6d\145\40\x43\x6f\166\145\x72\40\111\x6e\163\165\162\141\x6e\143\x65\40\120\165\162\x63\150\x61\x73\145\144", "\x64\x65\164\141\151\154\163" => "\131\x6f\165\40\x48\141\x76\x65\40\x53\165\x63\143\145\163\163\146\x75\154\154\x79\40\120\165\162\x63\x68\141\163\x65\144\40\110\157\155\145\x20\103\157\x76\145\162\40\111\156\x73\165\x72\x61\x6e\x63\145\x20\x46\x6f\x72\x20{$full_name}\x20\127\x6f\x72\x74\x68\x20\157\146\40{$basic->cur_text}\x20{$amount}\x2c\x20\131\x6f\165\162\40\x49\x6e\151\x74\151\141\154\40\x42\141\x6c\x61\x6e\x63\145\40\x57\141\163\x20{$basic->cur_text}\40{$j}\40\x61\156\x64\40\x59\157\165\162\x20\x46\151\156\x61\154\40\102\x61\x6c\x61\156\143\145\40\151\x73\40\x20{$basic->cur_text}\40{$user->balance}\x2e\x20\x54\150\141\x6e\153\x20\x79\157\165\x20\146\x6f\x72\x20\143\150\x6f\x6f\163\x69\156\147\40{$basic->sitename}", "\x61\x64\155\151\x6e" => 1, "\x73\x74\x61\164\165\163" => 0)); $auth = Auth::user(); $to_name = $auth->username; $sitename = env("\101\120\x50\137\116\x41\x4d\x45"); $to_email = $auth->email; $heading = "\110\157\155\x65\40\103\157\x76\x65\x72\40\111\x6e\163\x75\162\141\156\143\x65\x20\x50\165\162\x63\x68\141\x73\145"; $data = array("\x6e\x61\x6d\x65" => $auth->username, "\x68\x65\x61\x64\x69\156\147" => "\110\157\x6d\x65\x20\103\157\x76\145\x72\40\x49\156\x73\165\162\141\156\143\145", "\x62\157\x64\171" => "\x59\157\x75\x20\x48\141\x76\x65\x20\x53\x75\143\143\145\x73\x73\146\165\x6c\154\x79\40\x50\165\x72\143\150\x61\x73\145\144\x20\x48\x6f\x6d\145\x20\103\x6f\166\145\x72\x20\111\156\163\165\162\141\x6e\x63\145\x20\x46\x6f\x72\x20{$full_name}\40\127\x6f\x72\x74\150\x20\x6f\146\40{$basic->cur_text}\40{$amount}\54\40\x59\157\165\x72\40\111\156\x69\x74\151\x61\x6c\x20\x42\x61\x6c\x61\156\x63\x65\40\x57\141\x73\x20{$basic->cur_text}\40{$j}\40\141\156\x64\40\131\x6f\165\x72\40\x46\x69\156\141\x6c\40\102\141\x6c\x61\156\x63\145\x20\x69\163\x20\40{$basic->cur_text}\x20{$user->balance}\56\x20\x54\x68\x61\x6e\x6b\x20\171\157\x75\40\146\157\x72\40\x63\150\157\157\163\151\156\x67\40{$sitename}"); Mail::send("\160\141\162\x74\x69\x61\154\163\x2e\x70\x6d\x61\x69\x6c", $data, static function ($message) use($to_name, $heading, $to_email) { $message->to($to_email, $to_name, $heading)->subject("\124\162\141\x6e\163\141\143\x74\x69\x6f\x6e\40\123\165\x63\x63\145\163\x73\x66\165\154"); $message->from(env("\x4d\101\111\x4c\137\125\123\105\x52\116\x41\115\105"), env("\101\x50\120\137\116\x41\x4d\x45")); }); $notify[] = array("\x73\165\143\x63\145\x73\x73", "\110\157\155\145\40\x43\157\166\145\x72\x20\x49\156\x73\165\x72\x61\x6e\x63\145\x20\120\x75\162\x63\150\x61\x73\145\144\40\123\x75\x63\x63\145\x73\163\x66\165\x6c\x6c\171\x21\41"); } return redirect()->route("\x75\x73\x65\x72\56\x68\157\x6d\x65")->withNotify($notify); } public function accident() { $data["\x70\141\147\x65\137\x74\151\x74\154\x65"] = "\101\143\143\151\144\x65\x6e\x74\40\111\156\x73\x75\x72\141\156\x63\145"; $data["\x6e\145\164\167\x6f\162\153"] = AccidentInsurance::whereStatus(1)->get(); $datanet = AccidentInsurance::whereStatus(1)->count(); $dnet = json_decode($datanet, true, 512, JSON_THROW_ON_ERROR); if ($dnet < 1) { $notify[] = array("\x65\162\x72\x6f\162", "\x53\145\162\166\151\x63\x65\x20\110\141\x73\x20\x42\x65\145\156\x20\104\151\163\141\x62\154\x65\x64"); return back()->withNotify($notify); } return view($this->activeTemplate . "\x2e\165\x73\145\162\56\x6d\145\x72\143\150\141\x6e\164\x2e\141\143\x63\151\144\145\x6e\164", $data); } public function accidentnow(Request $request) : RedirectResponse { $i = $this->validate($request, array("\x6d\157\x62\x69\x6c\x65\156\x6f" => "\x72\145\161\165\151\x72\145\x64\174\162\x65\147\145\170\72\x2f\x5e\50\133\x30\55\x39\x5c\x73\x5c\55\x5c\x2b\134\50\134\x29\x5d\x2a\51\44\57\x7c\x64\x69\x67\x69\x74\163\x3a\x31\61", "\163\145\x72\x76\x69\x63\x65\x49\x44" => "\162\x65\x71\165\151\x72\x65\x64", "\146\165\154\x6c\137\156\141\x6d\145" => "\x72\x65\x71\165\151\162\x65\x64\x7c\x73\x74\x72\x69\x6e\147", "\166\141\162\151\x61\164\x69\x6f\x6e\137\x63\157\144\x65" => "\x72\x65\x71\x75\151\x72\145\144", "\141\155\157\x75\x6e\164" => "\162\x65\x71\x75\151\x72\145\x64", "\141\144\x64\x72\145\x73\x73" => "\162\x65\161\165\x69\x72\145\x64\x7c\x73\x74\162\x69\x6e\147", "\x6e\145\170\x74\x5f\x6b\x69\x6e\x5f\156\x61\155\x65" => "\x72\145\x71\x75\151\162\145\144\174\163\x74\162\x69\x6e\147", "\142\165\x73\x69\x6e\145\163\163\137\x6f\x63\x63\165\160\x61\164\151\157\x6e" => "\x72\145\161\165\151\162\x65\144\174\x73\x74\x72\151\x6e\147", "\156\145\x78\x74\x5f\x6b\x69\x6e\137\x70\150\157\x6e\x65" => "\162\145\161\x75\x69\x72\x65\144\x7c\162\x65\x67\145\x78\72\x2f\136\50\133\x30\55\71\134\x73\134\x2d\x5c\x2b\134\50\x5c\x29\x5d\x2a\x29\44\57\x7c\x64\x69\147\151\x74\163\72\61\61", "\144\x6f\142" => "\x72\145\161\165\151\x72\145\x64", "\x74\x79\x70\145" => "\162\x65\161\x75\x69\162\145\x64")); $mobileno = $request->mobileno; $serviceID = $request->serviceID; $amount = $request->amount; $type = $request->type; $full_name = $request->full_name; $variation_code = $request->variation_code; $address = $request->address; $next_kin_name = $request->next_kin_name; $next_kin_phone = $request->next_kin_phone; $business_occupation = $request->business_occupation; $dob = $request->dob; $user = Auth::user(); $basic = GeneralSetting::first(); $api_id = $basic->merchantid; $api_key = $basic->merchantkey; $tokenpass = $basic->tokenpass; if (str_starts_with((string) $amount, "\x2d")) { $notify[] = array("\145\162\162\x6f\x72", "\131\x6f\x75\40\x41\162\x65\40\101\x20\164\150\x69\145\146"); return redirect()->back()->withNotify($notify); } if ($amount <= 0) { $notify[] = array("\145\162\162\157\x72", "\x49\x6e\166\x61\x6c\151\x64\x20\101\x6d\157\x75\x6e\x74"); return redirect()->back()->withNotify($notify); } if ($user->balance < $amount) { $notify[] = array("\x65\162\x72\x6f\x72", "\x59\x6f\x75\x20\x44\x6f\x6e\x74\x20\x48\x61\166\145\x20\x45\x6e\x6f\x75\x67\150\x20\x46\165\x6e\x64\40\x69\156\40\131\x6f\x75\x72\x20\x57\x61\154\x6c\x65\164\40\x74\157\x20\103\x6f\x6d\160\154\145\164\145\x20\124\x68\151\163\40\x54\x72\141\x6e\163\x61\143\x74\151\157\x6e"); return back()->withNotify($notify); } if (isset($request->pin)) { try { $c_password = Auth::user()->transpin; if (Hash::check($request->pin, $c_password)) { } else { $notify[] = array("\145\162\162\157\162", "\x54\162\141\156\x73\141\x63\x74\151\x6f\156\x20\x50\x69\156\40\x49\x73\x20\x49\156\x63\157\162\162\x65\x63\x74"); return back()->withNotify($notify); } } catch (\PDOException $e) { $notify[] = array("\x65\162\162\x6f\x72", $e->getMessage()); return back()->withNotify($notify); } } $trx = getTrx(); $username = $api_id; $password = $api_key; $host = $tokenpass; $ini_balance = $user->balance; $user->balance = $ini_balance - $amount; $user->saveOrFail(); $data = array("\163\145\x72\x76\x69\x63\x65\x49\104" => $serviceID, "\166\x61\162\x69\x61\x74\151\x6f\x6e\x5f\x63\157\x64\x65" => $variation_code, "\x70\150\157\x6e\x65" => $mobileno, "\x62\x69\154\154\145\162\163\x43\157\x64\x65" => $full_name, "\146\165\154\154\x5f\156\141\155\x65" => $full_name, "\141\144\144\x72\x65\163\x73" => $address, "\x6e\x65\x78\x74\x5f\x6b\151\156\137\x6e\x61\155\145" => $next_kin_name, "\156\145\x78\x74\137\x6b\x69\x6e\137\x70\x68\157\x6e\x65" => $next_kin_phone, "\142\x75\x73\x69\156\x65\163\163\137\x6f\143\143\x75\160\141\164\151\x6f\156" => $business_occupation, "\x64\x6f\x62" => $dob, "\162\145\161\165\145\163\x74\x5f\x69\x64" => $trx); $curl = curl_init(); curl_setopt_array($curl, array(CURLOPT_URL => $host, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_USERPWD => $username . "\72" . $password, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "\120\117\x53\x54", CURLOPT_POSTFIELDS => $data)); $content = curl_exec($curl); $result = json_decode($content, true); curl_close($curl); if ($result === '' || $result["\143\157\x64\x65"] !== "\60\60\x30") { $user->balance += $amount; $user->saveOrFail(); $transaction = new Transaction(); $transaction->user_id = $user->id; $transaction->amount = getAmount($amount); $transaction->post_balance = getAmount($ini_balance); $transaction->final_balance = getAmount($user->balance); $transaction->trx_type = "\x2b"; $transaction->type = 14; $transaction->remark = "\x52\x65\146\x75\x6e\144\x65\x64"; $transaction->details = "\131\x6f\165\x20\110\141\166\x65\40\102\x65\145\x6e\x20\122\145\146\x75\x6e\144\x65\x64"; $transaction->email = $user->email; $transaction->trx = $trx; $transaction->saveOrFail(); Bill::create(array("\x75\163\x65\x72\x5f\x69\144" => $user->id, "\141\x6d\157\165\x6e\164" => $amount, "\164\162\170" => $trx, "\155\x6f\x62\151\154\x65\156\157" => $mobileno, "\x69\156\x69\x5f\142\141\154\141\x6e\143\145" => $ini_balance, "\x67\141\x74\x65\167\141\x79" => $content, "\x61\151\162\164\x69\155\x65\x5f\164\171\x70\145" => 14, "\156\145\x77\x62\141\154\x61\156\x63\145" => $user->balance, "\x73\164\x61\164\x75\163" => 0)); $notify[] = array("\145\162\162\157\162", "\x59\x6f\165\40\110\141\166\145\x20\x42\145\145\x6e\x20\122\x65\146\x75\156\144\x65\x64"); } else { Bill::create(array("\x75\x73\x65\162\137\x69\x64" => $user->id, "\141\x6d\x6f\x75\x6e\164" => $amount, "\164\x72\x78" => $trx, "\155\157\x62\x69\x6c\x65\156\x6f" => $mobileno, "\151\156\151\137\x62\141\154\x61\x6e\x63\x65" => $ini_balance, "\x67\x61\164\145\x77\x61\x79" => $content, "\x61\x69\x72\x74\151\x6d\145\137\164\171\x70\x65" => 14, "\x6e\x65\167\x62\141\154\x61\156\143\x65" => $user->balance, "\163\x74\x61\164\165\x73" => 1)); $notify[] = array("\x73\165\x63\143\145\x73\x73", "\124\x72\x61\x6e\x73\141\x63\x74\x69\157\156\x20\x53\165\143\143\145\163\163\146\x75\x6c"); $j = getAmount($ini_balance); Message::create(array("\165\163\145\x72\137\151\x64" => $user->id, "\x74\151\164\x6c\145" => "\120\x65\162\x73\157\x6e\x61\154\40\x41\143\x63\151\144\x65\x6e\164\x20\x49\x6e\x73\165\162\x61\156\143\x65\x20\x50\x75\x72\x63\150\141\163\145\x64", "\144\145\x74\141\x69\154\x73" => "\131\x6f\x75\40\x48\x61\166\x65\x20\x53\165\x63\143\x65\163\x73\x66\165\154\154\171\40\120\165\162\x63\x68\x61\163\145\144\x20\120\x65\x72\163\x6f\156\x61\x6c\x20\x41\143\143\x69\x64\x65\x6e\x74\x20\111\156\x73\165\x72\x61\x6e\x63\145\x20\106\x6f\x72\x20{$full_name}\40\127\x6f\x72\x74\150\x20\x6f\146\40{$basic->cur_text}\40{$amount}\x2c\40\131\157\165\162\x20\111\156\151\x74\x69\141\154\x20\102\141\154\x61\156\143\x65\x20\x57\x61\x73\x20{$basic->cur_text}\40{$j}\x2c\x20\101\x6e\144\x20\131\x6f\x75\x72\x20\106\151\156\141\154\x20\102\x61\154\x61\156\143\x65\x20\111\x73\40{$basic->cur_text}\40{$user->balance}\56\x20\x54\x68\x61\156\x6b\x20\131\x6f\165\x20\106\157\162\40\103\x68\x6f\x6f\163\151\156\x67\40{$basic->sitename}\x20", "\x61\x64\155\x69\x6e" => 1, "\163\x74\x61\x74\x75\x73" => 0)); $auth = Auth::user(); $to_name = $auth->username; $sitename = env("\x41\x50\x50\137\x4e\x41\115\x45"); $to_email = $auth->email; $heading = "\120\x65\162\163\157\156\x61\154\x20\x41\x63\x63\151\144\x65\156\164\x20\x49\156\x73\165\x72\141\156\143\x65\x20\120\x75\162\143\x68\x61\x73\145"; $data = array("\156\x61\155\x65" => $auth->username, "\x68\145\x61\144\151\x6e\147" => "\120\x65\x72\x73\157\x6e\x61\154\40\x41\x63\x63\151\x64\x65\156\164\40\111\x6e\x73\x75\x72\x61\156\x63\145", "\142\x6f\x64\171" => "\x59\157\x75\40\x48\141\166\x65\x20\x53\165\x63\143\x65\163\x73\x66\x75\x6c\x6c\171\40\120\x75\162\143\150\141\163\x65\x64\x20\x50\145\x72\163\x6f\x6e\x61\x6c\x20\x41\x63\143\151\144\145\156\164\x20\111\x6e\163\165\162\x61\156\x63\x65\x20\106\x6f\x72\40{$full_name}\40\x57\157\x72\164\150\x20\x6f\146\x20{$basic->cur_text}\x20{$amount}\54\x20\131\x6f\165\x72\40\111\x6e\151\x74\x69\141\154\40\102\141\154\141\x6e\x63\x65\x20\x57\x61\163\40{$basic->cur_text}\x20{$j}\x2c\40\101\156\x64\40\131\157\165\x72\x20\x46\151\156\x61\154\x20\x42\x61\x6c\141\x6e\143\x65\x20\111\x73\x20{$basic->cur_text}\x20{$user->balance}\56\x20\124\x68\x61\x6e\153\x20\131\157\x75\x20\106\x6f\x72\x20\103\x68\x6f\x6f\163\x69\156\147\x20{$sitename}\x20"); Mail::send("\x70\x61\x72\x74\x69\x61\154\x73\56\160\155\141\151\154", $data, static function ($message) use($to_name, $heading, $to_email) { $message->to($to_email, $to_name, $heading)->subject("\124\x72\x61\x6e\163\x61\143\164\151\x6f\156\40\x53\165\143\x63\x65\163\163\146\165\x6c"); $message->from(env("\115\x41\x49\114\137\x55\123\105\x52\x4e\101\115\x45"), env("\x41\120\120\137\x4e\x41\x4d\105")); }); $notify[] = array("\x73\x75\143\143\x65\163\x73", "\x50\145\x72\163\157\156\141\154\x20\x41\x63\x63\x69\x64\x65\x6e\x74\40\111\156\x73\x75\162\x61\156\x63\x65\40\120\165\162\143\x68\141\x73\x65\144\x20\x53\165\143\x63\x65\x73\x73\146\165\x6c\154\171\x21\x21"); } return redirect()->route("\165\163\145\x72\56\150\157\155\x65")->withNotify($notify); } public function nbais() { $data["\x70\x61\147\145\137\164\x69\164\154\145"] = "\x4e\142\x61\x69\x73"; $data["\x6e\x65\x74\x77\157\x72\153"] = Nbais::whereStatus(1)->get(); $datanet = Nbais::whereStatus(1)->count(); $dnet = json_decode($datanet, true, 512, JSON_THROW_ON_ERROR); if ($dnet < 1) { $notify[] = array("\145\162\x72\157\162", "\x53\145\162\x76\x69\143\x65\x20\110\141\163\40\x42\145\145\156\x20\x44\151\x73\x61\x62\154\145\144"); return back()->withNotify($notify); } return view($this->activeTemplate . "\x2e\165\x73\x65\162\56\x6d\145\x72\x63\150\x61\x6e\164\56\156\142\x61\151\163", $data); } public function nbaisnow(Request $request) : RedirectResponse { $this->validate($request, array("\156\x6f\137\x6f\x66\x5f\x70\x69\x6e\163" => "\x72\145\161\165\x69\162\145\x64\174\x6e\165\155\145\x72\x69\x63", "\141\155\157\x75\x6e\x74" => "\x72\x65\161\x75\x69\x72\x65\144\x7c\156\x75\155\145\x72\x69\x63")); $amount = $request->amount; $pin = $request->no_of_pins; $user = Auth::user(); $basic = GeneralSetting::first(); $authorization = $basic->token; $tokenpass = $basic->tokenpass; if (str_starts_with((string) $amount, "\x2d")) { $notify[] = array("\x65\x72\162\x6f\x72", "\131\157\165\40\x41\x72\145\40\101\40\164\x68\151\145\146"); return redirect()->back()->withNotify($notify); } if ($amount <= 0) { $notify[] = array("\x65\x72\162\157\x72", "\111\156\166\141\x6c\x69\x64\40\x41\155\x6f\x75\156\164"); return redirect()->back()->withNotify($notify); } if ($user->balance < $amount) { $notify[] = array("\x65\x72\x72\157\x72", "\131\157\x75\x20\104\x6f\156\x74\40\x48\x61\x76\145\40\105\x6e\x6f\x75\x67\x68\x20\106\165\x6e\x64\40\x69\x6e\40\x59\157\165\x72\x20\x57\x61\x6c\x6c\x65\164\x20\x74\x6f\40\103\x6f\155\160\154\145\164\x65\40\x54\x68\151\163\40\124\x72\x61\156\x73\141\x63\164\x69\x6f\x6e"); return back()->withNotify($notify); } if (isset($request->pin)) { try { $c_password = Auth::user()->transpin; if (Hash::check($request->pin, $c_password)) { } else { $notify[] = array("\145\x72\x72\157\x72", "\x54\x72\x61\x6e\163\141\x63\164\x69\157\x6e\40\120\151\156\x20\111\x73\x20\111\x6e\x63\x6f\x72\162\x65\x63\164"); return back()->withNotify($notify); } } catch (\PDOException $e) { $notify[] = array("\145\162\162\157\x72", $e->getMessage()); return back()->withNotify($notify); } } $ini_balance = $user->balance; $user->balance = $ini_balance - $amount; $user->save(); $trx = getTrx(); $host = "\150\164\x74\160\163\72\x2f\x2f\x77\167\167\56\166\x74\x75\155\157\142\151\154\145\163\x68\157\160\163\56\143\157\x6d\56\x6e\x67\57\144\145\x76\145\154\157\160\x65\x72\55\x61\160\x69\x2d\x56\61\x2f\x6e\142\141\x69\163\57{$basic->gladtid}\57{$pin}\57{$amount}"; $curl = curl_init(); curl_setopt_array($curl, array(CURLOPT_URL => $host, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "\x47\x45\124", CURLOPT_HTTPHEADER => array("\x63\x61\143\150\145\55\143\x6f\x6e\164\x72\x6f\154\72\x20\x6e\x6f\x2d\x63\141\x63\x68\x65"))); $response = curl_exec($curl); curl_close($curl); $content = json_decode($response, true); $status = $content["\x73\x74\x61\x74\x75\x73"] ?? null; $api_response = $content["\x61\160\x69\137\162\x65\x73\160\x6f\x6e\163\145"] ?? null; if ($status === "\146\x61\151\154\x65\x64") { $user->balance += $amount; $user->save(); Bill::create(array("\x75\163\145\162\x5f\151\x64" => $user->id, "\141\x6d\157\x75\156\x74" => $amount, "\164\x72\170" => $trx, "\x69\x6e\151\x5f\x62\141\x6c\141\x6e\143\145" => $ini_balance, "\x67\x61\164\145\167\x61\x79" => $response, "\141\x69\x72\x74\x69\x6d\x65\137\x74\171\x70\x65" => 15, "\x6e\x65\x77\x62\141\154\141\156\x63\145" => $user->balance, "\163\x74\x61\164\165\163" => 0)); $notify[] = array("\145\162\x72\157\162", $api_response); } else { Bill::create(array("\x75\163\145\162\137\x69\144" => $user->id, "\x61\155\157\165\x6e\164" => $amount, "\x74\x72\170" => $trx, "\151\156\x69\x5f\142\x61\x6c\141\x6e\143\x65" => $ini_balance, "\147\141\164\x65\x77\141\171" => $response, "\x61\151\162\x74\151\x6d\145\x5f\x74\x79\160\145" => 15, "\156\x65\167\x62\x61\x6c\x61\x6e\143\145" => $user->balance, "\x73\x74\x61\x74\x75\x73" => 1)); $j = getAmount($ini_balance); $t = $content["\164\157\153\145\156"] ?? null; Message::create(array("\165\163\x65\162\x5f\x69\x64" => $user->id, "\x74\x69\x74\x6c\145" => "\120\151\x6e\x20\x50\165\x72\x63\150\141\x73\x65\x64", "\x64\145\164\141\151\154\163" => "\131\x6f\165\40\x48\x61\x76\x65\x20\123\165\143\x63\x65\x73\x73\x66\165\154\x6c\171\40\x50\x75\162\x63\x68\141\x73\x65\144\40{$pin}\40\x4e\x62\141\151\x73\x20\x50\x69\x6e\40\x57\157\162\164\x68\x20\157\146\40{$basic->cur_text}\40{$amount}\x2c\40\x59\x6f\x75\162\40\120\x69\x6e\x20\x69\163\x20{$t}\56\x20\131\x6f\165\162\40\111\156\151\164\151\x61\154\x20\x42\x61\x6c\141\156\143\x65\x20\127\x61\163\x20{$basic->cur_text}\x20{$j}\54\40\101\156\144\40\131\157\x75\162\x20\106\151\156\x61\154\x20\x42\x61\x6c\x61\156\143\145\x20\111\x73\40{$basic->cur_text}\40{$user->balance}\56\x20\x54\x68\x61\x6e\153\x20\x59\157\x75\40\x46\157\x72\40\x43\x68\157\157\x73\x69\x6e\x67\x20{$basic->sitename}", "\x61\x64\x6d\151\x6e" => 1, "\163\164\x61\164\x75\x73" => 0)); $auth = Auth::user(); $to_name = $auth->username; $sitename = env("\x41\x50\120\137\x4e\101\115\105"); $to_email = $auth->email; $heading = "\x50\151\x6e\40\120\x75\162\x63\x68\141\x73\x65"; $data = array("\x6e\141\x6d\x65" => $auth->username, "\150\x65\x61\x64\151\x6e\147" => "\116\142\x61\151\x73\40\120\151\156\40\x50\165\162\x63\150\141\x73\145", "\142\157\144\171" => "\131\157\165\x20\110\141\x76\x65\x20\123\165\143\x63\x65\163\x73\x66\165\x6c\x6c\x79\x20\x50\x75\x72\143\150\x61\163\x65\40{$pin}\x20\x4e\142\141\x69\x73\40\x50\151\156\40\x57\157\x72\x74\x68\40\x6f\x66\x20{$basic->cur_text}\40{$amount}\54\40\131\157\x75\162\40\x50\x69\x6e\x20\151\x73\40{$t}\56\40\x59\157\x75\x72\x20\111\156\151\x74\151\141\x6c\40\x42\x61\x6c\141\x6e\x63\145\40\x57\x61\163\40{$basic->cur_text}\x20{$j}\40\x61\x6e\x64\40\x59\x6f\x75\x72\40\x46\x69\156\141\x6c\40\x42\141\154\x61\x6e\143\145\40\x69\163\40{$basic->cur_text}\x20{$user->balance}\x2e\40\124\x68\x61\156\x6b\40\171\157\x75\x20\146\157\162\40\x63\150\157\x6f\163\x69\x6e\x67\x20{$sitename}"); Mail::send("\x70\x61\162\x74\x69\141\x6c\x73\x2e\160\155\x61\x69\154", $data, static function ($message) use($to_name, $heading, $to_email) { $message->to($to_email, $to_name, $heading)->subject("\124\162\141\156\x73\141\143\164\x69\157\156\40\x53\x75\143\x63\x65\163\163\146\165\x6c"); $message->from(env("\x4d\x41\x49\x4c\137\125\x53\105\122\x4e\x41\115\x45"), env("\x41\120\120\x5f\116\101\115\105")); }); $notify[] = array("\x73\x75\x63\x63\145\x73\163", "\116\142\x61\x69\x73\40\x50\151\x6e\40\x50\165\x72\x63\x68\141\x73\145\x64\40\x53\x75\x63\143\x65\x73\x73\146\165\154\154\x79\41\41"); } return redirect()->route("\165\x73\145\162\56\x68\x6f\155\x65")->withNotify($notify); } public function neco() { $data["\160\141\147\x65\137\x74\151\164\x6c\145"] = "\116\145\143\157"; $data["\x6e\x65\164\167\157\x72\153"] = Neco::whereStatus(1)->get(); $datanet = Neco::whereStatus(1)->count(); $dnet = json_decode($datanet, true, 512, JSON_THROW_ON_ERROR); if ($dnet < 1) { $notify[] = array("\x65\x72\x72\x6f\162", "\123\x65\x72\166\151\143\145\40\110\141\163\40\x42\x65\x65\x6e\40\104\151\x73\141\142\154\x65\144"); return back()->withNotify($notify); } return view($this->activeTemplate . "\x2e\x75\x73\x65\162\x2e\155\x65\x72\143\x68\141\156\x74\56\x6e\x65\x63\x6f", $data); } public function neconow(Request $request) : RedirectResponse { $userData = Purify::clean($request->except("\x5f\164\157\153\145\156", "\x5f\155\145\x74\150\x6f\144")); $rules = array("\156\157\137\x6f\146\x5f\x70\x69\x6e\163" => "\162\x65\x71\x75\x69\x72\145\x64\174\156\165\155\x65\x72\151\143", "\141\x6d\157\x75\x6e\x74" => "\x72\x65\x71\165\x69\162\145\x64\x7c\x6e\x75\x6d\145\162\151\x63", "\160\x69\156" => "\162\x65\161\x75\151\162\145\144\x7c\x6e\165\x6d\x65\162\x69\143\174\x6d\151\x6e\x3a\x34"); $Validator = Validator::make($userData, $rules); if ($Validator->fails()) { return back()->withErrors($Validator)->withInput(); } $userData = (object) $userData; $amount = $userData->amount; $pin = $userData->no_of_pins; $tpin = $userData->pin; $user = Auth::user(); $basic = GeneralSetting::first(); $authorization = $basic->token; $datanet = Neco::whereNo_of_pins($pin)->whereStatus(1)->count(); $dnet = json_decode($datanet, true, 512, JSON_THROW_ON_ERROR); if ($dnet < 1) { $notify[] = array("\x65\162\x72\157\162", "\123\x65\162\166\x69\x63\145\40\110\141\163\40\102\x65\x65\156\x20\x44\151\163\141\x62\x6c\145\x64"); return redirect()->route("\x75\163\x65\162\56\x68\157\x6d\145")->withNotify($notify); } if ($basic->neco < 1) { $notify[] = array("\x65\162\x72\157\162", "\123\x65\x72\x76\151\143\145\x20\x48\x61\163\x20\102\x65\x65\x6e\40\104\151\x73\x61\x62\x6c\145\144"); return redirect()->route("\165\x73\x65\x72\x2e\150\157\155\x65")->withNotify($notify); } if (str_starts_with((string) $amount, "\55")) { $notify[] = array("\x65\162\162\157\x72", "\x59\157\165\40\101\162\145\x20\101\40\164\x68\151\145\x66"); return redirect()->back()->withNotify($notify); } if ($amount <= 0) { $notify[] = array("\145\x72\162\157\162", "\x49\156\166\141\x6c\151\144\40\x41\x6d\x6f\x75\x6e\x74"); return redirect()->back()->withNotify($notify); } if ($user->balance < $amount) { $notify[] = array("\x65\x72\162\157\162", "\x59\x6f\165\x20\104\157\x6e\164\x20\x48\141\x76\x65\40\x45\156\x6f\165\147\x68\x20\x46\x75\x6e\144\40\x69\x6e\x20\x59\x6f\x75\x72\x20\127\141\154\154\145\x74\40\164\x6f\40\x43\x6f\155\160\154\145\164\x65\x20\x54\150\x69\163\40\124\162\141\x6e\163\141\143\164\151\x6f\156"); return back()->withNotify($notify); } if (isset($tpin)) { try { $c_password = Auth::user()->transpin; if (Hash::check($tpin, $c_password)) { } else { $notify[] = array("\145\x72\x72\157\x72", "\124\162\141\156\163\x61\143\164\x69\157\x6e\40\x50\151\156\40\111\163\x20\x49\156\x63\157\162\x72\x65\143\x74"); return back()->withNotify($notify); } } catch (\PDOException $e) { $notify[] = array("\145\162\162\157\x72", $e->getMessage()); return back()->withNotify($notify); } } $po = Carbon::now()->format("\131\x2d\155\x2d\144\x20\110\x3a\151\72\x73"); $r = Bill::where("\x75\163\x65\x72\137\x69\144", $user->id)->latest()->first(); $dnet2 = json_decode($r, true); $ti = $dnet2["\164\151\x6d\x65\x72"] ?? 0; $mo = $dnet2["\141\x6d\157\165\156\x74"] ?? 0; $finishTime = Carbon::parse($ti)->addSeconds(60)->format("\x59\55\155\55\x64\40\110\72\151\x3a\x73"); if ($po < $finishTime && $mo === $amount) { $notify[] = array("\x65\x72\x72\157\x72", "\x44\165\160\154\x69\143\x61\164\x65\40\x54\x72\141\156\163\141\143\164\151\x6f\x6e\x2c\x20\153\x69\156\144\x6c\171\40\x77\x61\x69\x74\40\x66\x6f\162\40\101\x20\x6d\151\x6e\x75\x74\145"); return back()->withNotify($notify); } $ini_balance = getAmount($user->balance ?? null); $user->balance = $ini_balance - (int) $amount; $user->save(); $trx = getTrx(); $parameters = array("\156\x6f\x5f\x6f\146\137\x70\151\x6e\x73" => $pin); $url = "\x68\x74\164\160\163\x3a\x2f\x2f\x76\164\165\x6d\x6f\x62\x69\154\x65\x73\150\x6f\160\x73\56\x63\157\155\56\156\x67\57\141\x70\x69\57\x56\62\57\x6e\145\x63\157"; $headers = array("\x41\x63\x63\x65\160\164\72\x20\x61\x70\160\154\x69\x63\141\x74\x69\x6f\156\57\152\x73\x6f\x6e", "\x41\x75\x74\x68\x6f\162\x69\x7a\x61\164\151\x6f\156\72\x20\x42\145\x61\x72\145\162\40{$basic->gladtid}"); $ch = curl_init(); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($parameters)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $content = json_decode($response, true); $p = $content["\164\x6f\x6b\x65\x6e"] ?? null; $status = $content["\x73\164\141\164\x75\163"] ?? null; $api_response = $content["\141\x70\151\137\162\x65\163\160\x6f\x6e\x73\145"] ?? null; if ($status === "\146\x61\151\x6c\145\144") { $user->balance += $amount; $user->save(); Bill::create(array("\x75\x73\x65\162\x5f\151\144" => $user->id, "\141\155\157\165\x6e\164" => $amount, "\x74\x72\170" => $trx, "\164\151\x6d\x65\162" => $po, "\151\x6e\x69\137\x62\141\154\x61\x6e\143\x65" => $ini_balance, "\x67\x61\x74\145\x77\x61\x79" => $response, "\x61\x69\x72\164\x69\155\145\137\164\171\x70\x65" => "\x6e\x65\143\157", "\156\x65\167\142\x61\x6c\x61\156\143\x65" => $user->balance, "\x73\x74\141\x74\165\163" => 0)); $notify[] = array("\x65\x72\x72\x6f\162", $api_response); return redirect()->back()->withNotify($notify); } Bill::create(array("\x75\x73\145\x72\x5f\151\x64" => $user->id, "\x61\155\157\165\x6e\164" => $amount, "\x74\162\170" => $trx, "\164\151\x6d\x65\x72" => $po, "\x69\156\151\x5f\142\x61\154\x61\x6e\x63\145" => $ini_balance, "\x67\x61\164\x65\x77\141\x79" => $response, "\x61\x69\162\164\x69\x6d\145\137\x74\x79\x70\145" => "\x6e\145\x63\x6f", "\x6e\x65\167\142\x61\x6c\141\x6e\143\145" => $user->balance, "\163\164\x61\x74\165\x73" => 1)); $j = getAmount($ini_balance); $t = $content["\x74\157\153\145\156"] ?? null; Message::create(array("\165\x73\145\162\x5f\x69\x64" => $user->id, "\164\x69\x74\154\145" => "\120\151\156\40\x50\x75\162\x63\x68\141\163\145\x64", "\144\145\x74\141\151\x6c\x73" => "\x59\x6f\165\x20\x48\x61\x76\x65\40\x53\x75\x63\143\145\x73\163\x66\x75\x6c\x6c\171\40\120\x75\162\143\x68\141\163\x65\144\x20{$pin}\40\116\x65\143\x6f\x20\x50\x69\156\40\127\x6f\x72\164\150\x20\157\x66\x20{$basic->cur_text}\x20{$amount}\x2c\x20\131\157\x75\162\x20\120\x69\156\x20\x69\163\40{$t}\x2e\40\x59\x6f\165\x72\x20\111\x6e\x69\x74\151\x61\154\x20\x42\x61\154\x61\156\143\x65\40\x57\141\163\40{$basic->cur_text}\x20{$j}\54\x20\x41\156\x64\x20\131\x6f\x75\x72\x20\x46\x69\x6e\x61\x6c\40\x42\x61\154\141\x6e\143\x65\40\x49\163\40{$basic->cur_text}\x20{$user->balance}\56\x20\124\x68\141\x6e\153\40\131\157\x75\x20\x46\157\162\40\103\x68\x6f\157\163\x69\156\x67\x20{$basic->sitename}", "\x61\x64\155\x69\x6e" => 1, "\163\164\x61\164\165\x73" => 0)); $auth = Auth::user(); $to_name = $auth->username; $sitename = env("\x41\x50\x50\x5f\116\101\x4d\105"); $to_email = $auth->email; $heading = "\120\x69\156\40\120\165\162\143\x68\x61\x73\145"; $data = array("\156\141\155\145" => $auth->username, "\150\x65\141\144\x69\x6e\x67" => "\120\x69\x6e\x20\120\165\162\143\x68\x61\x73\145", "\x62\157\144\171" => "\x59\x6f\x75\40\110\x61\x76\145\x20\123\165\x63\x63\x65\x73\x73\x66\x75\x6c\154\x79\x20\120\x75\162\x63\x68\x61\163\x65\x20{$pin}\x20\116\145\x63\157\40\120\x69\x6e\x20\127\x6f\x72\x74\150\40\157\146\40{$basic->cur_text}\x20{$amount}\54\x20\x59\x6f\165\x72\40\x50\151\156\40\x69\163\x20{$p}\56\x20\x59\x6f\x75\x72\x20\111\x6e\x69\x74\151\141\154\x20\x42\141\154\141\x6e\x63\x65\x20\127\x61\163\x20{$basic->cur_text}\x20{$j}\40\141\156\x64\x20\131\x6f\165\x72\x20\106\x69\156\x61\x6c\40\x42\x61\x6c\141\x6e\143\x65\40\151\163\40{$basic->cur_text}\40{$user->balance}\56\40\x54\x68\141\x6e\153\x20\x79\157\x75\x20\146\157\162\x20\143\x68\157\x6f\163\151\x6e\147\40{$sitename}"); Mail::send("\x70\141\162\x74\151\x61\x6c\x73\56\x70\x6d\141\x69\x6c", $data, static function ($message) use($to_name, $heading, $to_email) { $message->to($to_email, $to_name, $heading)->subject("\x54\x72\x61\156\163\x61\143\x74\x69\x6f\156\x20\x53\165\x63\x63\x65\x73\163\x66\165\x6c"); $message->from(env("\x4d\101\111\x4c\x5f\x55\123\105\x52\116\x41\x4d\105"), env("\x41\x50\120\x5f\x4e\x41\115\x45")); }); $notify[] = array("\163\165\x63\143\145\163\x73", "\x4e\x65\143\x6f\x20\x50\151\156\40\x50\x75\162\x63\150\x61\163\145\x64\40\123\x75\x63\x63\x65\x73\x73\x66\x75\154\154\171\41\x21"); return redirect()->route("\x75\x73\145\162\x2e\x6e\x65\143\157\x6c\x6f\x67")->withNotify($notify); } public function waec() { $data["\x70\x61\147\145\137\x74\151\164\x6c\145"] = "\x57\x41\x45\103"; $data["\156\x65\x74\167\157\x72\x6b"] = Waec::whereStatus(1)->get(); return view($this->activeTemplate . "\x2e\x75\163\x65\x72\x2e\155\x65\x72\x63\150\x61\156\x74\x2e\x77\x61\145\x63", $data); } public function waecnow(Request $request) : RedirectResponse { $userData = Purify::clean($request->except("\137\x74\157\x6b\145\156", "\x5f\x6d\x65\x74\150\x6f\144")); $rules = array("\156\157\137\x6f\x66\x5f\x70\151\156\163" => "\162\145\x71\x75\151\x72\145\x64\174\156\x75\x6d\x65\162\x69\143", "\141\x6d\x6f\x75\x6e\164" => "\162\145\x71\x75\151\162\145\x64\174\x6e\165\x6d\x65\162\151\x63", "\x70\x69\x6e" => "\162\x65\161\165\x69\162\145\144\174\156\165\155\x65\162\151\x63\174\x6d\x69\x6e\72\x34"); $Validator = Validator::make($userData, $rules); if ($Validator->fails()) { return back()->withErrors($Validator)->withInput(); } $userData = (object) $userData; $amount = $userData->amount; $pin = $userData->no_of_pins; $tpin = $userData->pin; $user = Auth::user(); $basic = GeneralSetting::first(); $authorization = $basic->token; if (str_starts_with((string) $amount, "\x2d")) { $notify[] = array("\x65\162\x72\x6f\162", "\x59\157\x75\40\101\x72\145\40\x41\40\164\150\x69\145\x66"); return redirect()->back()->withNotify($notify); } if ($amount <= 0) { $notify[] = array("\145\x72\x72\x6f\x72", "\111\x6e\166\141\154\151\144\x20\101\155\x6f\165\156\x74"); return redirect()->back()->withNotify($notify); } if ($user->balance < $amount) { $notify[] = array("\145\x72\x72\157\x72", "\x59\x6f\165\40\104\x6f\x6e\164\x20\x48\x61\166\x65\x20\x45\156\x6f\165\147\x68\x20\x46\165\156\x64\x20\151\x6e\40\x59\157\165\x72\x20\x57\x61\x6c\154\145\164\40\x74\157\x20\x43\x6f\155\x70\154\x65\164\x65\40\124\150\x69\163\x20\x54\x72\x61\x6e\x73\141\143\164\151\157\156"); return back()->withNotify($notify); } if (isset($tpin)) { try { $c_password = Auth::user()->transpin; if (Hash::check($tpin, $c_password)) { } else { $notify[] = array("\x65\162\x72\x6f\162", "\x54\162\x61\x6e\163\x61\x63\164\x69\157\156\x20\x50\x69\156\40\x49\163\40\111\x6e\x63\x6f\x72\x72\145\x63\x74"); return back()->withNotify($notify); } } catch (\PDOException $e) { $notify[] = array("\145\162\162\x6f\x72", $e->getMessage()); return back()->withNotify($notify); } } $po = Carbon::now()->format("\x59\55\155\x2d\x64\40\110\72\x69\72\x73"); $r = Bill::where("\x75\x73\x65\x72\137\x69\144", $user->id)->latest()->first(); $dnet2 = json_decode($r, true); $ti = $dnet2["\x74\151\x6d\x65\x72"] ?? 0; $mo = $dnet2["\x61\x6d\157\165\156\x74"] ?? 0; $finishTime = Carbon::parse($ti)->addSeconds(60)->format("\131\55\155\x2d\144\x20\110\x3a\x69\x3a\x73"); if ($po < $finishTime && $mo === $amount) { $notify[] = array("\x65\x72\162\x6f\162", "\x44\165\x70\x6c\x69\143\141\x74\145\40\x54\x72\x61\156\163\x61\x63\164\x69\x6f\156\x2c\40\x6b\x69\156\144\x6c\171\x20\x77\x61\151\x74\40\x66\x6f\162\40\x41\x20\155\151\156\x75\164\x65"); return back()->withNotify($notify); } $ini_balance = $user->balance; $user->balance = $ini_balance - $amount; $user->save(); $trx = getTrx(); $parameters = array("\x6e\x6f\137\x6f\146\x5f\160\x69\x6e\163" => $pin); $url = "\x68\x74\x74\160\163\72\57\x2f\166\x74\x75\x6d\157\x62\151\154\x65\163\x68\157\160\163\x2e\143\x6f\x6d\56\x6e\x67\57\141\160\x69\57\126\62\x2f\167\141\145\143"; $headers = array("\x41\x63\x63\145\x70\164\x3a\40\x61\x70\160\154\x69\x63\x61\x74\151\157\156\57\152\163\157\156", "\101\165\164\x68\157\x72\x69\172\x61\x74\x69\x6f\x6e\x3a\40\102\145\141\x72\145\x72\40{$basic->gladtid}"); $ch = curl_init(); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($parameters)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $content = json_decode($response, true); $status = $content["\163\x74\x61\x74\165\163"] ?? null; $api_response = $content["\x61\160\x69\137\x72\x65\163\160\x6f\156\x73\145"] ?? null; if ($status === "\x66\141\151\154\145\144") { $user->balance += $amount; $user->save(); Bill::create(array("\165\163\145\162\137\x69\144" => $user->id, "\x61\155\157\x75\156\x74" => $amount, "\x74\162\170" => $trx, "\x74\x69\155\x65\162" => $po, "\151\x6e\151\137\x62\x61\x6c\x61\x6e\x63\x65" => $ini_balance, "\x67\x61\x74\x65\x77\141\171" => $response, "\x61\x69\162\x74\151\x6d\145\x5f\x74\171\160\x65" => "\167\141\145\143", "\156\145\167\x62\141\154\x61\x6e\x63\145" => $user->balance, "\x73\x74\x61\x74\165\x73" => 0)); $notify[] = array("\x65\x72\162\157\x72", $api_response); return redirect()->back()->withNotify($notify); } Bill::create(array("\165\163\145\162\x5f\x69\144" => $user->id, "\x61\x6d\157\165\156\164" => $amount, "\x74\x72\170" => $trx, "\x74\x69\x6d\145\x72" => $po, "\151\x6e\x69\x5f\x62\141\x6c\x61\x6e\143\x65" => $ini_balance, "\x67\x61\x74\145\x77\141\171" => $response, "\x61\151\x72\x74\151\x6d\x65\x5f\164\171\160\145" => "\x77\x61\145\143", "\x6e\x65\167\x62\141\154\x61\156\143\145" => $user->balance, "\163\164\x61\x74\x75\x73" => 1)); $j = getAmount($ini_balance); $t = $content["\x74\x6f\x6b\145\x6e"] ?? null; Message::create(array("\165\x73\145\x72\x5f\151\x64" => $user->id, "\x74\x69\164\154\145" => "\120\x69\x6e\x20\x50\165\162\143\x68\x61\163\x65\144", "\144\x65\164\141\151\154\163" => "\x59\x6f\x75\x20\110\141\166\x65\x20\x53\x75\x63\x63\145\163\163\146\x75\x6c\x6c\171\40\120\165\162\x63\150\141\163\x65\x64\40{$pin}\40\127\x61\145\143\40\x50\x69\x6e\x20\127\157\x72\x74\150\x20\157\x66\40{$basic->cur_text}\x20{$amount}\54\x20\131\157\165\x72\40\x50\151\156\40\151\163\40{$t}\x2e\x20\x59\x6f\165\x72\x20\111\x6e\x69\x74\x69\141\x6c\40\x42\141\154\x61\x6e\143\x65\40\127\x61\x73\x20{$basic->cur_text}\40{$j}\54\x20\x41\x6e\144\x20\x59\157\165\162\x20\106\x69\x6e\141\154\40\x42\x61\x6c\141\x6e\143\145\40\111\163\x20{$basic->cur_text}\x20{$user->balance}\x2e\40\124\150\141\x6e\x6b\x20\x59\x6f\x75\40\x46\x6f\162\40\x43\x68\157\157\x73\x69\156\147\40{$basic->sitename}", "\x61\x64\155\x69\x6e" => 1, "\163\164\x61\x74\x75\163" => 0)); $auth = Auth::user(); $to_name = $auth->username; $sitename = env("\x41\120\120\x5f\x4e\101\x4d\x45"); $to_email = $auth->email; $heading = "\x50\151\156\x20\120\165\162\x63\x68\x61\x73\145"; $data = array("\156\141\155\x65" => $auth->username, "\150\x65\x61\x64\151\156\147" => "\120\151\156\x20\x50\165\x72\x63\x68\x61\x73\145", "\142\157\144\171" => "\131\157\165\40\x48\141\166\145\40\x53\165\x63\143\145\x73\163\146\165\x6c\154\x79\x20\120\x75\x72\x63\x68\141\163\x65\x20{$pin}\x20\x57\x61\x65\x63\x20\120\151\x6e\x20\127\157\162\x74\x68\40\x6f\x66\x20{$basic->cur_text}\x20{$amount}\x2c\40\x59\x6f\165\x72\40\120\x69\x6e\x20\x69\163\x20{$t}\56\40\x59\x6f\165\162\40\x49\x6e\151\x74\x69\x61\x6c\x20\x42\141\154\141\156\143\x65\40\x57\141\x73\40{$basic->cur_text}\40\x20{$j}\40\x61\156\144\x20\131\x6f\165\x72\x20\x46\151\x6e\x61\154\x20\102\141\154\141\156\x63\145\40\151\163\40{$basic->cur_text}\40{$user->balance}\x20\56\x20\124\150\x61\156\153\40\x79\157\165\x20\146\157\162\40\x63\x68\x6f\157\163\x69\x6e\x67\40{$sitename}"); Mail::send("\x70\x61\x72\x74\x69\x61\x6c\x73\56\x70\x6d\x61\151\154", $data, static function ($message) use($to_name, $heading, $to_email) { $message->to($to_email, $to_name, $heading)->subject("\x54\x72\x61\x6e\163\x61\143\164\x69\157\156\x20\123\x75\143\x63\x65\x73\163\146\x75\x6c"); $message->from(env("\115\x41\111\114\137\x55\x53\x45\122\116\101\x4d\x45"), env("\x41\120\120\137\116\x41\x4d\105")); }); $notify[] = array("\x73\165\143\x63\x65\163\x73", "\127\x61\145\143\x20\120\x69\x6e\x20\x50\x75\162\x63\x68\x61\x73\145\144\x20\x53\x75\x63\143\x65\163\163\x66\165\154\154\x79\x21\x21"); return redirect()->route("\165\163\145\x72\x2e\167\141\145\x63\154\157\x67")->withNotify($notify); } public function waecreg() { $data["\x70\141\x67\145\137\x74\151\x74\x6c\145"] = "\x57\x41\x45\103\40\122\x65\x67\x69\x73\164\x72\141\164\151\x6f\156"; $data["\x6e\145\164\167\x6f\x72\153"] = WaecReg::whereStatus(1)->get(); return view($this->activeTemplate . "\x2e\165\x73\145\162\56\x6d\x65\162\x63\x68\x61\156\x74\x2e\167\x61\145\x63\162\x65\147", $data); } public function waecregnow(Request $request) : RedirectResponse { $u = $this->validate($request, array("\163\145\x72\166\x69\x63\145\x49\104" => "\x72\x65\x71\165\x69\162\145\x64", "\x76\141\x72\x69\141\164\x69\x6f\x6e\x5f\x63\157\144\145" => "\x72\x65\x71\165\x69\162\145\x64", "\155\157\142\151\154\x65\156\157" => "\x72\145\x71\x75\x69\162\145\x64\174\x72\145\147\x65\x78\x3a\57\x5e\x28\133\60\55\71\134\x73\x5c\x2d\x5c\x2b\134\x28\x5c\51\x5d\52\x29\44\x2f\174\144\x69\147\x69\164\163\x3a\x31\61", "\141\x6d\157\165\x6e\x74" => "\x72\145\161\165\x69\x72\x65\x64\x7c\156\x75\155\x65\162\151\143")); $amount = $request->amount; $mobileno = $request->mobileno; $serviceID = $request->serviceID; $variation_code = $request->variation_code; $user = Auth::user(); $basic = GeneralSetting::first(); $api_id = $basic->merchantid; $api_key = $basic->merchantkey; $tokenpass = $basic->tokenpass; if (str_starts_with((string) $amount, "\x2d")) { $notify[] = array("\145\x72\162\x6f\162", "\131\x6f\165\x20\101\162\145\x20\x41\x20\164\150\x69\x65\x66"); return redirect()->back()->withNotify($notify); } if ($amount <= 0) { $notify[] = array("\145\x72\x72\x6f\x72", "\x49\x6e\x76\x61\x6c\x69\x64\40\101\x6d\157\165\156\x74"); return redirect()->back()->withNotify($notify); } if ($user->balance < $amount) { $notify[] = array("\145\162\x72\x6f\162", "\131\157\165\40\104\157\156\164\x20\x48\x61\x76\x65\40\x45\156\157\165\x67\x68\40\106\x75\x6e\144\40\151\156\40\x59\157\165\162\x20\127\x61\x6c\x6c\x65\164\x20\x74\x6f\x20\x43\x6f\155\x70\154\145\164\x65\x20\124\150\x69\163\x20\124\x72\141\156\x73\141\143\164\x69\x6f\156"); return back()->withNotify($notify); } if (isset($request->pin)) { try { $c_password = Auth::user()->transpin; if (Hash::check($request->pin, $c_password)) { } else { $notify[] = array("\x65\x72\x72\x6f\162", "\124\162\141\x6e\163\141\x63\164\151\157\x6e\x20\x50\151\x6e\40\x49\x73\x20\111\x6e\143\x6f\x72\x72\145\143\x74"); return back()->withNotify($notify); } } catch (\PDOException $e) { $notify[] = array("\145\x72\x72\x6f\x72", $e->getMessage()); return back()->withNotify($notify); } } $po = Carbon::now()->format("\131\55\x6d\55\x64\x20\110\x3a\x69\72\163"); $r = Bill::where("\x75\163\x65\x72\137\151\144", $user->id)->latest()->first(); $dnet2 = json_decode($r, true); $ti = $dnet2["\x74\151\155\x65\x72"] ?? 0; $mo = $dnet2["\x61\155\157\x75\x6e\x74"] ?? 0; $finishTime = Carbon::parse($ti)->addSeconds(60)->format("\x59\55\155\x2d\144\x20\x48\72\151\72\163"); if ($po < $finishTime && $mo === $amount) { $notify[] = array("\145\162\162\x6f\x72", "\104\x75\x70\x6c\151\x63\x61\x74\145\x20\x54\x72\x61\x6e\163\141\143\x74\x69\x6f\156\54\40\153\151\156\x64\154\171\x20\167\141\x69\164\x20\x66\157\x72\x20\x41\40\155\151\x6e\x75\x74\x65"); return back()->withNotify($notify); } $trx = getTrx(); $username = $api_id; $password = $api_key; $host = $tokenpass; $ini_balance = $user->balance; $user->balance = $ini_balance - $amount; $user->save(); $data = array("\x73\145\162\166\151\143\145\x49\x44" => $serviceID, "\166\x61\x72\x69\x61\x74\151\157\156\x5f\143\x6f\x64\145" => $variation_code, "\160\x68\x6f\x6e\x65" => $mobileno, "\162\x65\161\165\145\x73\164\x5f\x69\x64" => $trx); $curl = curl_init(); curl_setopt_array($curl, array(CURLOPT_URL => $host, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_USERPWD => $username . "\72" . $password, CURLOPT_TIMEOUT => 30, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "\x50\117\123\124", CURLOPT_POSTFIELDS => $data)); $content = curl_exec($curl); $result = json_decode($content, true); curl_close($curl); $status = $result["\163\164\141\164\165\163"] ?? null; $api_response = $result["\141\160\x69\137\162\x65\x73\160\x6f\156\163\x65"] ?? null; if ($status === "\146\x61\x69\x6c\145\x64") { $user->balance += $amount; $user->save(); Bill::create(array("\165\163\145\x72\x5f\151\x64" => $user->id, "\141\x6d\157\x75\x6e\x74" => $amount, "\164\x72\x78" => $trx, "\x74\x69\x6d\145\162" => $po, "\151\x6e\151\x5f\142\x61\x6c\141\156\143\145" => $ini_balance, "\147\141\164\145\x77\x61\171" => $content, "\141\x69\x72\164\151\155\145\x5f\x74\x79\x70\x65" => "\167\x61\145\143\162", "\x6e\145\x77\x62\x61\154\141\x6e\x63\x65" => $user->balance, "\x73\x74\141\164\x75\x73" => 0)); $notify[] = array("\x65\x72\162\x6f\162", $api_response); return redirect()->back()->withNotify($notify); } Bill::create(array("\165\x73\x65\x72\x5f\151\144" => $user->id, "\141\x6d\x6f\165\x6e\x74" => $amount, "\164\162\x78" => $trx, "\x74\x69\155\145\162" => $po, "\151\x6e\x69\137\x62\141\x6c\141\156\143\145" => $ini_balance, "\147\x61\x74\x65\167\x61\171" => $content, "\x61\x69\x72\164\151\155\x65\137\164\x79\x70\x65" => "\167\141\x65\143\162", "\x6e\145\x77\142\141\154\141\x6e\143\145" => $user->balance, "\x73\x74\x61\164\165\163" => 1)); $j = getAmount($ini_balance); Message::create(array("\165\163\x65\x72\x5f\151\144" => $user->id, "\164\x69\164\154\x65" => "\120\151\x6e\x20\120\165\162\143\x68\141\163\145\x64", "\x64\145\x74\x61\x69\154\163" => "\131\157\165\40\x48\x61\x76\145\x20\123\165\143\143\x65\x73\x73\146\x75\154\x6c\x79\40\120\x75\162\x63\150\141\163\x65\x64\40\x57\101\105\103\x20\122\145\147\x69\163\164\162\x61\x74\x69\x6f\x6e\x20\120\111\116\x20\127\x6f\162\164\x68\40\117\146\x20{$basic->cur_text}\x20{$amount}\x2c\40\131\157\x75\162\40\x49\x6e\151\164\x69\x61\154\40\x42\x61\154\141\156\143\145\40\x57\141\163\40{$basic->cur_text}\40{$j}\x2c\x20\x41\156\144\x20\x59\x6f\165\x72\40\x46\151\156\141\x6c\40\102\141\x6c\141\156\143\145\40\x49\x73\x20{$basic->cur_text}\x20{$user->balance}\56\x20\x54\150\x61\x6e\x6b\x20\x79\157\x75\x20\x66\x6f\162\40\143\x68\157\157\163\151\x6e\147\x20{$basic->sitename}", "\x61\x64\x6d\x69\x6e" => 1, "\163\x74\x61\164\165\163" => 0)); $auth = Auth::user(); $to_name = $auth->username; $sitename = env("\101\x50\x50\x5f\116\101\115\105"); $to_email = $auth->email; $heading = "\120\151\156\40\x50\165\x72\143\150\141\163\145"; $data = array("\156\x61\x6d\145" => $auth->username, "\x68\145\x61\144\151\x6e\147" => "\x50\x69\x6e\x20\x50\x75\162\x63\150\x61\163\x65", "\142\x6f\x64\171" => "\131\x6f\165\40\110\141\166\x65\40\x53\165\x63\143\x65\163\163\146\x75\x6c\x6c\x79\40\x50\x75\x72\x63\150\141\163\145\x64\40\x57\101\105\x43\x20\x52\x65\x67\151\163\164\162\141\164\151\157\x6e\x20\x50\x49\x4e\x20\x57\x6f\x72\x74\150\x20\x6f\146\40{$basic->cur_text}\40{$amount}\54\x20\x59\x6f\165\x72\x20\x49\x6e\x69\x74\x69\141\154\40\x42\x61\154\141\156\x63\x65\40\127\x61\x73\x20{$basic->cur_text}\40\x20{$j}\x20\141\x6e\x64\40\x59\x6f\165\162\x20\106\151\156\x61\x6c\x20\102\x61\154\141\156\143\x65\x20\151\163\x20{$basic->cur_text}\40{$user->balance}\40\x2e\40\124\x68\141\156\x6b\x20\171\x6f\x75\40\146\157\162\40\143\x68\157\x6f\x73\x69\156\x67\40{$sitename}"); Mail::send("\160\x61\x72\164\151\141\154\x73\56\x70\x6d\x61\151\154", $data, static function ($message) use($to_name, $heading, $to_email) { $message->to($to_email, $to_name, $heading)->subject("\x54\162\x61\x6e\x73\x61\143\x74\x69\157\x6e\40\x53\x75\x63\143\x65\163\x73\146\165\x6c"); $message->from(env("\x4d\101\x49\114\137\125\x53\x45\x52\x4e\x41\115\x45"), env("\101\x50\120\x5f\116\101\x4d\105")); }); $notify[] = array("\x73\165\x63\x63\x65\163\x73", "\x57\141\x65\143\x20\x52\x65\x67\151\x73\164\162\x61\164\151\157\156\x20\x50\x69\x6e\x20\x50\x75\x72\x63\x68\x61\x73\x65\x64\x20\x53\165\143\143\x65\163\x73\146\x75\x6c\154\x79\41\41"); return redirect()->route("\165\163\x65\162\56\167\x61\x65\143\162\154\157\147")->withNotify($notify); } public function nabteb() { $data["\160\x61\x67\145\137\164\151\x74\154\x65"] = "\x4e\101\102\124\105\102"; $data["\x6e\145\164\167\157\162\x6b"] = Nabteb::whereStatus(1)->get(); return view($this->activeTemplate . "\165\163\145\162\x2e\155\x65\x72\x63\150\141\156\164\56\x6e\141\142\x74\x65\142", $data); } public function nabtebnow(Request $request) : RedirectResponse { $this->validate($request, array("\156\x6f\x5f\157\x66\137\160\151\156\x73" => "\162\145\x71\165\151\x72\145\144\174\156\165\x6d\x65\162\x69\x63", "\141\x6d\157\165\156\164" => "\162\x65\161\x75\x69\162\145\144\174\156\x75\x6d\x65\162\x69\x63")); $amount = $request->amount; $pin = $request->no_of_pins; $user = Auth::user(); $basic = GeneralSetting::first(); $authorization = $basic->token; if (str_starts_with((string) $amount, "\x2d")) { $notify[] = array("\x65\162\x72\x6f\x72", "\x59\x6f\x75\40\101\162\x65\40\x41\x20\164\150\x69\x65\146"); return redirect()->back()->withNotify($notify); } if ($amount <= 0) { $notify[] = array("\x65\x72\x72\157\x72", "\111\x6e\166\141\154\151\144\40\x41\155\157\x75\x6e\x74"); return redirect()->back()->withNotify($notify); } if ($user->balance < $amount) { $notify[] = array("\145\x72\162\157\162", "\x59\157\x75\40\x44\x6f\x6e\164\x20\x48\x61\x76\x65\40\105\x6e\157\165\147\150\40\106\x75\x6e\x64\x20\151\156\x20\x59\x6f\x75\x72\x20\127\x61\x6c\154\145\x74\x20\x74\x6f\40\x43\157\x6d\160\x6c\x65\x74\x65\40\124\x68\x69\163\40\x54\x72\x61\156\x73\141\143\164\151\157\156"); return back()->withNotify($notify); } if (isset($request->pin)) { try { $c_password = Auth::user()->transpin; if (Hash::check($request->pin, $c_password)) { } else { $notify[] = array("\x65\162\x72\x6f\162", "\x54\162\141\156\163\141\x63\164\x69\157\156\x20\x50\x69\x6e\x20\x49\163\x20\111\x6e\143\157\x72\x72\145\x63\x74"); return back()->withNotify($notify); } } catch (\PDOException $e) { $notify[] = array("\x65\162\x72\x6f\162", $e->getMessage()); return back()->withNotify($notify); } } $po = Carbon::now()->format("\x59\55\155\x2d\x64\40\x48\72\151\x3a\163"); $r = Bill::where("\165\x73\x65\x72\x5f\x69\x64", $user->id)->latest()->first(); $dnet2 = json_decode($r, true); $ti = $dnet2["\x74\151\x6d\145\x72"] ?? 0; $mo = $dnet2["\x61\x6d\157\x75\156\164"] ?? 0; $finishTime = Carbon::parse($ti)->addSeconds(60)->format("\131\x2d\155\55\144\40\x48\72\151\x3a\x73"); if ($po < $finishTime && $mo === $amount) { $notify[] = array("\145\x72\162\157\162", "\104\165\160\154\x69\x63\x61\164\145\x20\x54\x72\x61\156\x73\141\x63\164\x69\157\156\x2c\x20\153\x69\156\x64\154\x79\x20\167\x61\x69\164\x20\x66\157\162\40\x41\40\x6d\x69\156\x75\x74\x65"); return back()->withNotify($notify); } $ini_balance = $user->balance; $user->balance = $ini_balance - $amount; $user->save(); $trx = getTrx(); $host = "\150\x74\x74\160\x73\x3a\x2f\57\167\167\167\56\166\164\165\x6d\157\142\x69\154\145\x73\150\157\x70\x73\56\x63\157\155\56\156\x67\57\144\145\166\145\x6c\157\160\x65\162\x2d\141\x70\x69\55\126\61\57\x6e\x61\142\x74\145\142\x2f{$basic->gladtid}\x2f{$pin}\x2f{$amount}"; $curl = curl_init(); curl_setopt_array($curl, array(CURLOPT_URL => $host, CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "\107\105\x54", CURLOPT_HTTPHEADER => array("\143\141\143\x68\x65\x2d\143\157\156\164\x72\157\x6c\72\40\156\x6f\55\x63\x61\143\150\145"))); $response = curl_exec($curl); curl_close($curl); $content = json_decode($response, true); $status = $content["\163\x74\x61\164\x75\x73"] ?? null; $api_response = $content["\141\160\151\137\x72\145\163\160\x6f\x6e\163\x65"] ?? null; if ($status === "\146\141\151\x6c\145\x64") { $user->balance += $amount; $user->save(); Bill::create(array("\165\x73\x65\162\137\151\144" => $user->id, "\x61\x6d\157\165\x6e\x74" => $amount, "\164\x72\x78" => $trx, "\164\151\155\x65\x72" => $po, "\x69\156\151\137\142\141\x6c\141\156\143\x65" => $ini_balance, "\x67\141\164\x65\x77\141\171" => $response, "\141\x69\x72\164\151\x6d\145\137\164\171\x70\x65" => "\156\141\x62\164\145\142", "\x6e\x65\167\x62\141\154\141\x6e\x63\x65" => $user->balance, "\163\x74\141\x74\x75\163" => 0)); $notify[] = array("\145\x72\162\157\x72", $api_response); return redirect()->back()->withNotify($notify); } Bill::create(array("\x75\163\x65\x72\137\151\x64" => $user->id, "\141\x6d\157\x75\x6e\x74" => $amount, "\164\x72\170" => $trx, "\x74\x69\x6d\x65\162" => $po, "\151\156\151\x5f\x62\141\154\141\156\x63\x65" => $ini_balance, "\x67\141\164\x65\x77\141\x79" => $response, "\x61\x69\162\164\151\155\145\x5f\164\x79\x70\145" => "\156\141\x62\x74\145\142", "\x6e\145\167\x62\x61\154\x61\x6e\x63\x65" => $user->balance, "\x73\164\x61\164\165\163" => 1)); $j = getAmount($ini_balance); $t = $content["\x74\x6f\x6b\x65\x6e"] ?? null; Message::create(array("\x75\x73\145\x72\x5f\x69\x64" => $user->id, "\x74\x69\164\154\x65" => "\120\151\156\40\x50\x75\x72\x63\150\x61\163\145\144", "\144\145\x74\141\x69\154\x73" => "\x59\157\165\x20\110\141\166\x65\x20\123\165\x63\x63\x65\x73\163\x66\165\x6c\154\x79\x20\120\165\x72\x63\x68\x61\x73\145\x64\40{$pin}\x20\116\x61\x62\164\145\x62\40\x50\x69\156\x20\127\157\x72\x74\150\x20\x4f\146\40{$basic->cur_text}\40{$amount}\x2c\x20\x59\157\165\162\x20\x50\151\x6e\40\151\163\40{$t}\56\40\131\157\165\162\40\x49\156\x69\x74\x69\141\154\x20\102\141\x6c\141\156\x63\x65\40\x57\141\x73\x20{$basic->cur_text}\x20{$j}\x2c\x20\101\156\144\x20\x59\x6f\165\x72\x20\x46\151\156\x61\x6c\40\102\141\x6c\141\x6e\x63\145\x20\111\163\40{$basic->cur_text}\40{$user->balance}\56\40\x54\x68\141\x6e\153\40\x59\x6f\165\40\106\157\x72\x20\x43\x68\x6f\157\163\151\156\147\40{$basic->sitename}", "\141\144\155\x69\x6e" => 1, "\x73\x74\141\164\x75\x73" => 0)); $auth = Auth::user(); $to_name = $auth->username; $sitename = env("\101\120\120\137\x4e\101\115\x45"); $to_email = $auth->email; $heading = "\x50\x69\156\x20\x50\165\x72\x63\x68\x61\163\145"; $data = array("\156\141\155\x65" => $auth->username, "\150\x65\141\144\151\x6e\x67" => "\120\151\156\40\x50\165\162\143\x68\x61\163\x65", "\142\x6f\144\171" => "\131\157\165\40\110\141\x76\x65\40\x53\165\143\x63\x65\163\163\x66\165\154\x6c\x79\x20\x50\165\162\x63\150\141\x73\145\x64\x20{$pin}\x20\116\141\x62\x74\145\142\x20\120\x69\156\40\127\157\162\x74\x68\40\x4f\146\x20{$basic->cur_text}\x20{$amount}\54\40\x59\157\165\162\40\x50\151\156\x20\x69\163\x20{$t}\x2e\x20\x59\x6f\x75\x72\40\111\x6e\x69\164\151\x61\154\40\102\x61\154\x61\x6e\x63\145\x20\127\141\x73\x20{$basic->cur_text}\x20{$j}\x2c\x20\101\x6e\x64\x20\131\x6f\x75\x72\40\106\151\156\x61\154\40\x42\141\154\x61\156\x63\145\40\111\x73\x20{$basic->cur_text}\40{$user->balance}\56\x20\x54\x68\141\x6e\x6b\x20\131\x6f\165\x20\106\157\x72\x20\x43\150\x6f\157\x73\x69\156\x67\x20{$sitename}"); Mail::send("\x70\x61\x72\164\x69\141\x6c\x73\56\x70\155\x61\x69\154", $data, static function ($message) use($to_name, $heading, $to_email) { $message->to($to_email, $to_name, $heading)->subject("\124\x72\x61\x6e\163\x61\x63\x74\151\157\156\40\123\165\x63\143\145\x73\x73\x66\165\x6c"); $message->from(env("\x4d\101\x49\x4c\x5f\125\123\105\122\x4e\x41\115\x45"), env("\101\120\x50\137\116\x41\115\x45")); }); $notify[] = array("\163\x75\143\143\x65\163\x73", "\x4e\x61\x62\x74\145\142\40\120\151\x6e\40\120\165\x72\x63\x68\141\163\x65\x64\40\123\x75\x63\143\145\x73\x73\146\x75\154\154\171\41\41"); return redirect()->route("\x75\163\145\x72\56\x6e\x61\142\164\x65\142\154\157\x67")->withNotify($notify); } public function jamb() { $data["\160\141\147\145\x5f\x74\151\164\x6c\x65"] = "\112\x41\x4d\102"; $data["\x6e\145\x74\x77\x6f\x72\x6b"] = Jamb::whereStatus(1)->get(); return view($this->activeTemplate . "\x2e\165\x73\145\162\x2e\x6d\x65\x72\143\150\x61\156\164\x2e\x6a\141\x6d\142", $data); } public function jambnow(Request $request) : RedirectResponse { $u = $this->validate($request, array("\141\155\x6f\x75\156\x74" => "\162\145\x71\165\151\x72\x65\144\x7c\156\165\x6d\x65\162\151\x63", "\x63\x61\156\144\x69\x64\x61\x74\x65\163\137\x6e\x61\x6d\145\137\145\x6d\x61\151\x6c" => "\162\x65\161\165\x69\x72\145\x64", "\143\141\156\144\151\x64\141\164\145\x73\137\x6a\x61\155\x62\x5f\162\x65\x67\x6e\x6f" => "\x72\x65\161\x75\x69\x72\x65\x64")); $amount = $request->amount; $candi = $request->candidates_name_email; $regno = $request->candidates_jamb_regno; $user = Auth::user(); $basic = GeneralSetting::first(); $authorization = $basic->token; if (str_starts_with((string) $amount, "\55")) { $notify[] = array("\x65\162\x72\x6f\x72", "\131\x6f\165\40\x41\x72\145\40\101\x20\x74\150\151\145\x66"); return redirect()->back()->withNotify($notify); } if ($amount <= 0) { $notify[] = array("\145\162\x72\x6f\162", "\x49\156\x76\141\x6c\x69\x64\x20\x41\x6d\157\x75\x6e\x74"); return redirect()->back()->withNotify($notify); } if ($user->balance < $amount) { $notify[] = array("\145\x72\162\157\162", "\x59\x6f\x75\40\104\157\x6e\164\40\x48\141\166\145\40\105\156\x6f\165\147\150\40\106\165\x6e\144\x20\151\x6e\x20\131\157\165\162\40\x57\x61\x6c\154\145\x74\x20\x74\157\40\103\157\x6d\160\154\145\164\145\x20\x54\150\151\163\x20\x54\162\x61\x6e\x73\141\143\164\151\157\x6e"); return back()->withNotify($notify); } if (isset($request->pin)) { try { $c_password = Auth::user()->transpin; if (Hash::check($request->pin, $c_password)) { } else { $notify[] = array("\x65\x72\x72\x6f\162", "\x54\x72\x61\156\x73\x61\143\x74\x69\157\x6e\x20\x50\x69\156\x20\111\163\x20\111\x6e\x63\x6f\x72\162\x65\143\164"); return back()->withNotify($notify); } } catch (\PDOException $e) { $notify[] = array("\145\x72\162\x6f\162", $e->getMessage()); return back()->withNotify($notify); } } $po = Carbon::now()->format("\x59\55\x6d\x2d\x64\x20\x48\72\x69\72\163"); $r = Bill::where("\x75\x73\x65\x72\137\151\x64", $user->id)->latest()->first(); $dnet2 = json_decode($r, true); $ti = $dnet2["\164\x69\155\x65\x72"] ?? 0; $mo = $dnet2["\141\x6d\x6f\165\156\x74"] ?? 0; $finishTime = Carbon::parse($ti)->addSeconds(60)->format("\131\x2d\x6d\55\x64\x20\110\72\151\72\163"); if ($po < $finishTime && $mo === $amount) { $notify[] = array("\145\162\162\x6f\x72", "\104\x75\160\154\x69\143\x61\x74\x65\x20\x54\162\x61\156\163\141\143\164\x69\x6f\x6e\x2c\40\153\151\x6e\144\154\171\40\x77\141\x69\164\x20\146\x6f\x72\40\x41\x20\x6d\x69\156\165\164\145"); return back()->withNotify($notify); } $ini_balance = $user->balance; $user->balance = $ini_balance - $amount; $user->save(); $trx = getTrx(); $curl = curl_init(); curl_setopt_array($curl, array(CURLOPT_URL => "\150\x74\x74\x70\x73\72\x2f\57\x65\x61\x73\x79\141\x63\x63\x65\x73\x73\141\x70\151\56\143\x6f\x6d\56\x6e\147\x2f\141\160\x69\x2f\162\145\x73\145\164\137\x6a\141\x6d\x62\x5f\160\141\x73\163\167\x6f\x72\144\x2e\160\x68\160", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_MAXREDIRS => 10, CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "\120\117\x53\x54", CURLOPT_POSTFIELDS => "\143\141\x6e\x64\151\144\x61\x74\145\x73\137\156\141\155\145\137\145\155\141\x69\x6c\75" . $candi . "\143\141\x6e\144\151\144\x61\x74\145\x73\137\x6a\x61\x6d\142\137\162\145\x67\x6e\x6f\x3d" . $regno . "\46\162\x65\x66\145\162\x65\x6e\x63\145\137\x6e\x6f\x3d" . $trx . '', CURLOPT_HTTPHEADER => array("\101\165\x74\x68\157\162\151\172\141\x74\151\157\156\x54\x6f\x6b\145\x6e\72\x20" . $authorization, "\x63\x61\143\x68\x65\x2d\x63\157\x6e\x74\x72\x6f\x6c\72\40\156\157\x2d\x63\141\143\150\145"))); $response = curl_exec($curl); curl_close($curl); $content = json_decode($response, true); Bill::create(array("\x75\x73\145\x72\137\x69\x64" => $user->id, "\x61\155\x6f\165\x6e\164" => $amount, "\164\162\170" => $trx, "\164\151\x6d\145\162" => $po, "\151\156\x69\x5f\142\141\x6c\141\x6e\x63\x65" => $ini_balance, "\x67\141\164\x65\167\x61\171" => $response, "\x61\x69\x72\164\151\x6d\x65\137\x74\x79\160\x65" => 11, "\156\x65\167\142\x61\x6c\141\156\143\145" => $user->balance, "\163\x74\141\x74\165\x73" => 1)); if (!isset($content["\x6d\145\163\x73\x61\x67\x65"])) { $notify[] = array("\x65\162\162\x6f\x72", "\111\x6e\166\141\154\151\144\40\x41\x50\111\x20\x52\145\163\x70\157\x6e\x73\145"); return back()->withNotify($notify); } if ($content["\x73\165\x63\x63\x65\163\x73"] !== "\x74\162\165\145") { $notify[] = array("\x65\162\162\157\x72", $content["\x6d\145\x73\x73\141\147\145"]); return back()->withNotify($notify); } $j = getAmount($ini_balance); Message::create(array("\x75\x73\145\162\137\x69\144" => $user->id, "\x74\151\x74\154\x65" => "\120\151\x6e\x20\x50\x75\x72\143\150\x61\x73\x65\144", "\144\x65\x74\x61\151\x6c\x73" => "\x59\x6f\x75\40\110\x61\x76\145\x20\123\165\x63\x63\x65\x73\163\x66\x75\154\154\171\40\122\145\x71\x75\x65\x73\164\145\144\40\x46\x6f\x72\40\x4a\x61\155\142\x20\120\x61\x73\x73\x77\157\x72\x64\40\122\x65\x73\x65\x74\x20\x6f\x66\40{$candi}\x20\127\151\x74\x68\40\x52\145\x67\151\x73\x74\162\141\x74\151\x6f\x6e\x20\116\165\x6d\x62\x65\x72\x20{$regno}\54\x20\131\157\165\x72\40\x49\156\151\164\151\x61\154\40\102\141\154\x61\156\143\x65\x20\x57\141\x73\40{$basic->cur_text}\40{$j}\54\x20\x41\x6e\x64\x20\x59\x6f\x75\162\x20\x46\x69\156\x61\154\x20\x42\141\x6c\141\x6e\x63\x65\40\x49\163\40{$basic->cur_text}\40{$user->balance}\x2e\40\124\150\x61\156\x6b\40\131\157\x75\x20\106\x6f\x72\40\103\150\157\x6f\163\x69\x6e\147\x20{$basic->sitename}", "\141\144\155\151\x6e" => 1, "\163\164\x61\164\165\x73" => 0)); $auth = Auth::user(); $to_name = $auth->username; $sitename = env("\101\120\120\x5f\x4e\101\115\105"); $to_email = $auth->email; $heading = "\120\151\156\x20\x50\165\162\143\x68\x61\x73\145"; $data = array("\x6e\141\155\145" => $auth->username, "\x68\x65\141\144\151\156\147" => "\120\141\x73\163\x77\157\162\x64\40\x52\x65\163\x65\x74", "\142\x6f\144\171" => "\131\x6f\165\x20\110\141\x76\x65\x20\x53\x75\x63\x63\x65\163\163\x66\x75\154\x6c\171\x20\122\145\x71\165\145\x73\x74\145\x64\x20\x46\x6f\x72\x20\112\141\x6d\x62\x20\x50\141\163\163\x77\157\x72\x64\x20\x52\x65\163\145\164\x20\157\x66\x20{$candi}\x20\x57\x69\164\x68\x20\122\x65\x67\151\x73\164\x72\x61\164\151\157\156\x20\x4e\x75\155\142\x65\162\40{$regno}\54\40\131\x6f\x75\x72\40\111\x6e\151\164\151\141\x6c\x20\102\141\x6c\x61\156\x63\145\40\127\x61\163\x20{$basic->cur_text}\40{$j}\x2c\40\101\156\144\x20\131\157\165\x72\40\x46\151\x6e\x61\x6c\x20\102\141\x6c\x61\156\x63\x65\40\111\x73\x20{$basic->cur_text}\x20{$user->balance}\x2e\x20\124\x68\x61\156\153\40\x59\x6f\165\40\x46\157\x72\x20\x43\x68\x6f\x6f\163\151\156\147\x20{$sitename}"); Mail::send("\160\x61\x72\164\x69\141\154\163\56\160\155\x61\x69\x6c", $data, static function ($message) use($to_name, $heading, $to_email) { $message->to($to_email, $to_name, $heading)->subject("\x54\162\141\x6e\163\141\x63\164\x69\157\x6e\x20\x53\x75\143\x63\145\163\x73\146\165\x6c"); $message->from(env("\x4d\x41\x49\x4c\x5f\x55\123\x45\122\x4e\101\115\x45"), env("\101\x50\x50\137\x4e\101\x4d\x45")); }); $notify[] = array("\163\165\x63\x63\x65\163\163", "\x50\x61\x73\x73\167\x6f\x72\x64\x20\x52\145\163\145\164\x20\123\x75\142\x6d\x69\x74\x74\x65\x64\x20\x53\165\x63\143\x65\163\x73\146\165\x6c\154\171\x21\x21"); return redirect()->route("\165\x73\x65\x72\x2e\150\x6f\155\145")->withNotify($notify); } public function mobilerecharge() { $data["\160\141\x67\x65\137\x74\x69\164\x6c\145"] = "\115\157\142\151\154\145\40\x52\x65\143\x68\x61\162\x67\x65"; $data["\156\145\x74\167\157\162\x6b"] = Internex::wherePhone(1)->whereStatus(1)->latest()->get(); $datanet = Internex::wherePhone(1)->whereStatus(1)->count(); $dnet = json_decode($datanet, true, 512, JSON_THROW_ON_ERROR); if ($dnet < 1) { $notify[] = array("\145\162\162\157\x72", "\123\x65\162\166\x69\x63\145\40\x48\141\x73\x20\x42\x65\x65\x6e\x20\x44\151\163\141\x62\154\x65\x64"); return back()->withNotify($notify); } return view($this->activeTemplate . "\56\x75\x73\145\162\56\x6d\145\162\143\150\x61\156\164\x2e\155\x6f\x62\x69\x6c\x65", $data); } public function rechargenow(Request $request) : RedirectResponse { $userData = Purify::clean($request->except("\x5f\164\157\x6b\x65\x6e", "\137\155\145\x74\150\157\x64")); $rules = array("\x6d\x6f\x62\x69\x6c\145\x6e\x6f" => "\162\x65\161\x75\x69\x72\145\144\x7c\162\x65\x67\145\170\x3a\x2f\x5e\x28\133\60\x2d\71\x5c\163\134\x2d\134\x2b\x5c\50\x5c\51\135\52\51\x24\57\x7c\x64\x69\147\151\x74\163\x3a\x31\x31", "\x61\x69\162\164\151\x6d\145\137\164\x79\x70\145" => "\x72\x65\161\165\151\x72\145\x64\x7c\156\x75\x6d\145\162\x69\143", "\x6e\145\164\167\x6f\162\x6b" => "\x72\x65\x71\165\x69\162\x65\x64\174\x73\x74\x72\151\x6e\147", "\x61\155\157\165\x6e\x74" => "\162\145\161\165\x69\162\145\144\174\156\x75\x6d\x65\x72\151\x63\174\155\x69\156\x3a\x35\60\x7c\155\x61\170\72\x32\x30\60\x30", "\x70\151\156" => "\x72\x65\161\165\x69\x72\x65\x64\x7c\x6e\165\x6d\x65\x72\x69\143\x7c\x6d\151\156\x3a\x34", "\166\141\154\x69\x64\141\164\x65" => "\x6e\x75\154\x6c\141\x62\154\145"); $Validator = Validator::make($userData, $rules); if ($Validator->fails()) { return back()->withErrors($Validator)->withInput(); } $userData = (object) $userData; $mobileno = $userData->mobileno ?? null; $airtime_type = $userData->airtime_type ?? null; $amount = $userData->amount ?? null; $network = $userData->network ?? null; $pin = $userData->pin ?? null; $val = $userData->validate ?? null; if (!$val) { $validate = substr($mobileno, 0, 4); if ($network === "\155\x74\156") { if (!str_contains("\x20\x30\x37\60\x32\x20\60\x37\60\63\40\60\67\61\x33\40\x30\67\x30\x34\x20\x30\67\x30\66\x20\x30\67\x31\66\40\x30\x38\x30\62\x20\x30\70\x30\63\40\60\x38\x30\66\40\x30\x38\61\x30\x20\60\x38\61\63\40\x30\x38\61\x34\40\60\70\61\66\x20\60\x39\x30\63\40\60\x39\61\63\x20\x30\71\x30\x36\40\60\71\x31\x36\40\60\70\x30\x34\x20", $validate)) { $notify[] = array("\x65\162\162\157\x72", "\124\x68\x69\163\40\116\x75\x6d\x62\x65\x72\x20\x69\x73\40\x6e\157\164\x20\141\x6e\40{$network}\x20\116\165\155\142\145\x72\x2c\40\103\x68\x65\x63\153\40\x59\x6f\x75\162\40\x4e\165\155\142\x65\x72"); return back()->withNotify($notify); } } else { if ($network === "\x67\154\x6f") { if (!str_contains("\40\60\70\60\x35\40\x30\x37\60\x35\x20\60\x39\60\x35\x20\60\70\60\x37\x20\60\x39\x30\x37\40\x30\x37\x30\67\x20\x30\70\x31\67\x20\60\x39\x31\67\40\60\x37\x31\x37\x20\x30\67\x31\65\40\60\70\61\65\40\60\71\x31\65\40\x30\70\61\x31\x20\60\x37\61\61\40\x30\x39\61\x31\40", $validate)) { $notify[] = array("\x65\x72\162\157\162", "\x54\x68\151\x73\40\116\165\x6d\142\x65\162\40\x69\x73\40\156\x6f\x74\40\141\40{$network}\40\x4e\165\x6d\142\145\162\x2c\x20\103\150\x65\143\153\x20\x59\x6f\165\x72\40\116\165\155\142\x65\x72"); return back()->withNotify($notify); } } else { if ($network === "\x61\151\162\x74\x65\154") { if (!str_contains("\x20\x30\71\x30\x34\x20\60\x38\60\62\40\60\x39\60\x32\x20\60\x37\x30\62\x20\60\x38\x30\x38\40\60\71\x30\70\40\60\x37\60\70\x20\60\x39\61\x38\40\60\x38\61\x38\x20\60\67\x31\70\40\60\x38\x31\x32\x20\60\71\x31\62\x20\60\x37\61\x32\40\60\x38\x30\x31\x20\x30\x37\60\61\40\x30\x39\60\61\40\x30\x39\x30\x37\40\60\71\61\x37\40", $validate)) { $notify[] = array("\x65\162\x72\x6f\x72", "\124\150\151\x73\x20\116\165\155\142\145\x72\x20\x69\163\40\156\157\164\40\141\156\40{$network}\40\x4e\x75\155\142\x65\x72\x2c\x20\x43\x68\x65\x63\x6b\x20\131\x6f\x75\162\40\x4e\165\x6d\x62\x65\x72"); return back()->withNotify($notify); } } else { if ($network === "\145\x74\x69\x73\141\x6c\x61\x74" && !str_contains($validate, "\40\60\x38\x30\71\x20\x30\x39\60\71\x20\60\x37\x30\x39\x20\x30\x38\61\x39\x20\60\x39\61\x39\40\x30\x37\x31\x39\x20\x30\70\61\67\40\60\71\61\x37\x20\60\67\61\x37\40\60\67\x31\x38\40\x30\71\x31\70\40\60\70\x31\70\x20\60\x38\x30\70\x20\60\x37\60\x38\x20\60\x39\60\70\40")) { $notify[] = array("\145\x72\x72\157\x72", "\124\x68\151\x73\40\x4e\x75\x6d\x62\145\162\x20\x69\163\x20\156\x6f\x74\x20\141\x6e\x20{$network}\40\x4e\165\x6d\x62\x65\x72\54\40\103\x68\x65\143\153\x20\x59\x6f\x75\162\40\116\165\155\142\x65\x72"); return back()->withNotify($notify); } } } } } $user = Auth::user(); $basic = GeneralSetting::first(); if (str_starts_with((string) $amount, "\x2d")) { $notify[] = array("\145\x72\x72\x6f\162", "\x59\157\165\x20\x41\x72\145\40\x41\40\x74\150\151\x65\x66"); return redirect()->back()->withNotify($notify); } if ($amount <= 0) { $notify[] = array("\x65\162\162\x6f\x72", "\111\156\166\141\154\151\144\40\x41\x6d\x6f\x75\x6e\x74"); return redirect()->back()->withNotify($notify); } if ($user->balance < $amount) { $notify[] = array("\x65\162\162\157\x72", "\131\x6f\165\40\104\x6f\x6e\164\40\x48\x61\166\x65\x20\x45\x6e\157\165\147\150\x20\106\165\x6e\x64\163\40\x69\156\x20\x59\x6f\x75\x72\x20\127\141\x6c\x6c\145\164\x20\x74\157\40\x43\x6f\155\160\154\145\164\145\40\164\150\x69\x73\40\124\162\141\x6e\x73\x61\143\x74\x69\x6f\156"); return back()->withNotify($notify); } if (isset($pin)) { try { $c_password = Auth::user()->transpin ?? null; if (Hash::check($pin, $c_password)) { } else { $notify[] = array("\x65\162\x72\x6f\162", "\124\162\x61\x6e\x73\141\x63\x74\x69\x6f\x6e\x20\x50\151\156\x20\111\163\x20\111\x6e\143\x6f\162\162\145\143\164"); return back()->withNotify($notify); } } catch (\PDOException $e) { $notify[] = array("\x65\x72\162\x6f\x72", $e->getMessage()); return back()->withNotify($notify); } } $po = Carbon::now()->format("\x59\55\155\55\x64\40\110\x3a\151\72\163"); $r = Bill::where("\x75\163\x65\162\137\x69\144", $user->id)->latest()->first(); $dnet2 = json_decode($r, true); $ti = $dnet2["\x74\151\155\x65\162"] ?? 0; $mo = $dnet2["\x6d\157\x62\151\x6c\x65\156\157"] ?? null; $amt = $dnet2["\141\155\157\165\x6e\x74"] ?? null; $finishTime = Carbon::parse($ti)->addSeconds(60)->format("\x59\55\155\x2d\144\40\x48\x3a\151\x3a\x73"); if ($po < $finishTime && $mo === $mobileno && $amt === $amount) { $notify[] = array("\x65\162\162\157\x72", "\x44\165\160\154\x69\x63\141\164\x65\40\124\162\x61\x6e\163\x61\143\164\151\x6f\156\x2c\x20\153\151\x6e\x64\x6c\171\40\167\x61\x69\164\40\146\157\162\x20\66\x30\163\x65\x63\x73"); return back()->withNotify($notify); } $basic = GeneralSetting::first(); $dis2 = $basic->airtimediscount; $fee = $amount / 100 * $dis2; $pay = (double) $amount - (double) $fee; $ini_balance = getAmount($user->balance ?? null); $user->balance = (double) $ini_balance - $pay; $user->save(); $trx = getTrx(); $parameters = array("\155\157\x62\151\154\145\x6e\x6f" => $mobileno, "\x6e\x65\x74\167\x6f\162\x6b" => $network, "\x61\155\157\165\156\x74" => $amount); $url = "\150\164\x74\x70\x73\x3a\x2f\x2f\x76\164\x75\x6d\x6f\x62\151\x6c\145\163\x68\157\x70\x73\x2e\x63\157\x6d\56\x6e\x67\57\x61\x70\x69\57\126\x32\x2f\141\151\162\x74\151\x6d\145"; $headers = array("\101\143\x63\x65\x70\x74\x3a\x20\x61\160\x70\x6c\151\x63\141\164\151\x6f\x6e\x2f\152\163\x6f\156", "\x41\x75\x74\x68\157\162\x69\x7a\x61\164\x69\157\156\72\40\x42\x65\141\162\145\162\40{$basic->gladtid}"); $ch = curl_init(); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($parameters)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $result = json_decode($response, true); $status = $result["\x73\x74\x61\x74\165\x73"] ?? null; $api_response = $result["\141\160\x69\x5f\162\x65\163\160\x6f\156\163\145"] ?? null; if ($status === "\146\141\151\154\x65\x64") { $user->balance += $pay; $user->save(); Bill::create(array("\165\x73\145\x72\x5f\151\144" => $user->id ?? null, "\x6e\141\x6d\145" => $user->username ?? null, "\141\155\x6f\165\x6e\x74" => $amount, "\x74\151\x6d\x65\162" => $po, "\x6d\157\142\151\154\145\x6e\157" => $mobileno, "\164\x72\170" => $trx, "\156\x65\164\167\157\162\153" => $network, "\143\x68\141\x72\147\x65" => $pay, "\151\x6e\151\137\142\x61\x6c\141\x6e\x63\145" => getAmount($ini_balance), "\147\x61\164\x65\167\x61\x79" => $response ?? null, "\141\x69\162\164\x69\155\145\137\x74\x79\x70\x65" => $airtime_type, "\x6e\x65\x77\142\x61\x6c\141\x6e\143\145" => getAmount($user->balance ?? null), "\163\164\x61\164\165\x73" => 0)); $notify[] = array("\x65\x72\162\157\162", $api_response); return redirect()->back()->withNotify($notify); } Bill::create(array("\x75\x73\145\162\x5f\151\x64" => $user->id ?? null, "\x6e\x61\155\x65" => $user->username ?? null, "\x61\x6d\x6f\165\x6e\164" => $amount, "\x74\x69\155\145\162" => $po, "\x6d\x6f\142\x69\x6c\145\156\x6f" => $mobileno, "\164\162\x78" => $trx, "\156\x65\164\x77\157\162\x6b" => $network, "\x63\150\141\x72\x67\x65" => $pay, "\142\157\x6e\x75\x73" => $fee, "\x69\156\151\x5f\x62\x61\x6c\x61\x6e\x63\145" => getAmount($ini_balance), "\x67\x61\x74\x65\167\141\171" => $response ?? null, "\141\151\162\x74\151\x6d\x65\137\x74\x79\x70\145" => $airtime_type, "\156\145\167\142\141\154\141\156\x63\145" => getAmount($user->balance ?? null), "\163\x74\141\x74\165\163" => 1)); Message::create(array("\165\163\x65\162\x5f\x69\144" => $user->id ?? null, "\x74\x69\x74\x6c\x65" => "\101\x69\162\x74\x69\155\145\40\122\x65\143\x68\x61\x72\147\x65\144", "\x64\145\164\x61\151\x6c\163" => "\x59\x6f\x75\x72\40\x4d\157\142\x69\154\x65\40\x4e\x75\155\142\x65\162\40{$mobileno}\x20\110\141\x73\40\102\x65\x65\x6e\40\x53\165\143\x63\145\163\163\x66\165\154\x6c\171\40\x52\145\x63\150\141\162\147\145\144\x20\x57\151\x74\x68\x20\x54\150\x65\x20\x53\165\155\40\x4f\x66\x20{$basic->cur_text}\40{$amount}\40\127\157\162\x74\150\40\x4f\x66\40{$network}\x20\101\x69\x72\x74\151\x6d\145\x2c\40{$basic->cur_text}\x20{$pay}\40\x48\141\x73\x20\102\145\x65\156\40\104\x65\x64\165\143\164\145\x64\x20\x46\162\157\x6d\40\131\157\165\x72\40\x57\x61\154\154\x65\164\54\x20\x59\157\x75\x72\40\111\156\151\x74\151\141\x6c\40\x42\x61\154\x61\x6e\x63\x65\40\127\141\x73\x20{$basic->cur_text}\x20{$ini_balance}\54\x20\x41\156\144\40\x59\157\x75\162\40\106\151\x6e\141\154\40\x42\141\x6c\141\156\x63\x65\40\151\x73\40{$basic->cur_text}\x20{$user->balance}\x2e\40\x54\x68\141\156\153\40\131\157\x75\40\106\x6f\162\40\103\150\x6f\x6f\x73\x69\156\x67\40{$basic->sitename}", "\x61\144\155\x69\156" => 1, "\x73\x74\x61\164\165\x73" => 0)); $notify[] = array("\x73\x75\x63\143\x65\x73\x73", "\x41\x69\162\164\151\x6d\145\40\x50\165\x72\x63\x68\141\x73\145\x64\x20\x53\x75\x63\x63\145\x73\x73\146\x75\154\x6c\x79\41\x21"); return redirect()->route("\x75\163\145\162\x2e\x72\x65\x63\150\x61\x72\x67\145\x6c\x6f\x67")->withNotify($notify); } public function cabletv() { $data["\x70\x61\x67\x65\x5f\164\151\x74\154\x65"] = "\103\x61\142\x6c\x65\x20\x54\x56"; $data["\156\145\x74\167\x6f\162\153"] = Decoder::whereStatus(1)->latest()->get(); return view($this->activeTemplate . "\x2e\x75\163\x65\x72\56\155\x65\162\x63\x68\x61\x6e\x74\x2e\x63\x61\x62\154\145\164\x76", $data); } public function cabletvpost(Request $request) : RedirectResponse { $l = $request->validate(array("\156\x65\x74\x77\x6f\162\x6b" => "\x72\x65\161\165\151\x72\145\144\x7c\x73\x74\x72\151\156\x67")); Session::put("\x54\162\x61\x63\153", $request->network); return redirect()->route("\165\163\145\162\x2e\143\141\142\154\145\x74\166\160\157\x73\164\x32"); } public function cabletvpost2() { $data["\x70\141\x67\145\x5f\164\151\164\x6c\x65"] = "\103\141\x62\x6c\145\40\x54\126"; $track = Session::get("\x54\162\x61\x63\x6b"); $basic = GeneralSetting::first(); $data["\156\x65\x74\x77\157\x72\x6b"] = Decoder::whereServiceid($track)->whereStatus(1)->first(); $data["\x70\x6c\x61\x6e\x73"] = Decodersub::whereServiceid($track)->whereStatus(1)->whereStatus(1)->get(); $user = Auth::user(); $gnl = GeneralSetting::first(); return view($this->activeTemplate . "\56\165\163\x65\162\56\x6d\145\162\x63\150\x61\x6e\x74\56\x63\141\x62\x6c\x65\164\x76\x5f\x62\165\x79", $data); } public function cabletvpost3(Request $request) : RedirectResponse { $userData = Purify::clean($request->except("\x5f\x74\157\x6b\x65\156", "\x5f\155\145\x74\150\157\x64")); $rules = array("\143\x6f\x6d\x70\x61\x6e\171" => "\162\x65\x71\165\x69\x72\x65\x64\x7c\163\x74\162\151\x6e\147", "\x61\x6d\157\165\x6e\164" => "\x72\x65\161\x75\151\x72\x65\x64\174\156\x75\155\145\x72\151\x63", "\151\165\143\x6e\157" => "\x72\145\161\x75\x69\162\145\144\174\156\165\x6d\x65\x72\151\143", "\x6d\x6f\x62\151\154\x65\156\x6f" => "\x72\145\161\x75\x69\x72\145\144\x7c\162\x65\147\x65\170\x3a\57\136\x28\x5b\60\x2d\71\134\163\x5c\x2d\134\53\134\50\134\51\135\x2a\51\x24\x2f\174\x64\x69\147\151\x74\x73\72\61\x31", "\x70\151\x6e" => "\162\145\161\165\x69\x72\145\144\x7c\x6e\165\155\x65\162\151\143\174\x6d\x69\156\x3a\x34", "\166\x61\x72\x69\141\x74\151\x6f\156\137\x63\157\144\x65" => "\x72\145\161\165\151\162\145\x64\174\163\164\162\151\x6e\x67", "\163\165\x62\x73\143\162\x69\160\164\151\157\x6e\x5f\164\171\160\145" => "\156\165\154\x6c\141\142\x6c\145\x7c\163\x74\162\x69\156\x67"); $Validator = Validator::make($userData, $rules); if ($Validator->fails()) { return back()->withErrors($Validator)->withInput(); } $userData = (object) $userData; $company = $userData->company ?? null; $iucno = $userData->iucno ?? null; $variation_code = $userData->variation_code ?? null; $mobileno = $userData->mobileno ?? null; $amount = $userData->amount ?? null; $pin = $userData->pin ?? null; $subscription_type = "\143\150\x61\156\x67\x65"; $user = Auth::user(); $basic = GeneralSetting::first(); $api_id = $basic->merchantid; $api_key = $basic->merchantkey; $authorization = $basic->tokenverify; if (str_starts_with((string) $amount, "\x2d")) { $notify[] = array("\145\162\x72\x6f\162", "\131\157\x75\x20\101\162\145\x20\x41\x20\164\x68\x69\x65\146"); return redirect()->back()->withNotify($notify); } if ($amount <= 0) { $notify[] = array("\x65\x72\162\157\x72", "\x49\156\x76\141\154\151\x64\x20\x41\x6d\x6f\165\x6e\x74"); return redirect()->back()->withNotify($notify); } if ($user->balance < $amount) { $notify[] = array("\x65\x72\x72\x6f\162", "\131\157\165\40\x44\157\156\x74\x20\x48\x61\x76\x65\40\105\156\x6f\x75\147\150\40\106\x75\156\x64\40\151\x6e\40\x59\157\165\x72\40\127\x61\154\154\x65\164\40\x74\x6f\x20\x43\157\155\x70\154\145\x74\x65\x20\124\150\x69\163\40\124\162\x61\156\x73\x61\143\x74\151\x6f\156"); return back()->withNotify($notify); } if (isset($pin)) { try { $c_password = Auth::user()->transpin; if (Hash::check($pin, $c_password)) { } else { $notify[] = array("\x65\162\x72\x6f\x72", "\124\x72\x61\156\163\141\143\x74\x69\x6f\156\x20\x50\151\x6e\40\x49\x73\40\111\x6e\x63\157\x72\162\145\x63\x74"); return back()->withNotify($notify); } } catch (\PDOException $e) { $notify[] = array("\145\162\x72\x6f\x72", $e->getMessage()); return back()->withNotify($notify); } } $trx = getTrx(); $parameters = array("\143\x6f\155\160\x61\x6e\x79" => $company, "\151\x75\143\156\157" => $iucno); $url = "\x68\x74\x74\160\163\x3a\x2f\x2f\x76\x74\165\x6d\157\142\x69\x6c\145\x73\x68\x6f\x70\x73\x2e\143\x6f\x6d\56\x6e\147\x2f\x61\x70\x69\x2f\x56\62\x2f\143\x61\142\x6c\x65\137\166\x65\162\x69\146\171"; $headers = array("\101\x63\143\x65\x70\x74\x3a\x20\x61\x70\160\x6c\151\x63\141\x74\151\157\156\57\x6a\163\x6f\156", "\x41\x75\x74\x68\157\x72\x69\x7a\x61\164\x69\157\x6e\72\40\x42\145\141\x72\145\x72\x20{$basic->gladtid}"); $ch = curl_init(); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($parameters)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $content = json_decode($response, true); $status = $content["\163\164\141\x74\165\x73"] ?? null; $api_response = $content["\x61\x70\151\137\162\x65\x73\x70\157\156\x73\x65"] ?? null; if ($status === "\x66\x61\151\154\x65\x64") { $notify[] = array("\x65\x72\x72\x6f\x72", $api_response); return back()->withNotify($notify); } Session::put("\x76\x61\162\151\x61\x74\151\157\156\137\143\157\x64\145", $variation_code); Session::put("\x6e\x61\x6d\145", $content); Session::put("\151\x75\143\156\157", $iucno); Session::put("\x6d\x6f\142\x69\x6c\145\156\157", $mobileno); Session::put("\x63\x6f\x6d\160\x61\x6e\x79", $company); Session::put("\160\154\x61\156\x6e\141\x6d\x65", $userData->name); Session::put("\141\155\x6f\165\x6e\164", $amount); Session::put("\x73\x75\x62\163\x63\162\x69\160\164\151\x6f\156\137\164\171\160\x65", $subscription_type); Session::put("\164\x72\x78", $trx); return redirect()->route("\x75\x73\145\x72\x2e\143\141\x62\x6c\x65\164\166\x70\x61\x79"); } public function cabletvpay() { $data["\160\x61\x67\x65\x5f\164\151\164\x6c\145"] = "\x43\141\x62\154\145\40\124\x56"; $data["\x6e\x61\x6d\x65"] = Session::get("\156\141\155\145"); $data["\x64\145\143\x6f\x64\145\x72"] = Session::get("\x63\157\x6d\x70\x61\x6e\x79"); $data["\x61\x6d\x6f\x75\x6e\x74"] = Session::get("\141\x6d\x6f\x75\x6e\x74"); $data["\x6d\157\x62\151\x6c\145\156\x6f"] = Session::get("\x6d\157\142\151\x6c\x65\x6e\x6f"); $data["\166\x61\x72\x69\x61\164\151\x6f\x6e\x5f\x63\157\144\x65"] = Session::get("\166\141\x72\151\x61\164\x69\157\x6e\137\x63\x6f\144\x65"); $data["\x70\154\141\156\x6e\141\155\145"] = Session::get("\160\154\141\x6e\x6e\x61\x6d\145"); $data["\156\165\x6d\x62\145\x72"] = Session::get("\x69\165\143\156\x6f"); $data["\x73\x75\x62\163\143\162\x69\x70\164\x69\x6f\156\x5f\164\171\x70\x65"] = Session::get("\x73\165\142\x73\x63\x72\x69\x70\x74\x69\157\156\x5f\164\171\160\x65"); $data["\164\x72\x78\143\157\x64\145"] = Session::get("\164\162\170"); $data["\164\151\x6d\x65"] = Carbon::now(); $data["\x70\x6c\141\156\x32"] = $data["\x70\x6c\x61\x6e\156\141\155\145"]; $data["\x70\157\167\x65\162"] = Decoder::whereServiceid($data["\144\x65\x63\157\144\145\x72"])->whereStatus(1)->first(); return view($this->activeTemplate . "\x2e\165\163\x65\x72\x2e\x6d\x65\162\x63\x68\141\156\164\x2e\143\x61\x62\154\145\164\166\160\141\x79", $data); } public function cabletvpay2(Request $request) : RedirectResponse { $userData = Purify::clean($request->except("\137\164\157\153\x65\156", "\137\x6d\x65\x74\x68\157\144")); $rules = array("\141\155\157\x75\156\164" => "\x72\145\x71\x75\151\x72\145\x64\x7c\x6e\x75\x6d\x65\x72\151\143", "\x6e\x75\155\x62\x65\x72" => "\162\145\161\165\151\162\x65\144\x7c\x6e\165\155\x65\x72\151\143", "\x76\x61\162\x69\141\x74\x69\x6f\156\x5f\143\157\144\x65" => "\162\x65\161\165\151\x72\x65\x64\x7c\163\x74\x72\151\x6e\x67", "\164\x72\x78" => "\162\145\161\x75\x69\x72\x65\x64"); $Validator = Validator::make($userData, $rules); if ($Validator->fails()) { return back()->withErrors($Validator)->withInput(); } $userData = (object) $userData; $number = $userData->number; $amount = $userData->amount; $amount2 = $userData->amount2; $code = $userData->code; $trx = getTrx(); $decoder = Session::get("\143\x6f\x6d\x70\x61\x6e\171"); $data["\x6e\x61\x6d\x65"] = Session::get("\156\x61\x6d\145"); $planname = Session::get("\160\154\x61\156\x6e\141\x6d\145"); $mobileno = Session::get("\155\157\x62\x69\154\x65\156\x6f"); $variation_code = Session::get("\166\x61\x72\151\141\164\x69\157\156\137\143\x6f\144\x65"); $subscription_type = Session::get("\163\x75\x62\x73\143\x72\x69\x70\164\x69\x6f\156\x5f\x74\171\x70\145"); $user = Auth::user(); $basic = GeneralSetting::first(); $api_id = $basic->merchantid; $api_key = $basic->merchantkey; $authorization = $basic->tokenpass; $basic = GeneralSetting::first(); $pay = $amount; if (str_starts_with((string) $pay, "\55")) { $notify[] = array("\145\x72\162\x6f\162", "\x59\157\165\x20\x41\162\x65\40\x41\x20\x74\150\x69\145\x66"); return redirect()->back()->withNotify($notify); } if ($pay <= 0) { $notify[] = array("\x65\162\162\157\x72", "\111\156\x76\141\x6c\151\144\x20\101\x6d\x6f\x75\x6e\164"); return redirect()->back()->withNotify($notify); } if ($user->balance < $pay) { $notify[] = array("\145\162\x72\x6f\x72", "\131\x6f\165\x20\x44\x6f\156\164\x20\x48\141\x76\145\40\x45\156\x6f\x75\147\x68\40\x46\x75\x6e\x64\x73\40\151\156\x20\131\157\x75\162\x20\x57\141\x6c\154\145\x74\40\164\157\40\x43\x6f\155\160\x6c\x65\164\x65\40\x74\x68\x69\x73\40\x54\162\x61\156\x73\141\143\x74\151\157\x6e"); return back()->withNotify($notify); } $po = Carbon::now()->format("\x59\55\x6d\55\x64\x20\110\x3a\151\72\163"); $r = Bill::where("\165\163\145\x72\x5f\151\x64", $user->id)->latest()->first(); $dnet2 = json_decode($r, true); $ti = $dnet2["\x74\x69\x6d\145\x72"] ?? 0; $to = $dnet2["\156\145\164\x77\x6f\x72\153"] ?? null; $so = $dnet2["\x6e\165\155\142\x65\162"] ?? null; $mo = $dnet2["\141\x6d\x6f\165\156\164"] ?? 0; $finishTime = Carbon::parse($ti)->addSeconds(120)->format("\131\55\155\55\144\x20\110\72\x69\x3a\x73"); if ($po < $finishTime && $to === $code && $mo === $pay && $so === $number) { $notify[] = array("\145\162\162\x6f\162", "\x44\165\x70\154\151\x63\141\x74\145\40\124\162\141\156\163\141\143\x74\x69\x6f\x6e\x2c\x20\153\x69\x6e\x64\154\x79\40\167\x61\151\x74\40\x66\157\162\40\62\155\x69\x6e\165\x74\x65\x73"); return back()->withNotify($notify)->withInput(); } $ini_balance = getAmount($user->balance ?? null); $user->balance = $ini_balance - $pay; $user->save(); $parameters = array("\163\x65\x72\x76\151\143\145\x49\104" => $decoder, "\142\151\154\154\145\162\163\x43\157\144\145" => $number, "\x76\x61\x72\x69\141\x74\151\x6f\156\x5f\143\x6f\x64\x65" => $variation_code, "\x73\x75\142\163\x63\162\x69\x70\x74\x69\x6f\x6e\137\x74\171\160\x65" => $subscription_type, "\141\155\157\165\156\x74" => $amount2, "\x70\x68\x6f\156\145" => $mobileno); $url = "\x68\164\164\x70\163\72\x2f\57\x76\164\165\155\x6f\x62\151\154\145\163\x68\157\160\x73\56\x63\157\155\x2e\x6e\147\57\x61\x70\x69\57\126\62\x2f\x63\x61\142\154\145\137\160\141\x79"; $headers = array("\101\x63\143\x65\x70\x74\x3a\40\x61\160\x70\154\x69\x63\x61\x74\x69\x6f\x6e\57\152\x73\x6f\156", "\101\x75\x74\x68\x6f\162\x69\172\x61\164\151\157\156\72\x20\102\145\x61\162\x65\x72\40{$basic->gladtid}"); $ch = curl_init(); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($parameters)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $content = curl_exec($ch); curl_close($ch); $result = json_decode($content, true); $basic = GeneralSetting::first(); $na = $planname ?? null; $status = $result["\163\164\141\164\165\x73"] ?? null; $api_response = $result["\x61\x70\x69\137\x72\145\x73\x70\x6f\156\x73\x65"] ?? null; if ($status === "\146\141\x69\154\x65\144") { $user->balance += $pay; $user->save(); Bill::create(array("\165\163\145\162\137\x69\144" => $user->id ?? null, "\x61\155\x6f\x75\x6e\164" => $pay, "\x74\151\x6d\x65\x72" => $po, "\156\141\155\145" => $na, "\x6e\165\155\142\145\162" => $number, "\164\162\x78" => $trx, "\x6e\x65\x74\167\x6f\162\x6b" => $code, "\x6d\x6f\x62\151\x6c\x65\156\157" => $data["\155\157\x62\151\154\x65\156\x6f"] ?? null, "\x67\x61\x74\145\x77\x61\x79" => $content, "\141\x63\x63\157\x75\156\x74\156\x61\x6d\145" => $data["\163\x75\x62\x73\143\x72\151\x70\164\151\157\156\x5f\164\171\x70\145"] ?? null, "\151\x6e\x69\x5f\x62\x61\154\141\156\x63\x65" => $ini_balance, "\156\145\x77\142\x61\x6c\141\156\x63\x65" => $user->balance ?? null, "\141\x69\x72\x74\151\155\145\x5f\x74\171\160\145" => "\143\141\x62\154\145", "\x73\164\x61\x74\165\163" => 0)); $notify[] = array("\145\x72\x72\157\162", $api_response); return redirect()->back()->withNotify($notify); } Bill::create(array("\165\x73\x65\162\x5f\x69\144" => $user->id ?? null, "\x61\155\157\165\156\164" => $pay, "\x74\x69\155\145\162" => $po, "\156\x61\155\145" => $na, "\156\x75\x6d\x62\145\162" => $number, "\x74\x72\170" => $trx, "\x6e\x65\x74\x77\157\162\x6b" => $code, "\x6d\x6f\x62\x69\154\x65\x6e\157" => $data["\155\157\x62\151\x6c\145\156\x6f"] ?? null, "\x67\x61\x74\145\x77\141\x79" => $content, "\141\143\143\157\x75\156\x74\x6e\141\x6d\x65" => $data["\163\x75\x62\x73\x63\162\151\x70\x74\x69\x6f\x6e\137\x74\171\x70\x65"] ?? null, "\x69\x6e\x69\x5f\x62\141\154\141\156\143\145" => $ini_balance, "\x6e\145\167\142\141\x6c\x61\156\143\145" => $user->balance ?? null, "\x61\151\x72\x74\151\x6d\145\137\164\171\160\145" => "\143\141\x62\154\145", "\x73\164\x61\164\165\x73" => 1)); $j = getAmount($ini_balance); Message::create(array("\x75\163\x65\162\137\151\144" => $user->id ?? null, "\x74\x69\164\x6c\x65" => "\124\126\40\x53\x75\142\163\143\162\x69\160\x74\x69\157\156", "\144\145\x74\141\151\x6c\163" => "\131\157\165\x72\x20{$na}\x20\167\151\x74\150\40\144\145\x63\157\144\x65\162\x20\116\x75\155\142\x65\x72\x20{$number}\40\x68\141\163\x20\x62\x65\145\156\40\x73\165\143\143\x65\163\163\x66\165\x6c\x6c\x79\x20\162\x65\143\x68\141\x72\147\x65\x64\x20\167\x69\x74\x68\x20{$code}\40\x28\x4e\107\116\x20{$pay}\x29\x20\x53\165\x62\x73\x63\162\151\x70\164\151\157\156\40\x50\x6c\141\x6e\54\40\131\157\165\162\x20\x49\156\151\164\151\141\x6c\40\x42\141\154\x61\156\143\145\40\x57\x61\163\x20{$basic->cur_text}\x20{$j}\54\x20\141\156\144\40\x59\x6f\165\x72\x20\106\151\156\141\154\40\x42\141\x6c\141\x6e\143\145\40\x69\x73\40{$basic->cur_text}\x20{$user->balance}\56\40\x54\x68\141\156\153\40\171\x6f\165\40\146\x6f\x72\x20\x63\x68\x6f\157\x73\x69\156\147\x20{$basic->sitename}", "\x61\144\155\x69\156" => 1, "\163\164\141\164\165\163" => 0)); $notify[] = array("\x73\x75\x63\143\145\x73\x73", "\124\162\141\x6e\163\141\x63\x74\151\157\x6e\40\x53\165\x63\x63\x65\x73\163\x66\165\x6c"); return redirect()->route("\165\x73\x65\x72\56\x74\166\154\x6f\147")->withNotify($notify); } public function internetdata() { $data["\x70\141\147\145\x5f\x74\151\164\x6c\x65"] = "\111\x6e\164\145\162\x6e\x65\x74\x20\104\x61\164\x61"; $data["\156\x65\164\x77\x6f\162\x6b"] = Internet::whereStatus(1)->latest()->get(); $datanet = Internet::whereStatus(1)->latest()->count(); $dnet = json_decode($datanet, true, 512, JSON_THROW_ON_ERROR); $basic = GeneralSetting::first(); if ($dnet < 1) { $notify[] = array("\145\162\162\157\162", "\123\145\162\166\x69\143\x65\x20\110\141\163\40\102\145\145\x6e\x20\x44\151\x73\x61\142\x6c\145\x64"); return back()->withNotify($notify); } if ($basic->internet < 1) { $notify[] = array("\x65\x72\x72\157\x72", "\x53\x65\162\x76\x69\x63\145\40\110\x61\163\x20\x42\x65\x65\x6e\x20\x44\151\163\x61\142\154\x65\x64"); return redirect()->route("\x75\163\x65\162\56\150\x6f\x6d\x65")->withNotify($notify); } return view($this->activeTemplate . "\165\163\145\x72\x2e\155\x65\162\x63\150\x61\x6e\x74\56\151\156\x74\x65\x72\x6e\x65\164", $data); } public function internetdatapost(Request $request) : RedirectResponse { $userData = Purify::clean($request->except("\x5f\x74\x6f\153\145\156", "\137\x6d\x65\164\150\157\144")); $e = $rules = array("\x6e\x65\164\167\x6f\x72\153" => "\162\145\x71\165\151\x72\x65\x64", "\163\151\164\x65" => "\x72\145\161\165\151\162\x65\144"); $Validator = Validator::make($userData, $rules); if ($Validator->fails()) { return back()->withErrors($Validator)->withInput(); } $userData = (object) $userData; Session::put("\124\x72\x61\143\x6b", $userData->network); $basic = GeneralSetting::first(); $datanet = Internet::whereCode($userData->network)->whereSite($userData->site)->whereStatus(1)->latest()->count(); if ($datanet < 1) { return redirect()->route("\165\x73\x65\x72\x2e\150\x6f\155\x65")->with("\145\162\x72\x6f\x72", "\123\145\x72\x76\x69\143\x65\x20\110\x61\x73\x20\x42\145\145\156\40\104\x69\x73\x61\142\154\x65\144"); } if ($basic->internet < 1) { return redirect()->route("\x75\x73\145\x72\x2e\150\x6f\x6d\145")->with("\145\x72\162\x6f\x72", "\123\145\162\x76\151\x63\145\40\x48\x61\x73\x20\x42\x65\x65\x6e\40\104\x69\x73\x61\142\154\145\144"); } return redirect()->route("\x75\163\x65\x72\x2e\x69\x6e\x74\x65\162\x6e\x65\164\x64\141\x74\x61\x32"); } public function internetdata2(Request $request) { $data["\x70\x61\x67\x65\x5f\164\x69\164\x6c\145"] = "\x49\156\x74\145\x72\x6e\145\x74\x20\104\x61\x74\141"; $track = Session::get("\124\162\x61\x63\153"); $basic = GeneralSetting::first(); $data["\156\x65\164\167\157\162\153"] = Internet::wherecode($track)->whereStatus(1)->get(); $data["\x6e\x65\164\167\157\162\x6b"] = json_decode($data["\156\x65\164\167\x6f\x72\x6b"], true, 512, JSON_THROW_ON_ERROR); $datanet = Internet::wherecode($track)->whereStatus(1)->count(); if ($datanet < 1) { $notify[] = array("\x65\x72\162\157\x72", "\123\145\162\x76\151\143\x65\x20\110\x61\163\x20\x42\x65\x65\x6e\40\104\151\x73\x61\x62\154\145\144"); return redirect()->route("\165\x73\145\x72\x2e\x68\x6f\155\145")->withNotify($notify); } if ($basic->internet < 1) { $notify[] = array("\145\x72\x72\157\162", "\x53\145\162\x76\151\143\x65\x20\x48\x61\x73\40\102\145\145\x6e\x20\x44\151\x73\141\142\154\x65\x64"); return redirect()->route("\x75\163\x65\162\x2e\x68\x6f\155\145")->withNotify($notify); } $data["\160\x6c\141\156\163"] = Internetbundle::whereCode($track)->whereStatus(1)->get(); return view($this->activeTemplate . "\x75\x73\145\162\x2e\155\x65\162\x63\150\x61\156\164\56\151\x6e\164\x65\x72\x6e\145\164\137\142\165\171", $data); } public function internetdatapost2(Request $request) : RedirectResponse { $userData = Purify::clean($request->except("\137\164\x6f\153\x65\156", "\137\x6d\x65\x74\x68\157\144")); $rules = array("\155\157\x62\x69\154\145\156\x6f" => "\x72\145\161\165\151\x72\x65\x64\x7c\162\145\x67\x65\170\72\57\x5e\50\x5b\x30\x2d\71\x5c\163\134\55\x5c\53\x5c\x28\134\x29\x5d\52\x29\x24\57\x7c\144\x69\x67\x69\x74\163\x3a\61\61", "\x6e\145\164\x77\x6f\x72\x6b" => "\162\x65\161\x75\151\x72\x65\x64\x7c\156\165\x6d\145\162\x69\143", "\160\154\141\156" => "\x72\145\161\x75\x69\162\145\144\174\156\165\x6d\x65\162\x69\x63", "\154\151\x74\145" => "\162\145\161\x75\x69\x72\x65\x64\x7c\x6e\165\x6d\x65\x72\x69\x63", "\x64\141\x74\x61\x70\154\x61\156" => "\x72\145\161\x75\151\162\145\x64\x7c\x6e\x75\155\145\162\x69\143", "\160\154\x61\156\x73\151\172\x65" => "\x72\x65\x71\x75\151\x72\145\144", "\141\x6d\157\x75\x6e\x74" => "\147\x74\x3a\60", "\x70\151\x6e" => "\162\x65\x71\x75\x69\162\x65\144\x7c\156\165\x6d\x65\162\x69\x63", "\166\141\154\x69\x64\141\164\x65" => "\x6e\165\154\154\141\142\x6c\145"); $Validator = Validator::make($userData, $rules); if ($Validator->fails()) { return back()->withErrors($Validator)->withInput(); } $userData = (object) $userData; $mobileno = $userData->mobileno ?? null; $network2 = $userData->network ?? null; $network1 = $userData->network ?? null; $plan = $userData->plan ?? null; $lite = $userData->lite ?? null; $dataplan = $userData->dataplan ?? null; $plansize = $userData->plansize ?? null; $pin = $userData->pin ?? null; $val = $userData->validate ?? null; if (!$val) { $validate = substr($mobileno, 0, 4); if ($network1 === "\60\x31") { if (!str_contains("\x20\60\x37\x30\x32\40\60\67\x30\63\x20\x30\x37\61\x33\x20\60\67\x30\x34\40\x30\67\60\x36\x20\x30\67\61\x36\40\x30\x38\x30\62\40\x30\x38\60\x33\40\x30\x38\60\x36\40\x30\x38\x31\60\40\x30\70\x31\63\40\60\x38\x31\x34\x20\x30\70\61\66\40\x30\x39\60\63\x20\60\x39\x31\x33\40\60\71\60\66\40\60\71\61\x36\40\60\70\x30\x34\40", $validate)) { $notify[] = array("\145\162\x72\157\162", "\x54\x68\151\x73\40\x4e\165\155\x62\x65\x72\40\151\x73\40\156\x6f\164\40\141\156\x20\x4d\x54\x4e\40\x4e\x75\155\x62\x65\x72\54\x20\103\x68\x65\143\x6b\x20\x59\157\x75\x72\x20\x4e\165\x6d\x62\145\162"); return back()->withNotify($notify); } } else { if ($network1 === "\x30\x35") { if (!str_contains("\x20\x30\67\60\62\40\x30\67\60\x33\40\60\x37\x31\63\40\60\67\x30\x34\x20\x30\67\x30\66\x20\x30\x37\x31\x36\x20\60\70\60\62\x20\x30\70\x30\63\40\60\70\60\x36\x20\60\x38\x31\60\x20\60\70\61\63\x20\x30\x38\x31\x34\40\x30\70\x31\x36\x20\60\x39\x30\x33\x20\x30\x39\x31\63\40\x30\71\x30\x36\40\60\71\x31\66\x20\60\70\60\x34\x20", $validate)) { $notify[] = array("\145\x72\x72\157\x72", "\x54\x68\151\163\x20\116\x75\155\x62\x65\x72\x20\151\x73\40\156\x6f\x74\40\x61\156\40\115\x54\x4e\x20\116\x75\x6d\x62\x65\162\x2c\x20\103\150\145\x63\153\x20\x59\157\x75\162\x20\116\165\x6d\x62\145\162"); return back()->withNotify($notify); } } else { if ($network1 === "\x30\62") { if (!str_contains("\x20\x30\x38\x30\x35\40\x30\x37\60\x35\40\x30\x39\60\x35\40\60\70\60\67\40\60\x39\x30\67\x20\x30\67\60\x37\x20\x30\70\x31\67\x20\60\x39\x31\67\40\x30\x37\61\x37\40\60\x37\x31\65\x20\60\x38\x31\65\x20\60\71\61\x35\x20\x30\x38\61\61\40\x30\67\61\x31\40\x30\x39\61\61\40", $validate)) { $notify[] = array("\145\x72\162\157\162", "\x54\x68\151\x73\x20\x4e\165\x6d\142\x65\x72\x20\151\163\40\156\x6f\x74\x20\x61\40\107\x4c\x4f\x20\116\165\155\142\145\162\x2c\40\x43\x68\145\143\153\x20\131\x6f\165\x72\x20\116\x75\x6d\x62\x65\x72"); return back()->withNotify($notify); } } else { if ($network1 === "\60\x33") { if (!str_contains("\40\x30\x39\x30\x34\40\x30\70\x30\62\40\x30\x39\60\x32\40\60\x37\x30\x32\40\x30\70\x30\x38\40\x30\x39\x30\x38\40\x30\x37\60\70\40\x30\x39\61\70\40\x30\x38\61\x38\40\60\67\61\70\x20\60\x38\x31\62\x20\x30\x39\x31\62\x20\x30\67\61\62\40\60\70\60\x31\40\x30\67\60\x31\40\60\x39\x30\x31\40\60\71\60\67\40\x30\x39\x31\x37\x20", $validate)) { $notify[] = array("\145\162\x72\x6f\x72", "\124\150\x69\163\40\x4e\165\155\142\x65\x72\40\151\163\x20\156\157\x74\40\x61\156\x20\x41\111\122\x54\x45\x4c\x20\x4e\x75\155\x62\145\x72\x2c\x20\103\x68\x65\143\x6b\40\x59\x6f\x75\162\x20\x4e\x75\x6d\142\145\162"); return back()->withNotify($notify); } } else { if ($network1 === "\x30\x36") { if (!str_contains("\40\60\x38\60\x39\40\x30\x39\x30\71\x20\x30\x37\x30\71\x20\x30\x38\x31\71\40\x30\x39\x31\71\40\x30\x37\x31\71\x20\60\70\x31\x37\x20\x30\71\x31\67\40\60\67\61\67\40\60\x37\x31\70\x20\x30\71\61\70\40\x30\x38\61\70\40\60\70\60\x38\x20\60\x37\60\x38\40\x30\x39\60\x38\40", $validate)) { $notify[] = array("\x65\x72\162\157\162", "\x54\150\151\163\40\x4e\165\x6d\142\145\162\x20\151\163\x20\156\x6f\164\40\x61\156\40\x45\124\x49\x53\101\114\101\124\x20\116\165\155\142\x65\162\x2c\x20\x43\x68\x65\143\x6b\40\x59\x6f\165\162\x20\116\165\x6d\x62\x65\x72"); return back()->withNotify($notify); } } else { if ($network1 === "\x30\x37") { if (!str_contains("\x20\60\x39\x30\x34\x20\x30\x38\60\x32\x20\60\x39\60\x32\x20\60\x37\x30\x32\x20\x30\x38\x30\x38\x20\60\71\60\70\40\60\67\60\70\40\60\x39\x31\x38\40\60\x38\61\x38\x20\60\x37\x31\x38\x20\60\x38\x31\62\x20\60\x39\61\62\40\x30\67\x31\x32\40\60\70\60\61\x20\60\x37\x30\x31\40\60\x39\60\61\x20\60\x39\60\67\40\60\x39\61\67\x20", $validate)) { $notify[] = array("\x65\x72\x72\157\162", "\x54\150\x69\x73\40\x4e\165\x6d\x62\x65\x72\40\151\x73\40\x6e\x6f\164\40\x61\x6e\40\x41\111\122\124\105\114\x20\116\165\x6d\x62\145\162\54\40\103\x68\x65\143\153\x20\x59\157\x75\162\40\x4e\x75\155\142\x65\x72"); return back()->withNotify($notify); } } else { if ($network1 === "\x30\x34" && !str_contains("\40\x30\x38\x30\x39\40\x30\71\x30\x39\x20\x30\67\x30\71\40\x30\x38\61\71\x20\60\71\x31\x39\40\60\x37\x31\71\40\60\70\61\67\40\x30\71\x31\x37\40\60\67\x31\x37\40\x30\67\x31\70\x20\x30\x39\x31\x38\40\x30\70\61\x38\40\60\70\x30\70\40\60\67\x30\x38\x20\60\x39\60\x38\x20", $validate)) { $notify[] = array("\x65\x72\x72\x6f\x72", "\124\x68\x69\x73\40\x4e\x75\x6d\142\145\162\40\x69\x73\40\156\157\164\40\141\x6e\x20\x45\124\x49\x53\101\114\x41\124\x20\116\x75\155\142\x65\x72\x2c\40\x43\x68\145\143\153\40\131\x6f\165\x72\40\x4e\x75\155\x62\145\x72"); return back()->withNotify($notify); } } } } } } } } $user = Auth::user(); $basic = GeneralSetting::first(); $network = Internet::whereCode($network2)->get(); $authorize = $basic->gladtid; $trx = getTrx(); $bundle = Internetbundle::whereCode($network1)->wherePlan($plan)->whereStatus(1)->sharedLock()->latest()->first(); if ($user->apiPro) { $amount = $bundle->apiPro ?? 0; } elseif ($user->apiUser) { $amount = $bundle->apicost ?? 0; } elseif ($user->apiGold) { $amount = $bundle->apiGold ?? 0; } elseif ($user->apiSilver) { $amount = $bundle->apiSilver ?? 0; } elseif ($user->vip) { $amount = $bundle->vip ?? 0; } elseif ($user->posUser) { $amount = $bundle->poscost ?? 0; } elseif ($user->agent) { $amount = $bundle->agent ?? 0; } elseif ($user->affyUser) { $amount = $bundle->affycost ?? 0; } elseif ($user->Reseller) { $amount = $bundle->rprice ?? 0; } else { $amount = $bundle->cost ?? 0; } if (str_starts_with((string) $amount, "\x2d")) { $notify[] = array("\145\162\162\157\162", "\x59\157\x75\40\x41\x72\x65\40\x41\40\x74\150\151\145\x66"); return redirect()->back()->withNotify($notify); } if ($amount <= 0) { $notify[] = array("\145\x72\162\157\162", "\x49\x6e\x76\x61\x6c\151\144\x20\x41\x6d\157\x75\156\x74"); return redirect()->back()->withNotify($notify); } if ($user->balance < $amount) { $notify[] = array("\145\162\162\x6f\x72", "\131\x6f\x75\40\104\157\x6e\x74\40\110\141\x76\x65\x20\105\156\x6f\165\x67\x68\x20\x46\x75\156\144\x20\x69\156\40\131\x6f\165\x72\x20\127\141\154\154\145\x74\x20\x74\x6f\40\103\x6f\155\x70\x6c\x65\164\145\x20\x54\x68\x69\163\40\124\162\141\156\163\x61\x63\x74\x69\157\156"); return back()->withNotify($notify); } if (isset($pin)) { try { $c_password = Auth::user()->transpin ?? null; if (Hash::check($pin, $c_password)) { } else { $notify[] = array("\145\x72\162\157\x72", "\124\162\x61\156\163\141\x63\164\x69\x6f\156\40\x50\151\x6e\40\x49\163\40\x49\156\x63\157\162\x72\145\143\164"); return back()->withNotify($notify); } } catch (\PDOException $e) { $notify[] = array("\x65\x72\162\x6f\x72", $e->getMessage()); return back()->withNotify($notify); } } $checkTime = Bill::where(array("\165\163\145\162\137\151\x64" => $user->id, "\x6d\157\x62\x69\154\x65\x6e\x6f" => $mobileno, "\160\x6c\x61\x6e" => $plansize, "\144\141\x74\x61\160\154\141\156" => $dataplan, "\x6e\x65\164\x77\x6f\x72\153" => $network1, "\163\x74\141\164\x75\x73" => 1))->lockForUpdate()->latest()->first(); $created_at = $checkTime->created_at ?? ''; $from_time = strtotime($created_at); $to_time = strtotime(date("\x59\55\155\x2d\x64\40\110\x3a\151\72\163")); $timeDifference = round(abs($to_time - $from_time) / 60, 2); if ($timeDifference <= 1) { $notify[] = array("\145\x72\x72\x6f\x72", "\x44\x75\x70\x6c\151\x63\x61\164\145\40\x54\x72\x61\x6e\x73\141\x63\164\x69\x6f\156\x2c\40\x6b\x69\x6e\144\x6c\171\x20\167\141\x69\164\x20\x66\157\x72\40\66\x30\x73\145\x63\163"); return back()->withNotify($notify); } $pay = (double) $amount; $ini_balance = getAmount($user->balance ?? 0); $user_balance = $ini_balance - $pay; DB::transaction(function () use($user, $user_balance) { DB::table("\x75\163\x65\162\163")->whereId($user->id)->lockForUpdate()->update(array("\142\141\x6c\141\x6e\x63\145" => $user_balance)); }); process_data($user, $amount, $mobileno, $trx, $network1, $plansize, $dataplan, $lite, $ini_balance, $user_balance); $rr = query_process_data($user, $trx); if (empty($rr) && $trx != $rr->trx && $user->id != $rr->user_id) { $notify[] = array("\145\x72\x72\157\162", "\101\x6e\x20\x45\x72\162\x6f\162\x20\x4f\x63\x63\x75\162\x72\145\x64\x2c\40\113\151\156\x64\154\171\x20\x74\162\x79\40\141\147\141\151\156"); return back()->withNotify($notify); } $netw = $rr->network; $b_charge = $rr->ini_balance; $p_balance = $user_balance; $data_url = "\150\164\x74\160\x73\x3a\x2f\x2f\166\x74\165\x6d\x6f\142\x69\x6c\x65\x73\x68\x6f\x70\163\56\143\x6f\155\x2e\x6e\147\57\141\x70\x69\57\126\62\x2f\160\x72\x6f\x63\145\x73\x73"; $payload = array("\x6d\x6f\x62\151\x6c\x65\156\x6f" => $rr->mobileno, "\154\151\x74\x65" => $rr->lite, "\144\x61\164\x61\160\x6c\x61\x6e" => $rr->dataplan); $response = data_api_call($authorize, $payload, $data_url); $net = $network[0]->name ?? null; $con = $response["\163\164\x61\x74\165\163"] ?? null; $err = $response["\x6d\145\163\163\x61\x67\145"] ?? null; $plan_amount = $response["\141\x6d\157\x75\x6e\x74"] ?? 0; if (empty($plan_amount)) { $bonus = 0; } else { $bonus = (double) $amount - $plan_amount; } $api_response = $response["\141\160\x69\137\162\x65\163\x70\157\x6e\x73\x65"] ?? null; if ($con === "\146\x61\151\x6c\145\x64" || $err === "\123\145\x72\x76\145\x72\x20\105\162\162\x6f\162") { $newb = $p_balance + $rr->amount; DB::table("\x75\x73\145\x72\163")->whereId($user->id)->lockForUpdate()->update(array("\x62\x61\154\141\156\x63\145" => $newb)); DB::table("\x62\151\x6c\x6c\163")->whereTrx($trx)->update(array("\x69\x6e\x69\x5f\142\141\154\141\156\x63\x65" => getAmount($b_charge), "\156\x65\167\x62\141\x6c\141\x6e\143\x65" => getAmount($newb ?? 0), "\x61\x69\162\x74\151\x6d\x65\x5f\164\171\x70\x65" => 2, "\147\x61\x74\145\167\141\x79" => $response, "\x73\164\x61\164\165\x73" => 0)); $notify[] = array("\x65\162\162\157\x72", "{$api_response}\40\x42\165\x74\40\131\x6f\x75\x20\x48\141\166\145\x20\102\145\145\x6e\x20\122\x65\146\x75\156\x64\145\x64"); return redirect()->back()->withNotify($notify); } DB::table("\x62\151\154\x6c\x73")->whereTrx($trx)->update(array("\151\156\x69\x5f\x62\x61\154\141\156\x63\x65" => getAmount($b_charge), "\x6e\145\167\x62\141\x6c\141\x6e\x63\x65" => getAmount($p_balance ?? 0), "\142\157\x6e\165\x73" => $bonus ?? 0, "\141\x69\x72\x74\x69\155\x65\137\x74\x79\x70\145" => 2, "\x67\x61\x74\x65\167\141\x79" => $response, "\x73\164\x61\x74\165\x73" => 1)); $j = getAmount($ini_balance ?? 0); Message::create(array("\x75\x73\145\162\137\x69\144" => $user->id ?? null, "\164\151\x74\x6c\x65" => "\104\x61\x74\141\40\102\165\x6e\x64\154\x65\40\x52\145\143\150\x61\162\147\x65\x64", "\144\145\164\141\x69\154\163" => "\131\x6f\165\162\x20\x4d\157\142\151\x6c\x65\40\x4e\165\155\142\145\x72\40{$mobileno}\x20\x48\141\x73\40\102\145\145\156\x20\123\x75\x63\143\x65\163\x73\146\x75\154\154\x79\40\x52\x65\x63\x68\141\162\147\145\x64\40\x57\x69\x74\150\40\x54\x68\x65\x20\x53\165\x6d\x20\x4f\x66\x20{$basic->cur_text}\40{$amount}\x20\167\x6f\x72\x74\x68\x20\x6f\146\40{$plansize}\x20{$net}\40\x44\141\164\x61\40\x42\x75\x6e\144\x6c\x65\54\40\x59\x6f\x75\x72\40\111\156\151\x74\151\141\x6c\40\102\141\154\141\156\143\145\40\127\141\163\40{$basic->cur_text}\40{$j}\x2c\40\141\156\144\x20\131\157\165\x72\40\x46\151\156\x61\x6c\40\x42\x61\154\x61\156\x63\x65\x20\151\163\40{$basic->cur_text}\40{$user->balance}\56\x20\x54\x68\x61\x6e\153\40\171\x6f\x75\x20\x66\x6f\162\x20\x63\x68\x6f\x6f\x73\x69\156\147\40{$basic->sitename}\56\40\101\160\151\x20\x52\145\163\x70\x6f\156\x73\145\40\151\163\x3a\40{$api_response}", "\141\x64\155\x69\x6e" => 1, "\163\x74\141\164\165\163" => 0)); $notify[] = array("\x73\165\x63\143\145\163\x73", $api_response ?? "\124\x72\x61\156\x73\x61\x63\x74\151\x6f\x6e\40\123\165\x63\x63\x65\163\x73\x66\x75\154"); return redirect()->back()->withNotify($notify); } public function internetdataa() { $data["\160\141\147\145\137\x74\151\x74\x6c\x65"] = "\104\141\164\141\x63\x61\x72\144"; $data["\156\x65\164\167\157\162\153"] = Datacard::whereStatus(1)->latest()->get(); $datanet = Datacard::whereStatus(1)->latest()->count(); $dnet = json_decode($datanet, true, 512, JSON_THROW_ON_ERROR); $basic = GeneralSetting::first(); if ($dnet < 1) { $notify[] = array("\x65\162\x72\157\x72", "\123\145\162\166\x69\143\x65\x20\x48\x61\x73\40\102\x65\x65\156\40\x44\151\x73\x61\142\x6c\145\144"); return back()->withNotify($notify); } if ($basic->interneta < 1) { $notify[] = array("\145\162\x72\157\162", "\123\145\162\166\x69\143\x65\x20\110\141\163\x20\102\x65\x65\156\x20\x44\x69\163\141\x62\x6c\145\144"); return redirect()->route("\x75\163\145\162\x2e\x68\157\155\x65")->withNotify($notify); } return view($this->activeTemplate . "\x2e\165\x73\x65\x72\x2e\x6d\x65\162\x63\x68\x61\x6e\164\x2e\x69\x6e\x74\x65\x72\156\145\x74\141", $data); } public function internetdataposta(Request $request) : RedirectResponse { $e = $request->validate(array("\x6e\x65\x74\x77\157\162\x6b" => "\162\x65\x71\x75\151\162\145\x64")); Session::put("\x54\162\x61\x63\153", $request->network); return redirect()->route("\165\163\145\x72\56\151\x6e\x74\x65\162\x6e\x65\x74\144\141\164\x61\x32\141"); } public function internetdata2a(Request $request) { $data["\x70\141\147\x65\x5f\164\151\164\154\x65"] = "\111\x6e\164\x65\162\x6e\145\164\40\x44\141\164\x61"; $track = Session::get("\124\x72\x61\x63\153"); $basic = GeneralSetting::first(); $data["\x6e\145\x74\x77\x6f\162\x6b"] = Datacard::whereCode($track)->whereStatus(1)->get(); $data["\156\145\164\167\x6f\x72\153"] = json_decode($data["\x6e\x65\x74\x77\x6f\162\153"], true, 512, JSON_THROW_ON_ERROR); $datanet = DataCardBundle::whereCode($track)->whereStatus(1)->count(); $dnet = json_decode($datanet, true, 512, JSON_THROW_ON_ERROR); if ($dnet < 1) { $notify[] = array("\145\x72\162\x6f\162", "\123\x65\162\166\151\143\145\x20\x48\x61\163\40\x42\x65\x65\x6e\40\104\x69\x73\x61\x62\x6c\145\144"); return redirect()->route("\165\x73\x65\x72\x2e\x68\157\155\x65")->withNotify($notify); } $data["\x70\154\141\x6e\163"] = DataCardBundle::whereCode($track)->whereStatus(1)->get(); if ($basic->interneta < 1) { $notify[] = array("\x65\x72\162\157\x72", "\x53\145\162\166\x69\143\145\40\x48\141\x73\x20\102\145\145\156\x20\x44\151\163\141\x62\154\x65\x64"); return redirect()->route("\x75\163\x65\x72\56\150\x6f\155\145")->withNotify($notify); } return view($this->activeTemplate . "\x75\163\145\x72\x2e\x6d\x65\x72\143\x68\x61\156\x74\x2e\x69\x6e\164\x65\162\x6e\145\164\137\x62\165\171\141", $data); } public function internetdatapost2a(Request $request) : RedirectResponse { $userData = Purify::clean($request->except("\x5f\x74\157\x6b\x65\x6e", "\x5f\x6d\x65\x74\150\157\144")); $rules = array("\156\145\164\x77\x6f\x72\153" => "\x72\145\161\x75\x69\x72\145\144\x7c\156\x75\155\x65\x72\151\x63", "\x70\154\x61\x6e" => "\x72\x65\x71\x75\x69\x72\145\x64", "\144\x61\x74\141\160\154\x61\156" => "\162\145\x71\165\151\x72\x65\144", "\160\154\x61\x6e\x73\151\x7a\145" => "\162\145\x71\165\151\x72\145\x64", "\x71\x75\x61\x6e\164\151\x74\x79" => "\162\x65\x71\165\151\162\145\144\x7c\151\x6e\x74\x65\x67\x65\x72", "\160\151\156" => "\162\x65\161\x75\151\x72\145\x64\174\156\x75\155\145\x72\151\143\174\155\x69\156\72\64", "\x63\x61\x72\144\x5f\156\141\x6d\x65" => "\x6e\x75\154\x6c\x61\142\x6c\145"); $Validator = Validator::make($userData, $rules); if ($Validator->fails()) { return back()->withErrors($Validator)->withInput(); } $userData = (object) $userData; $network2 = $userData->network ?? null; $network1 = $userData->network ?? null; $plan = $userData->plan ?? null; $dataplan = $userData->dataplan ?? null; $plansize = $userData->plansize ?? null; $amount1 = $userData->amount ?? null; $pin = $userData->pin ?? null; $card_name = $userData->card_name ?? null; $quantity = $userData->quantity ?? null; $amount = $amount1 * $quantity; $user = Auth::user(); $basic = GeneralSetting::first(); $network = Datacard::whereCode($network2)->get(); $datanet = DataCardBundle::whereCode($network1)->whereStatus(1)->latest()->count(); $dnet = json_decode($datanet, true, 512, JSON_THROW_ON_ERROR); if ($dnet < 1) { $notify[] = array("\145\x72\x72\157\x72", "\x53\x65\162\166\151\143\x65\x20\110\141\x73\40\x42\x65\x65\x6e\40\x44\x69\x73\141\x62\154\145\x64"); return redirect()->route("\x75\163\x65\162\56\x68\x6f\155\145")->withNotify($notify); } if ($basic->interneta < 1) { $notify[] = array("\145\162\162\x6f\x72", "\123\x65\162\166\x69\x63\145\40\110\141\x73\40\102\x65\145\156\40\104\x69\x73\x61\142\154\145\x64"); return redirect()->route("\x75\163\145\x72\x2e\x68\x6f\155\x65")->withNotify($notify); } if (str_starts_with((string) $amount, "\55")) { $notify[] = array("\145\x72\x72\x6f\x72", "\x59\157\165\40\101\162\x65\40\101\40\164\150\151\145\146"); return redirect()->back()->withNotify($notify); } if ($amount <= 0) { $notify[] = array("\145\x72\x72\157\x72", "\111\x6e\x76\x61\x6c\x69\x64\x20\x41\155\157\x75\x6e\x74"); return redirect()->back()->withNotify($notify); } if ($user->balance < $amount) { $notify[] = array("\145\x72\x72\157\162", "\x59\157\165\x20\104\157\156\164\x20\110\x61\x76\x65\40\105\156\157\165\147\150\x20\106\165\x6e\x64\x20\151\x6e\40\131\x6f\x75\162\40\x57\141\x6c\154\x65\x74\x20\164\x6f\40\103\x6f\x6d\160\154\145\164\x65\x20\x54\150\x69\x73\40\x54\162\x61\x6e\163\141\143\x74\x69\157\156"); return back()->withNotify($notify); } if (isset($pin)) { try { $c_password = Auth::user()->transpin ?? null; if (Hash::check($pin, $c_password)) { } else { $notify[] = array("\x65\x72\162\157\162", "\x54\162\x61\156\x73\x61\143\164\x69\x6f\156\x20\120\x69\x6e\x20\111\x73\x20\x49\x6e\x63\x6f\x72\x72\x65\x63\164"); return back()->withNotify($notify); } } catch (\PDOException $e) { $notify[] = array("\145\x72\162\157\x72", $e->getMessage()); return back()->withNotify($notify); } } $checkTime = Bill::where(array("\x75\x73\x65\162\137\151\x64" => $user->id, "\161\165\141\x6e\x74\x69\x74\x79" => $quantity, "\156\x65\x74\167\157\x72\x6b" => $network1, "\163\164\x61\x74\165\163" => 1))->latest()->first(); $created_at = $checkTime->created_at ?? ''; $from_time = strtotime($created_at); $to_time = strtotime(date("\131\55\155\x2d\144\40\x48\x3a\x69\72\163")); $timeDifference = round(abs($to_time - $from_time) / 60, 2); if ($timeDifference <= 1) { $notify[] = array("\x65\x72\x72\x6f\x72", "\104\165\160\x6c\151\143\x61\164\145\x20\x54\162\141\156\x73\141\x63\164\x69\x6f\156\x2c\40\x6b\x69\156\144\154\171\x20\167\141\151\164\40\x66\x6f\162\x20\66\x30\x73\x65\143\163"); return back()->withNotify($notify); } $trx = getTrx(); $pay = (int) $amount; $ini_balance = getAmount($user->balance ?? 0); $user->balance = (int) $ini_balance - $pay; $user->save(); $parameters = array("\x6c\151\164\145" => $network2, "\x64\141\164\x61\160\x6c\x61\x6e" => $plan, "\161\x75\x61\156\x74\151\164\x79" => $quantity, "\143\x61\x72\144\x5f\156\x61\x6d\x65" => $card_name); $url = "\150\x74\164\x70\163\72\57\x2f\166\164\165\155\x6f\x62\x69\154\x65\x73\x68\157\160\x73\x2e\x63\157\x6d\x2e\156\147\57\141\x70\x69\57\126\x32\x2f\x64\x61\x74\x61\137\x63\x61\x72\x64"; $headers = array("\101\x63\143\x65\x70\164\72\40\x61\160\160\154\x69\143\141\164\x69\x6f\x6e\x2f\x6a\163\x6f\156", "\101\165\x74\x68\157\x72\x69\172\141\164\x69\x6f\156\72\x20\x42\145\x61\162\x65\162\x20{$basic->gladtid}"); $ch = curl_init(); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($parameters)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $content = json_decode($response, true); $con = $content["\x73\164\x61\x74\165\x73"] ?? null; $plan_amount = $content["\141\x6d\157\165\x6e\164"] ?? 0; $net = $network[0]->name ?? null; if (empty($plan_amount)) { $bonus = 0; } else { $bonus = $pay - $plan_amount; } if ($con === "\x66\141\151\154\145\144") { $user->balance += $pay; $user->save(); $bill = new Bill(); $bill->user_id = $user->id ?? null; $bill->email = $user->email ?? null; $bill->name = $user->username ?? null; $bill->transaction_id = $trx; $bill->amount = $amount; $bill->charge = $pay; $bill->card_name = $card_name; $bill->trx = $trx; $bill->ini_balance = $ini_balance ?? 0; $bill->newbalance = getAmount($user->balance ?? 0); $bill->airtime_type = "\x64\x61\x74\x61\x63\141\x72\x64"; $bill->gateway = $response ?? null; $bill->status = 0; $bill->save(); $notify[] = array("\x65\162\x72\x6f\162", "\x20\x42\x75\164\x20\131\157\x75\40\110\x61\x76\x65\40\102\x65\145\156\x20\122\145\x66\x75\156\x64\x65\144"); return redirect()->back()->withNotify($notify); } $t = $content["\160\x69\156"] ?? null; $netw = $content["\156\145\x74\x77\157\x72\153"] ?? null; $load_pin = $content["\x6c\157\x61\x64\137\160\x69\156"] ?? null; $check_balance = $content["\143\150\145\x63\x6b\x5f\x62\x61\154\141\x6e\x63\145"] ?? null; $serial = $content["\x73\145\x72\151\141\x6c"] ?? null; $card_name = $content["\143\x61\x72\144\137\x6e\141\x6d\x65"] ?? null; $bill = new Bill(); $bill->user_id = $user->id ?? null; $bill->email = $user->email ?? null; $bill->name = $user->username ?? null; $bill->transaction_id = $trx; $bill->amount = $amount; $bill->charge = $pay; $bill->bonus = $bonus; $bill->pin = $t ?? null; $bill->serial = $serial ?? null; $bill->card_name = $card_name; $bill->load_pin = $load_pin; $bill->check_balance = $check_balance; $bill->network = $netw; $bill->trx = $trx; $bill->ini_balance = $ini_balance ?? 0; $bill->newbalance = getAmount($user->balance ?? 0); $bill->airtime_type = "\x64\x61\x74\x61\143\x61\x72\144"; $bill->gateway = $response ?? null; $bill->status = 1; $bill->save(); $bill->data_card_logs()->saveMany(array(new DatacardLog(array("\x74\x72\x61\x6e\x73\x61\x63\x74\151\157\x6e\137\151\x64" => $bill->id, "\x70\151\x6e" => $t, "\143\x61\x72\x64\137\x6e\141\155\x65" => $card_name, "\154\x6f\x61\144\137\160\x69\x6e" => $load_pin, "\x63\x68\145\x63\153\x5f\x62\x61\154\x61\x6e\143\x65" => $check_balance, "\160\151\156\137\x76\x61\x6c\x75\145" => $plansize ?? null, "\163\145\x72\151\141\154\x5f\x6e\157" => $serial, "\156\145\164\x77\x6f\x72\153" => $netw)))); $j = getAmount($ini_balance ?? 0); Message::create(array("\x75\163\x65\x72\x5f\x69\x64" => $user->id ?? null, "\164\151\164\154\x65" => "\120\151\x6e\40\x50\x75\162\x63\150\x61\x73\145\x64", "\144\145\164\x61\x69\x6c\x73" => "\x59\157\165\x20\110\x61\166\145\40\x53\165\x63\x63\x65\x73\x73\x66\x75\154\154\171\x20\x50\x75\162\x63\x68\141\x73\x65\144\x20{$quantity}\40\x44\141\x74\141\143\141\162\144\x20\x50\151\156\40\127\x6f\x72\x74\150\x20\157\146\x20{$basic->cur_text}\x20{$amount}\54\40\x59\x6f\165\x72\x20\120\151\156\x20\151\163\x20{$t}\x2c\40\131\157\165\40\143\141\x6e\40\x6c\x6f\x61\x64\x20\131\157\x75\x72\40\120\x69\x6e\x20\x42\171\40\x44\151\141\x6c\x69\156\147\x20{$load_pin}\40\x61\x6e\144\x20\x43\150\x65\143\153\x20\x59\x6f\x75\162\40\102\141\154\x61\x6e\x63\145\40\x77\151\x74\x68\40{$check_balance}\56\x20\131\157\165\162\x20\111\x6e\151\164\x69\x61\x6c\x20\x42\141\x6c\x61\x6e\143\x65\40\127\x61\x73\40{$basic->cur_text}\x20{$j}\54\40\x41\x6e\144\x20\x59\x6f\165\162\x20\106\151\156\x61\x6c\x20\x42\141\x6c\x61\x6e\143\x65\x20\111\163\x20{$basic->cur_text}\40{$user->balance}\56\40\x54\x68\141\156\153\40\x59\157\165\x20\106\x6f\162\x20\103\x68\157\x6f\163\x69\x6e\x67\40{$basic->sitename}", "\x61\144\155\151\x6e" => 1, "\x73\164\141\164\165\163" => 0)); $notify[] = array("\x73\165\143\x63\145\163\163", "\124\x72\141\156\163\x61\x63\164\x69\x6f\x6e\x20\x53\165\143\143\x65\x73\x73\x66\165\x6c"); return redirect()->back()->withNotify($notify); } public function internetdata2b(Request $request) { $data["\160\141\x67\145\x5f\164\x69\164\x6c\x65"] = "\x49\156\x74\145\162\x6e\145\x74\40\104\141\164\141"; $track = Session::get("\x54\x72\141\x63\153"); $basic = GeneralSetting::first(); $data["\x6e\x65\x74\167\x6f\x72\153"] = Internet::wherecode($track)->whereStatus(1)->get(); $data["\x6e\145\x74\x77\x6f\x72\x6b"] = json_decode($data["\156\145\x74\x77\x6f\x72\x6b"], true, 512, JSON_THROW_ON_ERROR); $datanet = Internet::wherecode($track)->whereStatus(1)->count(); $dnet = json_decode($datanet, true, 512, JSON_THROW_ON_ERROR); if ($dnet < 1) { $notify[] = array("\145\x72\162\157\162", "\123\x65\162\x76\151\x63\x65\40\110\x61\x73\40\102\145\145\x6e\40\x44\x69\163\141\142\154\145\x64"); return redirect()->route("\x75\x73\x65\x72\56\150\157\155\x65")->withNotify($notify); } if ($basic->internet < 1) { $notify[] = array("\x65\x72\162\x6f\162", "\123\x65\x72\166\151\x63\x65\x20\110\x61\163\x20\x42\145\145\x6e\x20\104\151\163\x61\142\154\x65\144"); return redirect()->route("\x75\x73\x65\x72\56\x68\157\x6d\145")->withNotify($notify); } $data["\x70\154\141\x6e\x73"] = Internetbundle::whereCode($track)->whereStatus(1)->get(); return view($this->activeTemplate . "\x75\163\x65\162\x2e\x6d\145\162\x63\150\141\x6e\x74\56\x69\156\164\145\x72\x6e\x65\x74\137\x62\165\x79\142", $data); } public function electricity() { $data["\160\141\x67\x65\x5f\164\x69\164\154\x65"] = "\x45\x6c\145\143\x74\x72\151\143\x69\164\171\40\102\151\x6c\x6c"; $data["\160\157\x77\x65\x72"] = Power::whereStatus(1)->latest()->get(); $datanet = Power::whereStatus(1)->count(); $dnet = json_decode($datanet, true, 512, JSON_THROW_ON_ERROR); if ($dnet < 1) { $notify[] = array("\145\x72\162\157\162", "\x53\x65\162\x76\x69\143\145\40\110\141\x73\x20\x42\x65\145\156\x20\x44\151\x73\141\x62\154\145\x64"); return back()->withNotify($notify); } return view($this->activeTemplate . "\56\x75\x73\x65\162\56\155\145\x72\143\x68\x61\156\164\x2e\160\x6f\167\145\x72", $data); } public function electricitypost(Request $request) : RedirectResponse { $userData = Purify::clean($request->except("\x5f\164\x6f\153\x65\156", "\137\x6d\x65\164\150\x6f\x64")); $rules = array("\143\157\x64\145" => "\x72\x65\x71\x75\x69\x72\x65\144\x7c\163\164\x72\151\156\147", "\141\x6d\x6f\165\156\164" => "\162\x65\x71\165\151\162\145\144\x7c\x6e\165\155\145\162\151\x63", "\155\x65\x74\145\x72\164\171\160\145" => "\162\x65\161\165\x69\162\145\144", "\x6e\165\x6d\x62\145\x72" => "\x72\x65\161\x75\151\x72\145\144\174\x6e\165\155\145\x72\151\143", "\155\x6f\142\151\x6c\x65\x6e\x6f" => "\x72\145\161\x75\151\162\145\144\x7c\x72\x65\147\145\170\72\x2f\x5e\50\x5b\x30\x2d\x39\134\x73\x5c\x2d\x5c\x2b\134\x28\x5c\51\135\x2a\x29\x24\57\174\x64\151\147\x69\164\x73\72\61\61"); $Validator = Validator::make($userData, $rules); if ($Validator->fails()) { return back()->withErrors($Validator)->withInput(); } $userData = (object) $userData; $code = $userData->code ?? null; $amount = $userData->amount ?? null; $metertype = $userData->metertype ?? null; $number = $userData->number ?? null; $mobileno = $userData->mobileno ?? null; $pin = $userData->pin ?? null; $user = Auth::user(); $basic = GeneralSetting::first(); $authorization = $basic->tokenpass; if (str_starts_with((string) $amount, "\x2d")) { $notify[] = array("\145\162\162\157\x72", "\131\157\165\x20\101\162\x65\x20\x41\x20\164\x68\x69\x65\x66"); return redirect()->back()->withNotify($notify); } if ($amount <= 0) { $notify[] = array("\145\162\x72\x6f\162", "\x49\156\x76\141\154\151\144\40\x41\x6d\157\165\156\x74"); return redirect()->back()->withNotify($notify); } $datanet = Power::whereServiceid($code)->whereStatus(1)->count(); $dnet = json_decode($datanet, true, 512, JSON_THROW_ON_ERROR); if ($dnet < 1) { $notify[] = array("\x65\x72\162\x6f\162", "\123\145\162\166\151\x63\145\40\110\141\x73\40\x42\x65\145\156\40\104\151\163\141\x62\x6c\145\x64"); return redirect()->back()->withNotify($notify); } if ($basic->electric < 1) { $notify[] = array("\x65\162\x72\157\x72", "\x53\145\x72\x76\x69\x63\x65\x20\x48\x61\163\x20\x42\145\145\156\x20\x44\151\163\141\x62\154\145\x64"); return redirect()->route("\165\163\145\x72\56\x68\157\x6d\x65")->withNotify($notify); } if (isset($pin)) { try { $c_password = $user->transpin; if (Hash::check($pin, $c_password)) { } else { $notify[] = array("\x65\162\162\157\x72", "\x54\162\141\156\x73\x61\143\164\x69\157\x6e\x20\x50\x69\x6e\x20\111\x73\x20\111\x6e\143\x6f\x72\x72\x65\143\x74"); return back()->withNotify($notify); } } catch (\PDOException $e) { $notify[] = array("\145\162\x72\x6f\162", $e->getMessage()); return back()->withNotify($notify); } } $parameters = array("\143\x6f\x64\145" => $code, "\x6e\x75\x6d\142\145\162" => $number, "\155\x65\164\x65\x72\164\x79\x70\x65" => $metertype); $url = "\150\164\164\x70\x73\72\57\57\x76\164\x75\155\x6f\x62\x69\x6c\x65\x73\x68\157\x70\x73\x2e\143\157\155\56\x6e\147\57\141\160\x69\57\126\x32\x2f\x70\x6f\x77\145\x72\x5f\x76\145\x72\x69\146\171"; $headers = array("\x41\x63\x63\x65\160\x74\x3a\x20\141\160\160\x6c\151\x63\x61\x74\151\x6f\156\x2f\152\163\x6f\x6e", "\x41\x75\x74\150\157\162\151\x7a\x61\164\x69\157\156\x3a\40\x42\145\x61\x72\145\x72\40{$basic->gladtid}"); $ch = curl_init(); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($parameters)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $response = curl_exec($ch); curl_close($ch); $result = json_decode($response, true); $status = $result["\163\164\141\x74\165\x73"] ?? null; $api_response = $result["\141\x70\151\x5f\x72\x65\x73\x70\157\156\x73\x65"] ?? null; if ($status === "\146\141\151\154\145\x64") { $notify[] = array("\145\x72\162\157\162", $api_response); return back()->withNotify($notify); } Session::put("\x63\157\x64\x65", $code); Session::put("\156\141\x6d\145", $result); Session::put("\156\x75\155\142\145\x72", $number); Session::put("\141\x6d\157\x75\x6e\164", $amount); Session::put("\164\171\160\x65", $metertype); Session::put("\x6d\157\x62\151\154\145\156\x6f", $mobileno); Session::put("\164\x72\170", getTrx()); return redirect()->route("\165\163\x65\x72\x2e\x70\x6f\167\x65\162\160\141\x79"); } public function electricitypay() { $data["\160\x61\x67\145\x5f\x74\x69\164\154\145"] = "\x45\154\145\x63\x74\162\x69\x63\x69\164\x79\x20\x42\x69\154\154"; $data["\x63\157\144\145"] = Session::get("\x63\157\144\x65"); $data["\x74\x79\x70\x65"] = Session::get("\164\x79\160\145"); $data["\156\141\x6d\x65"] = Session::get("\156\x61\155\x65"); $data["\x61\155\x6f\x75\x6e\x74"] = Session::get("\141\155\x6f\165\156\x74"); $data["\x6e\x75\x6d\142\x65\162"] = Session::get("\156\165\x6d\142\145\162"); $data["\x6d\x6f\x62\151\x6c\145\156\x6f"] = Session::get("\155\x6f\142\x69\x6c\145\x6e\x6f"); $data["\164\162\x78\143\157\x64\145"] = Session::get("\164\162\x78"); $data["\x74\151\155\145"] = Carbon::now(); $data["\160\x6f\167\145\x72"] = Power::whereServiceid($data["\x63\x6f\x64\x65"])->first(); return view($this->activeTemplate . "\56\165\163\145\162\x2e\155\x65\162\x63\150\141\x6e\164\x2e\160\x6f\167\145\162\x70\x61\x79", $data); } public function electricitypay2(Request $request) : RedirectResponse { $userData = Purify::clean($request->except("\x5f\164\x6f\x6b\x65\156", "\137\155\x65\x74\x68\x6f\144")); $rules = array("\143\157\144\145" => "\x72\145\x71\165\x69\162\x65\x64\174\163\x74\162\x69\x6e\x67", "\141\155\157\x75\156\164" => "\x72\145\x71\x75\x69\x72\145\144\174\x6e\x75\155\145\162\151\143", "\141\x6d\x6f\165\x6e\164\62" => "\162\x65\x71\165\x69\x72\x65\x64\174\x6e\x75\155\145\x72\151\x63", "\164\x79\x70\145" => "\x72\x65\161\x75\x69\162\145\144", "\156\165\155\x62\145\x72" => "\x72\x65\161\165\151\x72\x65\x64\x7c\156\x75\155\145\x72\x69\143"); $Validator = Validator::make($userData, $rules); if ($Validator->fails()) { return back()->withErrors($Validator)->withInput(); } $userData = (object) $userData; $data["\x6d\x6f\x62\151\154\145\x6e\157"] = Session::get("\x6d\x6f\x62\151\x6c\145\156\x6f"); $code = $userData->code ?? null; $amount = $userData->amount ?? null; $amount2 = $userData->amount2 ?? null; $metertype = $userData->type ?? null; $number = $userData->number ?? null; $mobileno = $data["\155\x6f\x62\x69\x6c\x65\156\157"] ?? null; $user = Auth::user(); $basic = GeneralSetting::first(); $api_id = $basic->merchantid; $api_key = $basic->merchantkey; $authorization = $basic->tokenpass; $pay = $amount2 + $amount; if (str_starts_with((string) $pay, "\x2d")) { $notify[] = array("\145\x72\162\157\162", "\x59\157\x75\40\x41\162\x65\40\x41\40\x74\x68\x69\x65\146"); return redirect()->back()->withNotify($notify); } if ($pay <= 0) { $notify[] = array("\x65\162\162\157\x72", "\x49\x6e\x76\141\x6c\x69\144\40\101\x6d\157\165\x6e\164"); return redirect()->back()->withNotify($notify); } if ($user->balance < $pay) { $notify[] = array("\145\162\162\x6f\162", "\131\x6f\x75\x20\104\x6f\156\x74\x20\110\141\x76\145\40\x45\156\x6f\165\147\150\40\x46\165\156\x64\x20\x69\156\40\131\157\165\x72\x20\x57\141\154\x6c\145\x74\x20\x74\157\x20\103\157\155\160\x6c\145\x74\x65\40\x54\150\x69\163\x20\x54\x72\x61\156\x73\141\x63\x74\x69\x6f\156"); return back()->withNotify($notify); } $power = Power::whereServiceid($code)->first(); $trox = getTrx(); $po = Carbon::now()->format("\131\x2d\x6d\55\x64\40\x48\x3a\x69\x3a\x73"); $r = Bill::where("\x75\163\x65\x72\x5f\x69\144", $user->id)->latest()->first(); $dnet2 = json_decode($r, true); $ti = $dnet2["\x74\151\155\145\162"] ?? 0; $to = $dnet2["\x6e\x65\164\167\x6f\x72\x6b"] ?? null; $so = $dnet2["\x6e\165\x6d\142\x65\x72"] ?? null; $mo = $dnet2["\141\x6d\x6f\x75\156\164"] ?? 0; $finishTime = Carbon::parse($ti)->addSeconds(120)->format("\131\x2d\x6d\55\x64\x20\x48\x3a\x69\72\163"); if ($po < $finishTime && $to === $code && $mo === $amount && $so === $number) { $notify[] = array("\x65\162\162\x6f\x72", "\x44\165\x70\x6c\151\143\x61\x74\x65\x20\124\162\141\156\163\x61\x63\x74\151\x6f\x6e\x2c\40\153\151\x6e\x64\x6c\x79\x20\x77\x61\151\x74\x20\146\x6f\162\x20\62\155\151\156\165\164\x65\163"); return back()->withNotify($notify); } $ini_balance = getAmount($user->balance ?? null); $user->balance = $ini_balance - $pay; $user->save(); $parameters = array("\163\x65\x72\166\x69\x63\x65\x49\104" => $code, "\142\x69\154\x6c\145\x72\163\103\x6f\x64\x65" => $number, "\166\x61\x72\151\141\164\x69\x6f\156\x5f\143\x6f\144\145" => $metertype, "\x61\155\157\165\x6e\x74" => $amount, "\160\x68\x6f\156\x65" => $mobileno); $url = "\x68\x74\164\x70\x73\72\x2f\x2f\x76\x74\x75\155\157\142\151\154\x65\x73\x68\157\x70\x73\56\143\157\155\x2e\156\147\57\x61\x70\151\x2f\126\62\x2f\x70\x6f\x77\x65\x72\137\x70\x61\x79"; $headers = array("\101\x63\x63\145\160\x74\x3a\x20\x61\x70\160\x6c\151\143\141\164\x69\x6f\156\x2f\x6a\x73\157\x6e", "\101\165\164\x68\157\x72\x69\172\141\x74\151\157\156\x3a\x20\x42\x65\141\x72\145\162\x20{$basic->gladtid}"); $ch = curl_init(); curl_setopt($ch, CURLOPT_HTTPHEADER, $headers); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_POSTFIELDS, http_build_query($parameters)); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $content = curl_exec($ch); curl_close($ch); $result = json_decode($content, true); $status = $result["\x73\164\141\x74\165\x73"] ?? null; $api_response = $result["\x61\160\151\137\162\145\163\x70\x6f\x6e\x73\145"] ?? null; if ($status === "\146\x61\151\154\x65\x64") { $user->balance += $pay; $user->save(); Bill::create(array("\x75\163\x65\162\137\x69\x64" => $user->id ?? null, "\x61\x6d\x6f\x75\156\x74" => $amount, "\x74\151\x6d\145\162" => $po, "\x6e\165\x6d\142\145\x72" => $number, "\155\x6f\142\151\154\x65\x6e\x6f" => $mobileno, "\164\162\170" => $trox, "\x6e\x65\164\x77\157\x72\153" => $code, "\x63\150\x61\x72\147\x65" => $pay, "\146\145\145" => $power->fee, "\147\141\x74\x65\167\141\171" => $content, "\x69\x6e\151\137\x62\141\154\x61\156\x63\x65" => $ini_balance, "\156\x65\x77\142\141\x6c\141\156\x63\x65" => getAmount($user->balance ?? null), "\160\154\x61\156" => $metertype, "\141\x69\162\164\151\155\x65\x5f\164\x79\160\x65" => "\160\x6f\167\x65\162", "\x73\x74\x61\164\165\163" => 0)); $notify[] = array("\145\x72\x72\157\162", $api_response); return redirect()->back()->withNotify($notify); } else { $j = getAmount($ini_balance); Bill::create(array("\165\x73\145\x72\137\151\144" => $user->id ?? null, "\141\155\x6f\165\x6e\164" => $amount, "\164\151\155\x65\x72" => $po, "\x6e\x75\x6d\142\145\x72" => $number, "\155\x6f\x62\151\x6c\145\x6e\157" => $mobileno, "\x74\x72\170" => $trox, "\156\x65\164\x77\x6f\162\x6b" => $code, "\x63\x68\x61\162\147\x65" => $pay, "\x66\x65\x65" => $power->fee, "\147\141\x74\x65\x77\141\171" => $content, "\151\x6e\151\x5f\142\141\154\141\x6e\x63\145" => $ini_balance, "\x6e\145\167\x62\x61\x6c\141\x6e\143\145" => getAmount($user->balance ?? 0), "\160\x6c\141\x6e" => $metertype, "\x61\151\162\164\151\155\x65\137\x74\171\160\145" => "\160\157\x77\145\162", "\x73\164\x61\164\165\163" => 1)); $power = Power::whereServiceid($code)->whereStatus(1)->first(); $t = $result["\164\157\x6b\x65\156"] ?? null; Message::create(array("\165\163\145\x72\137\x69\x64" => $user->id ?? null, "\x74\151\x74\154\x65" => "\x45\x6c\145\143\x74\162\151\x63\x69\x74\x79\x20\x42\151\154\154\40\x50\141\x79\x6d\x65\156\x74", "\144\145\x74\x61\x69\x6c\x73" => "\x59\x6f\x75\x72\x20{$power->name}\40\x50\122\x45\x50\x41\111\x44\40\127\x69\x74\150\x20\x4d\x65\164\145\162\40\116\165\x6d\142\x65\x72\40\x28{$number}\x29\40\x48\141\163\40\x42\145\145\156\x20\123\x75\x63\143\x65\163\x73\x66\165\154\154\x79\x20\122\145\x63\150\141\x72\x67\x65\144\40\167\151\164\x68\40{$basic->cur_text}\x20{$amount}\x2c\40\x59\157\x75\x72\40\124\x6f\153\145\x6e\40\x69\x73\40{$t}\x2e\40\x59\157\x75\162\40\111\x6e\x69\x74\151\141\x6c\40\102\141\154\x61\156\x63\x65\x20\x57\141\x73\x20{$basic->cur_text}\x20{$j}\40\x61\156\x64\x20\x59\x6f\x75\x72\x20\106\151\x6e\141\154\40\x42\141\154\x61\x6e\143\x65\40\151\x73\x20{$basic->cur_text}\x20{$user->balance}\x2e\40\124\150\141\156\x6b\x20\131\x6f\x75\x20\106\157\162\40\x43\x68\x6f\x6f\x73\151\x6e\147\40{$basic->sitename}", "\x61\x64\x6d\151\x6e" => 1, "\x73\164\x61\x74\x75\x73" => 0)); $auth = Auth::user(); $to_name = $auth->username ?? null; $sitename = env("\101\120\120\137\116\x41\115\x45"); $to_email = $auth->email; $heading = "\105\154\x65\143\x74\x72\151\143\x69\x74\x79\40\102\x49\x6c\154\x20\120\x61\x79\x6d\x65\x6e\164"; $data = array("\x6e\141\x6d\145" => $auth->username ?? null, "\150\x65\141\x64\x69\156\147" => "\x45\154\x65\143\164\162\151\143\x69\x74\x79\x20\102\111\154\154\x20\120\x61\x79\x6d\x65\x6e\164", "\x62\157\144\x79" => "\131\157\165\x72\40{$power->name}\40\120\122\105\120\101\x49\104\x20\127\x69\164\150\x20\x4d\x65\x74\x65\162\40\x4e\165\x6d\142\145\162\x20\50{$number}\x29\x20\x48\141\163\x20\102\x65\145\156\40\x53\165\x63\x63\x65\163\x73\x66\x75\154\x6c\171\40\x52\145\143\150\141\162\x67\x65\144\40\167\x69\x74\x68\x20{$basic->cur_text}\x20{$amount}\54\x20\131\x6f\x75\162\x20\124\157\153\145\156\40\x69\x73\40{$t}\x2e\x20\131\x6f\165\162\40\111\x6e\151\x74\x69\141\x6c\40\102\141\154\x61\x6e\x63\x65\x20\x57\x61\163\40{$basic->cur_text}\x20{$j}\x20\141\x6e\144\x20\x59\x6f\165\162\x20\106\x69\x6e\141\154\x20\x42\x61\154\x61\156\x63\x65\40\151\x73\40{$basic->cur_text}\40{$user->balance}\x2e\x20\x54\150\x61\156\x6b\x20\x59\x6f\165\40\106\x6f\162\40\103\x68\x6f\x6f\163\151\156\147\40{$sitename}\x2e\x20\x43\150\x65\145\162\163"); Mail::send("\x70\141\162\164\x69\x61\154\x73\x2e\x70\155\x61\x69\x6c", $data, static function ($message) use($to_name, $heading, $to_email) { $message->to($to_email, $to_name, $heading)->subject("\124\162\141\156\x73\141\143\x74\151\x6f\156\40\x53\165\x63\x63\x65\163\163\x66\x75\154"); $message->from(env("\x4d\101\111\x4c\137\125\123\x45\122\116\x41\115\105"), env("\101\120\x50\137\116\101\115\x45")); }); $notify[] = array("\x73\x75\x63\x63\145\x73\163", "\x54\x72\141\x6e\163\141\x63\x74\151\157\156\40\123\165\143\143\145\163\x73\x66\165\x6c"); } return redirect()->route("\x75\163\x65\162\56\160\157\167\145\162\154\x6f\x67")->withNotify($notify); } public function bet() { $data["\x70\141\147\x65\137\x74\151\164\x6c\x65"] = "\102\x65\x74\x20\x42\151\154\x6c"; $data["\x62\x65\x74"] = Bet::whereStatus(1)->latest()->get(); $datanet = Bet::whereStatus(1)->count(); $dnet = json_decode($datanet, true, 512, JSON_THROW_ON_ERROR); if ($dnet < 1) { $notify[] = array("\145\162\x72\x6f\162", "\123\145\x72\166\151\143\145\40\110\141\x73\x20\102\145\x65\156\40\104\151\x73\141\142\x6c\145\x64"); return back()->withNotify($notify); } return view($this->activeTemplate . "\x2e\x75\163\x65\x72\x2e\155\145\162\x63\x68\141\156\164\x2e\x62\x65\x74", $data); } public function betpost(Request $request) : RedirectResponse { $this->validate($request, array("\x6e\141\155\145" => "\x72\145\x71\x75\151\x72\x65\144\x7c\163\x74\x72\x69\x6e\x67", "\143\x75\x73\164\157\155\x65\162\151\x64" => "\162\145\161\x75\x69\162\145\x64", "\x61\x6d\x6f\x75\156\164" => "\x72\145\161\165\x69\162\145\144\x7c\156\165\x6d\x65\162\151\x63")); $name = $request->name; $customerid = $request->customerid; $customerid2 = $request->customerid; $amount = $request->amount; $user = Auth::user(); $basic = GeneralSetting::first(); $api_id = $basic->cuid; $api_key = $basic->ckapi; $authorization = $basic->tokenpass; if (str_starts_with((string) $amount, "\x2d")) { $notify[] = array("\x65\x72\162\x6f\162", "\x59\x6f\x75\40\x41\162\145\x20\x41\x20\x74\x68\151\145\146"); return redirect()->back()->withNotify($notify); } if ($amount <= 0) { $notify[] = array("\x65\x72\x72\157\162", "\x49\156\166\141\x6c\x69\x64\40\x41\155\x6f\x75\156\x74"); return redirect()->back()->withNotify($notify); } if ($user->balance < $amount) { $notify[] = array("\x65\x72\162\x6f\x72", "\x59\x6f\x75\x20\104\157\x6e\x74\40\x48\x61\x76\145\x20\105\x6e\x6f\x75\x67\x68\40\106\165\156\144\40\151\x6e\40\x59\x6f\x75\x72\40\x57\141\x6c\x6c\145\x74\40\x74\x6f\x20\x43\x6f\155\160\154\x65\x74\x65\40\124\x68\x69\x73\40\x54\162\x61\156\x73\141\143\x74\151\157\x6e"); return back()->withNotify($notify); } if (isset($request->pin)) { try { $c_password = $user->transpin; if (Hash::check($request->pin, $c_password)) { } else { $notify[] = array("\145\162\162\x6f\162", "\x54\x72\x61\x6e\x73\141\143\164\x69\x6f\x6e\x20\x50\151\156\40\111\x73\40\x49\x6e\x63\157\162\162\145\x63\164"); return back()->withNotify($notify); } } catch (\PDOException $e) { $notify[] = array("\x65\x72\162\x6f\x72", $e->getMessage()); return back()->withNotify($notify); } } $userID = $api_id; $APIKey = $api_key; $ip = "\61\x36\x32\56\60\x2e\x32\60\71\56\63\70"; $curl = curl_init(); curl_setopt_array($curl, array(CURLOPT_URL => "\x68\x74\164\160\x73\72\x2f\57\x77\x77\x77\56\x6e\x65\x6c\x6c\157\142\171\164\145\163\x79\163\x74\x65\155\x73\x2e\x63\x6f\x6d\57\101\120\111\x56\x65\x72\x69\x66\171\x42\x65\x74\x74\x69\x6e\147\126\x31\56\x61\163\160\77\x55\163\x65\162\111\104\x3d{$userID}\x26\101\x50\x49\113\x65\171\75{$APIKey}\46\x42\145\x74\164\151\x6e\x67\x43\x6f\155\x70\141\x6e\x79\75{$name}\x26\103\x75\163\x74\x6f\155\x65\x72\x49\x44\x3d{$customerid}", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "\107\105\x54", CURLOPT_HTTPHEADER => array("\103\157\156\164\x65\x6e\x74\55\x54\171\160\x65\72\x20\x61\x70\160\x6c\151\x63\x61\x74\x69\157\x6e\57\x6a\x73\157\156"))); $content = curl_exec($curl); $result = json_decode($content, true); $err = curl_errno($curl); $errmsg = curl_error($curl); curl_close($curl); Session::put("\x6e\x61\155\x65", $name); Session::put("\143\165\163\164\157\155\x65\x72\x69\x64", $result["\143\165\x73\164\x6f\155\x65\162\x5f\156\x61\155\x65"]); Session::put("\x63\165\163\x74\x6f\x6d\x65\x72\151\x64\62", $customerid2); Session::put("\x61\155\157\x75\x6e\164", $amount); Session::put("\164\x72\170", getTrx()); return redirect()->route("\165\163\145\162\x2e\x62\x65\x74\160\141\x79"); } public function betpay() { $data["\x70\141\147\145\x5f\164\x69\164\154\145"] = "\102\x65\x74\x20\x42\x69\x6c\x6c"; $data["\x6e\141\155\145"] = Session::get("\x6e\141\155\x65"); $data["\141\x6d\157\x75\156\164"] = Session::get("\141\x6d\157\x75\156\x74"); $data["\x63\x75\x73\x74\x6f\155\145\162\x69\144"] = Session::get("\143\x75\163\164\x6f\155\x65\162\151\144"); $data["\x63\x75\163\164\x6f\x6d\x65\162\151\144\x32"] = Session::get("\x63\165\163\164\157\x6d\x65\162\151\144\62"); $data["\164\162\170\x63\x6f\144\145"] = Session::get("\x74\162\x78"); $data["\x74\151\x6d\145"] = Carbon::now(); $data["\x62\145\164"] = Bet::whereName($data["\x6e\x61\x6d\145"])->first(); return view($this->activeTemplate . "\x2e\165\x73\145\x72\x2e\x6d\145\x72\143\x68\141\x6e\x74\x2e\142\145\164\160\141\x79", $data); } public function betpay2(Request $request) : RedirectResponse { $l = $this->validate($request, array("\x6e\141\155\x65" => "\x72\x65\161\165\x69\x72\x65\144\174\x73\x74\162\x69\x6e\x67", "\141\155\x6f\165\156\x74" => "\162\145\x71\x75\x69\162\x65\144\174\x6e\x75\155\145\x72\151\143", "\x61\x6d\157\x75\156\x74\x32" => "\162\x65\x71\165\151\x72\x65\x64\174\156\x75\155\x65\x72\151\143", "\143\165\x73\x74\x6f\155\x65\x72\151\144" => "\x72\145\161\x75\151\162\x65\144")); $data["\x63\x75\163\164\157\155\x65\x72\x69\144\62"] = Session::get("\143\165\163\164\157\x6d\x65\162\x69\144\x32"); $name = $request->name; $customerid2 = $data["\143\x75\x73\x74\x6f\155\145\162\151\144\62"]; $amount = $request->amount; $amount2 = $request->amount2; $customerid = $request->customerid; $pay = $amount + $amount2; if (str_starts_with((string) $pay, "\55")) { $notify[] = array("\x65\162\162\157\162", "\x59\157\x75\40\x41\x72\x65\40\x41\40\x74\x68\x69\145\x66"); return redirect()->back()->withNotify($notify); } if ($pay <= 0) { $notify[] = array("\145\x72\x72\157\x72", "\x49\156\x76\x61\x6c\x69\x64\x20\x41\x6d\x6f\165\x6e\164"); return redirect()->back()->withNotify($notify); } $user = Auth::user(); $basic = GeneralSetting::first(); $api_id = $basic->cuid; $api_key = $basic->ckapi; $authorization = $basic->tokenpass; if ($user->balance < $pay) { $notify[] = array("\x65\162\x72\157\x72", "\131\x6f\x75\40\x44\x6f\156\164\x20\110\141\166\x65\x20\x45\156\x6f\x75\x67\x68\40\x46\x75\x6e\144\x20\x69\156\40\x59\x6f\x75\162\x20\x57\x61\x6c\154\x65\x74\40\x74\157\x20\103\x6f\155\160\154\x65\x74\145\40\124\150\x69\163\40\x54\x72\141\x6e\163\141\143\164\151\157\156"); return back()->withNotify($notify); } $bet = Bet::whereName($name)->whereStatus(1)->first(); $trox = getTrx(); $ini_balance = $user->balance; $user->balance = $ini_balance - $pay; $user->save(); $userID = $api_id; $APIKey = $api_key; $ip = "\60\x2e\60\56\x30\x2e\x30"; $curl = curl_init(); curl_setopt_array($curl, array(CURLOPT_URL => "\150\164\164\x70\x73\x3a\57\x2f\167\167\167\x2e\156\x65\154\154\x6f\142\x79\164\145\163\x79\x73\x74\145\x6d\x73\x2e\143\157\x6d\x2f\101\120\111\x42\145\x74\x74\151\x6e\x67\x56\61\x2e\x61\x73\160\77\x55\x73\x65\x72\x49\x44\75{$userID}\x26\101\120\111\113\145\x79\x3d{$APIKey}\46\102\145\164\x74\151\x6e\x67\103\157\155\x70\x61\156\171\75{$name}\46\x43\165\163\x74\157\155\x65\162\111\x44\75{$customerid2}\46\101\x6d\157\x75\x6e\164\x3d{$amount}\46\x52\145\x71\x75\x65\x73\x74\111\104\75{$trox}\46\103\141\154\154\102\x61\143\x6b\125\x52\x4c\x3d\x27\x68\x74\164\x70\x73\x3a\x2f\x2f\x63\157\144\145\x72\172\x62\x69\x6c\x6c\x7a\x2e\x74\x6b\57\142\151\154\x6c\56\160\150\x70\x27", CURLOPT_RETURNTRANSFER => true, CURLOPT_ENCODING => '', CURLOPT_TIMEOUT => 0, CURLOPT_FOLLOWLOCATION => true, CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1, CURLOPT_CUSTOMREQUEST => "\x47\105\124", CURLOPT_HTTPHEADER => array("\103\157\156\x74\x65\156\164\x2d\x54\171\160\x65\72\40\x61\160\160\x6c\151\x63\x61\164\151\157\156\57\152\163\x6f\156"))); $content = curl_exec($curl); $result = json_decode($content, true); $err = curl_errno($curl); $errmsg = curl_error($curl); curl_close($curl); if ($result["\x73\164\x61\164\165\163"] !== "\x4f\x52\x44\105\x52\137\x52\105\x43\x45\x49\x56\x45\104") { Bill::create(array("\165\163\145\162\x5f\x69\144" => $user->id, "\141\x6d\x6f\165\x6e\x74" => $amount, "\156\165\x6d\142\145\162" => $customerid, "\x6e\141\x6d\x65" => $name, "\164\162\170" => $trox, "\156\145\x74\167\157\162\x6b" => $customerid2, "\143\150\141\162\x67\145" => $pay, "\146\145\145" => $bet->fee, "\147\x61\x74\x65\x77\141\x79" => $content, "\151\156\151\x5f\x62\141\x6c\141\156\143\x65" => $ini_balance, "\156\145\x77\x62\x61\154\141\156\x63\145" => $user->balance, "\141\x69\x72\164\151\155\x65\137\x74\x79\160\x65" => 22, "\x73\164\141\x74\165\x73" => 0)); $notify[] = array("\145\162\x72\x6f\x72", $result["\163\x74\x61\164\x75\x73"]); } else { $j = getAmount($ini_balance); Bill::create(array("\x75\x73\x65\x72\x5f\151\144" => $user->id, "\x61\x6d\157\x75\x6e\164" => $amount, "\156\165\155\142\x65\x72" => $customerid, "\x6e\x61\155\x65" => $name, "\164\162\170" => $trox, "\x6e\145\x74\x77\x6f\162\x6b" => $customerid2, "\x63\150\141\x72\x67\145" => $pay, "\x66\145\145" => $bet->fee, "\147\x61\x74\145\x77\x61\x79" => $content, "\151\x6e\x69\137\x62\141\154\x61\x6e\x63\145" => $ini_balance, "\x6e\145\x77\142\x61\x6c\141\156\x63\x65" => $user->balance, "\x61\151\x72\x74\x69\155\x65\x5f\x74\171\160\x65" => 22, "\163\x74\141\x74\x75\x73" => 1)); $bet = Bet::whereName($name)->whereStatus(1)->first(); Message::create(array("\165\163\145\x72\x5f\x69\x64" => $user->id, "\164\x69\164\x6c\145" => "\x42\145\x74\x20\127\x61\154\x6c\x65\164", "\144\x65\164\x61\151\x6c\163" => "\131\157\165\x72\40{$bet->name}\x20\127\141\x6c\x6c\145\x74\40\x48\141\x73\x20\102\145\145\156\40\123\165\143\x63\145\163\163\146\x75\154\154\171\40\x52\x65\143\x68\x61\162\x67\145\144\x20\167\x69\x74\x68\x20{$basic->cur_text}\40{$amount}\x2e\40\131\157\x75\x72\40\111\x6e\x69\x74\x69\141\154\x20\102\141\154\x61\156\x63\x65\x20\127\141\163\x20{$basic->cur_text}\40{$j}\40\141\x6e\144\x20\x59\x6f\165\162\x20\x46\x69\156\141\154\x20\x42\x61\154\x61\x6e\143\x65\40\x69\163\x20{$basic->cur_text}\40{$user->balance}\56\x20\124\x68\141\x6e\x6b\x20\x59\x6f\165\40\x46\x6f\x72\40\x43\150\x6f\x6f\x73\151\156\147\40{$basic->sitename}", "\x61\x64\x6d\151\x6e" => 1, "\163\x74\141\164\x75\163" => 0)); $auth = Auth::user(); $to_name = $auth->username; $sitename = env("\x41\120\x50\137\x4e\x41\115\x45"); $to_email = $auth->email; $heading = "\x42\145\164\40\102\x49\154\x6c\40\120\141\171\x6d\x65\156\x74"; $data = array("\x6e\x61\155\x65" => $auth->username, "\150\x65\x61\144\151\x6e\147" => "\x42\145\164\40\120\x61\x79\x6d\x65\x6e\x74", "\142\x6f\144\x79" => "\x59\x6f\165\162\40{$bet->name}\40\127\141\x6c\x6c\145\x74\x20\110\141\x73\x20\102\145\x65\x6e\x20\123\165\143\x63\x65\163\163\146\165\154\154\x79\40\122\145\143\150\141\x72\x67\x65\x64\x20\x77\151\x74\150\40{$basic->cur_text}\x20{$amount}\x2e\x20\131\157\x75\162\x20\111\156\151\x74\151\x61\154\x20\x42\141\x6c\141\x6e\x63\x65\40\127\141\x73\x20{$basic->cur_text}\40{$j}\x20\x61\x6e\144\40\131\x6f\165\162\x20\x46\x69\156\141\x6c\x20\x42\141\154\141\x6e\143\x65\40\151\163\x20{$basic->cur_text}\x20{$user->balance}\x2e\40\x54\150\141\x6e\x6b\40\131\157\x75\x20\x46\x6f\162\40\x43\150\x6f\157\163\x69\x6e\147\40{$sitename}\x2e\x20\x43\150\x65\x65\x72\163"); Mail::send("\160\141\x72\164\x69\141\154\163\56\x70\155\141\x69\x6c", $data, static function ($message) use($to_name, $heading, $to_email) { $message->to($to_email, $to_name, $heading)->subject("\x54\162\141\156\x73\x61\143\x74\x69\157\x6e\40\123\x75\143\143\145\x73\x73\146\x75\x6c"); $message->from(env("\115\101\111\x4c\137\125\123\105\x52\116\x41\x4d\105"), env("\x41\120\120\137\116\x41\115\105")); }); $notify[] = array("\x73\x75\143\143\145\x73\163", "\124\162\x61\x6e\163\x61\x63\x74\x69\x6f\x6e\40\123\x75\x63\143\x65\x73\x73\146\x75\x6c"); } return redirect()->route("\165\163\145\162\56\142\145\164\154\x6f\147")->withNotify($notify); } public function rechargelog() { $user = User::find(Auth::user()->id); $data["\x70\141\x67\145\x5f\x74\x69\164\154\145"] = "\x52\145\143\150\141\162\147\145\x20\x4c\x6f\x67"; $data["\145\155\x70\x74\x79\137\155\145\x73\x73\x61\x67\x65"] = "\116\x6f\40\122\145\143\x6f\162\144\x20\x46\x6f\165\156\x64"; $data["\154\x6f\147"] = Bill::whereAirtime_type(1)->whereUser_id($user->id)->latest()->paginate(20); return view($this->activeTemplate . "\56\165\x73\145\x72\56\155\x65\162\143\x68\x61\156\x74\56\162\x65\x63\x68\x61\162\147\x65\55\x6c\x6f\x67", $data); } public function voucherlog() { $user = User::find(Auth::user()->id); $data["\160\141\147\145\x5f\x74\151\x74\154\x65"] = "\126\x6f\x75\x63\150\x65\x72\x20\x4c\157\147"; $data["\145\155\x70\x74\171\x5f\x6d\x65\163\x73\141\147\x65"] = "\116\157\x20\122\x65\143\157\x72\x64\40\x46\x6f\x75\x6e\x64"; $data["\x6c\157\147"] = Bill::whereAirtime_type(18)->whereUser_id($user->id)->latest()->paginate(20); return view($this->activeTemplate . "\56\165\x73\145\162\x2e\x6d\x65\162\x63\150\141\x6e\164\56\x76\157\165\143\150\145\x72\x2d\x6c\x6f\x67", $data); } public function conversionlog() { $user = User::find(Auth::user()->id); $data["\x70\x61\x67\x65\137\164\151\x74\154\x65"] = "\x43\157\x6e\166\x65\x72\163\x69\157\156\x20\x4c\x6f\147"; $data["\145\155\x70\164\171\137\x6d\145\x73\163\141\x67\145"] = "\x4e\x6f\40\x52\x65\143\x6f\162\144\40\x46\x6f\165\x6e\144"; $data["\x6c\x6f\147"] = Bill::whereAirtime_type(5)->whereUser_id($user->id)->latest()->paginate(20); return view($this->activeTemplate . "\56\x75\163\145\162\56\x6d\x65\x72\x63\150\x61\156\x74\56\x63\x6f\x6e\166\145\162\163\x69\157\156\x2d\x6c\x6f\x67", $data); } public function conversionsearch(Request $request) { $request->validate(array("\164\x72\170" => "\162\x65\161\x75\x69\162\145\144")); $data["\x70\141\x67\x65\x5f\x74\151\164\x6c\145"] = "\103\157\156\x76\145\x72\x73\151\x6f\156\40\x4c\157\147\x20\122\145\x73\x75\154\x74"; $user = User::find(Auth::user()->id); $count = Bill::whereTrx($request->trx)->whereAirtime_type(5)->whereUser_id($user->id)->count(); if ($count > 0) { $data["\154\x6f\147"] = Bill::whereTrx($request->trx)->whereAirtime_type(5)->whereUser_id($user->id)->paginate(30); return view($this->activeTemplate . "\56\x75\x73\x65\x72\56\x6d\x65\x72\x63\150\x61\x6e\x74\x2e\x63\157\156\166\145\x72\x73\151\157\x6e\x2d\154\157\x67", $data); } return back()->with("\x61\x6c\x65\x72\x74", "\x54\x68\145\162\x65\x20\151\163\40\116\157\x20\124\x72\x61\156\163\x61\143\164\151\x6f\x6e\40\x57\x69\x74\150\x20\164\x68\151\x73\40\105\156\164\162\171\x20\x2e"); } public function conversionsearchget() { $user = User::find(Auth::user()->id); $data["\160\141\x67\145\137\164\151\164\154\145"] = "\x43\157\x6e\166\145\162\x73\x69\157\156\x20\x4c\x6f\x67"; $track = Session::get("\124\x72\x61\x63\x6b"); $count = Bill::whereTrx($track)->whereAirtime_type(5)->whereUser_id($user->id)->count(); if ($count > 0) { $data["\154\157\x67"] = Bill::whereNetwork($track)->whereAirtime_type(5)->whereUser_id($user->id)->paginate(30); return view($this->activeTemplate . "\56\165\x73\x65\162\x2e\155\145\x72\x63\x68\x61\x6e\x74\x2e\x63\x6f\x6e\x76\x65\162\x73\151\x6f\x6e\x2d\x6c\157\x67", $data); } return back()->with("\141\x6c\145\162\x74", "\x54\x68\x65\162\145\40\x69\x73\40\x4e\x6f\x20\x54\162\141\x6e\163\141\143\164\x69\157\x6e\x20\127\151\164\150\x20\x74\150\151\163\x20\x45\156\x74\x72\171\40\56"); } public function internetlog() { $user = User::find(Auth::user()->id); $data["\160\141\x67\x65\x5f\x74\151\x74\x6c\145"] = "\x49\156\164\x65\x72\156\x65\164\40\104\x61\164\x61\x20\123\x75\142\x73\143\162\151\x70\x74\151\x6f\156\163"; $data["\145\x6d\x70\x74\x79\137\x6d\x65\x73\x73\141\147\145"] = "\116\x6f\40\x52\145\x63\157\x72\144\40\x46\x6f\165\x6e\144"; $data["\154\x6f\147"] = Bill::whereAirtime_type(2)->whereUser_id($user->id)->latest()->paginate(20); return view($this->activeTemplate . "\56\165\163\x65\162\x2e\x6d\x65\x72\x63\150\141\x6e\164\x2e\151\x6e\x74\145\x72\156\145\x74\x2d\x6c\x6f\x67", $data); } public function internetloga() { $user = User::find(Auth::user()->id); $data["\x70\141\147\x65\137\164\151\x74\154\145"] = "\x44\141\164\x61\143\x61\162\x64\x20\x53\165\x62\163\143\162\x69\x70\164\151\157\156\x73"; $data["\145\x6d\160\164\171\x5f\155\145\x73\163\141\x67\145"] = "\116\157\x20\122\145\143\x6f\162\144\40\x46\157\165\x6e\144"; $data["\154\x6f\x67"] = Bill::whereAirtime_type("\144\141\x74\141\143\141\162\144")->whereUser_id($user->id)->latest()->paginate(20); return view($this->activeTemplate . "\x2e\165\163\x65\162\x2e\x6d\145\162\x63\x68\x61\x6e\164\56\x69\x6e\164\x65\162\x6e\x65\164\x2d\x6c\x6f\x67\141", $data); } public function tvlog() { $user = User::find(Auth::user()->id); $data["\x70\x61\147\145\137\x74\x69\164\154\x65"] = "\103\141\142\x6c\x65\40\124\x56\40\123\x75\x62\x73\x63\162\151\x70\x74\x69\157\x6e\163"; $data["\145\155\x70\164\x79\137\155\x65\163\x73\141\x67\x65"] = "\116\157\x20\122\x65\x63\157\162\x64\40\x46\157\165\x6e\144"; $data["\x6c\157\147"] = Bill::whereAirtime_type("\143\141\x62\x6c\x65")->whereUser_id($user->id)->latest()->paginate(20); return view($this->activeTemplate . "\x75\x73\x65\162\56\x6d\145\x72\x63\150\141\x6e\x74\56\164\166\55\x6c\x6f\x67", $data); } public function necolog() { $user = User::find(Auth::user()->id); $data["\160\x61\147\x65\x5f\x74\x69\164\154\x65"] = "\116\145\143\157\x20\x52\145\163\x75\x6c\164\40\x43\150\145\143\x6b\x65\x72"; $data["\x65\x6d\160\164\171\137\155\x65\163\x73\x61\x67\145"] = "\x4e\157\40\x52\145\143\x6f\162\x64\x20\x46\157\165\x6e\x64"; $data["\x6c\x6f\147"] = Bill::whereAirtime_type("\x6e\x65\x63\157")->whereUser_id($user->id)->latest()->paginate(20); return view($this->activeTemplate . "\x75\x73\145\x72\56\x6d\x65\x72\x63\x68\x61\x6e\x74\56\156\x65\x63\157\55\154\157\x67", $data); } public function waeclog() { $user = User::find(Auth::user()->id); $data["\x70\141\x67\x65\137\164\151\164\x6c\x65"] = "\x57\101\105\103\40\x52\145\163\165\154\164\40\103\x68\145\143\153\x65\162"; $data["\x65\x6d\160\164\171\x5f\155\145\163\163\141\147\145"] = "\116\x6f\x20\x52\145\x63\x6f\x72\x64\x20\106\x6f\x75\156\x64"; $data["\154\157\147"] = Bill::whereAirtime_type("\167\x61\145\x63")->whereUser_id($user->id)->latest()->paginate(20); return view($this->activeTemplate . "\165\x73\x65\162\56\x6d\145\x72\143\x68\141\156\x74\x2e\x77\x61\x65\x63\x2d\x6c\157\147", $data); } public function waecrlog() { $user = User::find(Auth::user()->id); $data["\x70\x61\x67\145\x5f\164\151\x74\154\x65"] = "\127\x41\105\x43\40\x52\145\147\x69\163\x74\x72\141\164\x69\157\156\x20\x50\151\x6e"; $data["\x65\x6d\160\x74\x79\x5f\155\145\x73\x73\x61\x67\x65"] = "\x4e\x6f\40\122\x65\143\x6f\x72\x64\40\x46\157\165\156\144"; $data["\154\157\x67"] = Bill::whereAirtime_type("\167\x61\x65\143\x72")->whereUser_id($user->id)->latest()->paginate(20); return view($this->activeTemplate . "\165\163\145\162\56\155\145\162\143\x68\x61\156\164\56\x77\x61\145\x63\x72\x2d\x6c\x6f\147", $data); } public function nabteblog() { $user = User::find(Auth::user()->id); $data["\160\141\x67\x65\137\x74\151\x74\154\145"] = "\x4e\x61\142\x74\145\x62\x20\x52\145\x73\x75\154\x74\40\103\x68\145\143\153\145\x72"; $data["\x65\x6d\160\x74\x79\137\x6d\145\163\x73\141\x67\x65"] = "\x4e\157\40\122\145\143\x6f\x72\144\x20\106\157\x75\156\x64"; $data["\x6c\157\x67"] = Bill::whereAirtime_type("\156\x61\142\164\x65\142")->whereUser_id($user->id)->latest()->paginate(20); return view($this->activeTemplate . "\x75\163\x65\162\x2e\x6d\145\162\x63\150\x61\x6e\x74\56\x6e\x61\142\164\x65\142\x2d\x6c\157\x67", $data); } public function nbaislog() { $user = User::find(Auth::user()->id); $data["\160\x61\x67\x65\x5f\x74\151\164\x6c\145"] = "\x4e\x62\141\151\x73\x20\122\x65\163\x75\154\x74\40\103\150\x65\143\x6b\x65\162"; $data["\x65\x6d\x70\x74\x79\137\155\145\163\x73\141\x67\x65"] = "\116\157\40\x52\x65\x63\157\162\x64\x20\106\157\165\156\x64"; $data["\x6c\157\x67"] = Bill::whereAirtime_type("\x6e\x62\x61\151\163")->whereUser_id($user->id)->latest()->paginate(20); return view($this->activeTemplate . "\x75\x73\145\x72\x2e\155\x65\162\143\150\141\156\x74\x2e\x6e\142\141\151\x73\x2d\154\x6f\x67", $data); } public function powerlog() { $user = User::find(Auth::user()->id); $data["\160\141\147\x65\x5f\x74\151\164\x6c\145"] = "\x45\154\x65\x63\164\162\x69\x63\151\164\171\x20\102\x69\x6c\x6c\40\x50\x61\171\155\x65\156\x74\163"; $data["\x65\155\x70\164\x79\137\155\x65\x73\163\141\x67\145"] = "\x4e\x6f\x20\x52\145\x63\x6f\162\144\40\x46\157\x75\x6e\x64"; $data["\154\x6f\x67"] = Bill::whereAirtime_type("\x70\157\167\x65\162")->whereUser_id($user->id)->latest()->paginate(20); return view($this->activeTemplate . "\56\x75\163\145\x72\56\155\145\162\x63\150\x61\156\164\56\160\x6f\x77\145\x72\x2d\154\157\x67", $data); } public function betlog() { $user = User::find(Auth::user()->id); $data["\160\141\147\145\x5f\x74\151\x74\x6c\145"] = "\x42\x65\164\40\102\151\154\x6c\x20\120\x61\171\155\145\x6e\x74\x73"; $data["\145\x6d\160\164\171\x5f\155\145\x73\163\141\147\x65"] = "\x4e\157\40\122\145\x63\157\162\144\x20\x46\x6f\165\156\x64"; $data["\x6c\x6f\147"] = Bill::whereAirtime_type("\142\x65\164")->whereUser_id($user->id)->latest()->paginate(20); return view($this->activeTemplate . "\56\x75\163\x65\x72\x2e\x6d\x65\162\143\x68\141\x6e\164\56\142\145\x74\x2d\x6c\x6f\147", $data); } public function rechargesearch(Request $request) { $this->validate($request, array("\x74\x72\x78" => "\162\x65\x71\165\151\x72\145\x64")); $user = User::find(Auth::user()->id); $trx = $request->trx; $data["\x70\141\147\145\137\x74\151\x74\154\145"] = "\x41\x69\x72\x74\151\155\145\x20\124\162\x61\x6e\163\x61\143\164\151\x6f\x6e\x73"; $count = Bill::whereAirtime_type("\x61\x69\162\x74\151\155\145")->whereUser_id($user->id)->whereTrx($trx)->orWhere("\155\x6f\142\x69\154\x65\x6e\x6f", $trx)->count(); if ($count < 1) { $notify[] = array("\145\x72\162\157\162", "\x54\x68\x65\162\145\x20\151\x73\40\x6e\157\40\164\x72\141\x6e\163\x61\143\x74\151\x6f\156\40\167\x69\x74\150\x20\x74\x68\x69\163\40\164\162\x61\156\163\x61\143\x74\x69\x6f\156\x20\x6e\x75\x6d\142\x65\162"); return back()->withNotify($notify); } $data["\x6c\x6f\x67"] = Bill::whereAirtime_type("\141\151\162\x74\x69\x6d\145")->whereUser_id($user->id)->whereTrx($trx)->orWhere("\x6d\x6f\x62\x69\x6c\145\156\157", $trx)->latest()->paginate(30); $data["\156\145\164\167\x6f\162\153"] = Internet::latest()->get(); return view($this->activeTemplate . "\56\165\163\145\162\56\x6d\145\x72\143\x68\141\x6e\x74\x2e\x72\x65\x63\x68\x61\x72\147\145\55\x6c\x6f\147", $data); } public function rechargesearchget(Request $request) { $user = User::find(Auth::user()->id); $trx = $request->trx; $data["\x70\141\147\145\137\164\x69\164\x6c\x65"] = "\101\x69\162\x74\x69\155\x65\x20\x54\162\141\156\163\141\143\164\x69\157\156\163"; $count = Bill::whereAirtime_type("\x61\151\162\164\x69\x6d\x65")->whereUser_id($user->id)->whereTrx($trx)->orWhere("\155\x6f\142\151\154\x65\156\157", $trx)->count(); if ($count < 1) { $notify[] = array("\x65\162\x72\x6f\162", "\124\x68\x65\162\145\x20\151\163\x20\x6e\x6f\x20\164\x72\141\x6e\163\141\143\164\151\157\156\x20\x77\x69\164\x68\40\x74\150\x69\163\40\x74\x72\x61\x6e\x73\x61\143\164\x69\x6f\156\x20\156\x75\155\142\x65\x72"); return back()->withNotify($notify); } $data["\154\x6f\x67"] = Bill::whereAirtime_type("\x61\151\162\164\x69\x6d\145")->whereUser_id($user->id)->whereTrx($trx)->orWhere("\x6d\157\142\151\x6c\145\156\x6f", $trx)->latest()->paginate(30); $data["\156\x65\164\x77\x6f\x72\x6b"] = Internet::latest()->get(); return view($this->activeTemplate . "\x2e\x75\x73\145\162\56\155\x65\162\143\150\141\x6e\x74\x2e\162\145\x63\x68\141\x72\x67\145\55\154\x6f\147", $data); } public function datasearch(Request $request) { $this->validate($request, array("\x74\162\170" => "\x72\x65\x71\165\151\x72\145\x64")); $user = User::find(Auth::user()->id); $trx = $request->trx; $data["\x70\141\147\145\137\164\151\x74\x6c\145"] = "\104\x61\164\141\40\123\x75\x62\163\143\x72\151\160\164\151\x6f\156\40\x54\x72\141\156\x73\x61\143\164\151\157\156\x73"; $count = Bill::whereAirtime_type(2)->whereUser_id($user->id)->whereTrx($trx)->orWhere("\x6d\x6f\x62\151\x6c\145\x6e\157", $trx)->count(); if ($count < 1) { $notify[] = array("\x65\162\x72\x6f\162", "\x54\150\145\x72\x65\x20\151\x73\40\156\x6f\x20\x74\x72\x61\156\x73\141\143\164\x69\157\156\40\x77\x69\x74\150\40\x74\x68\x69\163\40\x74\162\x61\156\163\x61\143\164\x69\157\156\40\156\165\x6d\142\x65\x72"); return back()->withNotify($notify); } $data["\154\157\147"] = Bill::whereAirtime_type(2)->whereUser_id($user->id)->whereTrx($trx)->orWhere("\155\x6f\x62\x69\x6c\145\x6e\157", $trx)->latest()->paginate(30); $data["\x6e\145\x74\167\157\162\153"] = Internet::latest()->get(); return view($this->activeTemplate . "\56\x75\163\145\x72\56\x6d\x65\162\143\150\141\x6e\x74\x2e\x69\156\x74\x65\x72\x6e\x65\x74\x2d\154\x6f\147", $data); } public function datasearchget(Request $request) { $user = User::find(Auth::user()->id); $trx = $request->trx; $data["\160\x61\147\x65\137\x74\151\164\x6c\145"] = "\x44\141\164\141\40\x53\165\142\x73\143\x72\x69\160\164\x69\157\156\40\124\162\x61\156\163\141\143\x74\x69\157\156\x73"; $count = Bill::whereAirtime_type(2)->whereUser_id($user->id)->whereTrx($trx)->orWhere("\x6d\157\x62\151\x6c\145\156\x6f", $trx)->count(); if ($count < 1) { $notify[] = array("\x65\162\162\x6f\x72", "\x54\x68\145\x72\x65\40\x69\163\x20\156\157\40\x74\x72\141\156\163\x61\143\x74\x69\157\156\x20\167\x69\x74\x68\40\x74\150\x69\x73\x20\x74\162\141\156\163\141\143\x74\151\x6f\156\40\156\165\155\x62\x65\162"); return back()->withNotify($notify); } $data["\x6c\157\147"] = Bill::whereAirtime_type(2)->whereUser_id($user->id)->whereTrx($trx)->orWhere("\155\157\x62\x69\154\145\x6e\x6f", $trx)->latest()->paginate(30); $data["\x6e\145\164\167\x6f\x72\153"] = Internet::latest()->get(); return view($this->activeTemplate . "\x2e\x75\x73\145\162\56\155\145\162\x63\150\141\x6e\164\56\x69\156\x74\145\x72\156\145\164\x2d\154\157\147", $data); } public function datasearcha(Request $request) { $this->validate($request, array("\x74\162\x78" => "\x72\145\x71\x75\x69\x72\x65\144")); $user = User::find(Auth::user()->id); $trx = $request->trx; $data["\x70\x61\x67\x65\x5f\x74\x69\164\x6c\x65"] = "\x44\141\164\x61\40\123\x75\x62\163\x63\162\151\160\x74\x69\x6f\x6e\40\124\162\x61\x6e\163\x61\x63\x74\x69\157\156\163"; $count = Bill::whereAirtime_type(2)->whereUser_id($user->id)->whereTrx($trx)->orWhere("\x6d\157\142\x69\x6c\x65\x6e\157", $trx)->count(); if ($count < 1) { $notify[] = array("\145\x72\162\x6f\162", "\124\150\145\162\145\40\151\x73\40\156\157\x20\x74\162\141\x6e\x73\141\x63\164\x69\x6f\156\x20\167\151\x74\x68\40\164\x68\x69\163\x20\x74\162\141\x6e\163\x61\x63\x74\151\157\156\40\x6e\x75\x6d\x62\145\162"); return back()->withNotify($notify); } $data["\154\157\x67"] = Bill::whereAirtime_type(2)->whereUser_id($user->id)->whereTrx($trx)->orWhere("\155\x6f\x62\x69\154\145\156\157", $trx)->latest()->paginate(30); $data["\x6e\x65\x74\167\157\162\153"] = Internet::latest()->get(); return view($this->activeTemplate . "\x2e\165\x73\145\162\x2e\155\145\x72\x63\150\x61\x6e\164\56\x69\x6e\x74\145\x72\156\x65\x74\55\154\x6f\147\x61", $data); } public function datasearchgeta(Request $request) { $user = User::find(Auth::user()->id); $trx = $request->trx; $data["\x70\x61\x67\145\137\164\x69\x74\154\145"] = "\x44\141\x74\141\40\123\165\x62\x73\x63\162\151\160\164\151\x6f\156\40\x54\x72\x61\156\163\x61\x63\x74\151\x6f\156\x73"; $count = Bill::whereAirtime_type(2)->whereUser_id($user->id)->whereTrx($trx)->orWhere("\x6d\x6f\142\151\x6c\x65\x6e\x6f", $trx)->count(); if ($count < 1) { $notify[] = array("\x65\162\x72\x6f\162", "\x54\150\x65\x72\145\40\151\x73\x20\156\x6f\x20\x74\162\x61\156\163\141\143\x74\x69\x6f\156\x20\167\x69\164\150\x20\164\150\x69\163\40\x74\162\141\156\x73\141\143\164\151\x6f\x6e\40\156\165\x6d\x62\x65\162"); return back()->withNotify($notify); } $data["\154\157\x67"] = Bill::whereAirtime_type(2)->whereUser_id($user->id)->whereTrx($trx)->orWhere("\155\x6f\x62\x69\154\x65\x6e\x6f", $trx)->latest()->paginate(30); $data["\x6e\x65\164\167\x6f\x72\x6b"] = Internet::latest()->get(); return view($this->activeTemplate . "\x75\163\x65\x72\56\155\145\162\x63\150\141\156\x74\x2e\151\156\x74\x65\162\x6e\145\164\x2d\x6c\x6f\147\x61", $data); } public function tvsearch(Request $request) : RedirectResponse { $request->validate(array("\x74\x72\x78" => "\162\x65\x71\x75\151\162\145\144")); Session::put("\124\162\x61\x63\153", $request->trx); return redirect()->route($this->activeTemplate . "\x74\x76\x73\145\141\162\143\x68\147\145\164"); } public function tvsearchget() { $user = User::find(Auth::user()->id); $data["\x70\x61\x67\145\137\164\x69\164\x6c\145"] = "\124\x56\x20\123\x75\142\x73\143\x72\x69\160\164\x69\157\x6e"; $track = Session::get("\x54\x72\141\143\153"); if ($track == "\104\123\124\x56") { $code = 1; $count2 = Bill::whereNetwork($code)->whereAirtime_type("\143\x61\142\x6c\x65")->whereUser_id($user->id)->count(); if ($count2 > 0) { $data["\x6c\x6f\147"] = Bill::whereNetwork($code)->whereAirtime_type("\x63\x61\142\154\145")->whereUser_id($user->id)->paginate(30); return view($this->activeTemplate . "\x75\163\145\162\x2e\x6d\x65\x72\143\x68\141\156\164\x2e\164\166\x2d\x6c\x6f\x67", $data); } } if ($track == "\107\x4f\124\x56") { $code = 2; $count2 = Bill::whereNetwork($code)->whereAirtime_type("\x63\141\x62\154\x65")->whereUser_id($user->id)->count(); if ($count2 > 0) { $data["\154\157\147"] = Bill::whereNetwork($code)->whereAirtime_type("\143\x61\x62\154\145")->whereUser_id($user->id)->paginate(30); return view($this->activeTemplate . "\165\x73\145\162\56\x6d\145\162\143\x68\141\156\x74\x2e\x74\166\55\154\157\147", $data); } } if ($track == "\123\x54\101\122\x54\111\115\105\123") { $code = 3; $count2 = Bill::whereNetwork($code)->whereAirtime_type("\x63\x61\142\x6c\x65")->whereUser_id($user->id)->count(); if ($count2 > 0) { $data["\x6c\x6f\x67"] = Bill::whereNetwork($code)->whereAirtime_type("\143\x61\142\x6c\x65")->whereUser_id($user->id)->paginate(30); return view($this->activeTemplate . "\165\163\x65\162\x2e\x6d\x65\x72\x63\150\141\156\164\56\164\x76\55\x6c\x6f\147", $data); } } if ($track == "\x64\x73\164\166") { $code = 1; $count2 = Bill::whereNetwork($code)->whereAirtime_type("\143\x61\142\x6c\x65")->whereUser_id($user->id)->count(); if ($count2 > 0) { $data["\x6c\157\x67"] = Bill::whereNetwork($code)->whereAirtime_type("\x63\141\x62\x6c\145")->whereUser_id($user->id)->paginate(30); return view($this->activeTemplate . "\165\x73\x65\162\56\x6d\x65\x72\143\150\x61\x6e\x74\56\x74\x76\x2d\154\157\147", $data); } } if ($track == "\x67\157\x74\x76") { $code = 2; $count2 = Bill::whereNetwork($code)->whereAirtime_type("\x63\x61\142\x6c\145")->whereUser_id($user->id)->count(); if ($count2 > 0) { $data["\x6c\157\x67"] = Bill::whereNetwork($code)->whereAirtime_type("\x63\x61\x62\x6c\x65")->whereUser_id($user->id)->paginate(30); return view($this->activeTemplate . "\165\163\x65\162\56\x6d\x65\x72\x63\x68\141\156\164\56\x74\166\55\x6c\x6f\147", $data); } } if ($track == "\163\164\x61\x72\164\x69\x6d\x65\163") { $code = 3; $count2 = Bill::whereNetwork($code)->whereAirtime_type("\143\x61\x62\x6c\145")->whereUser_id($user->id)->count(); if ($count2 > 0) { $data["\x6c\x6f\147"] = Bill::whereNetwork($code)->whereAirtime_type("\143\141\142\154\145")->whereUser_id($user->id)->paginate(30); return view($this->activeTemplate . "\x75\x73\145\x72\x2e\155\145\x72\143\x68\x61\x6e\x74\x2e\x74\x76\x2d\x6c\157\x67", $data); } } $count1 = Bill::whereTrx($track)->whereAirtime_type(4)->whereUser_id($user->id)->count(); if ($count1 > 0) { $data["\x6c\157\147"] = Bill::whereTrx($track)->whereAirtime_type("\143\141\142\x6c\145")->whereUser_id($user->id)->paginate(30); return view($this->activeTemplate . "\165\x73\145\x72\x2e\x6d\145\162\143\x68\x61\x6e\x74\56\164\x76\55\x6c\157\x67", $data); } $count3 = Bill::whereTrx($track)->whereAirtime_type("\143\141\142\154\x65")->whereUser_id($user->id)->count(); if ($count3 > 0) { $data["\x6c\x6f\147"] = Bill::whereTrx($track)->whereAirtime_type("\x63\x61\x62\x6c\145")->whereUser_id($user->id)->paginate(30); return view($this->activeTemplate . "\x75\x73\x65\x72\56\155\x65\162\x63\150\141\x6e\x74\x2e\x74\x76\55\154\x6f\147", $data); } return back()->with("\x61\154\145\162\x74", "\124\150\145\162\145\40\x69\x73\40\x6e\157\40\x74\162\x61\156\x73\x61\143\x74\x69\x6f\x6e\x20\x77\151\x74\150\x20\x74\150\x69\x73\x20\x65\156\164\162\171\x20\x2e"); } public function powersearch(Request $request) : RedirectResponse { $request->validate(array("\164\162\170" => "\162\145\161\x75\151\162\145\x64")); Session::put("\x54\162\x61\143\x6b", $request->trx); return redirect()->route($this->activeTemplate . "\x70\157\x77\145\x72\x73\x65\x61\162\143\150\x67\145\x74"); } public function powersearchget() { $user = User::find(Auth::user()->id); $data["\160\141\x67\x65\137\164\x69\x74\154\x65"] = "\x45\154\145\x63\164\162\x69\143\x69\164\x79\x20\x42\151\154\154\163"; $track = Session::get("\x54\162\141\143\153"); if ($track == "\x45\113\105\x44\x43") { $code = 1; $count2 = Bill::whereNetwork($code)->whereAirtime_type("\x70\x6f\167\145\x72")->whereUser_id($user->id)->count(); if ($count2 > 0) { $data["\x6c\157\x67"] = Bill::whereNetwork($code)->whereAirtime_type("\x70\157\x77\x65\x72")->whereUser_id($user->id)->paginate(30); return view($this->activeTemplate . "\165\x73\x65\162\x2e\155\x65\x72\x63\150\x61\156\164\56\160\x6f\167\145\162\55\x6c\x6f\x67", $data); } } if ($track == "\111\x4b\x45\104\x43") { $code = 2; $count2 = Bill::whereNetwork($code)->whereAirtime_type("\160\x6f\167\145\162")->whereUser_id($user->id)->count(); if ($count2 > 0) { $data["\154\157\x67"] = Bill::whereNetwork($code)->whereAirtime_type("\x70\x6f\167\145\162")->whereUser_id($user->id)->paginate(30); return view($this->activeTemplate . "\165\163\145\x72\x2e\155\145\162\143\x68\141\x6e\164\x2e\x70\x6f\167\145\162\x2d\154\157\147", $data); } } if ($track == "\x4b\x45\x44\103\x4f") { $code = 4; $count2 = Bill::whereNetwork($code)->whereAirtime_type("\x70\x6f\167\145\x72")->whereUser_id($user->id)->count(); if ($count2 > 0) { $data["\x6c\157\x67"] = Bill::whereNetwork($code)->whereAirtime_type("\x70\157\x77\x65\162")->whereUser_id($user->id)->paginate(30); return view($this->activeTemplate . "\165\163\145\162\x2e\155\x65\x72\143\150\x61\156\164\x2e\160\x6f\x77\145\162\55\x6c\x6f\x67", $data); } } if ($track == "\x50\x48\x45\104\103") { $code = 5; $count2 = Bill::whereNetwork($code)->whereAirtime_type("\x70\157\x77\145\162")->whereUser_id($user->id)->count(); if ($count2 > 0) { $data["\154\x6f\147"] = Bill::whereNetwork($code)->whereAirtime_type("\160\157\x77\145\x72")->whereUser_id($user->id)->paginate(30); return view($this->activeTemplate . "\165\x73\145\162\56\x6d\x65\162\143\150\141\x6e\x74\56\x70\x6f\167\x65\162\55\154\x6f\x67", $data); } } if ($track == "\112\105\x44") { $code = 6; $count2 = Bill::whereNetwork($code)->whereAirtime_type("\160\x6f\167\x65\x72")->whereUser_id($user->id)->count(); if ($count2 > 0) { $data["\x6c\157\147"] = Bill::whereNetwork($code)->whereAirtime_type("\160\x6f\x77\x65\x72")->whereUser_id($user->id)->paginate(30); return view($this->activeTemplate . "\x75\x73\145\x72\x2e\x6d\145\162\143\150\141\x6e\164\56\160\x6f\167\145\162\55\154\x6f\147", $data); } } if ($track == "\x41\x45\104\103") { $code = 3; $count2 = Bill::whereNetwork($code)->whereAirtime_type("\x70\x6f\x77\145\162")->whereUser_id($user->id)->count(); if ($count2 > 0) { $data["\154\x6f\x67"] = Bill::whereNetwork($code)->whereAirtime_type("\x70\x6f\167\x65\162")->whereUser_id($user->id)->paginate(30); return view($this->activeTemplate . "\165\x73\145\x72\x2e\x6d\145\x72\x63\150\141\156\164\56\x70\157\167\x65\162\x2d\154\x6f\x67", $data); } } if ($track == "\111\102\105\x44\x43") { $code = 7; $count2 = Bill::whereNetwork($code)->whereAirtime_type("\160\x6f\x77\x65\162")->whereUser_id($user->id)->count(); if ($count2 > 0) { $data["\x6c\157\147"] = Bill::whereNetwork($code)->whereAirtime_type("\x70\157\x77\x65\162")->whereUser_id($user->id)->paginate(30); return view($this->activeTemplate . "\165\x73\x65\x72\56\x6d\145\x72\143\150\x61\156\x74\56\x70\x6f\x77\145\162\55\154\157\x67", $data); } } if ($track == "\105\105\104\103") { $code = "\x30\x38"; $count2 = Bill::whereNetwork($code)->whereAirtime_type("\x70\x6f\x77\145\x72")->whereUser_id($user->id)->count(); if ($count2 > 0) { $data["\x6c\x6f\x67"] = Bill::whereNetwork($code)->whereAirtime_type("\160\x6f\167\145\162")->whereUser_id($user->id)->paginate(30); return view($this->activeTemplate . "\165\x73\x65\162\x2e\155\145\162\x63\x68\141\x6e\x74\56\160\157\x77\145\162\55\154\157\x67", $data); } } $count1 = Bill::whereTrx($track)->whereAirtime_type("\x70\157\167\145\x72")->whereUser_id($user->id)->count(); if ($count1 > 0) { $data["\154\x6f\147"] = Bill::whereTrx($track)->whereAirtime_type("\x70\157\x77\145\x72")->whereUser_id($user->id)->paginate(30); return view($this->activeTemplate . "\x75\x73\x65\x72\x2e\155\145\162\143\150\x61\156\x74\56\160\x6f\x77\145\x72\55\154\x6f\147", $data); } $count3 = Bill::whereTrx($track)->whereAirtime_type("\x70\x6f\x77\145\x72")->whereUser_id($user->id)->count(); if ($count3 > 0) { $data["\x6c\157\x67"] = Bill::whereTrx($track)->whereAirtime_type("\160\157\167\x65\162")->whereUser_id($user->id)->paginate(30); return view($this->activeTemplate . "\165\x73\x65\162\x2e\155\x65\162\143\x68\x61\156\164\x2e\x70\157\167\145\162\x2d\154\x6f\147", $data); } return back()->with("\141\154\x65\x72\x74", "\124\x68\x65\162\145\x20\151\163\x20\116\x6f\x20\x54\162\141\156\x73\141\x63\x74\x69\x6f\x6e\x20\127\x69\x74\150\x20\164\x68\151\x73\x20\x45\156\x74\162\171\40\x2e"); } public function developerapi() { $user = User::find(Auth::user()->id); $data["\160\141\x67\x65\x5f\x74\151\x74\x6c\145"] = "\104\145\166\x65\x6c\157\160\145\x72\x20\x41\x70\x69"; if ($user->developer > 0) { return view($this->activeTemplate . "\165\x73\x65\x72\x2e\144\145\x76\145\x6c\x6f\160\x65\x72\56\151\x6e\144\x65\x78", $data); } $notify[] = array("\145\162\162\x6f\x72", "\x59\157\x75\x20\104\x6f\156\x74\40\110\x61\x76\x65\40\x44\145\x76\145\154\157\x70\x65\x72\40\101\x50\111\40\x50\x65\x72\155\x69\163\x73\151\157\x6e\40\x59\x65\x74\x2e\x20\120\x6c\x65\141\x73\145\x20\x43\157\x6e\164\x61\x63\x74\x20\101\x64\x6d\151\x6e\40\x46\x6f\162\40\x50\145\x72\x6d\151\163\x73\x69\157\x6e"); return back()->withNotify($notify); } public function developerapiairtime() { $user = User::find(Auth::user()->id); $data["\x70\x61\x67\x65\x5f\164\x69\164\x6c\x65"] = "\x41\160\x69\40\101\x69\162\164\151\155\x65"; if ($user->developer > 0) { return view($this->activeTemplate . "\x75\163\x65\x72\56\144\x65\x76\145\x6c\157\x70\x65\x72\56\x61\x69\x72\x74\x69\x6d\145", $data); } $notify[] = array("\x65\x72\162\157\162", "\131\x6f\165\40\x44\157\x6e\164\x20\110\x61\x76\x65\40\x44\145\166\145\154\x6f\160\x65\162\40\x41\120\111\40\x50\x65\x72\155\151\163\163\x69\x6f\x6e\40\x59\x65\164\56\40\120\154\145\141\163\145\x20\x43\x6f\156\x74\141\x63\x74\x20\101\144\155\151\x6e\x20\x46\x6f\162\40\120\145\162\155\151\x73\x73\151\x6f\x6e"); return back()->withNotify($notify); } public function developerapidata() { $user = User::find(Auth::user()->id); $data["\x70\x61\147\145\x5f\164\x69\164\x6c\x65"] = "\101\x70\x69\x20\x49\x6e\x74\145\x72\156\145\164\x20\x44\x61\164\x61"; if ($user->developer > 0) { $data["\x62\x75\156\x64\154\x65"] = Internetbundle::whereStatus(1)->get(); return view($this->activeTemplate . "\x75\163\x65\x72\56\x64\x65\166\x65\x6c\157\160\x65\x72\56\x64\x61\x74\x61", $data); } $notify[] = array("\x65\162\x72\157\x72", "\x59\x6f\165\40\x44\157\x6e\x74\x20\110\141\x76\145\x20\104\x65\166\x65\154\157\160\145\162\40\x41\x50\x49\40\120\145\162\x6d\x69\163\163\151\157\156\40\131\145\164\56\x20\x50\x6c\x65\141\x73\x65\40\103\x6f\x6e\x74\141\143\164\x20\101\x64\155\151\x6e\40\106\157\x72\x20\120\145\x72\155\x69\163\163\151\157\156"); return back()->withNotify($notify); } public function developerapidata2() { $user = User::find(Auth::user()->id); $data["\160\x61\147\x65\x5f\x74\x69\164\x6c\x65"] = "\x41\x70\151\40\111\x6e\164\x65\x72\x6e\145\164\x20\104\x61\x74\141\x32"; if ($user->developer > 0) { $data["\142\x75\x6e\144\x6c\x65"] = Internetbundle2::whereStatus(1)->get(); return view($this->activeTemplate . "\x75\163\145\162\x2e\x64\145\166\145\x6c\157\160\x65\162\x2e\144\141\164\x61\62", $data); } $notify[] = array("\x65\x72\x72\157\162", "\x59\x6f\165\x20\104\x6f\156\164\x20\110\x61\x76\x65\x20\104\x65\x76\145\154\x6f\160\145\162\40\101\x50\x49\40\x50\145\162\x6d\151\x73\163\x69\x6f\156\x20\131\x65\x74\x2e\40\120\154\145\141\163\x65\x20\x43\157\156\x74\141\x63\x74\40\101\144\x6d\x69\x6e\x20\x46\157\x72\x20\120\145\x72\x6d\x69\x73\x73\x69\x6f\x6e"); return back()->withNotify($notify); } public function developerapicabletv() { $user = User::find(Auth::user()->id); $data["\x70\141\147\x65\x5f\x74\x69\164\x6c\145"] = "\x41\x70\151\x20\x43\x61\x62\x6c\145\40\124\x56"; if ($user->developer > 0) { $data["\x62\165\156\x64\154\x65"] = Decodersub::whereStatus(1)->get(); return view($this->activeTemplate . "\165\163\145\x72\56\x64\x65\x76\x65\154\157\160\145\x72\x2e\143\141\142\154\x65\x74\x76", $data); } $notify[] = array("\x65\x72\x72\x6f\x72", "\131\157\x75\40\x44\x6f\156\164\40\110\x61\x76\x65\x20\x44\x65\x76\145\x6c\157\x70\145\162\40\101\120\111\x20\120\x65\x72\x6d\x69\x73\163\151\157\156\40\x59\x65\164\56\x20\120\x6c\145\x61\x73\x65\40\103\x6f\156\164\141\x63\164\x20\x41\x64\155\151\156\40\106\157\x72\40\120\145\162\x6d\151\x73\x73\x69\x6f\x6e"); return back()->withNotify($notify); } public function developerapipower() { $user = User::find(Auth::user()->id); $data["\160\x61\147\x65\x5f\x74\x69\164\x6c\x65"] = "\x41\160\x69\x20\120\157\x77\145\162"; if ($user->developer > 0) { return view($this->activeTemplate . "\56\x75\163\145\162\56\x64\145\x76\145\154\157\160\145\162\56\160\x6f\x77\x65\162", $data); } $notify[] = array("\x65\x72\162\157\162", "\x59\157\x75\x20\104\157\x6e\164\x20\110\141\166\x65\40\104\x65\166\145\154\x6f\160\x65\x72\x20\x41\x50\111\40\120\x65\162\x6d\151\x73\x73\x69\157\156\40\x59\x65\x74\56\40\x50\x6c\x65\141\x73\145\x20\103\157\156\164\141\x63\x74\40\x41\144\x6d\x69\x6e\x20\x46\x6f\162\40\120\145\162\x6d\x69\163\163\x69\157\x6e"); return back()->withNotify($notify); } }

Function Calls

None

Variables

None

Stats

MD5 322eb23f369584cb663f248711ec2f96
Eval Count 0
Decode Time 154 ms