Sha256: baa303a0212db0c4d08106a32cab3fd88e9f26c71ade38b1f610bb80ad09f208
Contents?: true
Size: 802 Bytes
Versions: 15
Compression:
Stored size: 802 Bytes
Contents
# Uncomment this if you reference any of your controllers in activate require_dependency 'application' class PaymentGatewayExtension < Spree::Extension version "1.0" description "Provides basic payment gateway functionality. User specifies an ActiveMerchant compatible gateway to use in the aplication." def activate # Set the global "gateway mode" for active merchant (depending on what environment we're in) ActiveMerchant::Billing::Base.gateway_mode = :test unless ENV['RAILS_ENV'] == "production" # Mixin the payment_gateway method into the base controller so it can be accessed by the checkout process, etc. Creditcard.class_eval do # add gateway methods to the creditcard so we can authorize, capture, etc. include Spree::PaymentGateway end end end
Version data entries
15 entries across 15 versions & 2 rubygems