From 086f69ccfb703f882d646fb14167aaf23aeacf6f Mon Sep 17 00:00:00 2001 From: Rohan Mitchell Date: Fri, 12 Dec 2014 11:35:18 +1100 Subject: [PATCH] Default payment method server/test_mode to live --- app/models/spree/gateway_decorator.rb | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/models/spree/gateway_decorator.rb b/app/models/spree/gateway_decorator.rb index e40b260ae8..3c6bb2638d 100644 --- a/app/models/spree/gateway_decorator.rb +++ b/app/models/spree/gateway_decorator.rb @@ -7,4 +7,9 @@ Spree::Gateway.class_eval do # To avoid that, we redefine this association here. has_and_belongs_to_many :distributors, join_table: 'distributors_payment_methods', :class_name => 'Enterprise', foreign_key: 'payment_method_id', association_foreign_key: 'distributor_id' + + + # Default to live + preference :server, :string, :default => 'live' + preference :test_mode, :boolean, :default => false end