<commit_before># Omnipay: Klarna

**Klarna driver for the Omnipay PHP payment processing library**

[![Build Status](https://travis-ci.org/Subscribo/omnipay-klarna.svg?branch=master)](https://travis-ci.org/Subscribo/omnipay-klarna)

[Omnipay](https://github.com/thephpleague/omnipay) is a framework agnostic, multi-gateway payment
processing library for PHP 5.3+. This package implements Klarna support for Omnipay.

## Important note:

This is a work-in-progress, unstable version.
Stable version has not yet been released.

## Requirements

* PHP 5.4+
* [Klarna API credentials](https://developers.klarna.com/en/at+php/kpm/apply-for-test-account)

## Installation

Omnipay Klarna driver is installed via [Composer](http://getcomposer.org/). To install, add it
to your `composer.json` file (you might need to add also development version of egeloen/http-adapter):

```json
{
    "require": {
        "subscribo/omnipay-klarna": "^0.1.0@alpha",
        "egeloen/http-adapter": "^0.8@dev"
    }
}
```

And run composer to update your dependencies:
```sh
    $ curl -s http://getcomposer.org/installer | php
    $ php composer.phar update
```

If you want to run online tests, you also need to set environment variables KLARNA_MERCHANT_ID and KLARNA_SHARED_SECRET with your Klarna API test credentials.
These are also needed for examples, provided in docs/example/invoice (they are used usually around lines 14-15 of the examples, but you can modify it and provide the credentials differently).

## Basic Usage

The following gateways are provided by this package:<commit_msg>README.md update<commit_after># Omnipay: Klarna

**Klarna driver for the Omnipay PHP payment processing library**

[![Build Status](https://travis-ci.org/Subscribo/omnipay-klarna.svg?branch=master)](https://travis-ci.org/Subscribo/omnipay-klarna)

[Omnipay](https://github.com/thephpleague/omnipay) is a framework agnostic, multi-gateway payment
processing library for PHP 5.3+. This package implements Klarna support for Omnipay.

## Important note:

This is a work-in-progress, unstable version.
Stable version has not yet been released.

## Requirements

* PHP 5.4+
* [Klarna API credentials](https://developers.klarna.com/en/at+php/kpm/apply-for-test-account)

## Installation

Omnipay Klarna driver is installed via [Composer](http://getcomposer.org/). To install, add it
to your `composer.json` file (you might need to add also development version of egeloen/http-adapter).

For alpha version use:
```json
{
    "require": {
        "subscribo/omnipay-klarna": "^0.1.0@alpha",
        "egeloen/http-adapter": "^0.8@dev"
    }
}
```

For development version use:
```json
{
    "require": {
        "subscribo/omnipay-klarna": "^0.1.0@dev",
        "egeloen/http-adapter": "^0.8@dev"
    }
}
```

After updating composer.json run composer update to update your dependencies:
```sh
    $ curl -s http://getcomposer.org/installer | php
    $ php composer.phar update
```

If you want to run online tests, you also need to set environment variables KLARNA_MERCHANT_ID and KLARNA_SHARED_SECRET with your Klarna API test credentials.
These are also needed for examples, provided in docs/example/invoice (they are used usually around lines 14-15 of the examples, but you can modify it and provide the credentials differently).

## Basic Usage

The following gateways are provided by this package:
{'fraction_non_alphanumeric': 0.11252969121140143, 'fraction_numerical': 0.009204275534441805, 'mean_word_length': 4.2888540031397175, 'pattern_counts': {'":': 9, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3122193', 'n_tokens_mistral': 1119, 'n_tokens_neox': 1063, 'n_words': 343}