Sha256: b13886bf6b6eb5cc2e1c1fabdbc02a16f977f590eb178ef6e54d7c29c733adf2

Contents?: true

Size: 524 Bytes

Versions: 1

Compression:

Stored size: 524 Bytes

Contents

require "pay_u"

require "pay_u_rails/errors"
require "pay_u_rails/engine" if defined?(Rails)

module PayURails
  class Confirmation
    EVENT = PayU::Confirmation::EVENT
  end

  class Response
    EVENT = PayU::Response::EVENT
  end

  def self.instrument(event, payload)
    ActiveSupport::Notifications.instrument(event, payload)
  end


  def self.subscribe(event, callable = Proc.new)
    ActiveSupport::Notifications.subscribe(event) do |*args|
      callable.call(args.extract_options![:resource])
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
payu-latam-rails-1.0.1 lib/pay_u_rails.rb