Class/Module Index [+]

Quicksearch

ActiveMerchant::Billing::ViaklixGateway

Constants

APPROVED

Public Class Methods

new(options = {}) click to toggle source

Initialize the Gateway

The gateway requires that a valid login and password be passed in the options hash.

Options

  • :login -- Merchant ID

  • :password -- PIN

  • :user -- Specify a subuser of the account (optional)

  • :test => true or false -- Force test transactions

# File lib/active_merchant/billing/gateways/viaklix.rb, line 33
def initialize(options = {})
  requires!(options, :login, :password)
  @options = options
  super
end

Public Instance Methods

credit(money, creditcard, options = {}) click to toggle source

Make a credit to a card (Void can only be done from the virtual terminal) Viaklix does not support credits by reference. You must pass in the credit card

# File lib/active_merchant/billing/gateways/viaklix.rb, line 51
def credit(money, creditcard, options = {})
  if creditcard.is_a?(String)
    raise ArgumentError, "Reference credits are not supported. Please supply the original credit card"
  end
  
  form = {}
  add_invoice(form, options)
  add_creditcard(form, creditcard)        
  add_address(form, options)   
  add_customer_data(form, options)
  commit(:credit, money, form)
end
purchase(money, creditcard, options = {}) click to toggle source

Make a purchase

# File lib/active_merchant/billing/gateways/viaklix.rb, line 40
def purchase(money, creditcard, options = {})
  form = {}
  add_invoice(form, options)
  add_creditcard(form, creditcard)        
  add_address(form, options)   
  add_customer_data(form, options)
  commit(:purchase, money, form)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.