Sha256: 2cafe6821e15c4813716cd8b95ada70c5086fcfc63a48981c88256a7ab38b357

Contents?: true

Size: 671 Bytes

Versions: 1

Compression:

Stored size: 671 Bytes

Contents

module ActiveMerchant #:nodoc:
  module Billing #:nodoc:
    module Base
      # Set ActiveMerchant gateways in test mode.
      #
      #   ActiveMerchant::Billing::Base.gateway_mode = :test
      mattr_accessor :gateway_mode
      
      # Set both the mode of both the gateways and integrations
      # at once
      mattr_reader :mode

      def self.mode=(mode)
        @@mode = mode
        self.gateway_mode = mode
      end

      self.mode = :production
                                                                
      # A check to see if we're in test mode
      def self.test?
        self.gateway_mode == :test
      end
    end             
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
am_credit_card-0.0.1 lib/active_merchant/billing/base.rb