Class: ActiveMerchant::Billing::SageBankcardGateway

Inherits:
Gateway
  • Object
show all
Includes:
SageCore
Defined in:
lib/active_merchant/billing/gateways/sage/sage_bankcard.rb

Overview

:nodoc:

Constant Summary

Constant Summary

Constants included from SageCore

ActiveMerchant::Billing::SageCore::TRANSACTIONS

Constants inherited from Gateway

Gateway::CREDIT_DEPRECATION_MESSAGE, Gateway::CURRENCIES_WITHOUT_FRACTIONS, Gateway::DEBIT_CARDS

Instance Attribute Summary

Attributes inherited from Gateway

#options

Instance Method Summary (collapse)

Methods included from SageCore

included, #initialize

Methods inherited from Gateway

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

Methods included from CreditCardFormatting

#format

Instance Method Details

- (Object) authorize(money, credit_card, options = {})



21
22
23
24
25
26
# File 'lib/active_merchant/billing/gateways/sage/sage_bankcard.rb', line 21

def authorize(money, credit_card, options = {})
  post = {}
  add_credit_card(post, credit_card)
  add_transaction_data(post, money, options)
  commit(:authorization, post)
end

- (Object) capture(money, reference, options = {})

The money amount is not used. The entire amount of the initial authorization will be captured.



37
38
39
40
41
# File 'lib/active_merchant/billing/gateways/sage/sage_bankcard.rb', line 37

def capture(money, reference, options = {})
  post = {}
  add_reference(post, reference)
  commit(:capture, post)
end

- (Object) credit(money, credit_card, options = {})



49
50
51
52
# File 'lib/active_merchant/billing/gateways/sage/sage_bankcard.rb', line 49

def credit(money, credit_card, options = {})
  deprecated CREDIT_DEPRECATION_MESSAGE
  refund(money, credit_card, options)
end

- (Object) purchase(money, credit_card, options = {})



28
29
30
31
32
33
# File 'lib/active_merchant/billing/gateways/sage/sage_bankcard.rb', line 28

def purchase(money, credit_card, options = {})
  post = {}
  add_credit_card(post, credit_card)
  add_transaction_data(post, money, options)
  commit(:purchase, post)
end

- (Object) refund(money, credit_card, options = {})



54
55
56
57
58
59
# File 'lib/active_merchant/billing/gateways/sage/sage_bankcard.rb', line 54

def refund(money, credit_card, options = {})
  post = {}
  add_credit_card(post, credit_card)
  add_transaction_data(post, money, options)
  commit(:credit, post)
end

- (Object) void(reference, options = {})



43
44
45
46
47
# File 'lib/active_merchant/billing/gateways/sage/sage_bankcard.rb', line 43

def void(reference, options = {})
  post = {}
  add_reference(post, reference)
  commit(:void, post)
end