Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
MyMoip extras for Rails projects
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
app
config
lib
script
test
.gitignore
.travis.yml
CHANGELOG.md
Gemfile
Gemfile.lock
MIT-LICENSE
README.md
Rakefile
my_moip-rails.gemspec

README.md

MyMoipRails

Currently under active development.

For a more customized usage, you might want to read mymoip's documentation.

Gem Version

Bundler - Gemfile

gem 'my_moip-rails'

Contributing

Build Status Dependency Status Code Climate

Any patch are welcome, even removing extra white spaces.

  1. Open a pull request.
  2. Done.

Payment notifications (NASP)

Do you need to perform an action when a payment is set as done (money already in your account), is canceled or something like this?

Create a controller inherited from MyMoipRails::PurchasesController and set its route.

app/controllers/purchases_controller.rb

class PurchasesController < MyMoipRails::PurchasesController
  def notification
    # You probably want to check params[:valor] and params[:cod_moip]
    done     { puts 'runs in done notifications' }
    canceled { puts 'runs in canceled notifications' }
    reversed { puts 'runs in reversed notifications' }
    refunded { puts 'runs in refunded notifications' }

    super
  end
end

config/routes.rb

post 'purchases/notification'

License

This project rocks and uses MIT-LICENSE.

Something went wrong with that request. Please try again.