summaryrefslogtreecommitdiff
path: root/lib/solidus_subscriptions
diff options
context:
space:
mode:
authorluca-landa <lucalanda@hotmail.it>2021-02-05 15:28:14 +0100
committerluca-landa <lucalanda@hotmail.it>2021-02-19 13:53:36 +0100
commit7c0689d1e7b95912e4b3ac1e717b2f0445157409 (patch)
tree1e0a13c238163f2ee8ad5eec75f2127aca48191b /lib/solidus_subscriptions
parente526705dcbccf1255ea4b4646a6aabededf08fc7 (diff)
Add currency to subscription
Diffstat (limited to 'lib/solidus_subscriptions')
-rw-r--r--lib/solidus_subscriptions/subscription_generator.rb1
-rw-r--r--lib/solidus_subscriptions/testing_support/factories/subscription_factory.rb1
2 files changed, 2 insertions, 0 deletions
diff --git a/lib/solidus_subscriptions/subscription_generator.rb b/lib/solidus_subscriptions/subscription_generator.rb
index 8153912..4f675a7 100644
--- a/lib/solidus_subscriptions/subscription_generator.rb
+++ b/lib/solidus_subscriptions/subscription_generator.rb
@@ -29,6 +29,7 @@ module SolidusSubscriptions
billing_address: order.bill_address,
payment_source: order.payments.valid.last&.payment_source,
payment_method: order.payments.valid.last&.payment_method,
+ currency: order.currency,
**configuration.to_h
}
diff --git a/lib/solidus_subscriptions/testing_support/factories/subscription_factory.rb b/lib/solidus_subscriptions/testing_support/factories/subscription_factory.rb
index 2898d36..4cd3a1c 100644
--- a/lib/solidus_subscriptions/testing_support/factories/subscription_factory.rb
+++ b/lib/solidus_subscriptions/testing_support/factories/subscription_factory.rb
@@ -5,6 +5,7 @@ FactoryBot.define do
store
interval_length { 1 }
interval_units { :month }
+ currency { 'USD' }
user do
new_user = create(:user, :subscription_user)