Manual Installation

1. Require the plugin

Add the package via Composer:

composer require sylius/refund-plugin

2. Register bundles

In your config/bundles.php, register both the Snappy PDF bundle and the Refund Plugin:

return [
    Knp\Bundle\SnappyBundle\KnpSnappyBundle::class => ['all' => true],
    Sylius\RefundPlugin\SyliusRefundPlugin::class => ['all' => true],
];

3. Import plugin configuration

In your main config (e.g. config/packages.yaml), add:

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

4. Import routes

In your routing configuration:

Ensure it’s loaded with your other plugin routes.

5. Run migrations

This will create the necessary refund tables in the database.

6. Include admin assets

Open assets/admin/entrypoint.js (or wherever your admin JS entry is), and import the refund plugin’s entrypoint:

7. Build frontend assets

Recompile your admin UI:

Or, for production:

8. Configure wkhtmltopdf

If wkhtmltopdf is not in a default location, set:

This ensures the plugin can find the binary at runtime.

9. Clear cache

Last updated

Was this helpful?