effective_orders 6.1.2 → 6.1.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d89c7eaee9322884706dfaacae71335ca4b8284b06ab69459194cb09b523eb53
|
4
|
+
data.tar.gz: 2c667a68c9e3e68fe764cd3386495698d55c8c86c7d213ce5691e0a35f37821c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cadaa028284a3ee34b1cdfefe2165722cec9edd5307771d8c2e7c5f5fa5afff5ccbd3926d0c6a535369b163dd3987eb4be4afef1572aafd5c6367268cb7e9591
|
7
|
+
data.tar.gz: c5cc2bee6db200d5ba490a61f987b5d00df5c7e7bc78c1bf7bfabb11e536ff2899c4fe1c8be3fef886fb62cfff266aa29b8164a0c3e864b8fa4800437e9ce923
|
@@ -17,8 +17,19 @@ this.StripeForm ||= class StripeForm
|
|
17
17
|
@card = @stripe.elements().create('card', @style())
|
18
18
|
|
19
19
|
@mount()
|
20
|
+
@form.find('.stripe-submit-button').show()
|
20
21
|
@form.addClass('initialized')
|
21
22
|
|
23
|
+
destroy: ->
|
24
|
+
@form = $('form[data-stripe-form]').first()
|
25
|
+
return false unless @form.length > 0
|
26
|
+
|
27
|
+
@form.find("input[name$='[payment_intent_id]']").val('')
|
28
|
+
@form.find('#stripe-card-element').html('')
|
29
|
+
|
30
|
+
@form.find('.stripe-submit-button').hide()
|
31
|
+
@form.removeClass('initialized')
|
32
|
+
|
22
33
|
style: ->
|
23
34
|
style: {
|
24
35
|
base: { color: '#32325d', fontSize: '16px', },
|
@@ -73,7 +84,8 @@ this.StripeForm ||= class StripeForm
|
|
73
84
|
|
74
85
|
errorPayment: (error) ->
|
75
86
|
$('#stripe-card-errors').text(error.message)
|
76
|
-
EffectiveForm.invalidate(@form)
|
87
|
+
EffectiveForm.invalidate(@form)
|
77
88
|
|
78
89
|
$ -> (new StripeForm()).initialize()
|
79
90
|
$(document).on 'turbolinks:load', -> (new StripeForm()).initialize()
|
91
|
+
$(document).on 'turbolinks:before-cache', -> (new StripeForm()).destroy()
|
@@ -16,7 +16,7 @@
|
|
16
16
|
= f.hidden_field :declined_url, value: declined_url
|
17
17
|
|
18
18
|
-# This is set by the stripe.js javascript
|
19
|
-
= f.hidden_field :payment_intent_id
|
19
|
+
= f.hidden_field :payment_intent_id, required: true
|
20
20
|
|
21
21
|
- if stripe[:token_required]
|
22
22
|
%p Please enter your credit card information.
|
@@ -27,5 +27,5 @@
|
|
27
27
|
= collapse('Use this card instead...', class: 'update-stripe-payment-method') do
|
28
28
|
= render('effective/orders/stripe/element')
|
29
29
|
|
30
|
-
.mt-4
|
30
|
+
.mt-4.stripe-submit-button{style: 'display: none;'}
|
31
31
|
= f.submit order_checkout_label(:stripe), center: true, border: false
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: effective_orders
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.1.
|
4
|
+
version: 6.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Code and Effect
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-12-
|
11
|
+
date: 2022-12-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|