solidus_stripe 4.2.0 → 4.4.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +26 -0
  3. data/.gem_release.yml +1 -1
  4. data/.github/stale.yml +1 -17
  5. data/.github_changelog_generator +2 -0
  6. data/.gitignore +3 -2
  7. data/.rubocop.yml +3 -3
  8. data/.rubocop_todo.yml +298 -0
  9. data/CHANGELOG.md +128 -17
  10. data/Gemfile +9 -10
  11. data/LICENSE +2 -1
  12. data/README.md +61 -54
  13. data/Rakefile +3 -0
  14. data/app/assets/javascripts/spree/frontend/solidus_stripe/stripe-cart-page-checkout.js +1 -0
  15. data/app/assets/javascripts/spree/frontend/solidus_stripe/stripe-payment-request-button-shared.js +2 -1
  16. data/app/controllers/solidus_stripe/intents_controller.rb +2 -2
  17. data/app/controllers/solidus_stripe/payment_request_controller.rb +14 -4
  18. data/app/decorators/models/spree/refund_decorator.rb +1 -1
  19. data/app/models/solidus_stripe/address_from_params_service.rb +20 -8
  20. data/app/models/solidus_stripe/create_intents_payment_service.rb +2 -1
  21. data/app/models/spree/payment_method/stripe_credit_card.rb +46 -11
  22. data/bin/rails +4 -12
  23. data/bin/rails-engine +13 -0
  24. data/bin/rails-sandbox +16 -0
  25. data/bin/sandbox +3 -1
  26. data/config/locales/en.yml +5 -0
  27. data/lib/generators/solidus_stripe/install/install_generator.rb +1 -5
  28. data/lib/solidus_stripe/configuration.rb +21 -0
  29. data/lib/solidus_stripe/engine.rb +3 -14
  30. data/lib/solidus_stripe/testing_support/card_input_helper.rb +34 -0
  31. data/lib/solidus_stripe/{factories.rb → testing_support/factories.rb} +0 -0
  32. data/lib/solidus_stripe/version.rb +1 -1
  33. data/lib/solidus_stripe.rb +5 -5
  34. data/lib/views/frontend/spree/checkout/payment/v2/_javascript.html.erb +1 -1
  35. data/lib/views/frontend/spree/checkout/payment/v3/_form_elements.html.erb +2 -1
  36. data/solidus_stripe.gemspec +6 -5
  37. data/spec/features/stripe_checkout_spec.rb +33 -113
  38. data/spec/models/solidus_stripe/address_from_params_service_spec.rb +17 -6
  39. data/spec/models/solidus_stripe/create_intents_payment_service_spec.rb +4 -4
  40. data/spec/models/spree/payment_method/stripe_credit_card_spec.rb +63 -0
  41. data/spec/requests/payment_requests_spec.rb +152 -0
  42. data/spec/spec_helper.rb +16 -5
  43. data/spec/support/solidus_address_helper.rb +2 -2
  44. metadata +37 -14
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fbb4f65f220249d05424544fea63ae4b7ee065a735d9ad75d30212f90f11c2e9
4
- data.tar.gz: 0167d591c1bad084130963d11dc0d823d51e9fb7b26d04964634ba87d79f7a8f
3
+ metadata.gz: ae346073816f937b18888261522168542afadcd9d00ab6350045707b8b11a380
4
+ data.tar.gz: 0fd2b4a1f79a3b50eb4c272fac0baeff4aa0a222ba98bf6d12c0d9d1910d1cc1
5
5
  SHA512:
6
- metadata.gz: 5006bc7738c469e4d00f0f709c51691f56dad323a418283b0d361d04728140a4bf1069be861ff5d08df98b06e3147d0fa91ea004fe741e5c8229e720702b6c8a
7
- data.tar.gz: 2dfea9b20b5dabc2f1199256fb04a3911e811f62d97de95e07cb5f675ba3c70105c81ff8b6ea8fb34f6cf19eb4b1e380a0ae8fd28acccad715c45f8cd9064b56
6
+ metadata.gz: 7b744e67e2a22c606ce93d666750a810c09dd85d0d038a119445e7bd40faad6edda4ec68a741325e42cc97a334f3c10c5d742b61aeaf9e01911ad21e40412fed
7
+ data.tar.gz: ece237b20f84ad66a2688585de53bdaed4adf17317dd86c35d0788290a0221de22961283cf912b27da118400369d0634d45a768d2400f99a111458b38eb8c958
data/.circleci/config.yml CHANGED
@@ -1,27 +1,53 @@
1
1
  version: 2.1
2
2
 
3
3
  orbs:
4
+ # Required for feature specs.
5
+ browser-tools: circleci/browser-tools@1.1
6
+
4
7
  # Always take the latest version of the orb, this allows us to
5
8
  # run specs against Solidus supported versions only without the need
6
9
  # to change this configuration every time a Solidus version is released
7
10
  # or goes EOL.
8
11
  solidusio_extensions: solidusio/extensions@volatile
9
12
 
13
+ executors:
14
+ sqlite:
15
+ description: Run specs with an SQLite
16
+ docker:
17
+ - image: cimg/ruby:2.7-browsers
18
+ environment:
19
+ RAILS_ENV: test
20
+ DB: sqlite
21
+
10
22
  jobs:
11
23
  run-specs-with-postgres:
12
24
  executor: solidusio_extensions/postgres
