Class/Module Index [+]

Quicksearch

ActiveMerchant::Billing::SkipJackGateway

Public Class Methods

new(options = {}) click to toggle source

Creates a new SkipJackGateway

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

Options

  • :login -- The SkipJack Merchant Serial Number.

  • :password -- The SkipJack Developer Serial Number.

  • :test => true or false -- Use the test or live SkipJack url.

  • :advanced => true or false -- Set to true if you're using an advanced processor

See the SkipJack Integration Guide for details. (default: false)

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

Public Instance Methods

authorize(money, creditcard, options = {}) click to toggle source
# File lib/active_merchant/billing/gateways/skip_jack.rb, line 190
def authorize(money, creditcard, options = {})
  requires!(options, :order_id, :email)
  post = {}
  add_invoice(post, options)
  add_creditcard(post, creditcard)
  add_address(post, options)
  add_customer_data(post, options)
  commit(:authorization, money, post)
end
capture(money, authorization, options = {}) click to toggle source

Captures the funds from an authorized transaction.

Parameters

  • money -- The amount to be capture as an Integer in cents.

  • authorization -- The authorization returned from the previous authorize request.

  • options -- A hash of optional parameters.

Options

  • :force_settlement -- Force the settlement to occur as soon as possible. This option is not supported by other gateways. See the SkipJack API reference for more details

# File lib/active_merchant/billing/gateways/skip_jack.rb, line 221
def capture(money, authorization, options = {})
  post = { }
  add_status_action(post, 'SETTLE')
  add_forced_settlement(post, options)
  add_transaction_id(post, authorization)
  commit(:change_status, money, post)
end
credit(money, identification, options = {}) click to toggle source
# File lib/active_merchant/billing/gateways/skip_jack.rb, line 245
def credit(money, identification, options = {})
  deprecated CREDIT_DEPRECATION_MESSAGE
  refund(money, identification, options)
end
purchase(money, creditcard, options = {}) click to toggle source
# File lib/active_merchant/billing/gateways/skip_jack.rb, line 200
def purchase(money, creditcard, options = {})
  post = {}
  authorization = authorize(money, creditcard, options)
  if authorization.success?
    capture(money, authorization.authorization)
  else
    authorization
  end
end
refund(money, identification, options = {}) click to toggle source
# File lib/active_merchant/billing/gateways/skip_jack.rb, line 237
def refund(money, identification, options = {})
  post = {}
  add_status_action(post, 'CREDIT')
  add_forced_settlement(post, options)
  add_transaction_id(post, identification)
  commit(:change_status, money, post)
end
status(order_id) click to toggle source
# File lib/active_merchant/billing/gateways/skip_jack.rb, line 250
def status(order_id)
  commit(:get_status, nil, :szOrderNumber => order_id)
end
test?() click to toggle source
# File lib/active_merchant/billing/gateways/skip_jack.rb, line 186
def test?
  @options[:test] || super
end
void(authorization, options = {}) click to toggle source
# File lib/active_merchant/billing/gateways/skip_jack.rb, line 229
def void(authorization, options = {})
  post = {}
  add_status_action(post, 'DELETE')
  add_forced_settlement(post, options)
  add_transaction_id(post, authorization)
  commit(:change_status, nil, post)
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.