solidus_stripe 5.0.1 → 5.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '087dea6eda51aa5e0b0cbfcbd8ec4cc802b9dff821a2ee9b4ad360b71eea2ec0'
4
- data.tar.gz: 9d19502ddd9843c04499d392f5fec36cf4f92e9575c8a143ca0edf250507d994
3
+ metadata.gz: '024918e27fdd100b73a5695aa31d9217cc244ecb44fc4fb209df09eda07462af'
4
+ data.tar.gz: d9f652e6df2d4680e7a81e792449a34d189de9aecf8d320cad78ccb8d3460417
5
5
  SHA512:
6
- metadata.gz: 74401198731b8489dadea5c4bbe93c3652b5e149fc905af17f88b70630d2ac12d0c9bb7d3f6616409a49b7e775336ba15f3073f4dbe401334e19fd7b9fd92fbf
7
- data.tar.gz: d18b70d73eeee93470fe6c0b2c680b1d43a1d62a455c872d64e86556ac0ba05f2de111f8b6d301806de013075bfe7429e4bb978eeca46aacec1ab430ac81ca82
6
+ metadata.gz: df078370f8522e3ab4c38ddcb114aa91ffde2b932aa6bb63ab4292b24645f0828d7ba556319b1e52878b46b43bd672e0c60d396110b722192bf00764296a45f6
7
+ data.tar.gz: 6f2d40c7bb04dd739589e161e02777c872fbc547567767e4f0fc1f1508f800b22c7442c3a264b9ce1595c8bf1e483a89725500ffe27375c50a3f55e0f2fe0b69
@@ -39,7 +39,8 @@ module SolidusStripe
39
39
 
40
40
  def usable?
41
41
  stripe_intent_id &&
42
- stripe_intent.status == 'requires_payment_method' &&
42
+ (stripe_intent.status == 'requires_payment_method' ||
43
+ stripe_intent.status == 'requires_confirmation') &&
43
44
  stripe_intent.amount == stripe_order_amount
44
45
  end
45
46
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SolidusStripe
4
- VERSION = '5.0.1'
4
+ VERSION = '5.0.2'
5
5
  end
@@ -203,4 +203,23 @@ RSpec.describe 'SolidusStripe Checkout', :js do
203
203
  end
204
204
  end
205
205
  end
206
+
207
+ context 'when refreshing the confirmation page' do
208
+ it 'does not create a duplicate payment intent' do
209
+ create_payment_method
210
+ visit_payment_step(user: create(:user))
211
+ choose_new_stripe_payment
212
+ fill_in_stripe_country('United States')
213
+ fill_stripe_form(number: '4000000000003220')
214
+ submit_payment
215
+ expect(page).to have_content('Confirm')
216
+ check_terms_of_service # ensure we're on the confirm page before refreshing
217
+ page.driver.browser.navigate.refresh
218
+ check_terms_of_service
219
+ confirm_order
220
+ authorize_3d_secure_2_payment(authenticate: true)
221
+ expect(page).to have_content('Your order has been processed successfully')
222
+ payment_intent_is_created_with_required_capture
223
+ end
224
+ end
206
225
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: solidus_stripe
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.0.1
4
+ version: 5.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Solidus Team
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-10-09 00:00:00.000000000 Z
11
+ date: 2023-11-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: solidus_core