public function createFactoryConfig()
 {
     $config = parent::createFactoryConfig();
     $config['payum.extension.payum.extensions.storage.sylius_component_core_model_payment'] = new Reference('payum.extension.storage.sylius_component_core_model_payment');
     $config['payum.extension.payum.extension.storage.sylius_component_core_model_order'] = new Reference('payum.extension.storage.sylius_component_core_model_order');
     return $config;
 }
    /**
     * {@inheritDoc}
     */
    protected function createFactoryConfig()
    {
        $config = parent::createFactoryConfig();
        $config['payum.template.obtain_token'] = new Parameter('payum.stripe_checkout.template.obtain_checkout_token');

        return $config;
    }
    /**
     * {@inheritdoc}
     */
    public function addConfiguration(ArrayNodeDefinition $builder)
    {
        parent::addConfiguration($builder);

        $builder->children()
            ->scalarNode('type')->isRequired()->cannotBeEmpty()->end()
            ->arrayNode('options')->isRequired()
                ->useAttributeAsKey('key')
                ->prototype('scalar')->end()
            ->end()
        ->end();

        $builder
            ->validate()
            ->ifTrue(function ($v) {
                $gatewayFactory = Omnipay::getFactory();
                $gatewayFactory->find();

                $supportedTypes = $gatewayFactory->all();
                if (false == in_array($v['type'], $supportedTypes) && !class_exists($v['type'])) {
                    throw new LogicException(sprintf(
                        'Given type %s is not supported. Try one of supported types: %s or use the gateway full class name.',
                        $v['type'],
                        implode(', ', $supportedTypes)
                    ));
                }

                return false;
            })
            ->thenInvalid('A message')
        ;
    }
    /**
     * @return array
     */
    protected function createFactoryConfig()
    {
        $config = parent::createFactoryConfig();
        $config['payum.template.authorize'] = new Parameter('payum.klarna_checkout.template.capture');

        return $config;
    }
    /**
     * {@inheritDoc}
     */
    public function addConfiguration(ArrayNodeDefinition $builder)
    {
        parent::addConfiguration($builder);

        $builder->children()
            ->scalarNode('service')->defaultValue(null)->end()
        ->end();
    }
 /**
  * {@inheritdoc}
  */
 public function create(ContainerBuilder $container, $contextName, array $config)
 {
     if (false == class_exists('Payum\\Offline\\PaymentFactory')) {
         throw new RuntimeException('Cannot find offline payment factory class. Have you installed payum/offline package?');
     }
     $loader = new XmlFileLoader($container, new FileLocator(__DIR__ . '/../../../Resources/config/payment'));
     $loader->load('offline.xml');
     return parent::create($container, $contextName, $config);
 }
 /**
  * {@inheritdoc}
  */
 public function addConfiguration(ArrayNodeDefinition $builder)
 {
     parent::addConfiguration($builder);
     
     $builder->children()
         ->scalarNode('identifier')->isRequired()->cannotBeEmpty()->end()
         ->scalarNode('password')->isRequired()->cannotBeEmpty()->end()
         ->booleanNode('sandbox')->defaultTrue()->end()
     ->end();
 }
 /**
  * {@inheritDoc}
  */
 public function addConfiguration(ArrayNodeDefinition $builder)
 {
     parent::addConfiguration($builder);
     
     $builder->children()
         ->scalarNode('encryption_key')->isRequired()->cannotBeEmpty()->end()
         ->scalarNode('account_number')->isRequired()->cannotBeEmpty()->end()
         ->booleanNode('sandbox')->defaultTrue()->end()
     ->end();
 }
 /**
  * {@inheritDoc}
  */
 public function addConfiguration(ArrayNodeDefinition $builder)
 {
     parent::addConfiguration($builder);
     
     $builder->children()
         ->scalarNode('login_id')->isRequired()->cannotBeEmpty()->end()
         ->scalarNode('transaction_key')->isRequired()->cannotBeEmpty()->end()
         ->booleanNode('sandbox')->defaultTrue()->end()
     ->end();
 }
 /**
  * {@inheritDoc}
  */
 public function addConfiguration(ArrayNodeDefinition $builder)
 {
     parent::addConfiguration($builder);
     
     $builder->children()
         ->scalarNode('eid')->isRequired()->cannotBeEmpty()->end()
         ->scalarNode('secret')->isRequired()->cannotBeEmpty()->end()
         ->scalarNode('country')->defaultValue('SE')->cannotBeEmpty()->end()
         ->scalarNode('language')->defaultValue('SV')->cannotBeEmpty()->end()
         ->scalarNode('currency')->defaultValue('SEK')->cannotBeEmpty()->end()
         ->booleanNode('sandbox')->defaultTrue()->end()
     ->end();
 }
 /**
  * {@inheritDoc}
  */
 public function addConfiguration(ArrayNodeDefinition $builder)
 {
     parent::addConfiguration($builder);
     $builder->children()->scalarNode('merchant_id')->isRequired()->cannotBeEmpty()->end()->scalarNode('merchant_password')->isRequired()->cannotBeEmpty()->end()->scalarNode('receiver_email')->isRequired()->cannotBeEmpty()->end()->booleanNode('sandbox')->defaultTrue()->end()->scalarNode('sandbox_url')->end()->end();
 }
 /**
  * {@inheritdoc}
  */
 public function addConfiguration(ArrayNodeDefinition $builder)
 {
     parent::addConfiguration($builder);
     $builder->children()->scalarNode('publishable_key')->isRequired()->cannotBeEmpty()->end()->scalarNode('secret_key')->isRequired()->cannotBeEmpty()->end()->end();
 }
 /**
  * {@inheritdoc}
  */
 public function addConfiguration(ArrayNodeDefinition $builder)
 {
     parent::addConfiguration($builder);
     $builder->children()->scalarNode('plugin_controller_service')->cannotBeEmpty()->defaultValue('payment.plugin_controller')->end()->end();
 }
 /**
  * {@inheritdoc}
  */
 public function addConfiguration(ArrayNodeDefinition $builder)
 {
     parent::addConfiguration($builder);
     $builder->children()->scalarNode('username')->isRequired()->cannotBeEmpty()->end()->scalarNode('password')->isRequired()->cannotBeEmpty()->end()->scalarNode('partner')->isRequired()->cannotBeEmpty()->end()->scalarNode('vendor')->isRequired()->cannotBeEmpty()->end()->scalarNode('tender')->defaultValue('C')->cannotBeEmpty()->end()->scalarNode('trxtype')->defaultValue('S')->cannotBeEmpty()->end()->booleanNode('sandbox')->defaultTrue()->end()->end();
 }
 /**
  * {@inheritDoc}
  */
 public function addConfiguration(ArrayNodeDefinition $builder)
 {
     parent::addConfiguration($builder);
     $builder->children()->scalarNode('service_id')->isRequired()->cannotBeEmpty()->end()->scalarNode('product_id')->defaultNull()->end()->scalarNode('payment_method_id')->defaultNull()->end()->scalarNode('secret')->isRequired()->cannotBeEmpty()->end()->booleanNode('sandbox')->defaultTrue()->end()->end();
 }
 /**
  * {@inheritDoc}
  */
 public function addConfiguration(ArrayNodeDefinition $builder)
 {
     parent::addConfiguration($builder);
     $builder->children()->arrayNode('gateway')->isRequired()->children()->scalarNode('url')->isRequired()->end()->end()->end()->arrayNode('mapping')->isRequired()->useAttributeAsKey('name')->prototype('scalar')->end()->end();
 }