Example #1
0
 /**
  * @param Config $config
  */
 public function __construct(Config $config)
 {
     $this->sandbox = false;
     $this->config = $config;
     foreach (self::$classmap as $key => $value) {
         if (!isset($options['classmap'][$key])) {
             $options['classmap'][$key] = $value;
         }
     }
     $options = array_merge(array('soap_version' => SOAP_1_1, 'features' => SOAP_SINGLE_ELEMENT_ARRAYS, 'compression' => SOAP_COMPRESSION_GZIP | SOAP_COMPRESSION_DEFLATE, 'keep_alive' => true, 'trace' => true, 'exceptions' => true, 'cache_wsdl' => WSDL_CACHE_NONE, 'ssl_method' => SOAP_SSL_METHOD_TLS, 'local_cert' => $config->getSSLCert(), 'passphrase' => $config->getSSLPass()), $options);
     $aliasOptions = $options;
     $aliasOptions["classmap"] += self::$classmapMerchantAlias;
     $this->aliasClient = new SoapClient(__DIR__ . '/../../../' . self::$WSDL['DIR'] . self::$WSDL['MERCHANT_ALIAS'], $aliasOptions);
     $financialOperationOptions = $options;
     $financialOperationOptions["classmap"] += self::$classmapFinancialOperation;
     $this->financialOperationClient = new SoapClient(__DIR__ . '/../../../' . self::$WSDL['DIR'] . self::$WSDL['FINANCIAL_OPERATION'], $financialOperationOptions);
 }