spree_gateway 3.7.1 → 3.7.2
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
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b3d2209f70f1e1ef9d3dfbaaf18dd0b738f54822839f5b4e37d4cd301fd8d7a
|
4
|
+
data.tar.gz: da9c496a55da549b4fa7927788c5d1986e0593a150e3d049fa0dda685a07eab0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5d60b875f026e7cda13735c783e2ab2c83ff2a03a035827f3be3857b085c299161c69aba30fb3c57757e7dfa3f907afa7159b1fbd06667cabe0fc446820b7179
|
7
|
+
data.tar.gz: bdcc15e27afd248137fbcbec3a0eb01ca5ecbb3f0feb662ae2e3290d777b47417722c341f25d35ce87fc8766d436d05d71e8125e5072a7eb0ffe8b29edc9da4f
|
data/README.md
CHANGED
@@ -36,30 +36,19 @@ For`PayPal` support head over to [braintree_vzero](https://github.com/spree-cont
|
|
36
36
|
|
37
37
|
1. Add this extension to your Gemfile with this line:
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
gem 'spree_gateway', '~> 3.3'
|
43
|
-
```
|
44
|
-
|
45
|
-
#### Spree 3.0 and Spree 2.x
|
46
|
-
|
47
|
-
```ruby
|
48
|
-
gem 'spree_gateway', github: 'spree/spree_gateway', branch: 'X-X-stable'
|
49
|
-
```
|
50
|
-
|
51
|
-
The `branch` option is important: it must match the version of Spree you're using.
|
52
|
-
For example, use `3-0-stable` if you're using Spree `3-0-stable` or any `3.0.x` version.
|
39
|
+
```ruby
|
40
|
+
gem 'spree_gateway', '~> 3.7'
|
41
|
+
```
|
53
42
|
|
54
43
|
2. Install the gem using Bundler:
|
55
|
-
|
56
|
-
|
57
|
-
|
44
|
+
```ruby
|
45
|
+
bundle install
|
46
|
+
```
|
58
47
|
|
59
48
|
3. Copy & run migrations
|
60
|
-
|
61
|
-
|
62
|
-
|
49
|
+
```ruby
|
50
|
+
bundle exec rails g spree_gateway:install
|
51
|
+
```
|
63
52
|
|
64
53
|
Finally, make sure to **restart your app**. Navigate to *Configuration > Payment Methods > New Payment Method* in the admin panel and you should see that a bunch of additional gateways have been added to the list.
|
65
54
|
|
@@ -1,24 +1,15 @@
|
|
1
1
|
<% param_prefix = "payment_source[#{payment_method.id}]" %>
|
2
2
|
<div class="well clearfix">
|
3
3
|
<p class="field">
|
4
|
-
<%=
|
5
|
-
<%= Spree.t(:name_on_card) %><abbr class="required" title="required">*</abbr>
|
6
|
-
<% end %>
|
7
|
-
<%= text_field_tag "#{param_prefix}[name]", "#{@order.bill_address_firstname} #{@order.bill_address_lastname}", { id: "name_on_card_#{payment_method.id}", class: 'form-control required'} %>
|
8
|
-
</p>
|
9
|
-
<div class="form-row">
|
10
|
-
<%= label_tag "card_number" do %>
|
11
|
-
<%= Spree.t(:card_number) %><abbr class="required" title="required">*</abbr>
|
12
|
-
<% end %>
|
13
|
-
<div class="form-control required cardNumber">
|
14
|
-
<div id="card-element">
|
15
|
-
<!-- a Stripe Element will be inserted here. -->
|
16
|
-
</div>
|
17
|
-
</div>
|
18
|
-
<!-- Used to display form errors -->
|
19
|
-
<div id="card-errors" role="alert"></div>
|
20
|
-
</div>
|
4
|
+
<%= text_field_tag "#{param_prefix}[name]", "#{@order.bill_address_firstname} #{@order.bill_address_lastname}", { id: "name_on_card_#{payment_method.id}", class: 'spree-flat-input', placeholder: Spree.t(:name_on_card)} %>
|
21
5
|
</p>
|
6
|
+
<div class="form-control required cardNumber spree-flat-input">
|
7
|
+
<div id="card-element">
|
8
|
+
<!-- a Stripe Element will be inserted here. -->
|
9
|
+
</div>
|
10
|
+
</div>
|
11
|
+
<!-- Used to display form errors -->
|
12
|
+
<div id="card-errors" role="alert"></div>
|
22
13
|
</div>
|
23
14
|
|
24
15
|
<script type="text/javascript" src="https://js.stripe.com/v3/"></script>
|
@@ -26,20 +17,24 @@
|
|
26
17
|
<script>
|
27
18
|
var stripeElements = Stripe("<%= payment_method.preferred_publishable_key %>");
|
28
19
|
var elements = stripeElements.elements();
|
20
|
+
var spreeFlatInputStyle = getComputedStyle(document.querySelector('input.spree-flat-input'));
|
29
21
|
|
30
22
|
var card = elements.create('card', {
|
31
23
|
iconStyle: 'solid',
|
32
24
|
hidePostalCode: true,
|
33
25
|
style: {
|
34
26
|
base: {
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
27
|
+
color: spreeFlatInputStyle['color'],
|
28
|
+
iconColor: spreeFlatInputStyle['color'],
|
29
|
+
lineHeight: spreeFlatInputStyle['line-height'],
|
30
|
+
fontWeight: spreeFlatInputStyle['font-weight'],
|
31
|
+
fontFamily: spreeFlatInputStyle['font-family'],
|
32
|
+
fontSize: spreeFlatInputStyle['font-size'],
|
40
33
|
|
41
34
|
'::placeholder': {
|
42
|
-
color: '#
|
35
|
+
color: '#757575',
|
36
|
+
fontWeight: 300,
|
37
|
+
textTransform: 'uppercase'
|
43
38
|
},
|
44
39
|
},
|
45
40
|
invalid: {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spree_gateway
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.7.
|
4
|
+
version: 3.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Spree Commerce
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-02-
|
11
|
+
date: 2020-02-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: spree_core
|