bestit / klarna-ordermanagement
Klarna ordermanagement as a package for our Klarna plugins.
Requires
- php: ^7.2
- phpdocumentor/reflection-docblock: v5.1.0
- symfony/polyfill-intl-grapheme: 1.18.1
- symfony/polyfill-intl-normalizer: 1.18.1
- symfony/polyfill-mbstring: 1.18.1
- symfony/property-info: v5.1.0
Requires (Dev)
- phpunit/phpunit: ^5.7
- shopware/shopware: 5.7.0-RC1
- dev-master
- 0.3.0
- 0.2.29
- 0.2.28
- 0.2.27
- 0.2.26
- 0.2.25
- 0.2.24
- 0.2.23
- 0.2.22
- 0.2.21
- 0.2.20
- 0.2.19
- 0.2.18
- 0.2.17
- 0.2.16
- 0.2.15
- 0.2.14
- 0.2.13
- 0.2.12
- 0.2.11
- 0.2.10
- 0.2.9
- 0.2.8
- 0.2.7
- 0.2.6
- 0.2.5
- 0.2.4
- 0.2.3
- 0.2.2
- 0.2.1
- 0.2.0
- 0.1.5
- 0.1.4
- 0.1.3
- 0.1.2
- 0.1.1
- 0.1.0
- dev-release/0.3.0
- dev-0.3.0-test
- dev-release/0.2.29
- dev-release/0.2.28
- dev-release/0.2.27
- dev-release/0.2.26
- dev-release/0.2.25
- dev-release/0.2.24
- dev-release/0.2.23
- dev-release/0.2.22
- dev-Release-0.2.21
- dev-Release-0.2.20
- dev-Release-0.2.19
- dev-Release-0.2.17
- dev-develop
- dev-Release-0.2.16
- dev-Release-0.2.15
- dev-Release-0.2.14
- dev-Release-0.2.13
- dev-Release-0.2.12
- dev-Release-0.2.11
- dev-Release-0.2.10
- dev-Release-0.2.9
- dev-Release-0.2.8
This package is auto-updated.
Last update: 2021-03-29 13:09:38 UTC
README
This is a package for shopware plugins. It adds support for the Klarna OrderManagement API and also includes a UI in the shopware backend. If using this package, you will need to implement Klarna Payments order Klarna Checkout yourself.
// TODO: Add Klarna Checkout link once its ready
Install
Via Composer
$ composer require bestit/klarna-ordermanagement
Registering dependencies
In your Shopware plugin entry file, you need to specify the following container parameters:
- Plugin name
- Plugin version
public function build(ContainerBuilder $containerBuilder)
{
parent::build($containerBuilder);
$containerBuilder->setParameter('bestit_klarna.plugin_name', 'ExamplePluginName');
$containerBuilder->setParameter('bestit_klarna.plugin_version', '1.0.0');
}
And you will also need to register our dependencies:
public function build(ContainerBuilder $containerBuilder)
{
parent::build($containerBuilder);
//
$dependencyInjectionExtensions = [
\BestitKlarnaOrderManagement\Components\DependencyInjection\DependencyInjectionExtension::class
];
foreach ($dependencyInjectionExtensions as $dependencyInjectionExtension) {
if (!class_exists($dependencyInjectionExtension)) {
continue;
}
$dependencyInjectionExtension = new $dependencyInjectionExtension();
if (!$dependencyInjectionExtension instanceof \BestitKlarnaOrderManagement\Components\DependencyInjection\DependencyInjectionExtensionInterface) {
continue;
}
$dependencyInjectionExtension->injectDependencies($containerBuilder);
}
}
Then you can use the OMInstaller
for any ohter necessary setup:
public function install(InstallContext $context)
{
// ...
$this->getOmInstaller()->install($this, $context);
// ...
}
public function uninstall(UninstallContext $context)
{
// ...
$this->getOmInstaller()->uninstall($this, $context);
// ...
}
public function update(UpdateContext $context)
{
// ...
$this->getOmInstaller()->update($this, $context);
// ...
}
protected function getOmInstaller()
{
if ($this->omInstaller !== null) {
return $this->omInstaller;
}
$this->omInstaller = new OmInstaller($this->container->get('shopware.snippet_database_handler'));
return $this->omInstaller;
}
Usage
See the docs for more information.
Change log
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING and CODE_OF_CONDUCT for details.
Security
If you discover any security related issues, please email best it.
License
The MIT License (MIT). Please see License File for more information.