Class: PaymentEngines

Inherits:
Object
  • Object
show all
Defined in:
lib/payment_engines.rb

Class Method Summary collapse

Class Method Details

.clearObject



7
8
9
# File 'lib/payment_engines.rb', line 7

def self.clear
  @@engines.clear
end

.configurationObject



19
20
21
# File 'lib/payment_engines.rb', line 19

def self.configuration
  ::Configuration
end

.create_payment_notification(attributes) ⇒ Object



15
16
17
# File 'lib/payment_engines.rb', line 15

def self.create_payment_notification attributes
  PaymentNotification.create! attributes
end

.enginesObject



11
12
13
# File 'lib/payment_engines.rb', line 11

def self.engines
  @@engines.sort{|a,b| (a[:locale] == I18n.locale.to_s ? -1 : 1) }
end

.find_payment(filter) ⇒ Object



23
24
25
# File 'lib/payment_engines.rb', line 23

def self.find_payment filter
  Backer.where(filter).first
end

.register(options) ⇒ Object



2
3
4
5
# File 'lib/payment_engines.rb', line 2

def self.register options
  @@engines ||= []
  @@engines.push(options)
end