33 require_once
'./Services/Payment/classes/class.ilERP.php';
47 const wsdl =
"https://www.e-conomic.com/secure/api1/EconomicWebservice.asmx?WSDL";
67 if (isset(self::$instance) and self::$instance)
93 return array_merge($ap,
$ret);
98 if ($this->connection_ok)
return;
101 $this->client =
new SoapClient(self::wsdl, array(
"trace" => 1,
"exceptions" => 1));
102 $this->client->Connect(array(
103 'agreementNumber' => $this->agreement,
104 'userName' => $this->username,
105 'password' => $this->password)
110 $this->connection_ok =
false;
111 throw new ilERPException(__FILE__ .
":" . __LINE__ .
" " . $e->getMessage());
113 $this->connection_ok =
true;
117 unset($this->client);
118 $this->connection_ok =
false;
133 $this->agreement = (int) $v;
137 $this->product = (int) $v;
141 $this->terms = (int) $v;
145 $this->layout = (int) $v;
183 if ($s[
'agreement'] == 0)
$ok =
false;
184 if (($s[
'product']==0) || ($s[
'terms']==0) || ($s[
'layout']==0) )
$ok =
false;
197 $res = $ilDB->queryf(
'SELECT * FROM payment_erps WHERE erps_id=%s AND erp_id=%s',
198 array(
"integer",
"integer"),
203 if (is_object($result))
205 if ($result->settings !=
"")
$data = unserialize($result->settings);
209 $data[
'agreement']=0;
210 $data[
'username']=
'erpuser';
211 $data[
'password']=
'pasword1234';