Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
bin
 
 
 
 
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 

PayU Latam Rails Library

CircleCI 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

# config/routes.rb
mount PayURails::Engine, at: "/pay_u", as: "pay_u"

Subscribing with blocks

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

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

About

PayU Latam Rails Library

Resources

License

Releases

No releases published

Packages

No packages published