Class: Gateway::Robokassa

Inherits:
Gateway
  • Object
show all
Defined in:
app/models/gateway/robokassa.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.currentObject



22
23
24
# File 'app/models/gateway/robokassa.rb', line 22

def self.current
  self.where(:type => self.to_s, :environment => Rails.env, :active => true).first
end

Instance Method Details

#descObject



26
27
28
29
30
31
32
# File 'app/models/gateway/robokassa.rb', line 26

def desc
  "<p>
    <label> #{I18n.t('robokassa.success_url')}: </label> http://[domain]/gateway/robokassa/success<br />
    <label> #{I18n.t('robokassa.result_url')}: </label> http://[domain]/gateway/robokassa/result<br />
    <label> #{I18n.t('robokassa.fail_url')}: </label> http://[domain]/gateway/robokassa/fail<br />
  </p>"
end

#method_typeObject



10
11
12
# File 'app/models/gateway/robokassa.rb', line 10

def method_type
  "robokassa"
end

#provider_classObject



6
7
8
# File 'app/models/gateway/robokassa.rb', line 6

def provider_class
  self.class
end

#test?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'app/models/gateway/robokassa.rb', line 14

def test?
  options[:test_mode] == true
end

#urlObject



18
19
20
# File 'app/models/gateway/robokassa.rb', line 18

def url
  self.test? ? "http://test.robokassa.ru/Index.aspx" : "https://merchant.roboxchange.com/Index.aspx"
end