Class: ActiveMerchant::Billing::QuickpayGateway

Inherits:
Gateway
  • Object
show all
Defined in:
lib/active_merchant/billing/gateways/quickpay.rb

Constant Summary

Constants inherited from Gateway

Gateway::CREDIT_DEPRECATION_MESSAGE, Gateway::CURRENCIES_WITHOUT_FRACTIONS, Gateway::DEBIT_CARDS, Gateway::RECURRING_DEPRECATION_MESSAGE, Gateway::STANDARD_ERROR_CODE

Instance Attribute Summary

Attributes inherited from Gateway

#options

Class Method Summary collapse

Methods inherited from Gateway

#card_brand, card_brand, #generate_unique_id, inherited, #initialize, non_fractional_currency?, #scrub, supported_countries, #supported_countries, supported_countries=, supports?, #supports_network_tokenization?, #supports_scrubbing?, #test?

Methods included from CreditCardFormatting

#expdate, #format

Methods included from PostsData

included, #raw_ssl_request, #ssl_get, #ssl_post, #ssl_request

Constructor Details

This class inherits a constructor from ActiveMerchant::Billing::Gateway

Class Method Details

.new(options = {}) ⇒ Object



12
13
14
15
16
17
18
19
20
21
# File 'lib/active_merchant/billing/gateways/quickpay.rb', line 12

def self.new(options = {})
  options.fetch(:login) rescue raise ArgumentError.new("Missing required parameter: login")

  version = options[:login].to_i < 10000000 ? 10 : 7
  if version <= 7
    QuickpayV4to7Gateway.new(options)
  else
    QuickpayV10Gateway.new(options)     
  end
end