<commit_before>Yii2 component for [WalletOne](https://www.walletone.com/)
============================

[![Total Downloads](https://poser.pugx.org/bookin/yii2-wallet-one/downloads)](https://packagist.org/packages/bookin/yii2-wallet-one)
[![Latest Unstable Version](https://poser.pugx.org/bookin/yii2-wallet-one/v/unstable)](https://packagist.org/packages/bookin/yii2-wallet-one)
[![License](https://poser.pugx.org/bookin/yii2-wallet-one/license)](https://packagist.org/packages/bookin/yii2-wallet-one)

## Installation

The preferred way to install this extension is through [composer](http://getcomposer.org/download/). 

To install, either run

```
$ php composer.phar require bookin/yii2-wallet-one "@dev"
```

or add

```
"bookin/yii2-wallet-one": "@dev"
```

to the ```require``` section of your `composer.json` file.


## Usage

### Configure component:

```php
'walletone'=>[
    'class'=>'bookin\walletone\WalletOne',
    'secretKey'=>'....',
    'signatureMethod'=>'sha1',
    'walletOptions'=>[
        'WMI_MERCHANT_ID'=>...,
        'WMI_CURRENCY_ID'=>...,
        'WMI_SUCCESS_URL'=>['site/payment-success'],
        'WMI_FAIL_URL'=>['site/payment-fail'],
    ]
]
```

```secretKey``` - it your secret key, you can find it on setting integration page your account

```walletOptions``` - it [parameters](https://www.walletone.com/merchant/documentation/#step2) for generating a payment form, you can set permanent data

```signatureMethod``` - EDS creation method, this parameter must be the same as your selected method on the setting integration page your account (default - sha1)

If you don't use encryption method, you need set ```signatureMethod``` and ```secretKey``` to NULL

### Example show form<commit_msg>update readme - add label attribute for button<commit_after>Yii2 component for [WalletOne](https://www.walletone.com/)
============================

[![Total Downloads](https://poser.pugx.org/bookin/yii2-wallet-one/downloads)](https://packagist.org/packages/bookin/yii2-wallet-one)
[![Latest Unstable Version](https://poser.pugx.org/bookin/yii2-wallet-one/v/unstable)](https://packagist.org/packages/bookin/yii2-wallet-one)
[![License](https://poser.pugx.org/bookin/yii2-wallet-one/license)](https://packagist.org/packages/bookin/yii2-wallet-one)

## Installation

The preferred way to install this extension is through [composer](http://getcomposer.org/download/). 

To install, either run

```
$ php composer.phar require bookin/yii2-wallet-one "@dev"
```

or add

```
"bookin/yii2-wallet-one": "@dev"
```

to the ```require``` section of your `composer.json` file.


## Usage

### Configure component:

```php
'walletone'=>[
    'class'=>'bookin\walletone\WalletOne',
    'secretKey'=>'....',
    'signatureMethod'=>'sha1',
    'buttonLabel'=>'....',
    'walletOptions'=>[
        'WMI_MERCHANT_ID'=>'...',
        'WMI_CURRENCY_ID'=>'...',
        'WMI_SUCCESS_URL'=>['site/payment-success'],
        'WMI_FAIL_URL'=>['site/payment-fail'],
    ]
]
```

```secretKey``` - it your secret key, you can find it on setting integration page your account

```walletOptions``` - it [parameters](https://www.walletone.com/merchant/documentation/#step2) for generating a payment form, you can set permanent data

```signatureMethod``` - EDS creation method, this parameter must be the same as your selected method on the setting integration page your account (default - sha1)

```buttonLabel``` - label for WalletOneButton

If you don't use encryption method, you need set ```signatureMethod``` and ```secretKey``` to NULL

### Example show form
{'fraction_non_alphanumeric': 0.18856822639394788, 'fraction_numerical': 0.0067245727094424204, 'mean_word_length': 4.569422776911076, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 22, 'https://': 16, 'lorem ipsum': 0, 'www.': 4, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6008677', 'n_tokens_mistral': 1174, 'n_tokens_neox': 1172, 'n_words': 256}