Example #1
0
 /**
  * Get the SOAP client and preset call parameters.
  *
  * @param string $service    WSDL service used for the call
  * @param string $method     Method used for the call
  * @param array  $parameters Parameters used for the call
  *
  * @return \TransIP\Soap\SoapClient
  */
 private function getSoapClient($service, $method, array $parameters)
 {
     $timestamp = time();
     $nonce = uniqid(null, true);
     $soapClient = $this->client->buildSoapClient($service);
     $soapClient->setTimestamp($timestamp);
     $soapClient->setNonce($nonce);
     $soapClient->setSignature(array_merge($parameters, ['__method' => $method]), $this->client->getPrivateKey(), $service, $this->client->getEndpoint(), $timestamp, $nonce);
     return $soapClient;
 }