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
tanga_activemerchant-1.38.0.5 lib/active_merchant/billing/integrations/world_pay.rb
tanga_activemerchant-1.38.0.4 lib/active_merchant/billing/integrations/world_pay.rb
tanga_activemerchant-1.38.0.3 lib/active_merchant/billing/integrations/world_pay.rb
tanga_activemerchant-1.38.0.2 lib/active_merchant/billing/integrations/world_pay.rb
tanga_activemerchant-1.38.0.1 lib/active_merchant/billing/integrations/world_pay.rb
tanga_activemerchant-1.38.0 lib/active_merchant/billing/integrations/world_pay.rb
tanga_activemerchant-1.37.0 lib/active_merchant/billing/integrations/world_pay.rb
activemerchant-1.43.3 lib/active_merchant/billing/integrations/world_pay.rb
activemerchant-1.43.1 lib/active_merchant/billing/integrations/world_pay.rb
activemerchant-1.43.0 lib/active_merchant/billing/integrations/world_pay.rb
activemerchant-1.42.9 lib/active_merchant/billing/integrations/world_pay.rb
activemerchant-1.42.8 lib/active_merchant/billing/integrations/world_pay.rb
activemerchant-1.42.7 lib/active_merchant/billing/integrations/world_pay.rb
activemerchant-1.42.6 lib/active_merchant/billing/integrations/world_pay.rb
activemerchant-1.42.5 lib/active_merchant/billing/integrations/world_pay.rb
activemerchant-1.42.4 lib/active_merchant/billing/integrations/world_pay.rb
activemerchant-1.42.3 lib/active_merchant/billing/integrations/world_pay.rb
activemerchant-1.42.2 lib/active_merchant/billing/integrations/world_pay.rb
activemerchant-1.42.1 lib/active_merchant/billing/integrations/world_pay.rb
activemerchant-1.42.0 lib/active_merchant/billing/integrations/world_pay.rb