From cd3cbec90bef031aabe91d6120464164968144e8 Mon Sep 17 00:00:00 2001 From: Sean Date: Wed, 14 Oct 2020 07:49:10 -0500 Subject: [PATCH] Fix Spree::Core lookup in gateway 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 #254 --- app/models/solidus_paypal_braintree/gateway.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/solidus_paypal_braintree/gateway.rb b/app/models/solidus_paypal_braintree/gateway.rb index e9f13657..130a7b9a 100644 --- a/app/models/solidus_paypal_braintree/gateway.rb +++ b/app/models/solidus_paypal_braintree/gateway.rb @@ -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