add missing require statements

This commit is contained in:
Andy Brett
2020-12-10 12:17:42 -08:00
parent f50577b489
commit 655512adab
3 changed files with 6 additions and 2 deletions

View File

@@ -1,3 +1,5 @@
require 'stripe/credit_card_clone_destroyer'
module Spree
class CreditCardsController < BaseController
def new_from_token

View File

@@ -13,7 +13,7 @@ module Stripe
next unless stripe_account = customer.enterprise.stripe_account&.stripe_user_id
customer_id, _payment_method_id =
CreditCardCloneFinder.new(card, stripe_account).find_cloned_card
Stripe::CreditCardCloneFinder.new(card, stripe_account).find_cloned_card
next unless customer_id
customer = Stripe::Customer.retrieve(customer_id, stripe_account: stripe_account)

View File

@@ -15,6 +15,8 @@
# clone it and look for a card with the same fingerprint (hash of the card number) and
# that metadata key to avoid cloning it multiple times.
require 'stripe/credit_card_clone_finder'
module Stripe
class CreditCardCloner
def initialize(card, stripe_account)
@@ -23,7 +25,7 @@ module Stripe
end
def find_or_clone
cloned_card = CreditCardCloneFinder.new(@card, @stripe_account).find_cloned_card
cloned_card = Stripe::CreditCardCloneFinder.new(@card, @stripe_account).find_cloned_card
cloned_card || clone
end