asgoodasnu / klarna-checkout-api-bundle
Integrates the Klarna Checkout API into a symfony2 bundle
This package's canonical repository appears to be gone and the package has been frozen as a result.
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
This bundle wraps the Klarna Checkout SDK as a Symfony Bundle
Installation
Require the bundle and its dependencies with composer:
$ composer require asgoodasnu/klarna-checkout-api-bundle
Register the bundle:
// app/AppKernel.php public function registerBundles() { $bundles = array( new Wk\KlarnaCheckoutApiBundle\WkKlarnaCheckoutApiBundle(), ); }
Configure your Klarna settings in your config.yml
:
# 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)
Usage
You can get a configured client object from the container:
$client = $this->get('wk_klarna_checkout_api.client.de')
Read the Klarna documentation for more information about this object.
Dependencies
symfony/framework-bundle
- Symfony FrameworkBundleklarna/kco_rest:2.2
- Klarna Checkout SDK
PHPUnit Tests
You can run the tests using the following command:
$ composer test
Code Analysis
You can analyze the code using the following command:
$ composer analyze
Resources
Symfony 2
Klarna Checkout API
Klarna Checkout SDK