Sha256: c8989525a2b6b7fa0967517b9c3a30012d55ab9fb4b0366ccd239316618f637c

Contents?: true

Size: 1.19 KB

Versions: 59

Compression:

Stored size: 1.19 KB

Contents

module ActiveMerchant #:nodoc:
  module Billing #:nodoc:
    module Integrations #:nodoc:
      module DirecPay
        
        class Status
          include PostsData
                    
          STATUS_TEST_URL = 'https://test.timesofmoney.com/direcpay/secure/dpPullMerchAtrnDtls.jsp'
          STATUS_LIVE_URL = 'https://www.timesofmoney.com/direcpay/secure/dpPullMerchAtrnDtls.jsp'
          
          attr_reader :account, :options
          
          def initialize(account, options = {})
            @account, @options = account, options
          end
          
          
          # Use this method to manually request a status update to the provided notification_url
          def update(authorization, notification_url)
            url = test? ? STATUS_TEST_URL : STATUS_LIVE_URL
            parameters = [ authorization, account, notification_url ]
            data = PostData.new
            data[:requestparams] = parameters.join('|')
            
            response = ssl_get("#{url}?#{data.to_post_data}")
          end

          def test?
            ActiveMerchant::Billing::Base.integration_mode == :test || options[:test]
          end
          
        end
      end
    end
  end
end

Version data entries

59 entries across 59 versions & 12 rubygems

Version Path
activemerchant-1.32.1 lib/active_merchant/billing/integrations/direc_pay/status.rb
activemerchant-1.32.0 lib/active_merchant/billing/integrations/direc_pay/status.rb
activemerchant-1.31.1 lib/active_merchant/billing/integrations/direc_pay/status.rb
activemerchant-1.31.0 lib/active_merchant/billing/integrations/direc_pay/status.rb
activemerchant-1.30.0 lib/active_merchant/billing/integrations/direc_pay/status.rb
jelaniharris-activemerchant-1.29.2 lib/active_merchant/billing/integrations/direc_pay/status.rb
activemerchant-1.29.3 lib/active_merchant/billing/integrations/direc_pay/status.rb
activemerchant-1.29.2 lib/active_merchant/billing/integrations/direc_pay/status.rb
activemerchant-1.29.1 lib/active_merchant/billing/integrations/direc_pay/status.rb
jelaniharris-activemerchant-1.29.1 lib/active_merchant/billing/integrations/direc_pay/status.rb
activemerchant-1.29.0 lib/active_merchant/billing/integrations/direc_pay/status.rb
activemerchant-nsp-1.27.0 lib/active_merchant/billing/integrations/direc_pay/status.rb
activemerchant-1.28.0 lib/active_merchant/billing/integrations/direc_pay/status.rb
yetanothernguyen-activemerchant-1.21.2 lib/active_merchant/billing/integrations/direc_pay/status.rb
activemerchant-1.27.0 lib/active_merchant/billing/integrations/direc_pay/status.rb
yetanothernguyen-activemerchant-1.21.1 lib/active_merchant/billing/integrations/direc_pay/status.rb
activemerchant-1.26.0 lib/active_merchant/billing/integrations/direc_pay/status.rb
activemerchant-1.25.0 lib/active_merchant/billing/integrations/direc_pay/status.rb
jelaniharris-activemerchant-1.24.1 lib/active_merchant/billing/integrations/direc_pay/status.rb
activemerchant-1.24.0 lib/active_merchant/billing/integrations/direc_pay/status.rb