Sha256: 1995fee09390f90294569deaddda1c13bf56366e0e5070771b44562570021478

Contents?: true

Size: 1.42 KB

Versions: 34

Compression:

Stored size: 1.42 KB

Contents

module ActiveMerchant #:nodoc:
  module Billing #:nodoc:
    module Integrations #:nodoc:
      module DirecPay
        autoload :Helper, File.dirname(__FILE__) + '/direc_pay/helper.rb'
        autoload :Return, File.dirname(__FILE__) + '/direc_pay/return.rb'
        autoload :Notification, File.dirname(__FILE__) + '/direc_pay/notification.rb'
        autoload :Status, File.dirname(__FILE__) + '/direc_pay/status.rb'
       
        mattr_accessor :production_url, :test_url
        
        self.production_url = "https://www.timesofmoney.com/direcpay/secure/dpMerchantTransaction.jsp"
        self.test_url       = "https://test.direcpay.com/direcpay/secure/dpMerchantTransaction.jsp"

        def self.service_url
          mode = ActiveMerchant::Billing::Base.integration_mode
          case mode
          when :production
            self.production_url
          when :test
            self.test_url
          else
            raise StandardError, "Integration mode set to an invalid value: #{mode}"
          end
        end
        
        def self.notification(post, options = {})
          Notification.new(post)
        end
        
        def self.return(query_string, options = {})
          Return.new(query_string, options)
        end
                
        def self.request_status_update(mid, transaction_id, notification_url)
          Status.new(mid).update(transaction_id, notification_url)
        end
      end
    end
  end
end

Version data entries

34 entries across 34 versions & 2 rubygems

Version Path
tanga_activemerchant-1.38.0.5 lib/active_merchant/billing/integrations/direc_pay.rb
tanga_activemerchant-1.38.0.4 lib/active_merchant/billing/integrations/direc_pay.rb
tanga_activemerchant-1.38.0.3 lib/active_merchant/billing/integrations/direc_pay.rb
tanga_activemerchant-1.38.0.2 lib/active_merchant/billing/integrations/direc_pay.rb
tanga_activemerchant-1.38.0.1 lib/active_merchant/billing/integrations/direc_pay.rb
tanga_activemerchant-1.38.0 lib/active_merchant/billing/integrations/direc_pay.rb
tanga_activemerchant-1.37.0 lib/active_merchant/billing/integrations/direc_pay.rb
activemerchant-1.43.3 lib/active_merchant/billing/integrations/direc_pay.rb
activemerchant-1.43.1 lib/active_merchant/billing/integrations/direc_pay.rb
activemerchant-1.43.0 lib/active_merchant/billing/integrations/direc_pay.rb
activemerchant-1.42.9 lib/active_merchant/billing/integrations/direc_pay.rb
activemerchant-1.42.8 lib/active_merchant/billing/integrations/direc_pay.rb
activemerchant-1.42.7 lib/active_merchant/billing/integrations/direc_pay.rb
activemerchant-1.42.6 lib/active_merchant/billing/integrations/direc_pay.rb
activemerchant-1.42.5 lib/active_merchant/billing/integrations/direc_pay.rb
activemerchant-1.42.4 lib/active_merchant/billing/integrations/direc_pay.rb
activemerchant-1.42.3 lib/active_merchant/billing/integrations/direc_pay.rb
activemerchant-1.42.2 lib/active_merchant/billing/integrations/direc_pay.rb
activemerchant-1.42.1 lib/active_merchant/billing/integrations/direc_pay.rb
activemerchant-1.42.0 lib/active_merchant/billing/integrations/direc_pay.rb