Beispiel #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));
 }
Beispiel #2
0
 /**
  * Tries to get an authorization or captures the money immediately for the given order if capturing the money
  * separately isn't supported or not configured by the shop owner.
  *
  * @param \Aimeos\MShop\Order\Item\Iface $order Order invoice object
  * @param array $params Request parameter if available
  * @return \Aimeos\MShop\Common\Item\Helper\Form\Standard Form object with URL, action and parameters to redirect to
  * 	(e.g. to an external server of the payment provider or to a local success page)
  */
 public function process(\Aimeos\MShop\Order\Item\Iface $order, array $params = array())
 {
     $order->setPaymentStatus(\Aimeos\MShop\Order\Item\Base::PAY_AUTHORIZED);
     $this->saveOrder($order);
     return parent::process($order, $params);
 }
 /**
  * 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));
 }