Guest User

Untitled

a guest
Jan 23rd, 2018
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.79 KB | None | 0 0
  1. #### core/lib/spree_core/railtie.rb #####
  2.  
  3. initializer "spree.environment" do |app|
  4. app.config.spree = Spree::Environment.new
  5. end
  6.  
  7. initializer "spree.register.payments" do |app|
  8. app.config.spree.payment_methods = [
  9. Gateway::Bogus,
  10. Gateway::AuthorizeNet,
  11. Gateway::AuthorizeNetCim,
  12. Gateway::Eway,
  13. Gateway::Linkpoint,
  14. Gateway::PayPal,
  15. Gateway::SagePay,
  16. Gateway::Beanstream,
  17. Gateway::Braintree,
  18. PaymentMethod::Check ]
  19. end
  20.  
  21. #### core/lib/spree/environment.rb #####
  22.  
  23. module Spree
  24. class Environment
  25. attr_accessor :calculators, :payment_methods
  26. end
  27. end
  28.  
  29. #### core/app/models/payment_methods #####
  30.  
  31. def self.providers
  32. Rails.application.config.spree.payment_methods
  33. end
Add Comment
Please, Sign In to add comment