示例#1
0
文件: mod_soap.php 项目: poef/ariadne
 public function __construct($endpoint, $wsdl = false, $portName = false, $proxy_params = array())
 {
     parent::SOAP_Client($endpoint, $wsdl, $portName, $proxy_params);
 }
示例#2
0
 /**
  * Construct a new CallerServices object.
  *
  * @param APIProfile $profile  The profile with the username, password,
  *                             and any other information necessary to use
  *                             the SDK.
  */
 function CallerServices($profile)
 {
     // Initialize the SOAP Client.
     parent::SOAP_Client(null);
     // Store the API profile.
     $this->setAPIProfile($profile);
     // SSL CA certificate.
     $this->setOpt('curl', CURLOPT_CAINFO, dirname(__FILE__) . '/cert/api_cert_chain.crt');
     // SSL Client certificate.
     if (isset($profile->_certificateFile)) {
         // Set options from the profile.
         $this->setOpt('curl', CURLOPT_SSLCERT, $profile->getCertificateFile());
         if ($profile->getCertificatePassword()) {
             $this->setOpt('curl', CURLOPT_SSLCERTPASSWD, $profile->getCertificatePassword());
         }
     }
     // Tracing.
     $this->setOpt('trace', 1);
     // Load the endpoint map.
     include 'PayPal/wsdl/paypal-endpoints.php';
     $this->_endpointMap = $PayPalEndpoints;
     // Load SDK settings.
     if (@(include 'PayPal/conf/paypal-sdk.php')) {
         if (isset($__PP_CONFIG['log_level'])) {
             $this->_logLevel = $__PP_CONFIG['log_level'];
         }
         if (isset($__PP_CONFIG['log_dir'])) {
             $this->_logDir = $__PP_CONFIG['log_dir'];
         }
     }
 }
示例#3
0
 /**
  * Construct a new CallerServices object.
  *
  * @param APIProfile $profile  The profile with the username, password,
  *                             and any other information necessary to use
  *                             the SDK.
  */
 function CallerServices($profile)
 {
     // Initialize the SOAP Client.
     parent::SOAP_Client(null);
     // Store the API profile.
     $this->setAPIProfile($profile);
     // below code will switch off the server certificate validation. this is only required in staging
     $this->setOpt('curl', CURLOPT_SSL_VERIFYPEER, false);
     $this->setOpt('curl', CURLOPT_SSL_VERIFYHOST, false);
     $this->_options['timeout'] = 15;
     if (!empty($profile->_subject)) {
         $this->setOpt('curl', CURLOPT_SSL_VERIFYPEER, false);
         $this->setOpt('curl', CURLOPT_SSL_VERIFYHOST, false);
     } else {
         // SSL CA certificate.
         $this->setOpt('curl', CURLOPT_CAINFO, dirname(__FILE__) . '/cert/api_cert_chain.crt');
         // SSL Client certificate.
         if (isset($profile->_certificateFile)) {
             // Set options from the profile.
             $this->setOpt('curl', CURLOPT_SSLCERT, $profile->getCertificateFile());
             if ($profile->getCertificatePassword()) {
                 $this->setOpt('curl', CURLOPT_SSLCERTPASSWD, $profile->getCertificatePassword());
             }
         }
     }
     // Tracing.
     $this->setOpt('trace', 1);
     // Load the endpoint map.
     include 'PayPal/wsdl/paypal-endpoints.php';
     $this->_endpointMap = $PayPalEndpoints;
     // Load SDK settings.
     if (@(include 'PayPal/conf/paypal-sdk.php')) {
         if (isset($__PP_CONFIG['log_level'])) {
             $this->_logLevel = $__PP_CONFIG['log_level'];
         }
         if (isset($__PP_CONFIG['log_dir'])) {
             $this->_logDir = $__PP_CONFIG['log_dir'];
         }
     }
 }