Example #1
0
 /**
  * {@inheritDoc}
  */
 public function getGateway($name)
 {
     try {
         return $this->registry->getGateway($name);
     } catch (InvalidArgumentException $e) {
         return $this->fallbackRegistry->getGateway($name);
     }
 }
Example #2
0
 /**
  * {@inheritDoc}
  */
 public function getGateway($name)
 {
     /** @var GatewayConfigInterface[] $configs */
     if ($configs = $this->gatewayConfigStore->findBy(array('gatewayName' => $name))) {
         $config = array_shift($configs);
         $factory = $this->getGatewayFactory($config->getFactoryName());
         return $factory->create($config->getConfig());
     }
     return $this->staticRegistry->getGateway($name);
 }