| Class | ActiveMerchant::Billing::Gateway |
| In: |
lib/active_merchant/billing/gateway.rb
|
| Parent: | Object |
The Gateway class is the base class for all ActiveMerchant gateway implementations.
The standard list of gateway functions that most concrete gateway subclasses implement is:
Some gateways include features for recurring billing
Some gateways also support features for storing credit cards:
The options hash consists of the following options:
The :billing_address, and :shipping_address hashes can have the following keys:
| DEBIT_CARDS | = | [ :switch, :solo ] |
| options | [R] |
# File lib/active_merchant/billing/gateway.rb, line 106
106: def self.card_brand(source)
107: result = source.respond_to?(:brand) ? source.brand : source.type
108: result.to_s.downcase
109: end
# File lib/active_merchant/billing/gateway.rb, line 69
69: def self.inherited(subclass)
70: super
71: @@implementations << subclass
72: end
Use this method to check if your gateway of interest supports a credit card of some type
# File lib/active_merchant/billing/gateway.rb, line 102
102: def self.supports?(card_type)
103: supported_cardtypes.include?(card_type.to_sym)
104: end