Created
September 26, 2011 19:38
-
-
Save citrus/1243183 to your computer and use it in GitHub Desktop.
Gateway::UsaEpay
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# config/application.rb | |
module YourApp | |
class Application < Rails::Application | |
require 'spree_site' | |
# ... | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# lib/spree_site.rb | |
module SpreeSite | |
class Engine < Rails::Engine | |
def self.activate | |
Gateway::UsaEpay.register | |
end | |
config.to_prepare &method(:activate).to_proc | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# app/models/gateway/usa_epay.rb | |
class Gateway::UsaEpay < Gateway | |
preference :login, :string | |
def provider_class | |
ActiveMerchant::Billing::UsaEpayGateway | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment