asgoodasnu / klarna-checkout-api-bundle
将 Klarna Checkout API 集成到 symfony2 bundle 中
该软件包的规范存储库似乎已消失,因此软件包已被冻结。
v1.0.0
2016-12-05 11:12 UTC
Requires
- php: >=5.5,<7
- klarna/kco_rest: ^2.2
- symfony/framework-bundle: ^2.6
Requires (Dev)
- phploc/phploc: 2.0.*
- phpmd/phpmd: 2.1.*
- phpunit/phpunit: ~4.8
- satooshi/php-coveralls: 0.6.*
- sebastian/phpcpd: 2.0.*
- squizlabs/php_codesniffer: ~1.5
This package is not auto-updated.
Last update: 2019-12-08 14:26:08 UTC
README
此 bundle 将 Klarna Checkout SDK 包装成 Symfony Bundle
安装
使用 composer 需要此 bundle 及其依赖项
$ composer require asgoodasnu/klarna-checkout-api-bundle
注册 bundle
// app/AppKernel.php public function registerBundles() { $bundles = array( new Wk\KlarnaCheckoutApiBundle\WkKlarnaCheckoutApiBundle(), ); }
在您的 config.yml 中配置您的 Klarna 设置
# config.yml services: wk_klarna_checkout_api: client: de: merchant_id: 1234567 # merchant id of the German shop shared_secret: mySecret # shared secret for the German shop region: EU # for europe set 'EU' and for North America set 'NA' use_sandbox: false # use sandbox (set to true) or live system (set to false) us: merchant_id: 2345671 # merchant id of the American shop shared_secret: aSecret # shared secret for the American shop region: NA # for europe set 'EU' and for North America set 'NA' use_sandbox: false # use sandbox (set to true) or live system (set to false)
使用
您可以从容器中获取配置好的客户端对象
$client = $this->get('wk_klarna_checkout_api.client.de')
阅读 Klarna 文档以获取有关此对象的更多信息。
依赖项
symfony/framework-bundle- Symfony FrameworkBundleklarna/kco_rest:2.2- Klarna Checkout SDK
PHPUnit 测试
您可以使用以下命令运行测试
$ composer test
代码分析
您可以使用以下命令分析代码
$ composer analyze
资源
Symfony 2
Klarna Checkout API
Klarna Checkout SDK