Rename CardCloner to CreditCardCloner because it's dependent on Spree:CreditCard attributes

This commit is contained in:
luisramos0
2020-01-26 18:49:16 +00:00
committed by Luis Ramos
parent 14c03ead31
commit 3fb1df9bb3
2 changed files with 2 additions and 2 deletions

View File

@@ -70,7 +70,7 @@ module Spree
options[:currency] = gateway_options[:currency]
options[:stripe_account] = stripe_account_id
Stripe::CardCloner.new.clone!(creditcard, stripe_account_id)
Stripe::CreditCardCloner.new.clone!(creditcard, stripe_account_id)
options[:customer] = creditcard.gateway_customer_profile_id
payment_method = creditcard.gateway_payment_profile_id

View File

@@ -11,7 +11,7 @@
# This process can be deleted once all hubs are running on the new stripe_sca method and all cards in the system have been migrated to the new payment_methods
# Basically, when all DBs have no card_* values in credit_card.gateway_payment_profile_id
module Stripe
class CardCloner
class CreditCardCloner
def clone!(credit_card, stripe_account_id)
return unless credit_card.gateway_payment_profile_id.starts_with?('card_')