Manual Installation

1. Install Mollie Plugin via Composer

composer require sylius/paypal-plugin

2. Enable the Bundle

# config/bundles.php

return [
    ...
    Sylius\PayPalPlugin\SyliusPayPalPlugin::class => ['all' => true],
];

3. Import Configuration

# config/packages/_sylius.yaml

imports:
    ...
    - { resource: '@SyliusPayPalPlugin/config/config.yaml' }

4. Import routes

# config/routes.yaml

...
sylius_paypal:
    resource: "@SyliusPayPalPlugin/config/routes.yaml"

5. Add FOS\RestBundle configuration

# config/packages/fos_rest.yaml

fos_rest:
    exception: true
    view:
        formats:
            json: true
            xml:  true
        empty_content: 204
    format_listener:
        rules:
            - { path: '^/api/.*', priorities: ['json', 'xml'], fallback_format: json, prefer_extension: true }
            - { path: '^/', stop: true }

6. Run Doctrine Migrations

Update your database schema:

bin/console doctrine:migrations:migrate

7. Clear the Symfony Cache

php bin/console cache:clear

Usage

To make PayPal integration working, your local Sylius URL should be accessible for the PayPal servers. Therefore, you can add the proper directive to your /etc/hosts (something like 127.0.0.1 sylius.local) or use a service as ngrok.

Next steps

Your plugin is now installed and ready for configuration.

To start accepting payments, you need to connect your PayPal Business account. Follow the step-by-step guide in the Onboarding page.

Last updated

Was this helpful?