coolminds / sylius-pay-by-invoice-plugin
Sylius plugin for adding on-invoice payment fee support
Installs: 16
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 2
Type:sylius-plugin
pkg:composer/coolminds/sylius-pay-by-invoice-plugin
Requires
- php: ^8.2
- sylius/invoicing-plugin: ^0.20 || ^2.0
- sylius/sylius: ^2.0
- symfony/framework-bundle: ^6.4
Requires (Dev)
- behat/behat: ^3.16
- dmore/behat-chrome-extension: ^1.4
- dmore/chrome-mink-driver: ^2.9
- friends-of-behat/mink: ^1.11
- friends-of-behat/mink-browserkit-driver: ^1.6
- friends-of-behat/mink-debug-extension: ^2.1
- friends-of-behat/mink-extension: ^2.7
- friends-of-behat/page-object-extension: ^0.3
- friends-of-behat/suite-settings-extension: ^1.1
- friends-of-behat/symfony-extension: ^2.6
- friends-of-behat/variadic-extension: ^1.6
- nyholm/psr7: ^1.8
- phpstan/phpstan: ^1.12
- phpstan/phpstan-doctrine: ^1.3
- phpstan/phpstan-webmozart-assert: ^1.2
- phpunit/phpunit: ^10.5
- robertfausk/behat-panther-extension: ^1.1
- sylius-labs/coding-standard: ^4.4
- sylius-labs/suite-tags-extension: ~0.2
- sylius/sylius-rector: ^2.0
- sylius/test-application: ^2.0.0@alpha
- symfony/browser-kit: ^6.4 || ^7.1
- symfony/debug-bundle: ^6.4 || ^7.1
- symfony/dotenv: ^6.4 || ^7.1
- symfony/http-client: ^6.4
- symfony/intl: ^6.4 || ^7.1
- symfony/runtime: ^6.4 || ^7.1
- symfony/web-profiler-bundle: ^6.4 || ^7.1
- symfony/webpack-encore-bundle: ^2.2
This package is not auto-updated.
Last update: 2025-10-29 12:01:40 UTC
README
Adds a configurable “Pay by Invoice” flow to Sylius 2.0 (Symfony 6.4):
- Define a payment method. example "on_invoice"
- Define a customer group example. "pay_by_invoice"
A proccessor wil applie a configurable percentage surcharge when your specific payment method (e.g. on_invoice) is selected. The form type wil show/hide the payment method based on a your Customer Group during checkout.
Displays in scheckout summary. admin order, Twig hooks + one template override to display the surcharge in Checkout, Admin > Order, and Invoice PDF.
Requirements
PHP 8.2+
Symfony 6.4.x
Sylius 2.0.x
Installation
Require the plugin
composer require "coolminds/sylius-pay-by-invoice-plugin:*@dev"
Enable the bundle
config/bundles.php
return [
// ...
Coolminds\PayByInvoice\CoolmindsPayByInvoicePlugin::class => ['all' => true],
];
Configure
Create config/packages/coolminds_pay_by_invoice.yaml
coolminds_pay_by_invoice: fee_percentage: 2.5 # float, e.g. 2.5 = 2.5% payment_code: 'on_invoice' # Sylius PaymentMethod code that triggers the fee group_code: 'betalen_op_factuur' # CustomerGroup code allowed to see/use this method display_in_description: true # append "(+X%)" to the payment label in the shop
Clear & warm cache
php -d memory_limit=-1 bin/console cache:clear
php -d memory_limit=-1 bin/console cache:warmup
Translations
By deafault translations for NL and EN ar available.
Available keys:
on_invoice: fee_suffix: "(Note: +%fee%%)" # EN fee_label: "Surcharge for payment on invoice" fee_label_with_percent: "Surcharge for payment on invoice (%fee%%)"
invoice twig template
Include below to your invoice twig templat. This way the fee will be visible on your invoice.
{% include '@CoolmindsPayByInvoice/bundles/SyliusInvoicingPlugin/shared/download/_on_invoice_fee.html.twig' with { invoice: invoice } %}