src/Payum/Core/PayumBuilder.php
public function addGatewayFactory($name, $gatewayFactory)
    {
        if (
            $gatewayFactory instanceof GatewayFactoryInterface ||
            is_callable($gatewayFactory)) {
            $this->gatewayFactories[$name] = $gatewayFactory;

            return $this;
        }

        throw new InvalidArgumentException('Invalid argument');
    }
public function addGatewayFactory($name, $gatewayFactory)
    {
        if (
            $gatewayFactory instanceof GatewayFactoryInterface ||
            is_callable($gatewayFactory)) {
            $this->gatewayFactories[$name] = $gatewayFactory;

            return $this;
        }

        throw new InvalidArgumentException('Invalid argument');
    }
@param string           $name
@param GatewayFactoryInterface|callable $gatewayFactory

@return static