Sha256: a44f70a232a91ef709e10745975f804898d9aabaf609ea4eadb91ca7693045fd

Contents?: true

Size: 1.48 KB

Versions: 48

Compression:

Stored size: 1.48 KB

Contents

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

      # Documentation: You will get it after registration steps here:
      # http://reg.webpay.by/registration-form.php
      module WebPay
        autoload :Helper, File.dirname(__FILE__) + '/web_pay/helper.rb'
        autoload :Notification, File.dirname(__FILE__) + '/web_pay/notification.rb'
        autoload :Common, File.dirname(__FILE__) + '/web_pay/common.rb'

        # Overwrite this if you want to change the WebPay sandbox url
        mattr_accessor :test_url
        self.test_url = 'https://secure.sandbox.webpay.by:8843'

        # Overwrite this if you want to change the WebPay production url
        mattr_accessor :production_url
        self.production_url = 'https://secure.webpay.by'

        mattr_accessor :signature_parameter_name
        self.signature_parameter_name = 'wsb_signature'

        def self.service_url
          mode = ActiveMerchant::Billing::Base.integration_mode
          case 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.helper(order, account, options = {})
          Helper.new(order, account, options)
        end

        def self.notification(query_string, options = {})
          Notification.new(query_string, options)
        end
      end
    end
  end
end

Version data entries

48 entries across 48 versions & 4 rubygems

Version Path
activemerchant-1.41.0 lib/active_merchant/billing/integrations/web_pay.rb
activemerchant-1.40.0 lib/active_merchant/billing/integrations/web_pay.rb
activemerchant-1.39.2 lib/active_merchant/billing/integrations/web_pay.rb
activemerchant-1.39.1 lib/active_merchant/billing/integrations/web_pay.rb
activemerchant-1.39.0 lib/active_merchant/billing/integrations/web_pay.rb
activemerchant-1.38.1 lib/active_merchant/billing/integrations/web_pay.rb
activemerchant-1.38.0 lib/active_merchant/billing/integrations/web_pay.rb
activemerchant-1.37.0 lib/active_merchant/billing/integrations/web_pay.rb
activemerchant-1.36.0 lib/active_merchant/billing/integrations/web_pay.rb
activemerchant-1.35.0 lib/active_merchant/billing/integrations/web_pay.rb
activemerchant-1.35.1 lib/active_merchant/billing/integrations/web_pay.rb
activemerchant-1.34.1 lib/active_merchant/billing/integrations/web_pay.rb
activemerchant-1.34.0 lib/active_merchant/billing/integrations/web_pay.rb
activemerchant-1.33.0 lib/active_merchant/billing/integrations/web_pay.rb
activemerchant-1.32.1 lib/active_merchant/billing/integrations/web_pay.rb
activemerchant-1.32.0 lib/active_merchant/billing/integrations/web_pay.rb
activemerchant-1.31.1 lib/active_merchant/billing/integrations/web_pay.rb
activemerchant-1.31.0 lib/active_merchant/billing/integrations/web_pay.rb
activemerchant-1.30.0 lib/active_merchant/billing/integrations/web_pay.rb
jelaniharris-activemerchant-1.29.2 lib/active_merchant/billing/integrations/web_pay.rb