Class: ActiveMerchant::Billing::PaymentechOrbitalGateway

Inherits:
Gateway
  • Object
show all
Defined in:
lib/active_merchant/billing/gateways/paymentech_orbital.rb

Constant Summary

Constants inherited from Gateway

Gateway::DEBIT_CARDS

Instance Attribute Summary collapse

Attributes inherited from Gateway

#options

Instance Method Summary collapse

Methods inherited from Gateway

#card_brand, card_brand, inherited, supports?, #test?

Methods included from Utils

generate_unique_id

Methods included from CreditCardFormatting

#format

Methods included from RequiresParameters

#requires!

Methods included from PostsData

included, #ssl_get, #ssl_post

Constructor Details

#initialize(options = {}) ⇒ PaymentechOrbitalGateway

Returns a new instance of PaymentechOrbitalGateway.



61
62
63
64
65
66
67
68
# File 'lib/active_merchant/billing/gateways/paymentech_orbital.rb', line 61

def initialize(options = {})
  requires!(options, :login, :password, :merchant_id, :bin, :terminal_id)
  @options = options.merge({
    :currency_code => self.class.currency_code, 
    :currency_exponent => self.class.currency_exponent
  })
  super
end

Instance Attribute Details

#requestObject (readonly)

Returns the value of attribute request.



59
60
61
# File 'lib/active_merchant/billing/gateways/paymentech_orbital.rb', line 59

def request
  @request
end

#responseObject (readonly)

Returns the value of attribute response.



59
60
61
# File 'lib/active_merchant/billing/gateways/paymentech_orbital.rb', line 59

def response
  @response
end

Instance Method Details

#authorize(money, credit_card = nil, options = {}) ⇒ Object



70
71
72
73
74
# File 'lib/active_merchant/billing/gateways/paymentech_orbital.rb', line 70

def authorize(money, credit_card=nil, options = {})
  @request = NewOrderRequest.new("A", money, credit_card, options.merge(@options))

  commit('authonly', @request)
end

#end_of_day(options = {}) ⇒ Object



100
101
102
103
104
# File 'lib/active_merchant/billing/gateways/paymentech_orbital.rb', line 100

def end_of_day(options={})
  @request = EndOfDayRequest.new(options.merge(@options))

  commit('end of day', @request)
end

#profile(action, credit_card = nil, options = {}) ⇒ Object



88
89
90
91
92
# File 'lib/active_merchant/billing/gateways/paymentech_orbital.rb', line 88

def profile(action, credit_card=nil, options={})
  @request = ProfileManagementRequest.new(action, credit_card, options.merge(@options))

  commit("profile-#{action}", @request)
end

#purchase(money, credit_card = nil, options = {}) ⇒ Object



76
77
78
79
80
# File 'lib/active_merchant/billing/gateways/paymentech_orbital.rb', line 76

def purchase(money, credit_card=nil, options = {})
  @request = NewOrderRequest.new("AC", money, credit_card, options.merge(@options))

  commit('sale', @request)
end

#refund(money, credit_card = nil, options = {}) ⇒ Object



82
83
84
85
86
# File 'lib/active_merchant/billing/gateways/paymentech_orbital.rb', line 82

def refund(money, credit_card=nil, options={})
  @request = NewOrderRequest.new("R", money, credit_card, options.merge(@options))

  commit('refund', @request)
end

#void(tx_ref_num, tx_ref_idx, money = nil, options = {}) ⇒ Object



94
95
96
97
98
# File 'lib/active_merchant/billing/gateways/paymentech_orbital.rb', line 94

def void(tx_ref_num, tx_ref_idx, money=nil, options={})
  @request = VoidRequest.new(tx_ref_num, tx_ref_idx, money, options.merge(@options))

  commit('void', @request)
end