# DatatransHelper
[](https://raw.githubusercontent.com/jshmrtn/datatrans-helper/master/LICENSE)
[](https://travis-ci.org/jshmrtn/datatrans-helper)
[](https://hex.pm/packages/datatrans_helper)
[](https://inch-ci.org/github/jshmrtn/datatrans-helper)
[](https://coveralls.io/github/jshmrtn/datatrans-helper?branch=master)
Small Helper Function to sign Datatrans Request Parameters.
## Installation
The package can be installed
by adding `datatrans_helper` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[{:datatrans_helper, "~> 0.2.0"}]
end
```
## Configuration
```elixir
config :datatrans_helper,
merchant_id: "Some ID",
sign1_hmac_key: "Some Key"
```
## Documentation
The docs can
be found at [https://hexdocs.pm/datatrans_helper](https://hexdocs.pm/datatrans_helper).
## Usage
```elixir
DatatransHelper.generate_payment_info(7.2, "CHF", "a5e511e9-7334-44c2-be21-cef964091739")
%{amount: 7.2, currency: "CHF", merchant_id: "73452",
refno: "a5e511e9-7334-44c2-be21-cef964091739",
sign: "1EC9627CC7BA2E58251656BD500672BB6C5509FD569BB31737EE381C56CFE785"}
```