Project

dibs_hmac

0.0
No commit activity in last 3 years
No release in over 3 years
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.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.0
~> 1.8
~> 3.12
~> 2.8
 Project Readme

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 PaymentWindow. This is production ready. I am curently using it for a Webshop.

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

Contact details

  • Please reports bugs in the github issue tracker.
  • For none bugs send me an email Björn Blomqvist

Short changelog

0.2.0 (2016-06-07)

  • Added missing fields to allowed fields.

0.1.3 (2015-08-24)

  • Remove deprecation warnings and added support for newer ruby versions.

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

  • Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
  • Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
  • Fork the project.
  • Start a feature/bugfix branch.
  • Commit and push until you are happy with your contribution.
  • Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.

Copyright

Copyright (c) 2013 - 2016 Björn Blomqvist and others. See LICENSE.txt for further details.

If the licens doesen't work for you contact me. Maybe we can find a solution.