Payum\Paypal\ProCheckout\Nvp\PaypalProCheckoutGatewayFactory::populateConfig PHP Method

populateConfig() protected method

{@inheritDoc}
protected populateConfig ( Payum\Core\Bridge\Spl\ArrayObject $config )
$config Payum\Core\Bridge\Spl\ArrayObject
    protected function populateConfig(ArrayObject $config)
    {
        $config->defaults(array('payum.factory_name' => 'paypal_pro_checkout_nvp', 'payum.factory_title' => 'PayPal ProCheckout', 'payum.action.capture' => new CaptureAction(), 'payum.action.refund' => new RefundAction(), 'payum.action.convert_payment' => new ConvertPaymentAction(), 'payum.action.status' => new StatusAction()));
        if (false == $config['payum.api']) {
            $config['payum.default_options'] = array('username' => '', 'password' => '', 'partner' => '', 'vendor' => '', 'tender' => '', 'sandbox' => true);
            $config->defaults($config['payum.default_options']);
            $config['payum.required_options'] = array('username', 'password', 'partner', 'vendor', 'tender');
            $config['payum.api'] = function (ArrayObject $config) {
                $config->validateNotEmpty($config['payum.required_options']);
                $paypalConfig = array('username' => $config['username'], 'password' => $config['password'], 'partner' => $config['partner'], 'vendor' => $config['vendor'], 'tender' => $config['tender'], 'sandbox' => $config['sandbox']);
                return new Api($paypalConfig, $config['payum.http_client'], $config['httplug.message_factory']);
            };
        }
    }
PaypalProCheckoutGatewayFactory