Skip to content

Instantly share code, notes, and snippets.

@aileron
Created June 18, 2012 05:24
Show Gist options
  • Save aileron/2946977 to your computer and use it in GitHub Desktop.
Save aileron/2946977 to your computer and use it in GitHub Desktop.
Gem (active_paypal_adaptive_payment) 初期化コード config/initializers/paypal.rb
unless Rails.env.production?
ActiveMerchant::Billing::Base.mode = :test
end
config = YAML.load(ERB.new(File.read("#{Rails.root}/config/paypal.yml")).result)[Rails.env]
PaypalGateway = ActiveMerchant::Billing::PaypalAdaptivePayment.new(
:login => config["username"],
:password => config["password"],
:signature => config["signature"],
:appid => config["application_id"]
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment