4 DEFINE(
'EFIRE_WSDL_URL',
'https://soap.oxid-efire.com/');
32 public function downloadConnector($sUsername, $sPassword, $sShopVersion, $blSaveCredentials)
35 if ($blSaveCredentials) {
36 $this->
getConfig()->saveShopConfVar(
'str',
'sEfiUsername', $sUsername);
37 $this->
getConfig()->saveShopConfVar(
'str',
'sEfiPassword', $sPassword);
39 $this->
getConfig()->saveShopConfVar(
'str',
'sEfiUsername', null);
40 $this->
getConfig()->saveShopConfVar(
'str',
'sEfiPassword', null);
43 $this->
_init($sUsername, $sPassword);
45 $sFileName = getShopBasePath() .
"core/". strtolower(basename($this->
_getConnectorClassName($sShopVersion))) .
".php";
49 $fOut = fopen($sFileName,
"w");
50 if (!fputs($fOut, $sFileContents)) {
51 throw new oxException(
'EXCEPTION_COULDNOTWRITETOFILE');
56 if (file_exists(getShopBasePath() .
"oxefi.php")) {
57 unlink(getShopBasePath() .
"oxefi.php");
71 protected function _init($sUsername, $sPassword)
73 $this->_oClient =
new SoapClient( EFIRE_WSDL_URL .
'eshopconnector/?wsdl',
76 'style' => SOAP_DOCUMENT,
77 'login' => $sUsername,
78 'password' => $sPassword,
79 'cache_wsdl' => WSDL_CACHE_NONE
94 $oResponse = $this->_oClient->getConnectorClassName($sShopVersion);
96 if (!$oResponse->blResult) {
97 throw new Exception($oResponse->sMessage);
100 return $oResponse->sMessage;
113 $oResponse = $this->_oClient->getConnectorFileContents($sShopVersion);
115 if (!$oResponse->blResult) {
116 throw new Exception($oResponse->sMessage);
119 return $oResponse->sMessage;