public function checkShopActivationObject() { // check general settings $check = $this->genSetData->get('currency_unit'); if ($check == null) { ilUtil::sendInfo($this->lng->txt('please_enter_currency')); return $this->generalSettingsObject(); } $check = $this->genSetData->get('address'); if ($check == null) { ilUtil::sendInfo($this->lng->txt('please_enter_address')); return $this->generalSettingsObject(); } $check = $this->genSetData->get('bank_data'); if ($check == null) { ilUtil::sendInfo($this->lng->txt('please_enter_bank_data')); return $this->generalSettingsObject(); } $check = $this->genSetData->get('pdf_path'); if ($check == null) { ilUtil::sendInfo($this->lng->txt('please_enter_pdf_path')); return $this->generalSettingsObject(); } // check paymethods $pm_array = ilPaymethods::_getActivePaymethods(); if (count($pm_array) == 0) { ilUtil::sendInfo($this->lng->txt('please_activate_one_paymethod')); $this->payMethodsObject(); return false; } foreach ($pm_array as $paymethod) { switch ($paymethod['pm_title']) { case 'bmf': $check = unserialize($this->genSetData->get('bmf')); if ($check['mandantNr'] == '' || $check['bewirtschafterNr'] == '' || $check['haushaltsstelle'] == '' || $check['objektNr'] == '' || $check['kennzeichenMahnverfahren'] == '' || $check['waehrungskennzeichen'] == '' || $check['ePaymentServer'] == '' || $check['clientCertificate'] == '' || $check['caCertificate'] == '' || $check['timeOut'] == '') { ilUtil::sendInfo($this->lng->txt('please_enter_bmf_data')); $this->bmfSettingsObject(); return false; } break; case 'paypal': $check = unserialize($this->genSetData->get('paypal')); if ($check['server_host'] == '' || $check['server_path'] == '' || $check['vendor'] == '' || $check['auth_token'] == '') { ilUtil::sendInfo($this->lng->txt('please_enter_paypal_data')); $this->paypalSettingsObject(); return false; } break; case 'epay': case 'erp': break; } } // check vats include_once './Services/Payment/classes/class.ilShopVats.php'; $check = ilShopVats::_readAllVats(); if (count($check) == 0) { ilUtil::sendInfo($this->lng->txt('please_enter_vats')); $this->vatsObject(); return false; } // check vendors $vendors = $this->vendors_obj->getVendors(); if (count($vendors) == 0) { ilUtil::sendInfo($this->lng->txt('please_create_vendor')); $this->vendorsObject(); return false; } // everything ok ilUtil::sendInfo($this->lng->txt('shop_activation_ok')); $this->generalSettingsObject(); return true; }