WebMoney Signer
===============
[![Packagist](https://img.shields.io/packagist/l/baibaratsky/php-wmsigner.svg)](https://github.com/baibaratsky/php-wmsigner/blob/master/LICENSE.md)
[![Dependency Status](https://www.versioneye.com/user/projects/55316b5e10e7149066000c9a/badge.svg?style=flat)](https://www.versioneye.com/user/projects/55316b5e10e7149066000c9a)
[![Packagist](https://img.shields.io/packagist/v/baibaratsky/php-wmsigner.svg)](https://packagist.org/packages/baibaratsky/php-wmsigner)
[![Packagist](https://img.shields.io/packagist/dt/baibaratsky/php-wmsigner.svg)](https://packagist.org/packages/baibaratsky/php-wmsigner)

Provides a convenient way to sign your requests to WebMoney API in PHP with no need to run executables.
You may also use [WebMoney API PHP Library](https://github.com/baibaratsky/php-webmoney) for more transparent object-oriented code.


Requirements
------------
WebMoney Signer requires PHP 5.3 compiled with [BCMath](http://www.php.net/manual/en/book.bc.php) support.
[GMP](http://www.php.net/manual/en/book.gmp.php) can increase the performance, but is not required.


Installation
------------
0. Install [Composer](http://getcomposer.org/):

    ```
    curl -sS https://getcomposer.org/installer | php
    ```

0. Add the php-wmsigner dependency:

    ```
    php composer.phar require baibaratsky/php-wmsigner:1.1.*
    ```

Usage
-----
```php

require_once(__DIR__ . '/vendor/autoload.php'); // Require autoload file generated by composer

use baibaratsky\WebMoney\Signer;

$signer = new Signer('wmid', '/full/path/to/the/key.kwm', 'password');
$data = 'Data to be signed'; 
$signature = $signer->sign($data);
```
