dibs_hmac

An implementation of DIBS Message authentication code. Has correct sorting and rules for which params to include. So far it only includes the params for DIBS Payment Window. This is production ready. I am curently using it for a Webshop.

If you find this useful please tell me in an email.

Short changelog

0.2.0 (2016-06-07)

0.1.3 (2015-08-24)

Code example

Calculate mac

dibs_params = {:amount => "100", :merchant => "2222", ....}

mac = DIBS::HMAC.calculate(dibs_params, Rails.application.config.dibs_hmac_key)

Validate response from DIBS

raise "INVALID REQUEST" unless DIBS::HMAC.valid?(params, Rails.application.config.dibs_hmac_key)

Contributing to dibs_hmac

Copyright © 2013 - 2015 Björn Blomqvist and others. See LICENSE.txt for further details.