Skip to content

siven-xtn/SyliusMolliePlugin

 
 

Repository files navigation

Overview

This plugin allows you to integrate Mollie payment with Sylius platform app. It includes all Sylius and Mollie payment features, including recurring payment and refunding orders.

Support

You can order our support on this page.

We work on amazing eCommerce projects on top of Sylius and other great Symfony based solutions, like eZ Platform, Akeneo or Pimcore. Need some help or additional resources for a project? Write us an email on mikolaj.krol@bitbag.pl or visit our website! 🚀

Demo

We created a demo app with some useful use-cases of the plugin! Visit demo.bitbag.shop to take a look at it.

$ composer require bitbag/mollie-plugin

Add plugin dependencies to your config/bundles.php file:

return [
    ...

    BitBag\SyliusMolliePlugin\BitBagSyliusMolliePlugin::class => ['all' => true],
];

Import required config in your config/packages/_sylius.yaml file:

# config/packages/_sylius.yaml

imports:
    ...

    - { resource: "@BitBagSyliusMolliePlugin/Resources/config/config.yml" }

Import the routing in your config/routes.yaml file:

# config/routes.yaml

bitbag_sylius_mollie_plugin:
    resource: "@BitBagSyliusMolliePlugin/Resources/config/routing.yml"

Update your database

$ bin/console doctrine:migrations:diff
$ bin/console doctrine:migrations:migrate

Note: If you are running it on production, add the -e prod flag to this command.

Usage

Rendering Mollie credit card form

You can use BitBagSyliusMolliePlugin:DirectDebit:_form.html.twig and @BitBagSyliusMolliePlugin/Grid/Action/cancelSubscriptionMollie.html.twig templates for adding the form to supplementing the direct debit card data from and cancel the subscription form the Twig UI.

For an example on how to do that, take a look at these source files.

Customization

Available services you can decorate and forms you can extend

Run the below command to see what Symfony services are shared with this plugin:

$ bin/console debug:container bitbag_sylius_mollie_plugin

Recurring subscription

State Machine

For a better integration with Mollie’s recurring subscription, you can use state machine callback.

Available states:

  • Processing: Subscription created but not active yet (startdate higher than “now”)
  • Active: Subscription is in progress. Not all payments are done, but we wait until the next payment date
  • Cancelled: The merchant cancelled the subscription
  • Suspended: Mandates became invalid, so the subscription is suspended
  • Completed: All subscription payments are executed according to the timetable

Testing

$ composer install
$ cd tests/Application
$ yarn install
$ yarn run gulp
$ bin/console assets:install -e test
$ bin/console doctrine:database:create -e test
$ bin/console doctrine:schema:create -e test
$ bin/console server:run 127.0.0.1:8080 -e test
$ open http://localhost:8080
$ bin/behat
$ bin/phpspec run

Contribution

Learn more about our contribution workflow on http://docs.sylius.org/en/latest/contributing/.

About

Sylius Mollie payment gateway integration.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • PHP 91.5%
  • Gherkin 5.3%
  • HTML 1.7%
  • JavaScript 1.5%