Class/Module Index [+]

Quicksearch

ActiveMerchant::Billing::QbmsGateway

Constants

API_VERSION
TYPES

Public Class Methods

new(options = {}) click to toggle source

Creates a new QbmsGateway

The gateway requires that a valid app id, app login, and ticket be passed in the options hash.

Options

  • :login -- The App Login (REQUIRED)

  • :ticket -- The Connection Ticket. (REQUIRED)

  • :pem -- The PEM-encoded SSL client key and certificate. (REQUIRED)

  • :test -- true or false. If true, perform transactions against the test server. Otherwise, perform transactions against the production server.

# File lib/active_merchant/billing/gateways/qbms.rb, line 39
def initialize(options = {})
  requires!(options, :login, :ticket)
  test_mode = options[:test] || false
  @options = options
  super
end

Public Instance Methods

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

Performs an authorization, which reserves the funds on the customer’s credit card, but does not charge the card.

Parameters

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

  • creditcard -- The CreditCard details for the transaction.

  • options -- A hash of optional parameters.

# File lib/active_merchant/billing/gateways/qbms.rb, line 55
def authorize(money, creditcard, options = {})
  commit(:authorize, money, options.merge(:credit_card => creditcard))
end
capture(money, authorization, options = {}) click to toggle source

Captures the funds from an authorized transaction.

Parameters

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

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

# File lib/active_merchant/billing/gateways/qbms.rb, line 78
def capture(money, authorization, options = {})
  commit(:capture, money, options.merge(:transaction_id => authorization))
end
credit(money, identification, options = {}) click to toggle source

Credit an account.

This transaction is also referred to as a Refund and indicates to the gateway that money should flow from the merchant to the customer.

Parameters

  • money -- The amount to be credited to the customer as an Integer value in cents.

  • identification -- The ID of the original transaction against which the credit is being issued.

  • options -- A hash of parameters.

# File lib/active_merchant/billing/gateways/qbms.rb, line 104
def credit(money, identification, options = {})
  deprecated CREDIT_DEPRECATION_MESSAGE
  refund(money, identification, options = {})
end
purchase(money, creditcard, options = {}) click to toggle source

Perform a purchase, which is essentially an authorization and capture in a single operation.

Parameters

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

  • creditcard -- The CreditCard details for the transaction.

  • options -- A hash of optional parameters.

# File lib/active_merchant/billing/gateways/qbms.rb, line 67
def purchase(money, creditcard, options = {})
  commit(:purchase, money, options.merge(:credit_card => creditcard))
end
query() click to toggle source

Query the merchant account status

# File lib/active_merchant/billing/gateways/qbms.rb, line 114
def query
  commit(:query, nil, {})
end
refund(money, identification, options = {}) click to toggle source
# File lib/active_merchant/billing/gateways/qbms.rb, line 109
def refund(money, identification, options = {})
  commit(:refund, money, options.merge(:transaction_id => identification))
end
test?() click to toggle source
# File lib/active_merchant/billing/gateways/qbms.rb, line 118
def test?
  @options[:test] || super  
end
void(authorization, options = {}) click to toggle source

Void a previous transaction

Parameters

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

# File lib/active_merchant/billing/gateways/qbms.rb, line 88
def void(authorization, options = {})
  commit(:void, nil, options.merge(:transaction_id => authorization))
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.