effective_orders 4.0.0beta18 → 4.0.0beta19
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a3a90107c72d72ef85dfab8a2b966f46ec314b7b
|
4
|
+
data.tar.gz: 6f7bec9931f8ae15798f744009ad1adfc6806dde
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 38287717bee0633b5700b70dde6c55683c33e724c76d13a07ed1d02e4382715ec95a59eb9e6f82ae77d0ecd4ca52517dc8cb45955ab8de1c0f2e45868476fae3
|
7
|
+
data.tar.gz: b89ff8c3382b05081945c08497deb8c2c0b2bdb2ae3a577b0b22971e0b943ae2f94b016179025bf1e559c4afde316883778ee3188f03976de9e92c4d49966072
|
@@ -14,15 +14,21 @@ stripeSubscriptionHandler = (key, form) ->
|
|
14
14
|
form.addClass('stripe-success').submit() # Submits the form. As this is a remote form, submits via JS
|
15
15
|
|
16
16
|
# Hijack submit and get a stripe token
|
17
|
-
$(document).on 'click', ".effective-orders-stripe-token-required[type='submit']", (event) ->
|
18
|
-
$
|
17
|
+
$(document).on 'click', ".effective-orders-stripe-token-required[type='submit'],[data-choose-stripe-plan-id]", (event) ->
|
18
|
+
$obj = $(event.currentTarget)
|
19
|
+
$form = $obj.closest('form')
|
19
20
|
|
20
21
|
# Get stripe data payload
|
21
22
|
stripe = $form.data('stripe')
|
22
23
|
return unless stripe?
|
23
24
|
|
25
|
+
# If we're doing choose button mode
|
26
|
+
if $obj.data('choose-stripe-plan-id')
|
27
|
+
$form.find("input[name$='[stripe_plan_id]']").val($obj.data('choose-stripe-plan-id'))
|
28
|
+
return true unless $obj.hasClass('effective-orders-stripe-token-required')
|
29
|
+
|
24
30
|
# Make sure there is a plan selected
|
25
|
-
selected_plan_id = $form.find("input[name$='[stripe_plan_id]']:checked").val() || ''
|
31
|
+
selected_plan_id = $form.find("input[name$='[stripe_plan_id]']:checked").val() || $form.find("input[name$='[stripe_plan_id]']").val() || ''
|
26
32
|
return unless selected_plan_id.length > 0
|
27
33
|
|
28
34
|
# Match plan
|
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: 4.0.
|
4
|
+
version: 4.0.0beta19
|
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: 2018-07-
|
11
|
+
date: 2018-07-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|