Esempio n. 1
0
 /**
  * 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));
 }
Esempio n. 2
0
 /**
  * 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));
 }