Guest User

Untitled

a guest
Feb 21st, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. class CreateAuthorizenetGateway < ActiveRecord::Migration
  2. def self.up
  3. login = GatewayOption.create(:name => "login",
  4. :description => "Your Authorize.Net API Login ID")
  5. password = GatewayOption.create(:name => "password",
  6. :description => "Your Authorize.Net Transaction Key.")
  7. test = GatewayOption.create(:name => "test",
  8. :description => "If true, perform transactions against the test server. Otherwise, perform transactions against the production server.")
  9.  
  10. gateway = Gateway.create(:name => "Authorize.net",
  11. :clazz => "ActiveMerchant::Billing::AuthorizeNetGateway",
  12. :description => "Active Merchant's Authorize.Net Gateway.",
  13. :gateway_options => [login, password, test])
  14. end
  15.  
  16. def self.down
  17. end
  18. end
Add Comment
Please, Sign In to add comment