solidus_subscriptions-alpha 0.0.2 → 0.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7457d91d94e22078989fce66d5e8b2ac924643fd
4
- data.tar.gz: 87516652b49784f6d2581f0f075c37f2d96ec338
3
+ metadata.gz: 72c5f256c4513d812bb3bb5dd7384db6e35f3cb5
4
+ data.tar.gz: 50156cc8c89051d4aae87068eccdea310a789a91
5
5
  SHA512:
6
- metadata.gz: 57806d34ad1210f79ab1c115780b93377fdcb9347e8baac7718a2de7bfd8678a2b9ae4398742c05e9620a1f7eef1d16b691b2545252df0a80359bb6d1302ec25
7
- data.tar.gz: a73e2853cf52025b46cfe6036abddb50aaf82d78120651029963eef6c50c9dac3b70fb92e2769d05d96a8dde5912df9c75a313c53234f75f953de356b7f6d870
6
+ metadata.gz: 9f1539664d5553ed89374f9c61eb8d310c0745cc4fe9a13edf16f7432d55b079cf1d64ae0f4493831359b6b82cf25e30db6ce2d45f3b60916b334824ad69ed7a
7
+ data.tar.gz: 2285218836e457b590d3eaba78ecdd1a973edbe1b325626c3da7eef9ad92552f3d1bcaa499c46eacb9f107441c0d6335417c30677d545e26f79d9c4160b80f44
@@ -68,10 +68,10 @@ module SolidusSubscriptions
68
68
  order.update!
69
69
  apply_promotions
70
70
 
71
- order.checkout_steps[0...-1].each do
71
+ order.checkout_steps.count.times do
72
72
  order.ship_address = ship_address if order.state == "address"
73
73
  create_payment if order.state == "payment"
74
- order.next!
74
+ order.next! if order.next_transition.present?
75
75
  end
76
76
 
77
77
  # Do this as a separate "quiet" transition so that it returns true or
@@ -114,7 +114,11 @@ module SolidusSubscriptions
114
114
  end
115
115
 
116
116
  def active_card
117
- user.wallet.default_wallet_payment_source
117
+ if SolidusSupport.solidus_gem_version < Gem::Version.new("2.2.0")
118
+ user.credit_cards.default.last
119
+ else
120
+ user.wallet.default_wallet_payment_source.payment_source
121
+ end
118
122
  end
119
123
 
120
124
  def create_payment
@@ -1,3 +1,3 @@
1
1
  module SolidusSubscriptions
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_subscriptions-alpha
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brendan Deere
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-09-16 00:00:00.000000000 Z
11
+ date: 2017-10-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: solidus