Skip to content

Latest commit

 

History

History
102 lines (73 loc) · 2.47 KB

installation.md

File metadata and controls

102 lines (73 loc) · 2.47 KB

Installation

  1. Complete refund plug-in installation steps

  2. Require with composer

composer require bitbag/sylius-adyen-plugin --no-scripts
  1. When using Symfony flex the proper bundle class will be automatically registered in your bundles.php file. Otherwise, add it to your config/bundles.php file:
return [
    // ...
    BitBag\SyliusAdyenPlugin\BitBagSyliusAdyenPlugin::class => ['all' => true],
];
  1. Import required config in your config/packages/_sylius.yaml file:
# config/packages/_sylius.yaml

imports:
    ...
    - { resource: "@BitBagSyliusAdyenPlugin/Resources/config/config.yaml" }
  1. Import the routing in your config/routes.yaml file:
# config/routes.yaml

bitbag_sylius_adyen_plugin:
    resource: "@BitBagSyliusAdyenPlugin/Resources/config/routing.yaml"
  1. Add logging to your environment in config/packages/{dev, prod, staging}/monolog.yaml
monolog:
    channels: [adyen]
    handlers: # Add alongside other handlers you might have
        doctrine:
            type: service
            channels: [adyen]
            id: bitbag.sylius_adyen_plugin.logging.monolog.doctrine_handler
  1. Add Adyen payment method as a supported refund gateway in config/packages/_sylius.yaml
# config/packages/_sylius.yaml

   parameters:
      sylius_refund.supported_gateways:
         - offline
         - adyen
  1. Configure config/packages/webpack_encore.yaml
    builds:
        *: *
        shop: '%kernel.project_dir%/public/build/shop'
        admin: '%kernel.project_dir%/public/build/admin'
  1. Copy Sylius templates overridden by plug-in to your templates directory (templates/bundles/):
mkdir -p templates/bundles/SyliusAdminBundle/
mkdir -p templates/bundles/SyliusShopBundle/

cp -R vendor/bitbag/sylius-adyen-plugin/tests/Application/templates/bundles/SyliusAdminBundle/* templates/bundles/SyliusAdminBundle/
cp -R vendor/bitbag/sylius-adyen-plugin/tests/Application/templates/bundles/SyliusShopBundle/* templates/bundles/SyliusShopBundle/
  1. Execute migrations
bin/console doctrine:migrations:migrate
  1. Install assets
bin/console assets:install
  1. Clear cache
bin/console cache:clear

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

  1. Obtain Adyen credentials and configure the payment method

  2. If you want to access the log page, visit /adyen/log.