module FakePaymill

Constants

VALID_CREDIT_CARDS
VALID_CREDIT_CARDS_3DSECURE
VERSION

Public Class Methods

boot_server() click to toggle source
# File lib/fake_paymill.rb, line 35
def self.boot_server
  Server.new.boot
end
clear!() click to toggle source
# File lib/fake_paymill.rb, line 22
def self.clear!
  reset_log!
end
log_file_path() click to toggle source
# File lib/fake_paymill.rb, line 26
def self.log_file_path
  'tmp/log'
end
logger() click to toggle source
# File lib/fake_paymill.rb, line 45
def self.logger
  @logger
end
logger=(logger) click to toggle source
# File lib/fake_paymill.rb, line 49
def self.logger=(logger)
  @logger = logger
end
memory() click to toggle source
# File lib/fake_paymill.rb, line 53
def self.memory
  @memory
end
memory=(memory) click to toggle source
# File lib/fake_paymill.rb, line 57
def self.memory=(memory)
  @memory = memory
end
reset_log!() click to toggle source
# File lib/fake_paymill.rb, line 30
def self.reset_log!
  FileUtils.mkdir_p(File.dirname(log_file_path))
  File.new(log_file_path, 'w').close
end
set_configuration() click to toggle source
# File lib/fake_paymill.rb, line 39
def self.set_configuration
  Paymill::Configuration.api_base = '0.0.0.0'
  Paymill::Configuration.api_port = ENV['GATEWAY_PORT']
  Paymill::Configuration.development = true
end
start!() click to toggle source
# File lib/fake_paymill.rb, line 14
def self.start!
  reset_log!
  self.logger = Logger.new(log_file_path)
  self.memory = Memory.new
  boot_server
  set_configuration
end