403Webshell
Server IP : 104.21.21.239  /  Your IP : 216.73.216.68
Web Server : Apache/2.4.68 (Amazon Linux) OpenSSL/3.5.5
System : Linux ip-172-31-69-123.ec2.internal 6.1.176-223.369.amzn2023.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Jul 24 13:34:27 UTC 2026 x86_64
User : ec2-user ( 1000)
PHP Version : 8.4.23
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /home/tgnewdev/admin/vendor/anet_php_sdk/lib/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/tgnewdev/admin/vendor/anet_php_sdk/lib/AuthorizeNetSOAP.php
<?php
/**
 * A simple wrapper for the SOAP API as well as a helper function
 * to generate a documentation file from the WSDL.
 *
 * @package    AuthorizeNet
 * @subpackage AuthorizeNetSoap
 */

/**
 * A simple wrapper for the SOAP API as well as a helper function
 * to generate a documentation file from the WSDL.
 *
 * @package    AuthorizeNet
 * @subpackage AuthorizeNetSoap
 * @todo       Make the doc file a usable class.
 */
class AuthorizeNetSOAP extends SoapClient
{
    const WSDL_URL = "https://api.authorize.net/soap/v1/Service.asmx?WSDL";
    const LIVE_URL = "https://api.authorize.net/soap/v1/Service.asmx";
    const SANDBOX_URL = "https://apitest.authorize.net/soap/v1/Service.asmx";
    
    public $sandbox;
    
    /**
     * Constructor
     */
    public function __construct()
    {
        parent::__construct(self::WSDL_URL);
        $this->__setLocation(self::SANDBOX_URL);
    }
    
    /**
     * Switch between the sandbox or production gateway.
     *
     * @param bool
     */
    public function setSandbox($bool)
    {
        $this->__setLocation(($bool ? self::SANDBOX_URL : self::LIVE_URL));
    }

    /**
     * Get all types as PHP Code.
     * @return string
     */
    public function getSoapTypes()
    {
        $string = "";
        $types = $this->__getTypes();
        foreach ($types as $type) {
            if (preg_match("/struct /",$type)) {
                $type = preg_replace("/struct /","class ",$type);
                $type = preg_replace("/ (\w+) (\w+);/","    // $1\n    public \$$2;",$type);
                $string .= $type ."\n";
            }
        }
        return $string;
    }
    
    /**
     * Get all methods as PHP Code.
     * @return string
     */
    public function getSoapMethods()
    {
        $string = "";
        $functions = array();
        $methods = $this->__getFunctions();
        foreach ($methods as $index => $method) {
            $sig = explode(" ", $method, 2);
            if (!isset($functions[$sig[1]])) {
                $string .= "    /**\n     * @return {$sig[0]}\n    */\n    public function {$sig[1]} {}\n\n";
                $functions[$sig[1]] = true;
            }
        }
        return $string;
    }
    
    /**
     * Create a file from the WSDL for reference.
     */
    public function saveSoapDocumentation($path)
    {
        $string =  "<?php\n";
        $string .= "/**\n";
        $string .= " * Auto generated documentation for the AuthorizeNetSOAP API.\n";
        $string .= " * Generated " . date("m/d/Y") . "\n";
        $string .= " */\n";
        $string .= "class AuthorizeNetSOAP\n";
        $string .= "{\n" . $this->getSoapMethods() . "\n}\n\n" . $this->getSoapTypes() ."\n\n ?>";
        return file_put_contents($path, $string);
    }
    
    
    
}

Youez - 2016 - github.com/yon3zu
LinuXploit