Sha256: c91e2c5a274cbccb0c294f84813d33840153a8ae5bdbf35c2f9460cc8e81955d
Contents?: true
Size: 1.12 KB
Versions: 2
Compression:
Stored size: 1.12 KB
Contents
# PayU Latam Rails Library [![CircleCI](https://circleci.com/gh/lengio/payu-latam-rails.svg?style=svg)](https://circleci.com/gh/lengio/payu-latam-rails) [![Maintainability](https://api.codeclimate.com/v1/badges/b497ad8d66bf768501f4/maintainability)](https://codeclimate.com/github/lengio/payu-latam-rails/maintainability) ## Installation gem "payu-latam-rails", github: "lengio/payu-latam-rails", require: "pay_u_rails" # Local gem build payu-latam-rails.gemspec ## Usage ### Mounting routes ```ruby # config/routes.rb mount PayURails::Engine, at: "/pay_u", as: "pay_u" ``` ### Subscribing with blocks ```ruby PayURails.subscribe(PayURails::Confirmation::EVENT) do |confirmation| # Do something with PayU::Confirmation object end PayURails.subscribe(PayURails::Response::EVENT) do |response| # Do something with PayU::Response object end ``` ### Subscribing with objects ```ruby class Subscriber def call(confirmation) # Do something with PayU::Confirmation object end end PayURails.subscribe(PayURails::Confirmation::EVENT, Subscriber.new) ``` ## Testing rspec ## Console bin/console
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
payu-latam-rails-1.0.3 | README.md |
payu-latam-rails-1.0.2 | README.md |