gem "payu-latam-rails", github: "lengio/payu-latam-rails", require: "pay_u_rails"
# Local
gem build payu-latam-rails.gemspec
# config/routes.rb
mount PayURails::Engine, at: "/pay_u", as: "pay_u"
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
class Subscriber
def call(confirmation)
# Do something with PayU::Confirmation object
end
end
PayURails.subscribe(PayURails::Confirmation::EVENT, Subscriber.new)
rspec
bin/console