Class: GpWebpay::Configuration::MerchantConfig
- Inherits:
-
Object
- Object
- GpWebpay::Configuration::MerchantConfig
- Defined in:
- lib/gp_webpay/configuration.rb
Constant Summary collapse
- DEFAULT_HTTP_URL =
'https://3dsecure.gpwebpay.com/pgw/order.do'.freeze
- DEFAULT_HTTP_TEST_URL =
'https://test.3dsecure.gpwebpay.com/pgw/order.do'.freeze
- DEFAULT_WS_URL =
'https://3dsecure.gpwebpay.com/pay-ws/v1/PaymentService'.freeze
- DEFAULT_WS_TEST_URL =
'https://test.3dsecure.gpwebpay.com/pay-ws/v1/PaymentService'.freeze
Instance Attribute Summary collapse
-
#enabled_methods ⇒ Object
Returns the value of attribute enabled_methods.
-
#gpe_pem ⇒ Object
Returns the value of attribute gpe_pem.
- #http_url ⇒ Object
-
#merchant_number ⇒ Object
Returns the value of attribute merchant_number.
-
#merchant_password ⇒ Object
Returns the value of attribute merchant_password.
-
#merchant_pem ⇒ Object
Returns the value of attribute merchant_pem.
-
#production ⇒ Object
Returns the value of attribute production.
-
#provider ⇒ Object
Returns the value of attribute provider.
- #ws_url ⇒ Object
-
#wsdl_file ⇒ Object
Returns the value of attribute wsdl_file.
Instance Method Summary collapse
-
#initialize(merchant_number) ⇒ MerchantConfig
constructor
A new instance of MerchantConfig.
Constructor Details
#initialize(merchant_number) ⇒ MerchantConfig
Returns a new instance of MerchantConfig.
50 51 52 53 54 55 |
# File 'lib/gp_webpay/configuration.rb', line 50 def initialize(merchant_number) @merchant_number = merchant_number @production = false @wsdl_file = File.read("#{GpWebpay.root}/config/wsdl/cws_v1.wsdl") @enabled_methods = 'credit_card,transfer' end |
Instance Attribute Details
#enabled_methods ⇒ Object
Returns the value of attribute enabled_methods.
42 43 44 |
# File 'lib/gp_webpay/configuration.rb', line 42 def enabled_methods @enabled_methods end |
#gpe_pem ⇒ Object
Returns the value of attribute gpe_pem.
42 43 44 |
# File 'lib/gp_webpay/configuration.rb', line 42 def gpe_pem @gpe_pem end |
#http_url ⇒ Object
57 58 59 60 61 62 63 |
# File 'lib/gp_webpay/configuration.rb', line 57 def http_url if @http_url.nil? production ? DEFAULT_HTTP_URL : DEFAULT_HTTP_TEST_URL else @http_url end end |
#merchant_number ⇒ Object
Returns the value of attribute merchant_number.
42 43 44 |
# File 'lib/gp_webpay/configuration.rb', line 42 def merchant_number @merchant_number end |
#merchant_password ⇒ Object
Returns the value of attribute merchant_password.
42 43 44 |
# File 'lib/gp_webpay/configuration.rb', line 42 def merchant_password @merchant_password end |
#merchant_pem ⇒ Object
Returns the value of attribute merchant_pem.
42 43 44 |
# File 'lib/gp_webpay/configuration.rb', line 42 def merchant_pem @merchant_pem end |
#production ⇒ Object
Returns the value of attribute production.
42 43 44 |
# File 'lib/gp_webpay/configuration.rb', line 42 def production @production end |
#provider ⇒ Object
Returns the value of attribute provider.
42 43 44 |
# File 'lib/gp_webpay/configuration.rb', line 42 def provider @provider end |
#ws_url ⇒ Object
65 66 67 68 69 70 71 |
# File 'lib/gp_webpay/configuration.rb', line 65 def ws_url if @ws_url.nil? production ? DEFAULT_WS_URL : DEFAULT_WS_TEST_URL else @ws_url end end |
#wsdl_file ⇒ Object
Returns the value of attribute wsdl_file.
42 43 44 |
# File 'lib/gp_webpay/configuration.rb', line 42 def wsdl_file @wsdl_file end |