Skip to content

Instantly share code, notes, and snippets.

@shadowmaru
Created November 19, 2008 14:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save shadowmaru/26523 to your computer and use it in GitHub Desktop.
Save shadowmaru/26523 to your computer and use it in GitHub Desktop.
class CreateAuthorizenetGateway < ActiveRecord::Migration
def self.up
login = GatewayOption.create(:name => "login",
:description => "Your Authorize.Net API Login ID")
password = GatewayOption.create(:name => "password",
:description => "Your Authorize.Net Transaction Key.")
test = GatewayOption.create(:name => "test",
:description => "If true, perform transactions against the test server. Otherwise, perform transactions against the production server.")
gateway = Gateway.create(:name => "Authorize.net",
:clazz => "ActiveMerchant::Billing::AuthorizeNetGateway",
:description => "Active Merchant's Authorize.Net Gateway.",
:gateway_options => [login, password, test])
end
def self.down
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment