Sha256: badf217d4b5dc55b44face480f7b2d69bb07c6ddfdb6eec2e77204cb71fbb2a2

Contents?: true

Size: 977 Bytes

Versions: 36

Compression:

Stored size: 977 Bytes

Contents

require File.dirname(__FILE__) + '/world_pay/helper.rb'
require File.dirname(__FILE__) + '/world_pay/notification.rb'

module ActiveMerchant #:nodoc:
  module Billing #:nodoc:
    module Integrations #:nodoc:
      module WorldPay

        mattr_accessor :production_url, :test_url
        self.production_url = 'https://secure.worldpay.com/wcc/purchase'
        self.test_url = 'https://secure-test.worldpay.com/wcc/purchase'

        def self.service_url
          case ActiveMerchant::Billing::Base.integration_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, options)
        end

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

Version data entries

36 entries across 36 versions & 2 rubygems

Version Path
activemerchant-1.41.0 lib/active_merchant/billing/integrations/world_pay.rb
activemerchant-1.40.0 lib/active_merchant/billing/integrations/world_pay.rb
activemerchant-1.39.2 lib/active_merchant/billing/integrations/world_pay.rb
activemerchant-1.39.1 lib/active_merchant/billing/integrations/world_pay.rb
activemerchant-1.39.0 lib/active_merchant/billing/integrations/world_pay.rb
activemerchant-1.38.1 lib/active_merchant/billing/integrations/world_pay.rb
activemerchant-1.38.0 lib/active_merchant/billing/integrations/world_pay.rb
activemerchant-1.37.0 lib/active_merchant/billing/integrations/world_pay.rb
activemerchant-1.36.0 lib/active_merchant/billing/integrations/world_pay.rb
activemerchant-1.35.0 lib/active_merchant/billing/integrations/world_pay.rb
activemerchant-1.35.1 lib/active_merchant/billing/integrations/world_pay.rb
activemerchant-1.34.1 lib/active_merchant/billing/integrations/world_pay.rb
activemerchant-1.34.0 lib/active_merchant/billing/integrations/world_pay.rb
activemerchant-1.33.0 lib/active_merchant/billing/integrations/world_pay.rb
activemerchant-1.32.1 lib/active_merchant/billing/integrations/world_pay.rb
activemerchant-1.32.0 lib/active_merchant/billing/integrations/world_pay.rb