diff options
author | Alessandro Desantis <desa.alessandro@gmail.com> | 2020-06-18 17:06:49 +0200 |
---|---|---|
committer | Alessandro Desantis <desa.alessandro@gmail.com> | 2020-06-18 17:08:45 +0200 |
commit | 195f5d64ddfe0f79cc3e8a1c54eb442bf06ac5e7 (patch) | |
tree | 7e7b45279ca19be57049f249dae1048e842114ff /app/services | |
parent | c92d87dacbcdcc02ce7ac7e0796ea5ae46b10c2d (diff) |
Copy payment details from order when activating subscriptions
Diffstat (limited to 'app/services')
-rw-r--r-- | app/services/solidus_subscriptions/subscription_generator.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/app/services/solidus_subscriptions/subscription_generator.rb b/app/services/solidus_subscriptions/subscription_generator.rb index 3b9dbb0..cf3743f 100644 --- a/app/services/solidus_subscriptions/subscription_generator.rb +++ b/app/services/solidus_subscriptions/subscription_generator.rb @@ -25,6 +25,8 @@ module SolidusSubscriptions store: order.store, shipping_address: order.ship_address, billing_address: order.bill_address, + payment_source: order.payments.valid.last&.payment_source, + payment_method: order.payments.valid.last&.payment_method, **configuration.to_h } |