/**
     * {@inheritDoc}
     */
    public function createConfig(array $config = array())
    {
        $config = ArrayObject::ensureArrayObject($config);
        $config->defaults(array(
            'payum.action.capture' => new OffsiteCaptureAction(),
        ));

        return parent::createConfig((array) $config);
    }
    /**
     * @test
     *
     * @expectedException \Payum\Core\Exception\LogicException
     * @expectedExceptionMessage Given type Invalid is not supported. Try one of supported types: Dummy.
     */
    public function shouldThrowIfTypeNotValid()
    {
        $factory = new DirectPaymentFactory();

        $factory->create(array('type' => 'Invalid'));
    }