13
25
  steps:
26
+ - browser-tools/install-chrome
14
27
  - solidusio_extensions/run-tests
15
28
  run-specs-with-mysql:
16
29
  executor: solidusio_extensions/mysql
17
30
  steps:
31
+ - browser-tools/install-chrome
32
+ - solidusio_extensions/run-tests
33
+ run-specs-with-sqlite:
34
+ executor: sqlite
35
+ steps:
36
+ - browser-tools/install-chrome
18
37
  - solidusio_extensions/run-tests
38
+ lint-code:
39
+ executor: solidusio_extensions/sqlite-memory
40
+ steps:
41
+ - solidusio_extensions/lint-code
19
42
 
20
43
  workflows:
21
44
  "Run specs on supported Solidus versions":
22
45
  jobs:
23
46
  - run-specs-with-postgres
24
47
  - run-specs-with-mysql
48
+ - run-specs-with-sqlite
49
+ - lint-code
50
+
25
51
  "Weekly run specs against master":
26
52
  triggers:
27
53
  - schedule:
data/.gem_release.yml CHANGED
@@ -1,5 +1,5 @@
1
1
  bump:
2
2
  recurse: false
3
3
  file: 'lib/solidus_stripe/version.rb'
4
- message: Bump Solidus Stripe to %{version}
4
+ message: Bump SolidusStripe to %{version}
5
5
  tag: true
data/.github/stale.yml CHANGED
@@ -1,17 +1 @@
1
- # Number of days of inactivity before an issue becomes stale
2
- daysUntilStale: 60
3
- # Number of days of inactivity before a stale issue is closed
4
- daysUntilClose: 7
5
- # Issues with these labels will never be considered stale
6
- exemptLabels:
7
- - pinned
8
- - security
9
- # Label to use when marking an issue as stale
10
- staleLabel: wontfix
11
- # Comment to post when marking an issue as stale. Set to `false` to disable
12
- markComment: >
13
- This issue has been automatically marked as stale because it has not had
14
- recent activity. It will be closed if no further activity occurs. Thank you
15
- for your contributions.
16
- # Comment to post when closing a stale issue. Set to `false` to disable
17
- closeComment: false
1
+ _extends: .github
@@ -0,0 +1,2 @@
1
+ issues=false
2
+ exclude-labels=infrastructure
data/.gitignore CHANGED
@@ -5,8 +5,6 @@
5
5
  .DS_Store
6
6
  .idea
7
7
  .project
8
- .ruby-version
9
- .rvmrc
10
8
  .sass-cache
11
9
  coverage
12
10
  Gemfile.lock
@@ -17,3 +15,6 @@ pkg
17
15
  spec/dummy
18
16
  spec/examples.txt
19
17
  /sandbox
18
+ .rvmrc
19
+ .ruby-version
20
+ .ruby-gemset
data/.rubocop.yml CHANGED
@@ -1,7 +1,7 @@
1
+ inherit_from: .rubocop_todo.yml
2
+
1
3
  require:
2
4
  - solidus_dev_support/rubocop
3
5
 
4
6
  AllCops:
