diff --git a/app/views/spree/shared/_paypal_cart_button.html.erb b/app/views/spree/shared/_paypal_cart_button.html.erb index cc7a1e20..c640f0c6 100644 --- a/app/views/spree/shared/_paypal_cart_button.html.erb +++ b/app/views/spree/shared/_paypal_cart_button.html.erb @@ -6,7 +6,15 @@ var paypalOptions = { flow: 'vault', enableShippingAddress: true, - environment: '<%= Rails.env.production? ? "production" : "sandbox" %>' + environment: '<%= Rails.env.production? ? "production" : "sandbox" %>', + locale: '<%= paypal_button_preference(:paypal_button_locale, store: current_store) %>', + style: { + color: '<%= paypal_button_preference(:paypal_button_color, store: current_store) %>', + size: '<%= paypal_button_preference(:paypal_button_size, store: current_store) %>', + shape: '<%= paypal_button_preference(:paypal_button_shape, store: current_store) %>', + label: '<%= paypal_button_preference(:paypal_button_label, store: current_store) %>', + tagline: '<%= paypal_button_preference(:paypal_button_tagline, store: current_store) %>' + } } var options = { restart_checkout: true diff --git a/config/initializers/braintree.rb b/config/initializers/braintree.rb index 77c51874..1f370736 100644 --- a/config/initializers/braintree.rb +++ b/config/initializers/braintree.rb @@ -4,4 +4,5 @@ if SolidusSupport.frontend_available? Spree::CheckoutController.helper :braintree_checkout + Spree::OrdersController.helper :braintree_checkout end