!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/vendor/mercadopago/dx-php/src/MercadoPago/Entities/   drwxr-xr-x
Free 13.03 GB of 57.97 GB (22.48%)
Home    Back    Forward    UPDIR    Refresh    Search    Buffer    Encoder    Tools    Proc.    FTP brute    Sec.    SQL    PHP-code    Update    Self remove    Logout    


Viewing file:     OAuth.php (2.6 KB)      -rw-r--r--
Select action/file-type:
(+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
/**
 * OAuth class file
 */
namespace MercadoPago;
use 
MercadoPago\Annotation\RestMethod;
use 
MercadoPago\Annotation\Attribute

/**
 * OAuth class
 * @RestMethod(resource="/oauth/token", method="create")
 */

class OAuth extends Entity
{
   
/**
     * client_secret
     * @Attribute()
     * @var string
     */
    
protected $client_secret;

    
/**
     * grant_type
     * @Attribute()
     * @var string
     */
    
protected $grant_type;

    
/**
     * code
     * @Attribute()
     * @var string
     */
    
protected $code;

    
/**
     * redirect_uri
     * @Attribute()
     * @var string
     */
    
protected $redirect_uri;

    
/**
     * access_token
     * @Attribute()
     * @var string
     */
    
protected $access_token;

    
/**
     * public_key
     * @Attribute()
     * @var string
     */
    
protected $public_key;

    
/**
     * refresh_token
     * @Attribute()
     * @var string
     */
    
protected $refresh_token;

    
/**
     * live_mode
     * @Attribute()
     * @var boolean
     */
    
protected $live_mode;

    
/**
     * user_id
     * @Attribute()
     * @var int
     */
    
protected $user_id;

    
/**
     * token_type
     * @Attribute()
     * @var string
     */
    
protected $token_type;

    
/**
     * expires_in
     * @Attribute()
     * @var int
     */
    
protected $expires_in;

    
/**
     * scope
     * @Attribute()
     * @var string
     */
    
protected $scope;


    
/**
     * getAuthorizationURL
     * @param $app_id
     * @param $redirect_uri
     * @return string
     */
    
public function getAuthorizationURL($app_id$redirect_uri){
        
$county_id strtolower(SDK::getCountryId());
        return 
"https://auth.mercadopago.com.${county_id}/authorization?client_id=${app_id}&response_type=code&platform_id=mp&redirect_uri=${redirect_uri}";
    }


    
/**
     * getOAuthCredentials
     * @param $authorization_code
     * @param $redirect_uri
     * @return bool|mixed
     * @throws \Exception
     */
    
public function getOAuthCredentials($authorization_code$redirect_uri){
      
$this->client_secret SDK::getAccessToken();
      
$this->grant_type 'authorization_code';
      
$this->code $authorization_code;
      
$this->redirect_uri $redirect_uri;

      return 
$this->save();
    }


    
/**
     * refreshOAuthCredentials
     * @param $refresh_token
     * @return bool|mixed
     * @throws \Exception
     */
    
public function refreshOAuthCredentials($refresh_token){
      
$this->client_secret SDK::getAccessToken();
      
$this->grant_type 'refresh_token';
      
$this->refresh_token $refresh_token;

      return 
$this->save();
    }
}

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