Sha256: 17118f74a12830b26dbdb79ecb080514c586c47bb092201a061fdcb86ebe41fb

Contents?: true

Size: 1.22 KB

Versions: 1

Compression:

Stored size: 1.22 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.timesofmoney.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)
          Notification.new(post)
        end
        
        def self.return(query_string)
          Return.new(query_string)
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
activemerchant-1.9.0 lib/active_merchant/billing/integrations/direc_pay.rb