Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

set attr_accessible in gateway models to allow updating payment metho…

…d settings

Merges #9
  • Loading branch information...
commit 47a7e4f47769694ccde02675ec7fd200d788b030 1 parent e0aa8bf
@phillcampbell phillcampbell authored radar committed
View
4 app/models/spree/gateway/authorize_net.rb
@@ -2,7 +2,9 @@ module Spree
class Gateway::AuthorizeNet < Gateway
preference :login, :string
preference :password, :string
-
+
+ attr_accessible :preferred_login, :preferred_password
+
def provider_class
ActiveMerchant::Billing::AuthorizeNetGateway
end
View
2  app/models/spree/gateway/authorize_net_cim.rb
@@ -4,6 +4,8 @@ class Gateway::AuthorizeNetCim < Gateway
preference :password, :string
preference :test_mode, :boolean, :default => false
preference :validate_on_profile_create, :boolean, :default => false
+
+ attr_accessible :preferred_login, :preferred_password, :preferred_test_mode, :preferred_validate_on_profile_create
ActiveMerchant::Billing::Response.class_eval do
attr_writer :authorization
View
2  app/models/spree/gateway/beanstream.rb
@@ -4,6 +4,8 @@ class Gateway::Beanstream < Gateway
preference :user, :string
preference :password, :string
preference :secure_profile_api_key, :string
+
+ attr_accessible :preferred_login, :preferred_user, :preferred_password, :preferred_secure_profile_api_key
def provider_class
ActiveMerchant::Billing::BeanstreamGateway
View
2  app/models/spree/gateway/braintree.rb
@@ -3,6 +3,8 @@ class Gateway::Braintree < Gateway
preference :merchant_id, :string
preference :public_key, :string
preference :private_key, :string
+
+ attr_accessible :preferred_merchant_id, :preferred_public_key, :preferred_private_key
def provider_class
ActiveMerchant::Billing::BraintreeGateway
View
2  app/models/spree/gateway/eway.rb
@@ -1,6 +1,8 @@
module Spree
class Gateway::Eway < Gateway
preference :login, :string
+
+ attr_accessible :preferred_login
# Note: EWay supports purchase method only (no authorize method).
# Ensure Spree::Config[:auto_capture] is set to true
View
2  app/models/spree/gateway/linkpoint.rb
@@ -2,6 +2,8 @@ module Spree
class Gateway::Linkpoint < Gateway
preference :login, :string
preference :pem, :text
+
+ attr_accessible :preferred_login, :preferred_pem
def provider_class
ActiveMerchant::Billing::LinkpointGateway
View
2  app/models/spree/gateway/pay_pal.rb
@@ -4,6 +4,8 @@ class Gateway::PayPal < Gateway
preference :password, :string
preference :signature, :string
preference :currency_code, :string
+
+ attr_accessible :preferred_login, :preferred_password, :preferred_signature, :preferred_currency_code
def provider_class
ActiveMerchant::Billing::PaypalGateway
View
2  app/models/spree/gateway/sage_pay.rb
@@ -3,6 +3,8 @@ class Gateway::SagePay < Gateway
preference :login, :string
preference :password, :string
preference :account, :string
+
+ attr_accessible :preferred_login, :preferred_password, :preferred_account
def provider_class
ActiveMerchant::Billing::SagePayGateway
View
2  app/models/spree/gateway/samurai.rb
@@ -3,6 +3,8 @@ class Gateway::Samurai < Gateway
preference :login, :string
preference :password, :string
preference :processor_token, :string
+
+ attr_accessible :preferred_login, :preferred_password, :preferred_processor_token
# Make sure to have Spree::Config[:auto_capture] set to true.
View
2  app/models/spree/gateway/stripe.rb
@@ -1,6 +1,8 @@
module Spree
class Gateway::Stripe < Gateway
preference :login, :string
+
+ attr_accessible :preferred_login
# Make sure to have Spree::Config[:auto_capture] set to true.
Please sign in to comment.
Something went wrong with that request. Please try again.