示例#1
0
 public function setUp()
 {
     if (!class_exists('SCA_Bindings_ebaysoap_Proxy')) {
         $this->markTestSkipped('Test skipped as the ebay soap binding is not loaded');
     }
     if (!SCA_Bindings_ebaysoap_Proxy::dependenciesLoaded()) {
         $this->markTestSkipped('Test skipped as the dependencies required for the ebay binding (openssl) are not loaded');
     }
 }
示例#2
0
文件: Proxy.php 项目: psagi/sdo
 /**
  * Proxy constructor
  *
  * @param string $target                       Target URI
  * @param string $base_path_for_relative_paths Base path
  * @param string $binding_config               Config
  */
 public function __construct($target, $base_path_for_relative_paths, $binding_config)
 {
     SCA::$logger->log('Entering');
     if (!SCA_Bindings_ebaysoap_Proxy::dependenciesLoaded()) {
         SCA::$logger->log('eBay soap binding requires the openssl extension, but it is not loaded.');
         throw new SCA_RuntimeException('eBay soap binding requires the openssl extension, but it is not loaded.');
     }
     $binding_config = SCA_Helper::mergeBindingIniAndConfig($binding_config, $base_path_for_relative_paths);
     // Check that all the required configuration has been provided
     if (!key_exists('siteid', $binding_config) || empty($binding_config['siteid'])) {
         SCA::$logger->log('eBay soap binding configuration missing: siteid.');
         throw new SCA_RuntimeException('eBay soap binding configuration missing: siteid.');
     }
     if (!key_exists('version', $binding_config) || empty($binding_config['version'])) {
         SCA::$logger->log('eBay soap binding configuration missing: version.');
         throw new SCA_RuntimeException('eBay soap binding configuration missing: version.');
     }
     if (!key_exists('authtoken', $binding_config) || empty($binding_config['authtoken'])) {
         SCA::$logger->log('eBay soap binding configuration missing: authtoken.');
         throw new SCA_RuntimeException('eBay soap binding configuration missing: authtoken.');
     }
     if (!key_exists('routing', $binding_config) || empty($binding_config['routing'])) {
         SCA::$logger->log('eBay soap binding configuration missing: routing.');
         throw new SCA_RuntimeException('eBay soap binding configuration missing: routing.');
     }
     if (!key_exists('appid', $binding_config) || empty($binding_config['appid'])) {
         SCA::$logger->log('eBay soap binding configuration missing: appid.');
         throw new SCA_RuntimeException('eBay soap binding configuration missing: appid.');
     }
     if (!key_exists('devid', $binding_config) || empty($binding_config['devid'])) {
         SCA::$logger->log('eBay soap binding configuration missing: devid.');
         throw new SCA_RuntimeException('eBay soap binding configuration missing: devid.');
     }
     if (!key_exists('authcert', $binding_config) || empty($binding_config['authcert'])) {
         SCA::$logger->log('eBay soap binding configuration missing: authcert.');
         throw new SCA_RuntimeException('eBay soap binding configuration missing: authcert.');
     }
     if (!key_exists('location', $binding_config) || empty($binding_config['location'])) {
         SCA::$logger->log('eBay soap binding configuration missing: location.');
         throw new SCA_RuntimeException('eBay soap binding configuration missing: location.');
     }
     parent::__construct($target, $base_path_for_relative_paths, $binding_config);
     SCA::$logger->log('Leaving');
 }