Class/Module Index [+]

Quicksearch

ActiveMerchant::Billing::PayflowCommonAPI

Public Class Methods

included(base) click to toggle source
# File lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb, line 4
def self.included(base)
  base.default_currency = 'USD'
    
  base.class_attribute :partner
  
  # Set the default partner to PayPal
  base.partner = 'PayPal'
  
  base.supported_countries = ['US', 'CA', 'SG', 'AU']
  
  base.class_attribute :timeout
  base.timeout = 60
  
  # Enable safe retry of failed connections
  # Payflow is safe to retry because retried transactions use the same
  # X-VPS-Request-ID header. If a transaction is detected as a duplicate
  # only the original transaction data will be used by Payflow, and the
  # subsequent Responses will have a :duplicate parameter set in the params
  # hash.
  base.retry_safe = true
end
new(options = {}) click to toggle source
# File lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb, line 56
def initialize(options = {})
  requires!(options, :login, :password)
  
  @options = options
  @options[:partner] = partner if @options[:partner].blank?
  super
end

Public Instance Methods

capture(money, authorization, options = {}) click to toggle source
# File lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb, line 68
def capture(money, authorization, options = {})
  request = build_reference_request(:capture, money, authorization, options)
  commit(request, options)
end
test?() click to toggle source
# File lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb, line 64
def test?
  @options[:test] || super
end
void(authorization, options = {}) click to toggle source
# File lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb, line 73
def void(authorization, options = {})
  request = build_reference_request(:void, nil, authorization, options)
  commit(request, options)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.