Class ActiveMerchant::Billing::ViaklixGateway
In: lib/active_merchant/billing/gateways/viaklix.rb
Parent: Gateway

Methods

credit   new   purchase  

Constants

TEST_URL = 'https://demo.viaklix.com/process.asp'
LIVE_URL = 'https://www.viaklix.com/process.asp'
APPROVED = '0'

Public Class methods

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

[Source]

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

Public Instance methods

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

[Source]

    # File lib/active_merchant/billing/gateways/viaklix.rb, line 43
43:       def credit(money, creditcard, options = {})
44:         if creditcard.is_a?(String)
45:           raise ArgumentError, "Reference credits are not supported. Please supply the original credit card"
46:         end
47:         
48:         form = {}
49:         add_invoice(form, options)
50:         add_creditcard(form, creditcard)        
51:         add_address(form, options)   
52:         add_customer_data(form, options)
53:         commit('CREDIT', money, form)
54:       end

Make a purchase

[Source]

    # File lib/active_merchant/billing/gateways/viaklix.rb, line 32
32:       def purchase(money, creditcard, options = {})
33:         form = {}
34:         add_invoice(form, options)
35:         add_creditcard(form, creditcard)        
36:         add_address(form, options)   
37:         add_customer_data(form, options)
38:         commit('SALE', money, form)
39:       end

[Validate]