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



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

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



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

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

#pay_urlObject



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

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:

  • (Boolean)


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

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

#web_services_urlObject



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

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