/** * Checks the backend configuration attributes for validity. * * @param array $attributes Attributes added by the shop owner in the administraton interface * @return array An array with the attribute keys as key and an error message as values for all attributes that are * known by the provider but aren't valid */ public function checkConfigBE(array $attributes) { $errors = parent::checkConfigBE($attributes); $prefix = $this->getConfigPrefix(); $config = $this->beConfig; $list = array(); if ($prefix !== 'omnipay') { unset($config['type'], $config['onsite']); } foreach ($config as $key => $config) { $config['code'] = $prefix . '.' . $config['code']; $list[$prefix . '.' . $key] = $config; } return array_merge($errors, $this->checkConfig($list, $attributes)); }
/** * Checks the backend configuration attributes for validity. * * @param array $attributes Attributes added by the shop owner in the administraton interface * @return array An array with the attribute keys as key and an error message as values for all attributes that are * known by the provider but aren't valid */ public function checkConfigBE(array $attributes) { $errors = parent::checkConfigBE($attributes); return array_merge($errors, $this->checkConfig($this->beConfig, $attributes)); }