5
- Exclude:
6
- - sandbox/**/*
7
- - spec/dummy/**/*
7
+ NewCops: disable
data/.rubocop_todo.yml ADDED
@@ -0,0 +1,298 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2022-08-30 14:09:43 UTC using RuboCop version 1.35.1.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 1
10
+ # This cop supports safe autocorrection (--autocorrect).
11
+ # Configuration parameters: TreatCommentsAsGroupSeparators, ConsiderPunctuation, Include.
12
+ # Include: **/*.gemspec
13
+ Gemspec/OrderedDependencies:
14
+ Exclude:
15
+ - 'solidus_stripe.gemspec'
16
+
17
+ # Offense count: 3
18
+ # This cop supports safe autocorrection (--autocorrect).
19
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
20
+ # SupportedStyles: with_first_argument, with_fixed_indentation
21
+ Layout/ArgumentAlignment:
22
+ Exclude:
23
+ - 'spec/models/spree/payment_method/stripe_credit_card_spec.rb'
24
+
25
+ # Offense count: 2
26
+ # This cop supports safe autocorrection (--autocorrect).
27
+ Layout/ClosingParenthesisIndentation:
28
+ Exclude:
29
+ - 'spec/requests/payment_requests_spec.rb'
30
+
31
+ # Offense count: 2
32
+ # This cop supports safe autocorrection (--autocorrect).
33
+ Layout/ElseAlignment:
34
+ Exclude:
35
+ - 'app/models/solidus_stripe/address_from_params_service.rb'
36
+ - 'spec/models/solidus_stripe/address_from_params_service_spec.rb'
37
+
38
+ # Offense count: 2
39
+ # This cop supports safe autocorrection (--autocorrect).
40
+ # Configuration parameters: EnforcedStyleAlignWith, Severity.
41
+ # SupportedStylesAlignWith: keyword, variable, start_of_line
42
+ Layout/EndAlignment:
43
+ Exclude:
44
+ - 'app/models/solidus_stripe/address_from_params_service.rb'
45
+ - 'spec/models/solidus_stripe/address_from_params_service_spec.rb'
46
+
47
+ # Offense count: 2
48
+ # This cop supports safe autocorrection (--autocorrect).
49
+ # Configuration parameters: Width, AllowedPatterns, IgnoredPatterns.
50
+ Layout/IndentationWidth:
51
+ Exclude:
52
+ - 'app/models/solidus_stripe/address_from_params_service.rb'
53
+ - 'spec/models/solidus_stripe/address_from_params_service_spec.rb'
54
+
55
+ # Offense count: 2
56
+ # This cop supports safe autocorrection (--autocorrect).
57
+ # Configuration parameters: EnforcedStyle.
58
+ # SupportedStyles: symmetrical, new_line, same_line
59
+ Layout/MultilineMethodCallBraceLayout:
60
+ Exclude:
61
+ - 'spec/models/spree/payment_method/stripe_credit_card_spec.rb'
62
+
63
+ # Offense count: 1
64
+ # This cop supports safe autocorrection (--autocorrect).
65
+ # Configuration parameters: EnforcedStyle, IndentationWidth.
66
+ # SupportedStyles: aligned, indented, indented_relative_to_receiver
67
+ Layout/MultilineMethodCallIndentation:
68
+ Exclude:
69
+ - 'spec/models/solidus_stripe/prepare_order_for_payment_service_spec.rb'
70
+
71
+ # Offense count: 1
72
+ # This cop supports safe autocorrection (--autocorrect).
73
+ # Configuration parameters: EnforcedStyle, EnforcedStyleForEmptyBrackets.
74
+ # SupportedStyles: space, no_space, compact
75
+ # SupportedStylesForEmptyBrackets: space, no_space
76
+ Layout/SpaceInsideArrayLiteralBrackets:
77
+ Exclude:
78
+ - 'spec/models/solidus_stripe/address_from_params_service_spec.rb'
79
+
80
+ # Offense count: 5
81
+ # Configuration parameters: AllowedMethods, AllowedPatterns, IgnoredMethods.
82
+ Lint/AmbiguousBlockAssociation:
83
+ Exclude:
84
+ - 'spec/models/solidus_stripe/create_intents_payment_service_spec.rb'
85
+ - 'spec/models/solidus_stripe/prepare_order_for_payment_service_spec.rb'
86
+ - 'spec/requests/payment_requests_spec.rb'
87
+
88
+ # Offense count: 2
89
+ # This cop supports safe autocorrection (--autocorrect).
90
+ Lint/RedundantCopDisableDirective:
91
+ Exclude:
92
+ - 'bin/sandbox_rails'
93
+ - 'lib/generators/solidus_stripe/install/install_generator.rb'
94
+
95
+ # Offense count: 10
96
+ RSpec/AnyInstance:
97
+ Exclude:
98
+ - 'spec/models/solidus_stripe/create_intents_payment_service_spec.rb'
99
+ - 'spec/requests/payment_requests_spec.rb'
100
+
101
+ # Offense count: 6
102
+ # Configuration parameters: Prefixes.
103
+ # Prefixes: when, with, without
104
+ RSpec/ContextWording:
105
+ Exclude:
106
+ - 'spec/models/spree/payment_method/stripe_credit_card_spec.rb'
107
+
108
+ # Offense count: 8
109
+ # This cop supports unsafe autocorrection (--autocorrect-all).
110
+ # Configuration parameters: EnforcedStyle.
111
+ # SupportedStyles: method_call, block
112
+ RSpec/ExpectChange:
113
+ Exclude:
114
+ - 'spec/models/solidus_stripe/create_intents_payment_service_spec.rb'
115
+ - 'spec/models/solidus_stripe/prepare_order_for_payment_service_spec.rb'
116
+ - 'spec/models/spree/payment_method/stripe_credit_card_spec.rb'
117
+
118
+ # Offense count: 6
119
+ RSpec/ExpectInHook:
120
+ Exclude:
121
+ - 'spec/features/stripe_checkout_spec.rb'
122
+
123
+ # Offense count: 1
124
+ # This cop supports safe autocorrection (--autocorrect).
125
+ RSpec/LeadingSubject:
126
+ Exclude:
127
+ - 'spec/models/solidus_stripe/address_from_params_service_spec.rb'
128
+
129
+ # Offense count: 2
130
+ RSpec/LetSetup:
131
+ Exclude:
132
+ - 'spec/models/solidus_stripe/prepare_order_for_payment_service_spec.rb'
133
+ - 'spec/models/spree/payment_method/stripe_credit_card_spec.rb'
134
+
135
+ # Offense count: 9
136
+ # Configuration parameters: .
137
+ # SupportedStyles: have_received, receive
138
+ RSpec/MessageSpies:
139
+ EnforcedStyle: receive
140
+
141
+ # Offense count: 13
142
+ RSpec/MultipleExpectations:
143
+ Max: 15
144
+
145
+ # Offense count: 40
146
+ # Configuration parameters: AllowSubject.
147
+ RSpec/MultipleMemoizedHelpers:
148
+ Max: 11
149
+
150
+ # Offense count: 47
151
+ # Configuration parameters: IgnoreSharedExamples.
152
+ RSpec/NamedSubject:
153
+ Exclude:
154
+ - 'spec/models/solidus_stripe/address_from_params_service_spec.rb'
155
+ - 'spec/models/solidus_stripe/create_intents_payment_service_spec.rb'
156
+ - 'spec/models/solidus_stripe/prepare_order_for_payment_service_spec.rb'
157
+ - 'spec/models/solidus_stripe/shipping_rates_service_spec.rb'
158
+ - 'spec/models/spree/payment_method/stripe_credit_card_spec.rb'
159
+
160
+ # Offense count: 13
161
+ RSpec/NestedGroups:
162
+ Max: 5
163
+
164
+ # Offense count: 2
165
+ RSpec/RepeatedExampleGroupBody:
166
+ Exclude:
167
+ - 'spec/models/spree/payment_method/stripe_credit_card_spec.rb'
168
+
169
+ # Offense count: 3
170
+ # This cop supports safe autocorrection (--autocorrect).
171
+ # Configuration parameters: EnforcedStyle.
172
+ # SupportedStyles: and_return, block
173
+ RSpec/ReturnFromStub:
174
+ Exclude:
175
+ - 'spec/models/solidus_stripe/create_intents_payment_service_spec.rb'
176
+ - 'spec/models/spree/payment_method/stripe_credit_card_spec.rb'
177
+
178
+ # Offense count: 4
179
+ RSpec/StubbedMock:
180
+ Exclude:
181
+ - 'spec/models/spree/payment_method/stripe_credit_card_spec.rb'
182
+
183
+ # Offense count: 3
184
+ RSpec/SubjectStub:
185
+ Exclude:
186
+ - 'spec/models/spree/payment_method/stripe_credit_card_spec.rb'
187
+
188
+ # Offense count: 12
189
+ # Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
190
+ RSpec/VerifiedDoubles:
191
+ Exclude:
192
+ - 'spec/models/solidus_stripe/create_intents_payment_service_spec.rb'
193
+ - 'spec/models/solidus_stripe/prepare_order_for_payment_service_spec.rb'
194
+ - 'spec/models/spree/payment_method/stripe_credit_card_spec.rb'
195
+
196
+ # Offense count: 1
197
+ # This cop supports safe autocorrection (--autocorrect).
198
+ # Configuration parameters: EnforceForPrefixed.
199
+ Rails/Delegate:
200
+ Exclude:
201
+ - 'app/models/spree/payment_method/stripe_credit_card.rb'
202
+
203
+ # Offense count: 1
204
+ # This cop supports unsafe autocorrection (--autocorrect-all).
205
+ # Configuration parameters: Whitelist, AllowedMethods, AllowedReceivers.
206
+ # Whitelist: find_by_sql
207
+ # AllowedMethods: find_by_sql
208
+ # AllowedReceivers: Gem::Specification
209
+ Rails/DynamicFindBy:
210
+ Exclude:
211
+ - 'app/models/solidus_stripe/address_from_params_service.rb'
212
+
213
+ # Offense count: 1
214
+ # This cop supports safe autocorrection (--autocorrect).
215
+ # Configuration parameters: Include, IgnoredMethods.
216
+ # Include: app/models/**/*.rb
217
+ # IgnoredMethods: order, limit, select, lock
218
+ Rails/FindEach:
219
+ Exclude:
220
+ - 'app/models/solidus_stripe/create_intents_payment_service.rb'
221
+
222
+ # Offense count: 5
223
+ # This cop supports unsafe autocorrection (--autocorrect-all).
224
+ # Configuration parameters: Include.
225
+ # Include: app/**/*.rb, config/**/*.rb, db/**/*.rb, lib/**/*.rb
226
+ Rails/Output:
227
+ Exclude:
228
+ - 'db/seeds.rb'
229
+
230
+ # Offense count: 3
231
+ # Configuration parameters: ForbiddenMethods, AllowedMethods.
232
+ # ForbiddenMethods: decrement!, decrement_counter, increment!, increment_counter, insert, insert!, insert_all, insert_all!, toggle!, touch, touch_all, update_all, update_attribute, update_column, update_columns, update_counters, upsert, upsert_all
233
+ Rails/SkipsModelValidations:
234
+ Exclude:
235
+ - 'db/migrate/20181010123508_update_stripe_payment_method_type_to_credit_card.rb'
236
+ - 'spec/models/solidus_stripe/shipping_rates_service_spec.rb'
237
+
238
+ # Offense count: 1
239
+ # This cop supports safe autocorrection (--autocorrect).
240
+ # Configuration parameters: EnforcedStyle, SingleLineConditionsOnly, IncludeTernaryExpressions.
241
+ # SupportedStyles: assign_to_condition, assign_inside_condition
242
+ Style/ConditionalAssignment:
243
+ Exclude:
244
+ - 'app/models/spree/payment_method/stripe_credit_card.rb'
245
+
246
+ # Offense count: 1
247
+ # This cop supports safe autocorrection (--autocorrect).
248
+ Style/ExplicitBlockArgument:
249
+ Exclude:
250
+ - 'spec/features/stripe_checkout_spec.rb'
251
+
252
+ # Offense count: 2
253
+ # Configuration parameters: MinBodyLength, AllowConsecutiveConditionals.
254
+ Style/GuardClause:
255
+ Exclude:
256
+ - 'app/decorators/models/spree/order_update_attributes_decorator.rb'
257
+ - 'app/models/solidus_stripe/create_intents_payment_service.rb'
258
+
259
+ # Offense count: 1
260
+ # This cop supports safe autocorrection (--autocorrect).
261
+ Style/MultilineIfModifier:
262
+ Exclude:
263
+ - 'app/models/spree/payment_method/stripe_credit_card.rb'
264
+
265
+ # Offense count: 1
266
+ # This cop supports unsafe autocorrection (--autocorrect-all).
267
+ # Configuration parameters: EnforcedStyle.
268
+ # SupportedStyles: literals, strict
269
+ Style/MutableConstant:
270
+ Exclude:
271
+ - 'app/models/spree/payment_method/stripe_credit_card.rb'
272
+
273
+ # Offense count: 2
274
+ # This cop supports safe autocorrection (--autocorrect).
275
+ # Configuration parameters: AllowedMethods.
276
+ # AllowedMethods: be, be_a, be_an, be_between, be_falsey, be_kind_of, be_instance_of, be_truthy, be_within, eq, eql, end_with, include, match, raise_error, respond_to, start_with
277
+ Style/NestedParenthesizedCalls:
278
+ Exclude:
279
+ - 'lib/solidus_stripe/testing_support/card_input_helper.rb'
280
+
281
+ # Offense count: 1
282
+ # This cop supports safe autocorrection (--autocorrect).
283
+ Style/RedundantBegin:
284
+ Exclude:
285
+ - 'app/models/solidus_stripe/address_from_params_service.rb'
286
+
287
+ # Offense count: 1
288
+ # This cop supports unsafe autocorrection (--autocorrect-all).
289
+ Style/RedundantInterpolation:
290
+ Exclude:
291
+ - 'lib/solidus_stripe/testing_support/card_input_helper.rb'
292
+
293
+ # Offense count: 19
294
+ # This cop supports safe autocorrection (--autocorrect).
295
+ # Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns, IgnoredPatterns.
296
+ # URISchemes: http, https
297
+ Layout/LineLength:
298
+ Max: 163
data/CHANGELOG.md CHANGED
@@ -1,15 +1,103 @@
1
1
  # Changelog
