Sha256: ab1c37f4bc80866505677a610cc53dbfcd09e44bfe9c86b8c296ee24b00de792

Contents?: true

Size: 907 Bytes

Versions: 1

Compression:

Stored size: 907 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
        self.production_url = 'https://select.worldpay.com/wcc/purchase'

        mattr_accessor :test_url
        self.test_url = 'https://select-test.worldpay.com/wcc/purchase'


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

        def self.notification(post)
          Notification.new(post)
        end  
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
activemerchant-1.12.1 lib/active_merchant/billing/integrations/world_pay.rb