Class: ActiveMerchant::Billing::Integrations::DirecPay::Status
- Inherits:
-
Object
- Object
- ActiveMerchant::Billing::Integrations::DirecPay::Status
- Includes:
- PostsData
- Defined in:
- lib/active_merchant/billing/integrations/direc_pay/status.rb
Constant Summary collapse
- STATUS_TEST_URL =
'https://test.timesofmoney.com/direcpay/secure/dpPullMerchAtrnDtls.jsp'
- STATUS_LIVE_URL =
'https://www.timesofmoney.com/direcpay/secure/dpPullMerchAtrnDtls.jsp'
Instance Attribute Summary collapse
-
#account ⇒ Object
readonly
Returns the value of attribute account.
-
#options ⇒ Object
readonly
Returns the value of attribute options.
Instance Method Summary collapse
-
#initialize(account, options = {}) ⇒ Status
constructor
A new instance of Status.
- #test? ⇒ Boolean
-
#update(authorization, notification_url) ⇒ Object
Use this method to manually request a status update to the provided notification_url.
Methods included from PostsData
included, #raw_ssl_request, #ssl_get, #ssl_post, #ssl_request
Constructor Details
#initialize(account, options = {}) ⇒ Status
Returns a new instance of Status.
14 15 16 |
# File 'lib/active_merchant/billing/integrations/direc_pay/status.rb', line 14 def initialize(account, = {}) @account, @options = account, end |
Instance Attribute Details
#account ⇒ Object (readonly)
Returns the value of attribute account.
12 13 14 |
# File 'lib/active_merchant/billing/integrations/direc_pay/status.rb', line 12 def account @account end |
#options ⇒ Object (readonly)
Returns the value of attribute options.
12 13 14 |
# File 'lib/active_merchant/billing/integrations/direc_pay/status.rb', line 12 def @options end |
Instance Method Details
#test? ⇒ Boolean
29 30 31 |
# File 'lib/active_merchant/billing/integrations/direc_pay/status.rb', line 29 def test? ActiveMerchant::Billing::Base.integration_mode == :test || [:test] end |
#update(authorization, notification_url) ⇒ Object
Use this method to manually request a status update to the provided notification_url
20 21 22 23 24 25 26 27 |
# File 'lib/active_merchant/billing/integrations/direc_pay/status.rb', line 20 def update(, notification_url) url = test? ? STATUS_TEST_URL : STATUS_LIVE_URL parameters = [ , account, notification_url ] data = PostData.new data[:requestparams] = parameters.join('|') response = ssl_get("#{url}?#{data.to_post_data}") end |