IFMB Build Status Code Climate

This is gem is a basic implementation to bill via IFMB service from IFTHEN. It is a fork from https://github.com/Davidslv/MB and this may fail because it was not fully tested yet.

Features

  • Generate payment references to pay via MB (ATM)
  • Format the payment data in html

Installation

Add this line to your application's Gemfile:

gem 'ifmb'

And then execute:

$ bundle

Or install it yourself as:

$ gem install ifmb

Usage

payment_data = {
  entidade: 11604,
  sub_entidade: 999,
  order_id: 1234,
  order_value: 25.86
}

@generator = Ifmb::Generator.new(payment_data)
@generator.generate # => your payment reference to give to the user

# You can also use the html format to print directly
<%= @generator.in_html %>

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request