Sha256: 67e9c58bafce4334133410f96a4b0160d750c98f925c5798739666b689a106ea

Contents?: true

Size: 901 Bytes

Versions: 1

Compression:

Stored size: 901 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 :service_url
        self.service_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.0 lib/active_merchant/billing/integrations/world_pay.rb