I am a hacker in the dark of a very cold night
path :/var/www/html/vorne.webheaydemo.com
upload file:
List of files:
| name file |
size |
edit |
permission |
action |
| .editorconfig | 276 KB | March 05 2024 07:12:34 | 0666 |
|
| .env | 1385 KB | May 24 2024 16:43:55 | 0666 |
|
| .env.example | 1088 KB | March 05 2024 07:12:34 | 0666 |
|
| .gitattributes | 190 KB | March 05 2024 07:12:34 | 0666 |
|
| .gitignore | 245 KB | March 05 2024 07:12:34 | 0666 |
|
| .htaccess | 947 KB | July 04 2023 21:25:08 | 0664 |
|
| .rnd | 1024 KB | March 13 2024 04:51:14 | 0666 |
|
| README.md | 472 KB | March 22 2024 10:35:00 | 0666 |
|
| app | - | March 05 2024 07:12:34 | 0777 |
|
| artisan | 1739 KB | March 05 2024 07:12:34 | 0666 |
|
| bootstrap | - | March 05 2024 07:12:34 | 0777 |
|
| composer.json | 2829 KB | May 13 2024 12:10:04 | 0666 |
|
| composer.lock | 417205 KB | March 19 2024 12:13:14 | 0666 |
|
| config | - | July 03 2025 02:53:36 | 0777 |
|
| database | - | March 05 2024 07:12:34 | 0777 |
|
| index.php | 1816 KB | May 13 2024 10:32:36 | 0666 |
|
| lang | - | May 13 2024 14:53:26 | 0777 |
|
| manifest.json | 913 KB | May 14 2024 03:57:26 | 0664 |
|
| package.json | 398 KB | March 05 2024 07:12:34 | 0666 |
|
| phpunit.xml | 1206 KB | March 05 2024 07:12:34 | 0666 |
|
| public | - | July 03 2025 02:37:20 | 0777 |
|
| resources | - | May 13 2024 12:09:36 | 0777 |
|
| routes | - | March 05 2024 07:12:34 | 0777 |
|
| service-worker.js | 924 KB | March 05 2024 07:12:34 | 0666 |
|
| storage | - | March 05 2024 10:03:52 | 0777 |
|
| symlink.php | 218 KB | March 05 2024 07:12:34 | 0666 |
|
| tests | - | March 05 2024 07:12:34 | 0777 |
|
| vendor | - | March 19 2024 12:13:14 | 0777 |
|
| vite.config.js | 326 KB | March 05 2024 07:12:34 | 0666 |
|
get();
$user_currencies = Currency::whereIn('id',$user_wallets->pluck('currency_id')->toArray())->get();
$payment_gateways_currencies = PaymentGatewayCurrency::whereHas('gateway', function ($gateway) {
$gateway->where('slug', PaymentGatewayConst::add_money_slug());
$gateway->where('status', 1);
})->get();
$transactions = Transaction::auth()->addMoney()->latest('id')->take(3)->get();
return view('user.sections.add-money.index',compact(
"page_title",
"transactions",
"payment_gateways_currencies"
));
}
/**
* This method for submit add money form
* @method POST
* @param Illuminate\Http\Request $request
* @return Illuminate\Http\Request
*/
public function submit(Request $request) {
$request->merge(['payment_type' => PaymentGatewayConst::TYPEADDMONEY]);
try{
$instance = PaymentGatewayHelper::init($request->all())->type(PaymentGatewayConst::TYPEADDMONEY)->gateway()->render();
}catch(Exception $e) {
return back()->with(['error' => [$e->getMessage()]]);
}
return $instance;
}
/**
* This method for success alert of PayPal
* @method POST
* @param Illuminate\Http\Request $request
* @return Illuminate\Http\Request
*/
public function success(Request $request, $gateway){
$requestData = $request->all();
$token = $requestData['token'] ?? "";
$checkTempData = TemporaryData::where("type",$gateway)->where("identifier",$token)->first();
if(!$checkTempData) return redirect()->route('user.add.money.index')->with(['error' => ['Transaction failed. Record didn\'t saved properly. Please try again']]);
$checkTempData = $checkTempData->toArray();
try{
PaymentGatewayHelper::init($checkTempData)->type(PaymentGatewayConst::TYPEADDMONEY)->responseReceive();
}catch(Exception $e) {
return back()->with(['error' => [$e->getMessage()]]);
}
return redirect()->route("user.add.money.index")->with(['success' => [__('Successfully added money')]]);
}
/**
* This method for cancel alert of PayPal
* @method POST
* @param Illuminate\Http\Request $request
* @return Illuminate\Http\Request
*/
public function cancel(Request $request, $gateway) {
$token = session()->get('identifier');
if( $token){
TemporaryData::where("identifier",$token)->delete();
}
return redirect()->route('user.add.money.index');
}
public function callback(Request $request,$gateway){
$callback_token = $request->get('token');
$callback_data = $request->all();
try{
PaymentGatewayHelper::init([])->type(PaymentGatewayConst::TYPEADDMONEY)->handleCallback($callback_token,$callback_data,$gateway);
}catch(Exception $e) {
logger($e);
}
}
/**
* This method for stripe payment
* @method GET
* @param $gateway
*/
public function payment($gateway){
$page_title = __('Stripe Payment');
$tempData = Session::get('identifier');
$hasData = TemporaryData::where('identifier', $tempData)->where('type',$gateway)->first();
if(!$hasData){
return redirect()->route('user.add.money.index');
}
return view('user.sections.add-money.automatic.'.$gateway,compact("page_title","hasData"));
}
/**
* This method for manual payment
* @method GET
*/
public function manualPayment(){
$tempData = Session::get('identifier');
$hasData = TemporaryData::where('identifier', $tempData)->first();
$gateway = PaymentGateway::manual()->where('slug',PaymentGatewayConst::add_money_slug())->where('id',$hasData->data->gateway)->first();
$page_title = __('Manual Payment').' ( '.$gateway->name.' )';
if(!$hasData){
return redirect()->route('user.add.money.index');
}
return view('user.sections.add-money.manual.payment_confirmation',compact("page_title","hasData",'gateway'));
}
public function flutterwaveCallback()
{
$status = request()->status;
//if payment is successful
if ($status == 'successful') {
$transactionID = Flutterwave::getTransactionIDFromCallback();
$data = Flutterwave::verifyTransaction($transactionID);
$requestData = request()->tx_ref;
$token = $requestData;
$checkTempData = TemporaryData::where("type",'flutterwave')->where("identifier",$token)->first();
if(!$checkTempData) return redirect()->route('user.add.money.index')->with(['error' => [__('Transaction failed. Record didn\'t saved properly. Please try again')]]);
$checkTempData = $checkTempData->toArray();
try{
PaymentGatewayHelper::init($checkTempData)->type(PaymentGatewayConst::TYPEADDMONEY)->responseReceive('flutterWave');
}catch(Exception $e) {
return back()->with(['error' => [$e->getMessage()]]);
}
return redirect()->route("user.add.money.index")->with(['success' => [__('Successfully added money')]]);
}
elseif ($status == 'cancelled'){
return redirect()->route('user.add.money.index')->with(['error' => [__('Add money cancelled')]]);
}
else{
return redirect()->route('user.add.money.index')->with(['error' => [__('Transaction failed')]]);
}
}
// Razor Pay
// public function razorPayment($trx_id){
// $identifier = $trx_id;
// $output = TemporaryData::where('identifier', $identifier)->first();
// if(!$output){
// return redirect()->route('user.add.money.index')->with(['error' => [__("Transaction failed")]]);
// }
// $data = $output->data->response;
// $orderId = $output->data->response->order_id;
// $page_title = __('RazorPay Payment');
// return view('user.sections.add-money.automatic.razor', compact('page_title','output','data','orderId'));
// }
public function redirectBtnPay(Request $request, $gateway)
{
try{
return PaymentGatewayHelper::init([])->handleBtnPay($gateway, $request->all());
}catch(Exception $e) {
return redirect()->route('index')->with(['error' => [$e->getMessage()]]);
}
}
public function razorSuccess(Request $request, $gateway){
try{
$token = PaymentGatewayHelper::getToken($request->all(),$gateway);
$temp_data = TemporaryData::where("identifier",$token)->first();
if(Transaction::where('callback_ref', $token)->exists()) {
if(!$temp_data) return redirect()->route('index')->with(['success' => [__('Transaction request sended successfully')]]);
}else {
if(!$temp_data) return redirect()->route('index')->with(['error' => [__('Transaction failed. Record didn\'t saved properly. Please try again')]]);
}
$update_temp_data = json_decode(json_encode($temp_data->data),true);
$update_temp_data['callback_data'] = $request->all();
$temp_data->update([
'data' => $update_temp_data,
]);
$temp_data = $temp_data->toArray();
$instance = PaymentGatewayHelper::init($temp_data)->type(PaymentGatewayConst::TYPEADDMONEY)->responseReceive($temp_data['type']);
if($instance instanceof RedirectResponse) return $instance;
}catch(Exception $e) {
return back()->with(['error' => [$e->getMessage()]]);
}
return redirect()->route("index")->with(['success' => [__('Successfully donation')]]);
}
public function razorCancel(Request $request, $gateway) {
$token = PaymentGatewayHelper::getToken($request->all(),$gateway);
if($temp_data = TemporaryData::where("identifier",$token)->first()) {
$temp_data->delete();
}
return redirect()->route('campaign.details');
}
public function razorCallback()
{
$request_data = request()->all();
//if payment is successful
if (isset($request_data['razorpay_order_id'])) {
$token = $request_data['razorpay_order_id'];
$checkTempData = TemporaryData::where("type",PaymentGatewayConst::RAZORPAY)->where("identifier",$token)->first();
if(!$checkTempData) return redirect()->route('user.add.money.index')->with(['error' => [__("Transaction Failed. Record didn\'t saved properly. Please try again")]]);
$checkTempData = $checkTempData->toArray();
try{
PaymentGatewayHelper::init($checkTempData)->type(PaymentGatewayConst::TYPEADDMONEY)->responseReceive('razorpay');
}catch(Exception $e) {
return back()->with(['error' => [__('Something went wrong! Please try again')]]);
}
return redirect()->route("user.add.money.index")->with(['success' => [__("Successfully Added Money")]]);
}
else{
return redirect()->route('user.add.money.index')->with(['error' => [__("Transaction failed")]]);
}
}
//stripe success
public function stripePaymentSuccess($trx){
$token = $trx;
$checkTempData = TemporaryData::where("type",PaymentGatewayConst::STRIPE)->where("identifier",$token)->first();
if(!$checkTempData) return redirect()->route('user.add.money.index')->with(['error' => [__('Transaction Failed. Record didn\'t saved properly. Please try again')]]);
$checkTempData = $checkTempData->toArray();
try{
PaymentGatewayHelper::init($checkTempData)->type(PaymentGatewayConst::TYPEADDMONEY)->responseReceive('stripe');
}catch(Exception $e) {
return back()->with(['error' => ["Something Is Wrong..."]]);
}
return redirect()->route("user.add.money.index")->with(['success' => ['Successfully Added Money']]);
}
//sslcommerz success
public function sllCommerzSuccess(Request $request){
$data = $request->all();
$token = $data['tran_id'];
$checkTempData = TemporaryData::where("type",PaymentGatewayConst::SSLCOMMERZ)->where("identifier",$token)->first();
if(!$checkTempData) return redirect()->route('user.add.money.index')->with(['error' => [__('Transaction Failed. Record didn\'t saved properly. Please try again')]]);
$checkTempData = $checkTempData->toArray();
$creator_id = $checkTempData['data']->creator_id ?? null;
$creator_guard = $checkTempData['data']->creator_guard ?? null;
$user = Auth::guard($creator_guard)->loginUsingId($creator_id);
if( $data['status'] != "VALID"){
return redirect()->route("user.add.money.index")->with(['error' => [__('Added Money Failed')]]);
}
try{
PaymentGatewayHelper::init($checkTempData)->type(PaymentGatewayConst::TYPEADDMONEY)->responseReceive('sslcommerz');
}catch(Exception $e) {
return back()->with(['error' => [__("Something Is Wrong")]]);
}
return redirect()->route("user.add.money.index")->with(['success' => [__('Successfully Added Money')]]);
}
//sslCommerz fails
public function sllCommerzFails(Request $request){
$data = $request->all();
$token = $data['tran_id'];
$checkTempData = TemporaryData::where("type",PaymentGatewayConst::SSLCOMMERZ)->where("identifier",$token)->first();
if(!$checkTempData) return redirect()->route('user.add.money.index')->with(['error' => ['Transaction Failed. Record didn\'t saved properly. Please try again.']]);
$checkTempData = $checkTempData->toArray();
$creator_id = $checkTempData['data']->creator_id ?? null;
$creator_guard = $checkTempData['data']->creator_guard ?? null;
$user = Auth::guard($creator_guard)->loginUsingId($creator_id);
if( $data['status'] == "FAILED"){
TemporaryData::destroy($checkTempData['id']);
return redirect()->route("user.add.money.index")->with(['error' => [__('Added Money Failed')]]);
}
}
//sslCommerz canceled
public function sllCommerzCancel(Request $request){
$data = $request->all();
$token = $data['tran_id'];
$checkTempData = TemporaryData::where("type",PaymentGatewayConst::SSLCOMMERZ)->where("identifier",$token)->first();
if(!$checkTempData) return redirect()->route('user.add.money.index')->with(['error' => [__('Transaction Failed. Record didn\'t saved properly. Please try again')]]);
$checkTempData = $checkTempData->toArray();
$creator_id = $checkTempData['data']->creator_id ?? null;
$creator_guard = $checkTempData['data']->creator_guard ?? null;
$user = Auth::guard($creator_guard)->loginUsingId($creator_id);
if( $data['status'] != "VALID"){
TemporaryData::destroy($checkTempData['id']);
return redirect()->route("user.add.money.index")->with(['error' => [__('Added Money Canceled')]]);
}
}
// Qrpay Call Back
public function qrpayCallback(Request $request)
{
if ($request->type == 'success') {
$requestData = $request->all();
$checkTempData = TemporaryData::where("type", 'qrpay')->where("identifier", $requestData['data']['custom'])->first();
if (!$checkTempData) return redirect()->route('user.add.money.index')->with(['error' => [__('Transaction failed. Record didn\'t saved properly. Please try again')]]);
$checkTempData = $checkTempData->toArray();
try {
PaymentGatewayHelper::init($checkTempData)->type(PaymentGatewayConst::TYPEADDMONEY)->responseReceive('qrpay');
} catch (Exception $e) {
return back()->with(['error' => [$e->getMessage()]]);
}
return redirect()->route("user.add.money.index")->with(['success' => [__('Successfully added money')]]);
} else {
return redirect()->route('user.add.money.index')->with(['error' => [__('Transaction failed')]]);
}
}
// QrPay Cancel
public function qrpayCancel(Request $request, $trx_id)
{
TemporaryData::where("identifier", $trx_id)->delete();
return redirect()->route("user.add.money.index")->with(['error' => [__('Payment Canceled')]]);
}
public function cryptoPaymentAddress(Request $request, $trx_id) {
$page_title = "Crypto Payment Address";
$transaction = Transaction::where('trx_id', $trx_id)->first();
if($transaction->gateway_currency->gateway->isCrypto() && $transaction->details?->payment_info?->receiver_address ?? false) {
return view('user.sections.add-money.payment.crypto.address', compact(
'transaction',
'page_title',
));
}
return abort(404);
}
public function cryptoPaymentConfirm(Request $request, $trx_id)
{
$transaction = Transaction::where('trx_id',$trx_id)->where('status', PaymentGatewayConst::STATUSWAITING)->firstOrFail();
$dy_input_fields = $transaction->details->payment_info->requirements ?? [];
$validation_rules = $this->generateValidationRules($dy_input_fields);
$validated = [];
if(count($validation_rules) > 0) {
$validated = Validator::make($request->all(), $validation_rules)->validate();
}
if(!isset($validated['txn_hash'])) return back()->with(['error' => [__('Transaction hash is required for verify')]]);
$receiver_address = $transaction->details->payment_info->receiver_address ?? "";
// check hash is valid or not
$crypto_transaction = CryptoTransaction::where('txn_hash', $validated['txn_hash'])
->where('receiver_address', $receiver_address)
->where('asset',$transaction->gateway_currency->currency_code)
->where(function($query) {
return $query->where('transaction_type',"Native")
->orWhere('transaction_type', "native");
})
->where('status',PaymentGatewayConst::NOT_USED)
->first();
if(!$crypto_transaction) return back()->with(['error' => [__('Transaction hash is not valid! Please input a valid hash')]]);
if($crypto_transaction->amount >= $transaction->total_payable == false) {
if(!$crypto_transaction) return back()->with(['error' => [__('Insufficient amount added. Please contact with system administrator')]]);
}
DB::beginTransaction();
try{
// Update user wallet balance
DB::table($transaction->user_wallet->getTable())
->where('id',$transaction->user_wallet->id)
->increment('balance',$transaction->request_amount);
// update crypto transaction as used
DB::table($crypto_transaction->getTable())->where('id', $crypto_transaction->id)->update([
'status' => PaymentGatewayConst::USED,
]);
// update transaction status
$transaction_details = json_decode(json_encode($transaction->details), true);
$transaction_details['payment_info']['txn_hash'] = $validated['txn_hash'];
DB::table($transaction->getTable())->where('id', $transaction->id)->update([
'details' => json_encode($transaction_details),
'status' => PaymentGatewayConst::STATUSSUCCESS,
]);
DB::commit();
}catch(Exception $e) {
DB::rollback();
return back()->with(['error' => [__('Something went wrong! Please try again')]]);
}
return back()->with(['success' => [__('Payment Confirmation Success')]]);
}
//coingate response start
public function coinGateSuccess(Request $request, $gateway){
try{
$token = $request->token;
$checkTempData = TemporaryData::where("type",PaymentGatewayConst::COINGATE)->where("identifier",$token)->first();
if(!$checkTempData) return redirect()->route('user.add.money.index')->with(['error' => [__('Transaction failed. Record didn\'t saved properly. Please try again')]]);
if(Transaction::where('callback_ref', $token)->exists()) {
if(!$checkTempData) return redirect()->route('user.add.money.index')->with(['success' => [__('Transaction request sended successfully')]]);
}else {
if(!$checkTempData) return redirect()->route('user.add.money.index')->with(['error' => [__('Transaction failed. Record didn\'t saved properly. Please try again')]]);
}
$update_temp_data = json_decode(json_encode($checkTempData->data),true);
$update_temp_data['callback_data'] = $request->all();
$checkTempData->update([
'data' => $update_temp_data,
]);
$temp_data = $checkTempData->toArray();
PaymentGatewayHelper::init($temp_data)->type(PaymentGatewayConst::TYPEADDMONEY)->responseReceive('coingate');
}catch(Exception $e) {
return redirect()->route("user.add.money.index")->with(['error' => [__('Something went wrong! Please try again')]]);
}
return redirect()->route("user.add.money.index")->with(['success' => [__('Successfully Added Money')]]);
}
public function coinGateCancel(Request $request, $gateway){
if($request->has('token')) {
$identifier = $request->token;
if($temp_data = TemporaryData::where('identifier', $identifier)->first()) {
$temp_data->delete();
}
}
return redirect()->route("user.add.money.index")->with(['error' => [__('Add money cancelled')]]);
}
// Perfect Money
public function redirectUsingHTMLForm(Request $request, $gateway)
{
$temp_data = TemporaryData::where('identifier', $request->token)->first();
if(!$temp_data || $temp_data->data->action_type != PaymentGatewayConst::REDIRECT_USING_HTML_FORM) return back()->with(['error' => ['Request token is invalid!']]);
$redirect_form_data = $temp_data->data->redirect_form_data;
$action_url = $temp_data->data->action_url;
$form_method = $temp_data->data->form_method;
return view('user.sections.add-money.automatic.redirect-form', compact('redirect_form_data', 'action_url', 'form_method'));
}
public function perfectSuccess(Request $request, $gateway){
try{
$token = PaymentGatewayHelper::getToken($request->all(),$gateway);
$temp_data = TemporaryData::where("type",PaymentGatewayConst::PERFECT_MONEY)->where("identifier",$token)->first();
if(Transaction::where('callback_ref', $token)->exists()) {
if(!$temp_data) return redirect()->route('campaign')->with(['success' => [__('Transaction request sended successfully')]]);
}else {
if(!$temp_data) return redirect()->route('campaign')->with(['error' => [__('Transaction failed. Record didn\'t saved properly. Please try again')]]);
}
$update_temp_data = json_decode(json_encode($temp_data->data),true);
$update_temp_data['callback_data'] = $request->all();
$temp_data->update([
'data' => $update_temp_data,
]);
$temp_data = $temp_data->toArray();
$instance = PaymentGatewayHelper::init($temp_data)->type(PaymentGatewayConst::TYPEADDMONEY)->responseReceive('perfect-money');
if($instance instanceof RedirectResponse) return $instance;
}catch(Exception $e) {
return back()->with(['error' => [$e->getMessage()]]);
}
return redirect()->route("campaign")->with(['success' => [__('Successfully Added Money')]]);
}
public function perfectCancel(Request $request, $gateway) {
if($request->has('token')) {
$identifier = $request->token;
if($temp_data = TemporaryData::where('identifier', $identifier)->first()) {
$temp_data->delete();
}
}
return redirect()->route("campaign")->with(['error' => [__('Added Money Canceled Successfully')]]);
}
public function perfectCallback(Request $request,$gateway) {
$callback_token = $request->get('token');
$callback_data = $request->all();
try{
PaymentGatewayHelper::init([])->type(PaymentGatewayConst::TYPEADDMONEY)->handleCallback($callback_token,$callback_data,$gateway);
}catch(Exception $e) {
// handle Error
logger($e);
}
}
}