Skip to content

Commit

Permalink
Fix Spree::Core lookup in gateway
Browse files Browse the repository at this point in the history
Gateway assumes that Spree::Core lives at
SolidusPaypalBraintree::Spree::Core. Adding leading colons forces the
lookup to happen from the toplevel namespace, which grabs the correct
class.

Fixes solidusio#254
  • Loading branch information
seand7565 committed Oct 14, 2020
1 parent f0bf053 commit cd3cbec
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/solidus_paypal_braintree/gateway.rb
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ def create_profile(payment)
return if source.token.present? || source.customer.present? || source.nonce.nil?

result = braintree.customer.create(customer_profile_params(payment))
fail Spree::Core::GatewayError, result.message unless result.success?
fail ::Spree::Core::GatewayError, result.message unless result.success?

customer = result.customer

Expand Down

0 comments on commit cd3cbec

Please sign in to comment.