Module: Pay2go

Defined in:
lib/pay2go.rb,
lib/pay2go/version.rb

Constant Summary collapse

VERSION =
"0.1.0"
@@item_options =
{}

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.integration_modeObject

Returns the value of attribute integration_mode.



17
18
19
# File 'lib/pay2go.rb', line 17

def integration_mode
  @integration_mode
end

Class Method Details

.service_urlObject



20
21
22
23
24
25
26
27
28
29
30
# File 'lib/pay2go.rb', line 20

def self.service_url
  mode =  Pay2go.integration_mode
  case mode
    when :development
      "https://capi.pay2go.com/MPG/mpg_gateway"
    when :production
      "https://api.pay2go.com/MPG/mpg_gateway"
    else
      raise StandardError, "Integration mode set to an invalid value: #{mode}"
  end
end

.setup {|_self| ... } ⇒ Object

Yields:

  • (_self)

Yield Parameters:

  • _self (Pay2go)

    the object that the method was called on



33
34
35
# File 'lib/pay2go.rb', line 33

def self.setup
  yield(self)
end