Sha256: 64c7a22a185ea160501dda2cb021d0ebb23f90501f9095d6629542daf80a5327

Contents?: true

Size: 1.47 KB

Versions: 76

Compression:

Stored size: 1.47 KB

Contents

module ActiveMerchant #:nodoc:
  module Billing #:nodoc:
    module Integrations #:nodoc:
      module EPaymentPlans
        autoload :Helper, File.dirname(__FILE__) + '/e_payment_plans/helper.rb'
        autoload :Notification, File.dirname(__FILE__) + '/e_payment_plans/notification.rb'

        mattr_accessor :production_url
        self.production_url = 'https://www.epaymentplans.com'

        mattr_accessor :test_url
        self.test_url = 'https://test.epaymentplans.com'

        def self.service_url
          mode = ActiveMerchant::Billing::Base.integration_mode
          case mode
          when :production
            "#{production_url}/order/purchase"
          when :test
            "#{test_url}/order/purchase"
          else
            raise StandardError, "Integration mode set to an invalid value: #{mode}"
          end
        end

        def self.notification_confirmation_url
          mode = ActiveMerchant::Billing::Base.integration_mode
          case mode
          when :production
            "#{production_url}/order/confirmation"
          when :test
            "#{test_url}/order/confirmation"
          else
            raise StandardError, "Integration mode set to an invalid value: #{mode}"
          end
        end

        def self.notification(post, options = {})
          Notification.new(post, options)
        end

        def self.return(query_string, options = {})
          Return.new(query_string, options)
        end
      end
    end
  end
end

Version data entries

76 entries across 76 versions & 9 rubygems

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