Class: GpWebpay::Configuration
- Inherits:
-
Object
- Object
- GpWebpay::Configuration
- Includes:
- ActiveSupport::Configurable
- Defined in:
- lib/gp_webpay/config.rb
Overview
need a Class for 3.0
Instance Method Summary collapse
- #gpe_pem_path ⇒ Object
- #param_name ⇒ Object
- #pay_url ⇒ Object
- #production? ⇒ Boolean
- #web_services_url ⇒ Object
Instance Method Details
#gpe_pem_path ⇒ Object
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.("../../../certs/#{file_name}", __FILE__) end |
#param_name ⇒ Object
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_url ⇒ Object
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
56 57 58 |
# File 'lib/gp_webpay/config.rb', line 56 def production? config.environment == "production" end |
#web_services_url ⇒ Object
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 |