コード例 #1
0
 /**
  * @test
  */
 public function shouldAllowCreateSoapClientWithCustomClassAndOptions()
 {
     $options = array('trace' => true, 'exceptions' => true);
     $factory = new SoapClientFactory($options, 'Payum\\Payex\\Tests\\Api\\CustomSoapClient');
     $client = $factory->createWsdlClient('https://test-external.payex.com/pxorder/pxorder.asmx?wsdl');
     $this->assertInstanceOf('Payum\\Payex\\Tests\\Api\\CustomSoapClient', $client);
 }
コード例 #2
0
ファイル: BaseApi.php プロジェクト: eamador/Payum
 /**
  * @param string $operation
  * @param array  $parameters
  * @param string $serviceWsdl
  *
  * @return array
  */
 protected function call($operation, array $parameters, $serviceWsdl)
 {
     $client = $this->clientFactory->createWsdlClient($serviceWsdl);
     $response = @$client->{$operation}($parameters);
     $result = $this->convertSimpleXmlToArray(new \SimpleXMLElement($response->{$operation . 'Result'}));
     $result = $this->normalizeStatusFields($result);
     $result = $this->removeHeader($result);
     $result = $this->removeObsolete($result);
     return $result;
 }