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


Viewing file:     MobileData.php (3.33 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
namespace AfricasTalking\SDK;

class 
MobileData extends Service
{

    public function 
__call($method$args)
    {
        
// First check if method exists
        
if (method_exists($this'do' $method)) {
            
$func 'do' $method;
            if (!isset(
$args[0])) {
                
$args = [ => ''];
            }
            return 
$this->$func($args[0]);
        } else {
            return 
$this->error($method .' is an invalid Mobile Data SDK Method');
        }
    }

    protected function 
doSend($parameters$options = [])
    {
        
// Check if productName is set
        
if (!isset($parameters['productName'])) {
            return 
$this->error('productName must be defined');
        }
        
$productName $parameters['productName'];

        
// Check if recipients array is provided
        
if (!isset($parameters['recipients'])) {
            return 
$this->error('recipients must be an array containing phoneNumber, unit, quatity, validity and metadata');
        } else if (isset(
$parameters['recipients']) && is_array($parameters['recipients'])) {
            
$recipients $parameters['recipients'];
            
            foreach (
$recipients as $r) {
                if (!isset(
$r['phoneNumber']) || 
                    !isset(
$r['quantity']) || 
                    !isset(
$r['unit']) ||
                    !isset(
$r['validity']) ||
                    !isset(
$r['metadata'])) {

                    return 
$this->error('recipients must be an array containing phoneNumber, quantity, unit, validity and metadata');
                }

                if (isset(
$r['validity'])) {
                    if (!
in_array($r['validity'], ['Day''Month''Week'])) {
                        return 
$this->error('validity must be one of Day, Week, Month'); 
                    }
                }

                if (isset(
$r['unit'])) {
                    if (!
in_array($r['unit'], ['MB''GB'])) {
                        return 
$this->error('unit must be one of MB, GB'); 
                    }
                }
            }
        }

        
// Make request data array
        
$requestData = [
            
'username' => $this->username,
            
'productName' => $productName,
            
'recipients' => $recipients,
        ];

        
$requestOptions = [
            
'json' => $requestData,
        ];

        if(isset(
$options['idempotencyKey'])) {
            
$requestOptions['headers'] = [
                
'Idempotency-Key' => $options['idempotencyKey'],
            ];
        }

        
$response $this->client->post('mobile/data/request'$requestOptions);
        return 
$this->success($response);
    }

    protected function 
doFindTransaction($options)
    {
        if (!isset(
$options['transactionId'])) {
            return 
$this->error('transactionId must be defined');
        }

        
$requestData = [
            
'username' => $this->username,
            
'transactionId' => $options['transactionId']
        ];

        
$response $this->client->get('query/transaction/find', ['query' => $requestData]);
        return 
$this->success($response);
    }

    protected function 
doFetchWalletBalance()
    {
        
$requestData = [
            
'username' => $this->username
        
];

        
$response $this->client->get('query/wallet/balance', ['query' => $requestData]);
        return 
$this->success($response);
    }
}

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