PayU Latam Rails Library
Installation
gem "payu-latam-rails", github: "lengio/payu-latam-rails", require: "pay_u_rails"
gem build payu-latam-rails.gemspec
Usage
Mounting routes
mount PayURails::Engine, at: "/pay_u", as: "pay_u"
Subscribing with blocks
PayURails.subscribe(PayURails::Confirmation::EVENT) do |confirmation|
end
PayURails.subscribe(PayURails::Response::EVENT) do |response|
end
Subscribing with objects
class Subscriber
def call(confirmation)
end
end
PayURails.subscribe(PayURails::Confirmation::EVENT, Subscriber.new)
Testing
rspec
Console
bin/console