Skip to content

Commit

Permalink
Set currency to orders on subscription processing
Browse files Browse the repository at this point in the history
  • Loading branch information
luca-landa committed Feb 19, 2021
1 parent 89eb3ce commit bdcb948
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/solidus_subscriptions/checkout.rb
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ def create_order
email: installment.subscription.user.email,
store: installment.subscription.store || ::Spree::Store.default,
subscription_order: true,
subscription: installment.subscription
subscription: installment.subscription,
currency: installment.subscription.currency
)
end

Expand Down
1 change: 1 addition & 0 deletions spec/lib/solidus_subscriptions/checkout_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
expect(order.bill_address.value_attributes).to eq(subscription.billing_address_to_use.value_attributes)
expect(order.payments.first.payment_method).to eq(subscription.payment_method_to_use)
expect(order.payments.first.source).to eq(subscription.payment_source_to_use)
expect(order.currency).to eq(subscription.currency)
expect(order.user).to eq(subscription.user)
expect(order.email).to eq(subscription.user.email)
end
Expand Down

0 comments on commit bdcb948

Please sign in to comment.