Class: GpWebpay::Configuration

Inherits:
Object
  • Object
show all
Includes:
ActiveSupport::Configurable
Defined in:
lib/gp_webpay/config.rb

Overview

need a Class for 3.0

Instance Method Summary collapse

Instance Method Details

#gpe_pem_pathObject



49
50
51
52
53
# File 'lib/gp_webpay/config.rb', line 49

def gpe_pem_path
  file_name = production? ? "muzo.signing_prod.pem" : "muzo.signing_test.pem"

  File.expand_path("../../../certs/#{file_name}", __FILE__)
end

#param_nameObject



29
30
31
# File 'lib/gp_webpay/config.rb', line 29

def param_name
  config.param_name.respond_to?(:call) ? config.param_name.call : config.param_name
end

#pay_urlObject



33
34
35
36
37
38
39
# File 'lib/gp_webpay/config.rb', line 33

def pay_url
  if production?
    "https://3dsecure.gpwebpay.com/kb/order.do"
  else
    "https://test.3dsecure.gpwebpay.com/kb/order.do"
  end
end

#production?Boolean

Returns:



55
56
57
# File 'lib/gp_webpay/config.rb', line 55

def production?
  config.environment == "production"
end

#web_services_urlObject



41
42
43
44
45
46
47
# File 'lib/gp_webpay/config.rb', line 41

def web_services_url
  if production?
    "https://3dsecure.gpwebpay.com/pay-ws/v1/PaymentService"
  else
    "https://test.3dsecure.gpwebpay.com/pay-ws/v1/PaymentService"
  end
end