2
2
 
3
+ ## [v4.4.0](https://github.com/solidusio/solidus_stripe/tree/v4.4.0) (2022-12-19)
4
+
5
+ [Full Changelog](https://github.com/solidusio/solidus_stripe/compare/v4.3.0...v4.4.0)
6
+
7
+ **Fixed bugs:**
8
+
9
+ - Test issue, please disregard [\#145](https://github.com/solidusio/solidus_stripe/issues/145)
10
+ - Fix incorrect charge amount for currencies without fractions [\#138](https://github.com/solidusio/solidus_stripe/issues/138)
11
+ - ActionView::MissingTemplate in Spree::Checkout\#edit [\#127](https://github.com/solidusio/solidus_stripe/issues/127)
12
+
13
+ **Closed issues:**
14
+
15
+ - RFC: Overhauling solidus\_stripe [\#135](https://github.com/solidusio/solidus_stripe/issues/135)
16
+ - Initializer fails with uninitialized constant Spree::PaymentMethod [\#133](https://github.com/solidusio/solidus_stripe/issues/133)
17
+ - How to pass zip code when add a Credit Card [\#132](https://github.com/solidusio/solidus_stripe/issues/132)
18
+ - Undefined method `cvv\_path' [\#130](https://github.com/solidusio/solidus_stripe/issues/130)
19
+ - Javascript don't working after solidus\_stripe installation [\#126](https://github.com/solidusio/solidus_stripe/issues/126)
20
+ - Facing dependency issue after upgrade solidus 3 [\#114](https://github.com/solidusio/solidus_stripe/issues/114)
21
+ - New release for solidus 3 [\#113](https://github.com/solidusio/solidus_stripe/issues/113)
22
+ - How to specify API version [\#93](https://github.com/solidusio/solidus_stripe/issues/93)
23
+ - Consistency between README and Wiki [\#67](https://github.com/solidusio/solidus_stripe/issues/67)
24
+
25
+ **Merged pull requests:**
26
+
27
+ - Fix adding a new customer card in admin [\#144](https://github.com/solidusio/solidus_stripe/pull/144) ([elia](https://github.com/elia))
28
+ - Fix incorrect charge amount for currencies without fractions [\#139](https://github.com/solidusio/solidus_stripe/pull/139) ([cmbaldwin](https://github.com/cmbaldwin))
29
+ - Fix setup instructions for Rails 7 [\#136](https://github.com/solidusio/solidus_stripe/pull/136) ([diegomichel](https://github.com/diegomichel))
30
+ - Update stale bot to extend org-level config [\#134](https://github.com/solidusio/solidus_stripe/pull/134) ([gsmendoza](https://github.com/gsmendoza))
31
+ - Revert "Add back custom view paths that were mistakenly removed" [\#129](https://github.com/solidusio/solidus_stripe/pull/129) ([elia](https://github.com/elia))
32
+ - Add back custom view paths that were mistakenly removed [\#128](https://github.com/solidusio/solidus_stripe/pull/128) ([elia](https://github.com/elia))
33
+ - Fix the CI after the Solidus v3.2 release [\#125](https://github.com/solidusio/solidus_stripe/pull/125) ([elia](https://github.com/elia))
34
+ - Update to use forked solidus\_frontend when needed [\#124](https://github.com/solidusio/solidus_stripe/pull/124) ([waiting-for-dev](https://github.com/waiting-for-dev))
35
+ - Fix CI and tests on Rails 7 [\#123](https://github.com/solidusio/solidus_stripe/pull/123) ([waiting-for-dev](https://github.com/waiting-for-dev))
36
+
37
+ ## [v4.3.0](https://github.com/solidusio/solidus_stripe/tree/v4.3.0) (2021-10-19)
38
+
39
+ [Full Changelog](https://github.com/solidusio/solidus_stripe/compare/v4.2.0...v4.3.0)
40
+
41
+ **Implemented enhancements:**
42
+
43
+ - Remove Solidus 2.x deprecation to allow 3.0 usage [\#99](https://github.com/solidusio/solidus_stripe/pull/99) ([kennyadsl](https://github.com/kennyadsl))
44
+ - Update gem with the latest dev\_support [\#97](https://github.com/solidusio/solidus_stripe/pull/97) ([kennyadsl](https://github.com/kennyadsl))
45
+
46
+ **Fixed bugs:**
47
+
48
+ - Fix 3DS iframe selection [\#86](https://github.com/solidusio/solidus_stripe/pull/86) ([spaghetticode](https://github.com/spaghetticode))
49
+
50
+ **Closed issues:**
51
+
52
+ - Could not create payment [\#111](https://github.com/solidusio/solidus_stripe/issues/111)
53
+ - statement\_descriptor\_suffix [\#107](https://github.com/solidusio/solidus_stripe/issues/107)
54
+ - Shipping cost payment refund rejected from Stripe API because of negative charge value [\#101](https://github.com/solidusio/solidus_stripe/issues/101)
55
+ - Remove Solidus 2.x deprecations [\#98](https://github.com/solidusio/solidus_stripe/issues/98)
56
+ - about LICENSE [\#59](https://github.com/solidusio/solidus_stripe/issues/59)
57
+
58
+ **Merged pull requests:**
59
+
60
+ - Add statement\_descriptor\_suffix support to options\_for\_purchase\_or\_auth [\#106](https://github.com/solidusio/solidus_stripe/pull/106) ([torukMnk](https://github.com/torukMnk))
61
+ - Update install instructions [\#105](https://github.com/solidusio/solidus_stripe/pull/105) ([kennyadsl](https://github.com/kennyadsl))
62
+ - Allow Solidus 3 [\#104](https://github.com/solidusio/solidus_stripe/pull/104) ([kennyadsl](https://github.com/kennyadsl))
63
+ - Bump minimum solidus\_support version requirement [\#102](https://github.com/solidusio/solidus_stripe/pull/102) ([filippoliverani](https://github.com/filippoliverani))
64
+ - Relax Ruby required version to support Ruby 3.0+ [\#96](https://github.com/solidusio/solidus_stripe/pull/96) ([filippoliverani](https://github.com/filippoliverani))
65
+ - Update refund\_decorator.rb prepend namespacing [\#91](https://github.com/solidusio/solidus_stripe/pull/91) ([brchristian](https://github.com/brchristian))
66
+ - Retrieve phone number paying with digital wallets [\#90](https://github.com/solidusio/solidus_stripe/pull/90) ([kennyadsl](https://github.com/kennyadsl))
67
+ - Fix Intents API link in README [\#87](https://github.com/solidusio/solidus_stripe/pull/87) ([kennyadsl](https://github.com/kennyadsl))
68
+ - Add missing 'var' [\#85](https://github.com/solidusio/solidus_stripe/pull/85) ([willread](https://github.com/willread))
69
+ - Fixes Rails 6.1 load warnings [\#84](https://github.com/solidusio/solidus_stripe/pull/84) ([marcrohloff](https://github.com/marcrohloff))
70
+ - Dedupe common code in stripe\_checkout\_spec.rb [\#80](https://github.com/solidusio/solidus_stripe/pull/80) ([brchristian](https://github.com/brchristian))
71
+ - Refactor spec with fill\_in\_card helper [\#78](https://github.com/solidusio/solidus_stripe/pull/78) ([brchristian](https://github.com/brchristian))
72
+ - Fix non-breaking space character in comment [\#76](https://github.com/solidusio/solidus_stripe/pull/76) ([brchristian](https://github.com/brchristian))
73
+ - Fix Copyright in README [\#73](https://github.com/solidusio/solidus_stripe/pull/73) ([kennyadsl](https://github.com/kennyadsl))
74
+ - Remove server and test\_mode from README [\#66](https://github.com/solidusio/solidus_stripe/pull/66) ([adammathys](https://github.com/adammathys))
75
+
76
+ ## [v4.2.0](https://github.com/solidusio/solidus_stripe/tree/v4.2.0) (2020-07-20)
77
+
78
+ [Full Changelog](https://github.com/solidusio/solidus_stripe/compare/v4.1.0...v4.2.0)
79
+
80
+ **Fixed bugs:**
81
+
82
+ - Fix StripeCreditCard\#try\_void with Elements/V2 API [\#75](https://github.com/solidusio/solidus_stripe/pull/75) ([spaghetticode](https://github.com/spaghetticode))
83
+
84
+ **Closed issues:**
85
+
86
+ - A token may not be passed in as a PaymentMethod. Instead, create a PaymentMethod or convert your token to a PaymentMethod by setting the `card[token]` parameter to [\#71](https://github.com/solidusio/solidus_stripe/issues/71)
87
+
88
+ **Merged pull requests:**
89
+
90
+ - Fix 3DS modal amount verification [\#72](https://github.com/solidusio/solidus_stripe/pull/72) ([spaghetticode](https://github.com/spaghetticode))
91
+
3
92
  ## [v4.1.0](https://github.com/solidusio/solidus_stripe/tree/v4.1.0) (2020-07-01)
4
93
 
5
- [Full Changelog](https://github.com/solidusio/solidus_stripe/compare/v4.0.0...v4.1.0)
94
+ [Full Changelog](https://github.com/solidusio/solidus_stripe/compare/v3.2.1...v4.1.0)
6
95
 
7
96
  **Fixed bugs:**
8
97
 
9
98
  - Card name ignored when adding new card to an order during checkout [\#68](https://github.com/solidusio/solidus_stripe/issues/68)
10
99
  - Try to find address state also by name [\#65](https://github.com/solidusio/solidus_stripe/pull/65) ([spaghetticode](https://github.com/spaghetticode))
11
100
  - Fix order cancel with Payment Intents captured payment [\#57](https://github.com/solidusio/solidus_stripe/pull/57) ([spaghetticode](https://github.com/spaghetticode))
12
- - \[ADMIN\] Order cancel doen't work with Payment Intents captured payments [\#56](https://github.com/solidusio/solidus_stripe/issues/56)
13
101
 
14
102
  **Merged pull requests:**
15
103
 
@@ -20,6 +108,14 @@
20
108
  - Update gemspec URLs [\#54](https://github.com/solidusio/solidus_stripe/pull/54) ([elia](https://github.com/elia))
21
109
  - fix typo [\#51](https://github.com/solidusio/solidus_stripe/pull/51) ([ccarruitero](https://github.com/ccarruitero))
22
110
 
111
+ ## [v3.2.1](https://github.com/solidusio/solidus_stripe/tree/v3.2.1) (2020-06-29)
112
+
113
+ [Full Changelog](https://github.com/solidusio/solidus_stripe/compare/v4.0.0...v3.2.1)
114
+
115
+ **Fixed bugs:**
116
+
117
+ - \[ADMIN\] Order cancel doen't work with Payment Intents captured payments [\#56](https://github.com/solidusio/solidus_stripe/issues/56)
118
+
23
119
  **Closed issues:**
24
120
 
25
121
  - Could not find generator 'solidus\_stripe:install' [\#60](https://github.com/solidusio/solidus_stripe/issues/60)
@@ -29,41 +125,56 @@
29
125
 
30
126
  ## [v4.0.0](https://github.com/solidusio/solidus_stripe/tree/v4.0.0) (2020-04-29)
31
127
 
32
- [Full Changelog](https://github.com/solidusio/solidus_stripe/compare/v3.0.0...v4.0.0)
128
+ [Full Changelog](https://github.com/solidusio/solidus_stripe/compare/v3.2.0...v4.0.0)
33
129
 
34
130
  **Fixed bugs:**
35
131
 
36
- - Duplicates charges with Payment Intents [\#44](https://github.com/solidusio/solidus_stripe/issues/44)
37
132
  - Fix for 3D-Secure payments on cart page checkout [\#49](https://github.com/solidusio/solidus_stripe/pull/49) ([spaghetticode](https://github.com/spaghetticode))
133
+
134
+ **Closed issues:**
135
+
136
+ - Custom stripe element field options \(e.g for showing a credit card icon\) [\#41](https://github.com/solidusio/solidus_stripe/issues/41)
137
+ - Clearer documentation on how to implement [\#15](https://github.com/solidusio/solidus_stripe/issues/15)
138
+
139
+ **Merged pull requests:**
140
+
141
+ - Relax solidus\_support dependency [\#48](https://github.com/solidusio/solidus_stripe/pull/48) ([kennyadsl](https://github.com/kennyadsl))
142
+
143
+ ## [v3.2.0](https://github.com/solidusio/solidus_stripe/tree/v3.2.0) (2020-04-10)
144
+
145
+ [Full Changelog](https://github.com/solidusio/solidus_stripe/compare/v3.1.0...v3.2.0)
146
+
147
+ **Fixed bugs:**
148
+
38
149
  - Send form data also when paying with payment request button [\#47](https://github.com/solidusio/solidus_stripe/pull/47) ([spaghetticode](https://github.com/spaghetticode))
150
+
151
+ **Merged pull requests:**
152
+
153
+ - Replace deprecated route `/stripe/confirm_payment` [\#46](https://github.com/solidusio/solidus_stripe/pull/46) ([spaghetticode](https://github.com/spaghetticode))
154
+
155
+ ## [v3.1.0](https://github.com/solidusio/solidus_stripe/tree/v3.1.0) (2020-04-10)
156
+
157
+ [Full Changelog](https://github.com/solidusio/solidus_stripe/compare/v3.0.0...v3.1.0)
158
+
159
+ **Fixed bugs:**
160
+
161
+ - Duplicates charges with Payment Intents [\#44](https://github.com/solidusio/solidus_stripe/issues/44)
39
162
  - Create a single charge when using Stripe Payment Intents [\#45](https://github.com/solidusio/solidus_stripe/pull/45) ([spaghetticode](https://github.com/spaghetticode))
40
163
 
41
164
  **Closed issues:**
42
165
 
43
- - Custom stripe element field options \(e.g for showing a credit card icon\) [\#41](https://github.com/solidusio/solidus_stripe/issues/41)
44
166
  - Stripe Elements submit button stuck in disabled state. [\#39](https://github.com/solidusio/solidus_stripe/issues/39)
45
167
  - Visa credit card type is blank [\#36](https://github.com/solidusio/solidus_stripe/issues/36)
46
168
  - Pay with Apple Pay from cart page [\#23](https://github.com/solidusio/solidus_stripe/issues/23)
47
- - Clearer documentation on how to implement [\#15](https://github.com/solidusio/solidus_stripe/issues/15)
48
169
 
49
170
  **Merged pull requests:**
50
171
 
51
- - Relax solidus\_support dependency [\#48](https://github.com/solidusio/solidus_stripe/pull/48) ([kennyadsl](https://github.com/kennyadsl))
52
- - Replace deprecated route `/stripe/confirm\_payment` [\#46](https://github.com/solidusio/solidus_stripe/pull/46) ([spaghetticode](https://github.com/spaghetticode))
53
172
  - Custom Stripe Elements field options [\#42](https://github.com/solidusio/solidus_stripe/pull/42) ([stuffmatic](https://github.com/stuffmatic))
54
173
  - Improve the way Stripe Elements validation errors are displayed [\#40](https://github.com/solidusio/solidus_stripe/pull/40) ([stuffmatic](https://github.com/stuffmatic))
55
174
  - Fix stripe-to-solidus card type mapping [\#38](https://github.com/solidusio/solidus_stripe/pull/38) ([stuffmatic](https://github.com/stuffmatic))
56
175
  - Add hook to provide custom Stripe Elements options [\#37](https://github.com/solidusio/solidus_stripe/pull/37) ([stuffmatic](https://github.com/stuffmatic))
57
176
  - Change order description that we pass to Stripe [\#35](https://github.com/solidusio/solidus_stripe/pull/35) ([kennyadsl](https://github.com/kennyadsl))
58
177
 
59
- ## [v3.2.1](https://github.com/solidusio/solidus_stripe/tree/v3.2.1) (2020-06-29)
60
-
61
- [Full Changelog](https://github.com/solidusio/solidus_stripe/compare/v3.2.0...v3.2.1)
62
-
63
- **Merged pull requests:**
64
-
65
- - Relax solidus\_support version dependency [\#70](https://github.com/solidusio/solidus_stripe/pull/70) ([spaghetticode](https://github.com/spaghetticode))
66
-
67
178
  ## [v3.0.0](https://github.com/solidusio/solidus_stripe/tree/v3.0.0) (2020-03-11)
68
179
 
69
180
  [Full Changelog](https://github.com/solidusio/solidus_stripe/compare/v2.1.0...v3.0.0)
@@ -111,7 +222,7 @@
111
222
  **Merged pull requests:**
112
223
 
113
224
  - Remove ERB from Elements and Intents JS code [\#28](https://github.com/solidusio/solidus_stripe/pull/28) ([spaghetticode](https://github.com/spaghetticode))
114
- - Remove `update\_attributes!` deprecation [\#24](https://github.com/solidusio/solidus_stripe/pull/24) ([spaghetticode](https://github.com/spaghetticode))
225
+ - Remove `update_attributes!` deprecation [\#24](https://github.com/solidusio/solidus_stripe/pull/24) ([spaghetticode](https://github.com/spaghetticode))
115
226
  - Add solidus\_dev\_support gem [\#21](https://github.com/solidusio/solidus_stripe/pull/21) ([spaghetticode](https://github.com/spaghetticode))
116
227
  - Fix reusing cards with Stripe v3 [\#17](https://github.com/solidusio/solidus_stripe/pull/17) ([kennyadsl](https://github.com/kennyadsl))
117
228
  - Extension maintenance [\#14](https://github.com/solidusio/solidus_stripe/pull/14) ([kennyadsl](https://github.com/kennyadsl))
data/Gemfile CHANGED
@@ -1,10 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- source "https://rubygems.org"
3
+ source 'https://rubygems.org'
4
4
  git_source(:github) { |repo| "https://github.com/#{repo}.git" }
5
5
 
6
6
  branch = ENV.fetch('SOLIDUS_BRANCH', 'master')
7
- gem "solidus", github: "solidusio/solidus", branch: branch
7
+ gem 'solidus', github: 'solidusio/solidus', branch: branch
8
+
9
+ # The solidus_frontend gem has been pulled out since v3.2
10
+ if (branch == 'master') || (branch >= 'v3.2')
11
+ gem 'solidus_frontend', github: 'solidusio/solidus_frontend', branch: branch
12
+ end
8
13
 
9
14
  # Needed to help Bundler figure out how to resolve dependencies,
10
15
  # otherwise it takes forever to resolve them.
@@ -12,9 +17,9 @@ gem "solidus", github: "solidusio/solidus", branch: branch
12
17
  gem 'rails', '>0.a'
13
18
 
14
19
  # Provides basic authentication functionality for testing parts of your engine
15
- gem "solidus_auth_devise"
20
+ gem 'solidus_auth_devise'
16
21
 
17
- case ENV['DB']
22
+ case ENV.fetch('DB', nil)
18
23
  when 'mysql'
19
24
  gem 'mysql2'
20
25
  when 'postgresql'
@@ -23,12 +28,6 @@ else
23
28
  gem 'sqlite3'
24
29
  end
25
30
 
26
- group :development, :test do
27
- gem "pry-rails"
28
- gem "ffaker"
29
- gem "rails-controller-testing"
30
- end
31
-
32
31
  gemspec
33
32
 
34
33
  # Use a local Gemfile to include development dependencies that might not be