k10r / klarna-ordermanagement
klarna-ordermanagement 是我们 Klarna 插件的一个包。
0.6.5
2024-03-13 13:45 UTC
Requires
- php: >=7.2 <8.3
Requires (Dev)
- k10r/codestyle: ^2.0
- dev-master
- 0.6.5
- 0.6.4
- 0.6.3
- 0.6.2
- 0.6.1
- 0.6.0
- 0.5.1
- 0.5.0
- 0.4.0
- 0.3.3
- 0.3.2
- 0.3.1
- 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-feature/KLARNASUPPORT-925
This package is auto-updated.
Last update: 2024-09-04 16:34:02 UTC
README
这是一个 Shopware 5 插件的包。它增加了对 Klarna OrderManagement API 的支持,并在 Shopware 后端中包含了一个用户界面。如果您使用此包,您需要自行实现 Klarna Payments 和 Klarna Checkout。
安装
通过 Composer
$ composer require k10r/klarna-ordermanagement
注册依赖
在您的 Shopware 插件入口文件中,您需要指定以下容器参数
- 插件名称
public function build(ContainerBuilder $containerBuilder) { parent::build($containerBuilder); $containerBuilder->setParameter('bestit_klarna.plugin_name', 'ExamplePluginName'); }
并且您还需要注册我们的依赖
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); } }
然后您可以使用 OMInstaller
进行其他必要的设置
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; }
用法
有关更多信息,请参阅 文档。
变更日志
请参阅 变更日志 了解最近更改的内容。
许可证
MIT 许可证(MIT)。有关更多信息,请参阅 许可证文件。