public function login($credentials)
{
ini_set('default_socket_timeout', '120');
$accountid = $credentials['accountid'];
$password = $credentials['apipassword'];
$nameSpace = 'http://api.affiliatewindow.com/';
$wsdlUrl = 'http://api.affiliatewindow.com/v6/AffiliateService?wsdl';
//Setting the client.
$this->_apiClient = new \SoapClient($wsdlUrl, array('login' => $accountid, 'encoding' => 'UTF-8', 'password' => $password, 'compression' => SOAP_COMPRESSION_ACCEPT | SOAP_COMPRESSION_GZIP | SOAP_COMPRESSION_DEFLATE, 'soap_version' => SOAP_1_1));
$soapHeader1 = new \SoapHeader($nameSpace, 'UserAuthentication', array('iId' => $accountid, 'sPassword' => $password, 'sType' => 'affiliate'), true, $nameSpace);
$soapHeader2 = new \SoapHeader($nameSpace, 'getQuota', true, true, $nameSpace);
$this->_apiClient->__setSoapHeaders(array($soapHeader1, $soapHeader2));
}