spree_gateway 3.0.0 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/app/models/spree/gateway/epay.rb +10 -0
- data/lib/spree_gateway/engine.rb +1 -0
- data/lib/views/frontend/spree/checkout/payment/_stripe.html.erb +6 -3
- data/spec/features/stripe_checkout_spec.rb +5 -5
- data/spec/models/gateway/epay_spec.rb +11 -0
- data/spree_gateway.gemspec +4 -3
- metadata +25 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a3dc1a49d41448e702c7c23b0955b6ae6f14eef
|
4
|
+
data.tar.gz: c32f5c5115fd9e2af9b74a706fa10cec8777496d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: db6931485b62ea5dc439c4db66b111e1eac00f630e142fc729f2a199b22765e06a33185a1acb9f7b670aa70f3a522ee1dea7b6826eb7633b6491aeaa9b671d21
|
7
|
+
data.tar.gz: 44e52ced5d6720c55e8c1197eafd2bf11e9a21acdff98ba99def0970fbef5b48e0a01a44e8165f605481972c1725de62ae373a207120d4f98a6b5545a338feab
|
data/Gemfile
CHANGED
data/lib/spree_gateway/engine.rb
CHANGED
@@ -15,6 +15,7 @@ module SpreeGateway
|
|
15
15
|
app.config.spree.payment_methods << Spree::Gateway::CardSave
|
16
16
|
app.config.spree.payment_methods << Spree::Gateway::CyberSource
|
17
17
|
app.config.spree.payment_methods << Spree::Gateway::DataCash
|
18
|
+
app.config.spree.payment_methods << Spree::Gateway::Epay
|
18
19
|
app.config.spree.payment_methods << Spree::Gateway::Eway
|
19
20
|
app.config.spree.payment_methods << Spree::Gateway::Maxipago
|
20
21
|
app.config.spree.payment_methods << Spree::Gateway::Migs
|
@@ -36,8 +36,11 @@
|
|
36
36
|
exp_year: '#card_expiry',
|
37
37
|
cvc: '#card_code'
|
38
38
|
}
|
39
|
-
if (response.error.param)
|
40
|
-
Spree.stripePaymentMethod.find(param_map[response.error.param])
|
39
|
+
if (response.error.param) {
|
40
|
+
errorField = Spree.stripePaymentMethod.find(param_map[response.error.param])
|
41
|
+
errorField.addClass('error');
|
42
|
+
errorField.parent().addClass('has-error');
|
43
|
+
}
|
41
44
|
|
42
45
|
return $('#stripeError').show();
|
43
46
|
} else {
|
@@ -55,7 +58,7 @@
|
|
55
58
|
};
|
56
59
|
|
57
60
|
$(document).ready(function() {
|
58
|
-
Spree.stripePaymentMethod.prepend("<div id='stripeError' class='errorExplanation' style='display:none'></div>");
|
61
|
+
Spree.stripePaymentMethod.prepend("<div id='stripeError' class='errorExplanation alert alert-danger' style='display:none'></div>");
|
59
62
|
return $('#checkout_form_payment [data-hook=buttons]').click(function() {
|
60
63
|
var expiration, params;
|
61
64
|
$('#stripeError').hide();
|
@@ -61,8 +61,8 @@ describe "Stripe checkout" do
|
|
61
61
|
|
62
62
|
it "shows an error with an invalid credit card number", :js => true do
|
63
63
|
click_button "Save and Continue"
|
64
|
-
page.should have_content("
|
65
|
-
page.should have_css('#card_number.error')
|
64
|
+
page.should have_content("The card number is not a valid credit card number")
|
65
|
+
page.should have_css('.has-error #card_number.error')
|
66
66
|
end
|
67
67
|
|
68
68
|
it "shows an error with invalid security fields", :js => true do
|
@@ -70,7 +70,7 @@ describe "Stripe checkout" do
|
|
70
70
|
fill_in "Expiration", :with => "01 / #{Time.now.year + 1}"
|
71
71
|
click_button "Save and Continue"
|
72
72
|
page.should have_content("Your card's security code is invalid.")
|
73
|
-
page.should have_css('#card_code.error')
|
73
|
+
page.should have_css('.has-error #card_code.error')
|
74
74
|
end
|
75
75
|
|
76
76
|
it "shows an error with invalid expiry month field", :js => true do
|
@@ -79,7 +79,7 @@ describe "Stripe checkout" do
|
|
79
79
|
fill_in "Card Code", :with => "123"
|
80
80
|
click_button "Save and Continue"
|
81
81
|
page.should have_content("Your card's expiration month is invalid.")
|
82
|
-
page.should have_css('#card_expiry.error')
|
82
|
+
page.should have_css('.has-error #card_expiry.error')
|
83
83
|
end
|
84
84
|
|
85
85
|
it "shows an error with invalid expiry year field", :js => true do
|
@@ -88,6 +88,6 @@ describe "Stripe checkout" do
|
|
88
88
|
fill_in "Card Code", :with => "123"
|
89
89
|
click_button "Save and Continue"
|
90
90
|
page.should have_content("Your card's expiration year is invalid.")
|
91
|
-
page.should have_css('#card_expiry.error')
|
91
|
+
page.should have_css('.has-error #card_expiry.error')
|
92
92
|
end
|
93
93
|
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Spree::Gateway::Epay do
|
4
|
+
let(:gateway) { described_class.create!(name: 'Epay') }
|
5
|
+
|
6
|
+
context '.provider_class' do
|
7
|
+
it 'is a Epay gateway' do
|
8
|
+
expect(gateway.provider_class).to eq ::ActiveMerchant::Billing::EpayGateway
|
9
|
+
end
|
10
|
+
end
|
11
|
+
end
|
data/spree_gateway.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
Gem::Specification.new do |s|
|
3
3
|
s.platform = Gem::Platform::RUBY
|
4
4
|
s.name = 'spree_gateway'
|
5
|
-
s.version = '3.
|
5
|
+
s.version = '3.1.0'
|
6
6
|
s.summary = 'Additional Payment Gateways for Spree Commerce'
|
7
7
|
s.description = s.summary
|
8
8
|
|
@@ -16,7 +16,7 @@ Gem::Specification.new do |s|
|
|
16
16
|
s.require_path = 'lib'
|
17
17
|
s.requirements << 'none'
|
18
18
|
|
19
|
-
s.add_dependency 'spree_core', '~> 3.0.
|
19
|
+
s.add_dependency 'spree_core', '~> 3.1.0.beta'
|
20
20
|
|
21
21
|
s.add_development_dependency 'braintree'
|
22
22
|
s.add_development_dependency 'capybara'
|
@@ -32,7 +32,8 @@ Gem::Specification.new do |s|
|
|
32
32
|
s.add_development_dependency 'pry'
|
33
33
|
s.add_development_dependency 'rspec-activemodel-mocks'
|
34
34
|
s.add_development_dependency 'rspec-rails', '~> 2.99'
|
35
|
-
s.add_development_dependency 'sass
|
35
|
+
s.add_development_dependency 'bootstrap-sass', '>= 3.3.5.1'
|
36
|
+
s.add_development_dependency 'sass-rails', '>= 3.2'
|
36
37
|
s.add_development_dependency 'selenium-webdriver'
|
37
38
|
s.add_development_dependency 'simplecov'
|
38
39
|
s.add_development_dependency 'sqlite3'
|
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.
|
4
|
+
version: 3.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Spree Commerce
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-04-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: spree_core
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.0.
|
19
|
+
version: 3.1.0.beta
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3.0.
|
26
|
+
version: 3.1.0.beta
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: braintree
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -220,20 +220,34 @@ dependencies:
|
|
220
220
|
- - "~>"
|
221
221
|
- !ruby/object:Gem::Version
|
222
222
|
version: '2.99'
|
223
|
+
- !ruby/object:Gem::Dependency
|
224
|
+
name: bootstrap-sass
|
225
|
+
requirement: !ruby/object:Gem::Requirement
|
226
|
+
requirements:
|
227
|
+
- - ">="
|
228
|
+
- !ruby/object:Gem::Version
|
229
|
+
version: 3.3.5.1
|
230
|
+
type: :development
|
231
|
+
prerelease: false
|
232
|
+
version_requirements: !ruby/object:Gem::Requirement
|
233
|
+
requirements:
|
234
|
+
- - ">="
|
235
|
+
- !ruby/object:Gem::Version
|
236
|
+
version: 3.3.5.1
|
223
237
|
- !ruby/object:Gem::Dependency
|
224
238
|
name: sass-rails
|
225
239
|
requirement: !ruby/object:Gem::Requirement
|
226
240
|
requirements:
|
227
|
-
- - "
|
241
|
+
- - ">="
|
228
242
|
- !ruby/object:Gem::Version
|
229
|
-
version:
|
243
|
+
version: '3.2'
|
230
244
|
type: :development
|
231
245
|
prerelease: false
|
232
246
|
version_requirements: !ruby/object:Gem::Requirement
|
233
247
|
requirements:
|
234
|
-
- - "
|
248
|
+
- - ">="
|
235
249
|
- !ruby/object:Gem::Version
|
236
|
-
version:
|
250
|
+
version: '3.2'
|
237
251
|
- !ruby/object:Gem::Dependency
|
238
252
|
name: selenium-webdriver
|
239
253
|
requirement: !ruby/object:Gem::Requirement
|
@@ -301,6 +315,7 @@ files:
|
|
301
315
|
- app/models/spree/gateway/card_save.rb
|
302
316
|
- app/models/spree/gateway/cyber_source.rb
|
303
317
|
- app/models/spree/gateway/data_cash.rb
|
318
|
+
- app/models/spree/gateway/epay.rb
|
304
319
|
- app/models/spree/gateway/eway.rb
|
305
320
|
- app/models/spree/gateway/maxipago.rb
|
306
321
|
- app/models/spree/gateway/migs.rb
|
@@ -361,6 +376,7 @@ files:
|
|
361
376
|
- spec/models/gateway/card_save_spec.rb
|
362
377
|
- spec/models/gateway/cyber_source_spec.rb
|
363
378
|
- spec/models/gateway/data_cache_spec.rb
|
379
|
+
- spec/models/gateway/epay_spec.rb
|
364
380
|
- spec/models/gateway/eway_spec.rb
|
365
381
|
- spec/models/gateway/maxipago_spec.rb
|
366
382
|
- spec/models/gateway/moneris_spec.rb
|
@@ -419,6 +435,7 @@ test_files:
|
|
419
435
|
- spec/models/gateway/card_save_spec.rb
|
420
436
|
- spec/models/gateway/cyber_source_spec.rb
|
421
437
|
- spec/models/gateway/data_cache_spec.rb
|
438
|
+
- spec/models/gateway/epay_spec.rb
|
422
439
|
- spec/models/gateway/eway_spec.rb
|
423
440
|
- spec/models/gateway/maxipago_spec.rb
|
424
441
|
- spec/models/gateway/moneris_spec.rb
|