Download the PHP package webgriffe/sylius-klarna-payments-plugin without Composer
On this page you can find all versions of the php package webgriffe/sylius-klarna-payments-plugin. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download webgriffe/sylius-klarna-payments-plugin
More information about webgriffe/sylius-klarna-payments-plugin
Files in webgriffe/sylius-klarna-payments-plugin
Package sylius-klarna-payments-plugin
Short Description Klarna Payments plugin for Sylius ecommerce framework
License proprietary
Informations about the package sylius-klarna-payments-plugin
Sylius Klarna Plugin
Sylius plugin for Klarna payments payment method.
Installation
-
Run:
-
Add
Webgriffe\SyliusKlarnaPlugin\WebgriffeSyliusKlarnaPaymentsPlugin::class => ['all' => true]
to yourconfig/bundles.php
.Normally, the plugin is automatically added to the
config/bundles.php
file by thecomposer require
command. If it is not, you have to add it manually. -
Create a new file config/packages/webgriffe_sylius_klarna_payments_plugin.yaml:
-
Import the routes needed for cancelling the payments. Add the following to your config/routes.yaml file:
NB: The file shop_routing needs to be after the prefix _locale, so that messages can be displayed in the right language. You should also include the cancel routes from the Payum bundle if you do not have it already!
-
Run:
Or, you can add the entry to your webpack.config.js file:
And then override the template
WebgriffeSyliusKlarnaPaymentsPlugin/Process/index.html.twig
to include the entry:
Usage
Access to the admin panel and go to the Payment methods
section. Create a new payment method and select Klarna payments
as gateway. Then, configure the payment method with the required parameters.
Contributing
For a comprehensive guide on Sylius Plugins development please go to Sylius documentation, there you will find the Plugin Development Guide, that is full of examples.
Quickstart Installation
Traditional
-
Run
composer create-project sylius/plugin-skeleton ProjectName
. - From the plugin skeleton root directory, run the following commands:
To be able to set up a plugin's database, remember to configure you database credentials in tests/Application/.env
and tests/Application/.env.test
.
Docker
-
Execute
docker compose up -d
-
Initialize plugin
docker compose exec app make init
- See your browser
open localhost
Usage
Running plugin tests
-
PHPUnit
-
PHPSpec
-
Behat (non-JS scenarios)
-
Behat (JS scenarios)
-
Start Headless Chrome:
-
Install SSL certificates (only once needed) and run test application's webserver on
127.0.0.1:8080
: - Run Behat:
-
Static Analysis
-
Psalm
- PHPStan
-
- Coding Standard
Opening Sylius with your plugin
-
Using
test
environment: - Using
dev
environment: