mirror of
https://github.com/openfoodfoundation/openfoodnetwork
synced 2026-01-24 20:36:49 +00:00
add missing require statements
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
require 'stripe/credit_card_clone_destroyer'
|
||||
|
||||
module Spree
|
||||
class CreditCardsController < BaseController
|
||||
def new_from_token
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user