Skip to content
Restrict payment methods by zone.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
bin
doc
features
src
tests
.editorconfig
.gitignore
.travis.yml
README.md
behat.yml.dist
composer.json
easy-coding-standard.yml
logo.png
node_modules
phpstan.neon
phpunit.xml.dist

README.md

Payment Restrictions Plugin

Features

  • Restrict payment method by zone.

Installation

  1. Run $ composer require mangoweb-sylius/sylius-payment-restrictions-plugin.
  2. Register \MangoSylius\PaymentRestrictionPlugin\MangoSyliusPaymentRestrictionPlugin in your Kernel.
  3. Your Entity PaymentMethod has to implement \MangoSylius\PaymentRestrictionPlugin\Model\PaymentMethodRestrictionInterface. You can use Trait MangoSylius\PaymentRestrictionPlugin\Model\PaymentMethodRestrictionTrait.
  4. Add {{ form_row(form.zone) }} to @SyliusAdmin/PaymentMethod/_form.html.twig.

For guide to use your own entity see Sylius docs - Customizing Models

Development

Usage

  • Create symlink from .env.dist to .env or create your own .env file
  • Develop your plugin in /src
  • See bin/ for useful commands

Testing

After your changes you must ensure that the tests are still passing.

  • Easy Coding Standard
    bin/ecs.sh
  • PHPStan
    bin/phpstan.sh

License

This library is under the MIT license.

Credits

Developed by manGoweb.

You can’t perform that action at this time.