Module: TrustPayRails

Defined in:
lib/trust_pay_rails.rb,
lib/trust_pay_rails/railtie.rb,
lib/trust_pay_rails/version.rb,
lib/trust_pay_rails/signature.rb,
lib/trust_pay_rails/view_helpers.rb,
lib/generators/trust_pay_rails/routes_generator.rb

Defined Under Namespace

Modules: Generators, ViewHelpers Classes: Railtie, Signature

Constant Summary collapse

VERSION =
"0.1.1"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.aidObject

Returns the value of attribute aid.



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

def aid
  @aid
end

.environmentObject

Returns the value of attribute environment.



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

def environment
  @environment
end

.fake_bank_urlObject

Returns the value of attribute fake_bank_url.



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

def fake_bank_url
  @fake_bank_url
end

.fake_card_urlObject

Returns the value of attribute fake_card_url.



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

def fake_card_url
  @fake_card_url
end

.keyObject

Returns the value of attribute key.



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

def key
  @key
end

Class Method Details

.bank_transfer_urlObject



14
15
16
17
18
19
20
21
22
23
# File 'lib/trust_pay_rails.rb', line 14

def self.bank_transfer_url
  case @environment
  when :testing
    'https://ib.test.trustpay.eu/mapi/pay.aspx'
  when :production
    'https://ib.trustpay.eu/mapi/pay.aspx'
  when :fake
    @fake_bank_url
  end
end

.card_transfer_urlObject



25
26
27
28
29
30
31
32
33
34
35
36
# File 'lib/trust_pay_rails.rb', line 25

def self.card_transfer_url
  case @environment
  when :testing
    # this won't actually work because trustpay does not offec car payment
    # testing.
    'https://test.trustpay.eu/mapi/cardpayments.aspx'
  when :production
    'https://ib.trustpay.eu/mapi/cardpayments.aspx'
  when :fake
    @fake_card_url
  end
end