src/Payum/Paypal/ProHosted/Nvp/PaypalProHostedGatewayFactory.php
protected function populateConfig(ArrayObject $config)
    {
        $config->defaults([
            'payum.factory_name'                       => 'paypal_pro_hosted',
            'payum.factory_title'                      => 'Paypal Pro Hosted',
            'payum.action.capture'                     => new CaptureAction(),
            'payum.action.notify'                      => new NotifyAction(),
            'payum.action.status'                      => new StatusAction(),
            'payum.action.sync'                        => new SyncAction(),
            'payum.action.convert_payment'             => new ConvertPaymentAction(),
            'payum.action.api.get_transaction_details' => new GetTransactionDetailsAction(),
            'payum.action.api.create_button_payment'   => new CreateButtonPaymentAction(),
        ]);

        if (false == $config['payum.api']) {
            $config['payum.default_options'] = [
                'username'  => '',
                'password'  => '',
                'signature' => '',
                'business'  => '',
                'sandbox'   => true,
            ];

            $config->defaults($config['payum.default_options']);
            $config['payum.required_options'] = [
                'username',
                'password',
                'signature',
            ];

            $config['payum.api'] = function (ArrayObject $config) {
                $config->validateNotEmpty($config['payum.required_options']);

                $paypalConfig = array(
                    'username'  => $config['username'],
                    'password'  => $config['password'],
                    'signature' => $config['signature'],
                    'business'  => $config['business'],
                    'sandbox'   => $config['sandbox'],
                );

                return new Api($paypalConfig, $config['payum.http_client'], $config['httplug.message_factory']);
            };
        }
    }
protected function populateConfig(ArrayObject $config)
    {
        $config->defaults([
            'payum.factory_name'                       => 'paypal_pro_hosted',
            'payum.factory_title'                      => 'Paypal Pro Hosted',
            'payum.action.capture'                     => new CaptureAction(),
            'payum.action.notify'                      => new NotifyAction(),
            'payum.action.status'                      => new StatusAction(),
            'payum.action.sync'                        => new SyncAction(),
            'payum.action.convert_payment'             => new ConvertPaymentAction(),
            'payum.action.api.get_transaction_details' => new GetTransactionDetailsAction(),
            'payum.action.api.create_button_payment'   => new CreateButtonPaymentAction(),
        ]);

        if (false == $config['payum.api']) {
            $config['payum.default_options'] = [
                'username'  => '',
                'password'  => '',
                'signature' => '',
                'business'  => '',
                'sandbox'   => true,
            ];

            $config->defaults($config['payum.default_options']);
            $config['payum.required_options'] = [
                'username',
                'password',
                'signature',
            ];

            $config['payum.api'] = function (ArrayObject $config) {
                $config->validateNotEmpty($config['payum.required_options']);

                $paypalConfig = array(
                    'username'  => $config['username'],
                    'password'  => $config['password'],
                    'signature' => $config['signature'],
                    'business'  => $config['business'],
                    'sandbox'   => $config['sandbox'],
                );

                return new Api($paypalConfig, $config['payum.http_client'], $config['httplug.message_factory']);
            };
        }
    }
{@inheritDoc}