Skip to content
This repository has been archived by the owner on Apr 14, 2023. It is now read-only.

Default Braintree configuration on store creation overwrites custom configuration #224

Closed
mdesantis opened this issue Jun 6, 2019 · 0 comments · Fixed by #225
Closed

Comments

@mdesantis
Copy link
Contributor

Building the default Braintree configuration record on store creation doesn't check whether a braintree configuration already exists:

before_create :build_default_configuration
private
def build_default_configuration
build_braintree_configuration
end

overwriting a custom configuration on store creation:

store = Spree::Store.new(
  code: 'some unique store code',
  name: 'name',
  url: 'example.com',
  mail_from_address: '[email protected]'
)
store.build_braintree_configuration(
  credit_card: true,
  paypal: true,
  apple_pay: true
)
store.save!
store.braintree_configuration #=> ... paypal: false, apple_pay: false, credit_card: false>
mdesantis added a commit to mdesantis/solidus_paypal_braintree that referenced this issue Jun 6, 2019
Closes solidusio#224. On `Spree::Store` creation, on default Braintree
configuration building it checks whether a configuration already exists,
preventing the overwriting of such configuration.
mdesantis added a commit to mdesantis/solidus_paypal_braintree that referenced this issue Jun 6, 2019
Closes solidusio#224. On default Braintree configuration building we need to
check whether a configuration already exists, preventing the overwriting
of such configuration.
mdesantis added a commit to mdesantis/solidus_paypal_braintree that referenced this issue Jun 6, 2019
Closes solidusio#224. On default Braintree configuration building we need to
check whether a configuration already exists, so the prevent the
overwrite of such configuration.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant