# File lib/active_merchant/billing/gateways/beanstream/beanstream_core.rb, line 40 def self.included(base) base.default_currency = 'CAD' # The countries the gateway supports merchants from as 2 digit ISO country codes base.supported_countries = ['CA'] # The card types supported by the payment gateway base.supported_cardtypes = [:visa, :master, :american_express] # The homepage URL of the gateway base.homepage_url = 'http://www.beanstream.com/' # The name of the gateway base.display_name = 'Beanstream.com' end
Only :login is required by default, which is the merchant’s merchant ID. If you’d like to perform void, capture or refund transactions then you’ll also need to add a username and password to your account under administration -> account settings -> order settings -> Use username/password validation
# File lib/active_merchant/billing/gateways/beanstream/beanstream_core.rb, line 61 def initialize(options = {}) requires!(options, :login) @options = options super end
# File lib/active_merchant/billing/gateways/beanstream/beanstream_core.rb, line 67 def capture(money, authorization, options = {}) reference, amount, type = split_auth(authorization) post = {} add_amount(post, money) add_reference(post, reference) add_transaction_type(post, :capture) commit(post) end
# File lib/active_merchant/billing/gateways/beanstream/beanstream_core.rb, line 86 def credit(money, source, options = {}) deprecated Gateway::CREDIT_DEPRECATION_MESSAGE refund(money, source, options) end
# File lib/active_merchant/billing/gateways/beanstream/beanstream_core.rb, line 77 def refund(money, source, options = {}) post = {} reference, amount, type = split_auth(source) add_reference(post, reference) add_transaction_type(post, refund_action(type)) add_amount(post, money) commit(post) end
Generated with the Darkfish Rdoc Generator 2.