class OffsitePayments::Integrations::DirecPay::Status
Constants
- STATUS_LIVE_URL
- STATUS_TEST_URL
Attributes
account[R]
options[R]
Public Class Methods
new(account, options = {})
click to toggle source
# File lib/offsite_payments/integrations/direc_pay.rb, line 312 def initialize(account, options = {}) @account, @options = account, options end
Public Instance Methods
test?()
click to toggle source
# File lib/offsite_payments/integrations/direc_pay.rb, line 326 def test? OffsitePayments.mode == :test || options[:test] end
update(authorization, notification_url)
click to toggle source
Use this method to manually request a status update to the provided notification_url
# File lib/offsite_payments/integrations/direc_pay.rb, line 317 def update(authorization, notification_url) url = test? ? STATUS_TEST_URL : STATUS_LIVE_URL parameters = [ authorization, account, notification_url ] data = ActiveUtils::PostData.new data[:requestparams] = parameters.join('|') response = ssl_get("#{url}?#{data.to_post_data}") end