spree_gateway 3.9.3 → 3.9.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (45) hide show
  1. checksums.yaml +4 -4
  2. data/.travis.yml +4 -15
  3. data/Gemfile +3 -1
  4. data/README.md +2 -2
  5. data/Rakefile +2 -2
  6. data/app/models/spree/gateway/stripe_elements_gateway.rb +4 -0
  7. data/app/models/spree/gateway/stripe_gateway.rb +4 -0
  8. data/app/models/{spree → spree_gateway}/apple_pay_order_decorator.rb +2 -2
  9. data/app/models/{spree → spree_gateway}/apple_pay_payment_decorator.rb +2 -2
  10. data/app/models/{spree → spree_gateway}/credit_card_decorator.rb +2 -2
  11. data/app/models/{spree → spree_gateway}/order_decorator.rb +2 -2
  12. data/app/models/{spree → spree_gateway}/payment_decorator.rb +2 -2
  13. data/lib/spree_gateway/engine.rb +3 -0
  14. data/lib/spree_gateway/version.rb +1 -1
  15. data/spec/features/admin/stripe_elements_payment_spec.rb +2 -1
  16. data/spec/features/stripe_checkout_spec.rb +9 -3
  17. data/spec/features/stripe_elements_3ds_checkout_spec.rb +2 -1
  18. data/spec/models/gateway/authorize_net_spec.rb +1 -1
  19. data/spec/models/gateway/balanced_gateway_spec.rb +1 -1
  20. data/spec/models/gateway/banwire_spec.rb +1 -1
  21. data/spec/models/gateway/beanstream_spec.rb +1 -1
  22. data/spec/models/gateway/braintree_gateway_spec.rb +24 -13
  23. data/spec/models/gateway/card_save_spec.rb +1 -1
  24. data/spec/models/gateway/{data_cache_spec.rb → data_cash_spec.rb} +1 -1
  25. data/spec/models/gateway/epay_spec.rb +1 -1
  26. data/spec/models/gateway/eway_rapid_spec.rb +1 -1
  27. data/spec/models/gateway/eway_spec.rb +1 -1
  28. data/spec/models/gateway/moneris_spec.rb +1 -1
  29. data/spec/models/gateway/pay_junction_spec.rb +1 -1
  30. data/spec/models/gateway/pay_pal_spec.rb +1 -1
  31. data/spec/models/gateway/payflow_pro_spec.rb +1 -1
  32. data/spec/models/gateway/paymill_spec.rb +1 -1
  33. data/spec/models/gateway/pin_gateway_spec.rb +1 -1
  34. data/spec/models/gateway/quickpay_spec.rb +1 -1
  35. data/spec/models/gateway/sage_pay_spec.rb +1 -1
  36. data/spec/models/gateway/secure_pay_au_spec.rb +1 -1
  37. data/spec/models/gateway/usa_epay_transaction_spec.rb +2 -2
  38. data/spec/models/gateway/worldpay_spec.rb +1 -1
  39. data/spec/models/spree/order_spec.rb +4 -2
  40. data/spree_gateway.gemspec +2 -3
  41. metadata +13 -23
  42. data/Appraisals +0 -15
  43. data/gemfiles/spree_3_7.gemfile +0 -9
  44. data/gemfiles/spree_4_1.gemfile +0 -8
  45. data/gemfiles/spree_master.gemfile +0 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 82e672befb08ae277659eec1f7686002af0b6f66b1f8ecb467649ab29667aee2
4
- data.tar.gz: 47d5a54c20d7987569af842d50f471e6f3eea69647f6807865191c55e97f61cc
3
+ metadata.gz: a29093f977d40e708b032c608a9e25f1949352bee57b9321fa36488000d7711f
4
+ data.tar.gz: 5f5d7ff9014be360d444df942dc24d1313ef0881e786ac37a49f4fe884b5d0fe
5
5
  SHA512:
6
- metadata.gz: 5efb8b8ce887c92a222bf0b4c4b53b0ea16ee45f6efff3ad2908acdc5e3383139b778362be57ed858d15a0497df4d6aa37fa2c8f56ddee81f334945bcb67fe9f
7
- data.tar.gz: fb61b3afbfc998e819bd11cf5d1f53c782e0e486c5b0fea6c43710fba74664398384badff68298a593b715185da3eaa68727e18b3d575dc5f14511d232d7f437
6
+ metadata.gz: 807b40308555c5149f146fa3fc38c52f10c47ec765a1988f0562adcc296115d43670f09052a80a2493edd166d6d195092e7861ae07457c8c47eedb0cca90559b
7
+ data.tar.gz: 0ce03934963ea212e16aed6148eff226362d90544789ec1fa283c69dbff81c1d2834c91bce4aab81794935c5d3e825ffb89f07b95d66d1d9994128b11f8e31de
data/.travis.yml CHANGED
@@ -1,6 +1,8 @@
1
1
  os: linux
2
2
  dist: bionic
3
3
 
4
+ cache: bundler
5
+
4
6
  addons:
5
7
  apt:
6
8
  sources:
@@ -11,6 +13,7 @@ addons:
11
13
  services:
12
14
  - mysql
13
15
  - postgresql
16
+ - redis-server
14
17
 
15
18
  language: ruby
16
19
 
@@ -22,20 +25,6 @@ env:
22
25
  - DB=mysql
23
26
  - DB=postgres
24
27
 
25
- gemfile:
26
- - gemfiles/spree_3_7.gemfile
27
- - gemfiles/spree_4_1.gemfile
28
- - gemfiles/spree_master.gemfile
29
-
30
- jobs:
31
- allow_failures:
32
- - gemfile: gemfiles/spree_master.gemfile
33
- exclude:
34
- - rvm: 3.0
35
- gemfile: gemfiles/spree_4_1.gemfile
36
- - rvm: 3.0
37
- gemfile: gemfiles/spree_3_7.gemfile
38
-
39
28
  before_install:
40
29
  - mysql -u root -e "GRANT ALL ON *.* TO 'travis'@'%';"
41
30
 
@@ -47,4 +36,4 @@ before_script:
47
36
 
48
37
  script:
49
38
  - bundle exec rake test_app
50
- - bundle exec rake spec
39
+ - bundle exec rake spec
data/Gemfile CHANGED
@@ -1,6 +1,8 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  gem 'rails-controller-testing'
4
- gem 'spree', github: 'spree/spree', branch: 'master'
4
+ gem 'spree', github: 'spree/spree', branch: 'main'
5
+ gem 'spree_backend', github: 'spree/spree', branch: 'main'
6
+ gem 'spree_frontend', github: 'spree/spree', branch: 'main'
5
7
 
6
8
  gemspec
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Spree Gateway
2
2
 
3
- [![Build Status](https://api.travis-ci.org/spree/spree_gateway.svg?branch=master)](https://travis-ci.org/spree/spree_gateway)
3
+ [![Build Status](https://api.travis-ci.org/spree/spree_gateway.svg?branch=main)](https://travis-ci.org/spree/spree_gateway)
4
4
  [![Code Climate](https://codeclimate.com/github/spree/spree_gateway.svg)](https://codeclimate.com/github/spree/spree_gateway)
5
5
 
6
6
  Community supported Spree Payment Method Gateways. It works as a wrapper for
@@ -100,6 +100,6 @@ We are [available for hire][spark].
100
100
 
101
101
  [1]: http://www.fsf.org/licensing/essays/free-sw.html
102
102
  [2]: https://github.com/spree/spree_gateway/issues
103
- [3]: https://github.com/spree/spree_gateway/blob/master/LICENSE.md
103
+ [3]: https://github.com/spree/spree_gateway/blob/main/LICENSE.md
104
104
  [4]: https://github.com/spree
105
105
  [5]: https://github.com/spree/spree_gateway/graphs/contributors
data/Rakefile CHANGED
@@ -2,7 +2,7 @@ require 'bundler'
2
2
  Bundler::GemHelper.install_tasks
3
3
 
4
4
  require 'rspec/core/rake_task'
5
- require 'spree/testing_support/common_rake'
5
+ require 'spree/testing_support/extension_rake'
6
6
 
7
7
  RSpec::Core::RakeTask.new
8
8
 
@@ -11,5 +11,5 @@ task :default => [:spec]
11
11
  desc "Generates a dummy app for testing"
12
12
  task :test_app do
13
13
  ENV['LIB_NAME'] = 'spree_gateway'
14
- Rake::Task['common:test_app'].invoke
14
+ Rake::Task['extension:test_app'].invoke
15
15
  end
@@ -53,5 +53,9 @@ module Spree
53
53
  options[:execute_threed] = get_preference(:intents)
54
54
  return money, creditcard, options
55
55
  end
56
+
57
+ def public_preference_keys
58
+ %i[publishable_key test_mode intents]
59
+ end
56
60
  end
57
61
  end
@@ -143,5 +143,9 @@ module Spree
143
143
  url = 'https://spreecommerce.org'
144
144
  "#{name_with_version} #{url}"
145
145
  end
146
+
147
+ def public_preference_keys
148
+ %i[publishable_key test_mode]
149
+ end
146
150
  end
147
151
  end
@@ -1,4 +1,4 @@
1
- module Spree
1
+ module SpreeGateway
2
2
  module ApplePayOrderDecorator
3
3
  def confirmation_required?
4
4
  return false if paid_with_apple_pay?
@@ -17,4 +17,4 @@ module Spree
17
17
  end
18
18
  end
19
19
 
20
- Spree::Order.prepend Spree::ApplePayOrderDecorator
20
+ ::Spree::Order.prepend(::SpreeGateway::ApplePayOrderDecorator)
@@ -1,4 +1,4 @@
1
- module Spree
1
+ module SpreeGateway
2
2
  module ApplePayPaymentDecorator
3
3
  def apple_pay?
4
4
  payment_method.is_a? Spree::Gateway::StripeApplePayGateway
@@ -6,4 +6,4 @@ module Spree
6
6
  end
7
7
  end
8
8
 
9
- Spree::Payment.prepend Spree::ApplePayPaymentDecorator
9
+ ::Spree::Payment.prepend(::SpreeGateway::ApplePayPaymentDecorator)
@@ -1,4 +1,4 @@
1
- module Spree
1
+ module SpreeGateway
2
2
  module CreditCardDecorator
3
3
  def set_last_digits
4
4
  self.last_digits ||= number.to_s.length <= 4 ? number : number.to_s.slice(-4..-1)
@@ -7,4 +7,4 @@ module Spree
7
7
  end
8
8
  end
9
9
 
10
- ::Spree::CreditCard.prepend(::Spree::CreditCardDecorator)
10
+ ::Spree::CreditCard.prepend(::SpreeGateway::CreditCardDecorator)
@@ -1,4 +1,4 @@
1
- module Spree
1
+ module SpreeGateway
2
2
  module OrderDecorator
3
3
  def self.prepended(base)
4
4
  return if base.checkout_steps.key?(:payment_confirm)
@@ -25,4 +25,4 @@ module Spree
25
25
  end
26
26
  end
27
27
 
28
- Spree::Order.prepend(Spree::OrderDecorator)
28
+ ::Spree::Order.prepend(::SpreeGateway::OrderDecorator)
@@ -1,4 +1,4 @@
1
- module Spree
1
+ module SpreeGateway
2
2
  module PaymentDecorator
3
3
  def handle_response(response, success_state, failure_state)
4
4
  if response.success? && response.respond_to?(:params)
@@ -33,4 +33,4 @@ module Spree
33
33
  end
34
34
  end
35
35
 
36
- Spree::Payment.prepend(Spree::PaymentDecorator)
36
+ ::Spree::Payment.prepend(::SpreeGateway::PaymentDecorator)
@@ -41,6 +41,9 @@ module SpreeGateway
41
41
  Dir.glob(File.join(File.dirname(__FILE__), '../../app/**/spree/*_decorator*.rb')) do |c|
42
42
  Rails.application.config.cache_classes ? require(c) : load(c)
43
43
  end
44
+ Dir.glob(File.join(File.dirname(__FILE__), '../../app/**/spree_gateway/*_decorator*.rb')) do |c|
45
+ Rails.application.config.cache_classes ? require(c) : load(c)
46
+ end
44
47
  Dir.glob(File.join(File.dirname(__FILE__), '../../lib/active_merchant/**/*_decorator*.rb')) do |c|
45
48
  Rails.application.config.cache_classes ? require(c) : load(c)
46
49
  end
@@ -1,5 +1,5 @@
1
1
  module SpreeGateway
2
2
  def self.version
3
- '3.9.3'
3
+ '3.9.4'
4
4
  end
5
5
  end
@@ -13,7 +13,8 @@ describe 'Admin Panel Stripe elements payment', type: :feature do
13
13
  Spree::Gateway::StripeElementsGateway.create!(
14
14
  name: 'Stripe Element',
15
15
  preferred_secret_key: 'sk_test_VCZnDv3GLU15TRvn8i2EsaAN',
16
- preferred_publishable_key: 'pk_test_Cuf0PNtiAkkMpTVC2gwYDMIg'
16
+ preferred_publishable_key: 'pk_test_Cuf0PNtiAkkMpTVC2gwYDMIg',
17
+ stores: [::Spree::Store.default]
17
18
  )
18
19
  end
19
20
 
@@ -8,15 +8,21 @@ describe "Stripe checkout", type: :feature, js: true do
8
8
  let!(:mug) { create(:product, :name => "RoR Mug") }
9
9
  let!(:stripe_payment_method) do
10
10
  Spree::Gateway::StripeGateway.create!(
11
- :name => "Stripe",
12
- :preferred_secret_key => "sk_test_VCZnDv3GLU15TRvn8i2EsaAN",
13
- :preferred_publishable_key => "pk_test_Cuf0PNtiAkkMpTVC2gwYDMIg"
11
+ name: 'Stripe',
12
+ preferred_secret_key: 'sk_test_VCZnDv3GLU15TRvn8i2EsaAN',
13
+ preferred_publishable_key: 'pk_test_Cuf0PNtiAkkMpTVC2gwYDMIg',
14
+ stores: [::Spree::Store.default]
14
15
  )
15
16
  end
16
17
 
17
18
  let!(:zone) { create(:zone) }
18
19
 
19
20
  before do
21
+ if Spree.version.to_f >= 4.2
22
+ payment_method = Spree::PaymentMethod.first
23
+ payment_method.update!(stores: [Spree::Store.first])
24
+ end
25
+
20
26
  user = create(:user)
21
27
 
22
28
  order = OrderWalkthrough.up_to(:delivery)
@@ -9,7 +9,8 @@ describe 'Stripe Elements 3ds checkout', type: :feature, js: true do
9
9
  name: 'Stripe',
10
10
  preferred_secret_key: 'sk_test_VCZnDv3GLU15TRvn8i2EsaAN',
11
11
  preferred_publishable_key: 'pk_test_Cuf0PNtiAkkMpTVC2gwYDMIg',
12
- preferred_intents: preferred_intents
12
+ preferred_intents: preferred_intents,
13
+ stores: [::Spree::Store.default]
13
14
  )
14
15
  end
15
16
 
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Spree::Gateway::AuthorizeNet do
4
- let (:gateway) { described_class.create!(name: 'Authorize.net') }
4
+ let (:gateway) { described_class.create!(name: 'Authorize.net', stores: [::Spree::Store.default]) }
5
5
 
6
6
  context '.provider_class' do
7
7
  it 'is a AuthorizeNet gateway' do
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Spree::Gateway::BalancedGateway do
4
- let(:gateway) { described_class.create!(name: 'Balanced') }
4
+ let(:gateway) { described_class.create!(name: 'Balanced', stores: [::Spree::Store.default]) }
5
5
 
6
6
  context '.provider_class' do
7
7
  it 'is a Balanced gateway' do
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Spree::Gateway::Banwire do
4
- let(:gateway) { described_class.create!(name: 'Banwire') }
4
+ let(:gateway) { described_class.create!(name: 'Banwire', stores: [::Spree::Store.default]) }
5
5
 
6
6
  context '.provider_class' do
7
7
  it 'is a Banwire gateway' do
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Spree::Gateway::Beanstream do
4
- let(:gateway) { described_class.create!(name: 'Beanstream') }
4
+ let(:gateway) { described_class.create!(name: 'Beanstream', stores: [::Spree::Store.default]) }
5
5
 
6
6
  context '.provider_class' do
7
7
  it 'is a Beanstream gateway' do
@@ -2,13 +2,24 @@ require 'spec_helper'
2
2
  require 'pry'
3
3
 
4
4
  describe Spree::Gateway::BraintreeGateway do
5
- let!(:country) { create(:country, name: 'United States', iso_name: 'UNITED STATES', iso3: 'USA', iso: 'US', numcode: 840) }
6
- let!(:state) { create(:state, name: 'Maryland', abbr: 'MD', country: country) }
7
- let!(:address) { create(:address, firstname: 'John', lastname: 'Doe', address1: '1234 My Street', address2: 'Apt 1', city: 'Washington DC', zipcode: '20123', phone: '(555)555-5555', state: state, country: country) }
8
-
9
5
  before do
6
+ country = Spree::Country.find_by(name: 'United States of America')
7
+ country.update(name: 'United States', iso_name: 'UNITED STATES', iso3: 'USA', iso: 'US', numcode: 840)
8
+ state = create(:state, name: 'Maryland', abbr: 'MD', country: country)
9
+ @address = create(:address,
10
+ firstname: 'John',
11
+ lastname: 'Doe',
12
+ address1: '1234 My Street',
13
+ address2: 'Apt 1',
14
+ city: 'Washington DC',
15
+ zipcode: '20123',
16
+ phone: '(555)555-5555',
17
+ state: state,
18
+ country: country)
19
+
20
+
10
21
  Spree::Gateway.update_all(active: false)
11
- @gateway = Spree::Gateway::BraintreeGateway.create!(name: 'Braintree Gateway', active: true)
22
+ @gateway = Spree::Gateway::BraintreeGateway.create!(name: 'Braintree Gateway', active: true, stores: [::Spree::Store.default])
12
23
  @gateway.preferences = {
13
24
  environment: 'sandbox',
14
25
  merchant_id: 'zbn5yzq9t7wmwx42',
@@ -18,7 +29,7 @@ describe Spree::Gateway::BraintreeGateway do
18
29
  @gateway.save!
19
30
 
20
31
  with_payment_profiles_off do
21
- order = create(:order_with_totals, bill_address: address, ship_address: address)
32
+ order = create(:order_with_totals, bill_address: @address, ship_address: @address)
22
33
  order.update_with_updater!
23
34
 
24
35
  # Use a valid CC from braintree sandbox: https://www.braintreepayments.com/docs/ruby/reference/sandbox
@@ -37,7 +48,7 @@ describe Spree::Gateway::BraintreeGateway do
37
48
 
38
49
  describe 'payment profile creation' do
39
50
  before do
40
- order = create(:order_with_totals, bill_address: address, ship_address: address)
51
+ order = create(:order_with_totals, bill_address: @address, ship_address: @address)
41
52
  order.update_with_updater!
42
53
 
43
54
  @credit_card = create(:credit_card,
@@ -56,12 +67,12 @@ describe Spree::Gateway::BraintreeGateway do
56
67
  remote_customer = @gateway.provider.instance_variable_get(:@braintree_gateway).customer.find(@credit_card.gateway_customer_profile_id)
57
68
  remote_address = remote_customer.addresses.first rescue nil
58
69
  expect(remote_address).not_to be_nil
59
- expect(remote_address.street_address).to eq(address.address1)
60
- expect(remote_address.extended_address).to eq(address.address2)
61
- expect(remote_address.locality).to eq(address.city)
62
- expect(remote_address.region).to eq(address.state.name)
63
- expect(remote_address.country_code_alpha2).to eq(address.country.iso)
64
- expect(remote_address.postal_code).to eq(address.zipcode)
70
+ expect(remote_address.street_address).to eq(@address.address1)
71
+ expect(remote_address.extended_address).to eq(@address.address2)
72
+ expect(remote_address.locality).to eq(@address.city)
73
+ expect(remote_address.region).to eq(@address.state.name)
74
+ expect(remote_address.country_code_alpha2).to eq(@address.country.iso)
75
+ expect(remote_address.postal_code).to eq(@address.zipcode)
65
76
  end
66
77
  end
67
78
 
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Spree::Gateway::CardSave do
4
- let(:gateway) { described_class.create!(name: 'CardSave') }
4
+ let(:gateway) { described_class.create!(name: 'CardSave', stores: [::Spree::Store.default]) }
5
5
 
6
6
  context '.provider_class' do
7
7
  it 'is a CardSave gateway' do
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Spree::Gateway::DataCash do
4
- let(:gateway) { described_class.create!(name: 'DataCash') }
4
+ let(:gateway) { described_class.create!(name: 'DataCash', stores: [::Spree::Store.default]) }
5
5
 
6
6
  context '.provider_class' do
7
7
  it 'is a DataCash gateway' do
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Spree::Gateway::Epay do
4
- let(:gateway) { described_class.create!(name: 'Epay') }
4
+ let(:gateway) { described_class.create!(name: 'Epay', stores: [::Spree::Store.default]) }
5
5
 
6
6
  context '.provider_class' do
7
7
  it 'is a Epay gateway' do
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Spree::Gateway::EwayRapid do
4
- let(:gateway) { described_class.create!(name: 'eWAY Rapid') }
4
+ let(:gateway) { described_class.create!(name: 'eWAY Rapid', stores: [::Spree::Store.default]) }
5
5
 
6
6
  describe '#provider_class' do
7
7
  it 'should be an eWAY Rapid gateway' do
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Spree::Gateway::Eway do
4
- let(:gateway) { described_class.create!(name: 'Eway') }
4
+ let(:gateway) { described_class.create!(name: 'Eway', stores: [::Spree::Store.default]) }
5
5
 
6
6
  context '.provider_class' do
7
7
  it 'is a Eway gateway' do
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Spree::Gateway::Moneris do
4
- let(:gateway) { described_class.create!(name: 'Moneris') }
4
+ let(:gateway) { described_class.create!(name: 'Moneris', stores: [::Spree::Store.default]) }
5
5
 
6
6
  context '.provider_class' do
7
7
  it 'is a Moneris gateway' do
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Spree::Gateway::PayJunction do
4
- let(:gateway) { described_class.create!(name: 'PayJunction') }
4
+ let(:gateway) { described_class.create!(name: 'PayJunction', stores: [::Spree::Store.default]) }
5
5
 
6
6
  context '.provider_class' do
7
7
  it 'is a PayJunction gateway' do
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Spree::Gateway::PayPalGateway do
4
- let(:gateway) { described_class.create!(name: 'PayPal') }
4
+ let(:gateway) { described_class.create!(name: 'PayPal', stores: [::Spree::Store.default]) }
5
5
 
6
6
  context '.provider_class' do
7
7
  it 'is a PayPal gateway' do
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Spree::Gateway::PayflowPro do
4
- let(:gateway) { described_class.create!(name: 'PayflowPro') }
4
+ let(:gateway) { described_class.create!(name: 'PayflowPro', stores: [::Spree::Store.default]) }
5
5
 
6
6
  context '.provider_class' do
7
7
  it 'is a Payflow gateway' do
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Spree::Gateway::Paymill do
4
- let(:gateway) { described_class.create!(name: 'Paymill') }
4
+ let(:gateway) { described_class.create!(name: 'Paymill', stores: [::Spree::Store.default]) }
5
5
 
6
6
  context '.provider_class' do
7
7
  it 'is a Paymill gateway' do
@@ -4,7 +4,7 @@ describe Spree::Gateway::PinGateway do
4
4
 
5
5
  before do
6
6
  Spree::Gateway.update_all(active: false)
7
- @gateway = described_class.create!(name: 'Pin Gateway', active: true)
7
+ @gateway = described_class.create!(name: 'Pin Gateway', active: true, stores: [::Spree::Store.default])
8
8
  @gateway.set_preference(:api_key, 'W_VzkRCZSILiKWUS-dndUg')
9
9
  @gateway.save!
10
10
 
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Spree::Gateway::Quickpay do
4
- let(:gateway) { described_class.create!(name: 'QuickpayGateway') }
4
+ let(:gateway) { described_class.create!(name: 'QuickpayGateway', stores: [::Spree::Store.default]) }
5
5
 
6
6
  context '.provider_class' do
7
7
  it 'is a Quickpay gateway' do
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Spree::Gateway::SagePay do
4
- let(:gateway) { described_class.create!(name: 'SagePay') }
4
+ let(:gateway) { described_class.create!(name: 'SagePay', stores: [::Spree::Store.default]) }
5
5
 
6
6
  context '.provider_class' do
7
7
  it 'is a SagePay gateway' do
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Spree::Gateway::SecurePayAU do
4
- let(:gateway) { described_class.create!(name: 'SecurePayAU') }
4
+ let(:gateway) { described_class.create!(name: 'SecurePayAU', stores: [::Spree::Store.default]) }
5
5
 
6
6
  context '.provider_class' do
7
7
  it 'is a SecurePayAU gateway' do
@@ -3,11 +3,11 @@ require 'spec_helper'
3
3
  describe Spree::Gateway::UsaEpayTransaction do
4
4
  before do
5
5
  Spree::Gateway.update_all(active: false)
6
- @gateway = Spree::Gateway::UsaEpayTransaction.create!(name: 'USA EPay Gateway', active: true)
6
+ @gateway = Spree::Gateway::UsaEpayTransaction.create!(name: 'USA EPay Gateway', active: true, stores: [::Spree::Store.default])
7
7
  @gateway.set_preference(:login, '0r19zQBdp5nS8i3t4hFxz0di13yf56q1')
8
8
  @gateway.save!
9
9
 
10
- country = create(:country, name: 'United States', iso_name: 'UNITED STATES', iso3: 'USA', iso: 'US', numcode: 840)
10
+ country = Spree::Country.find_by(name: 'United States of America')
11
11
  state = create(:state, name: 'Maryland', abbr: 'MD', country: country)
12
12
  address = create(:address,
13
13
  firstname: 'John',
@@ -1,7 +1,7 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Spree::Gateway::Worldpay do
4
- let(:gateway) { described_class.create!(name: 'Worldpay') }
4
+ let(:gateway) { described_class.create!(name: 'Worldpay', stores: [::Spree::Store.default]) }
5
5
 
6
6
  context '.provider_class' do
7
7
  it 'is a Worldpay gateway' do
@@ -6,14 +6,16 @@ describe Spree::Order do
6
6
  let(:stripe_apple_pay_payment_method) do
7
7
  Spree::Gateway::StripeApplePayGateway.create!(
8
8
  name: 'ApplePay',
9
- preferred_domain_verification_certificate: FFaker::Lorem.characters(20)
9
+ preferred_domain_verification_certificate: FFaker::Lorem.characters(20),
10
+ stores: [::Spree::Store.default]
10
11
  )
11
12
  end
12
13
  let(:stripe_credit_card_payment_method) do
13
14
  Spree::Gateway::StripeGateway.create!(
14
15
  name: 'CreditCard',
15
16
  preferred_secret_key: FFaker::Lorem.characters(20),
16
- preferred_publishable_key: FFaker::Lorem.characters(20)
17
+ preferred_publishable_key: FFaker::Lorem.characters(20),
18
+ stores: [::Spree::Store.default]
17
19
  )
18
20
  end
19
21
 
@@ -28,11 +28,10 @@ Gem::Specification.new do |s|
28
28
  s.require_path = 'lib'
29
29
  s.requirements << 'none'
30
30
 
31
- spree_version = '>= 3.7.0', '< 5.0'
32
- s.add_dependency 'spree_core', spree_version
31
+ s.add_dependency 'spree_core', '>= 3.7.0'
33
32
  s.add_dependency 'spree_extension'
34
33
 
35
- s.add_development_dependency 'braintree', '~>2.78'
34
+ s.add_development_dependency 'braintree', '~> 3.0.0'
36
35
  s.add_development_dependency 'rspec-activemodel-mocks'
37
36
  s.add_development_dependency 'spree_dev_tools'
38
37
  end
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.9.3
4
+ version: 3.9.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Spree Commerce
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-01-14 00:00:00.000000000 Z
11
+ date: 2021-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: spree_core
@@ -17,9 +17,6 @@ dependencies:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: 3.7.0
20
- - - "<"
21
- - !ruby/object:Gem::Version
22
- version: '5.0'
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
@@ -27,9 +24,6 @@ dependencies:
27
24
  - - ">="
28
25
  - !ruby/object:Gem::Version
29
26
  version: 3.7.0
30
- - - "<"
31
- - !ruby/object:Gem::Version
32
- version: '5.0'
33
27
  - !ruby/object:Gem::Dependency
34
28
  name: spree_extension
35
29
  requirement: !ruby/object:Gem::Requirement
@@ -50,14 +44,14 @@ dependencies:
50
44
  requirements:
51
45
  - - "~>"
52
46
  - !ruby/object:Gem::Version
53
- version: '2.78'
47
+ version: 3.0.0
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
51
  requirements:
58
52
  - - "~>"
59
53
  - !ruby/object:Gem::Version
60
- version: '2.78'
54
+ version: 3.0.0
61
55
  - !ruby/object:Gem::Dependency
62
56
  name: rspec-activemodel-mocks
63
57
  requirement: !ruby/object:Gem::Requirement
@@ -95,17 +89,13 @@ files:
95
89
  - ".gitignore"
96
90
  - ".rspec"
97
91
  - ".travis.yml"
98
- - Appraisals
99
92
  - Gemfile
100
93
  - Guardfile
101
94
  - LICENSE.md
102
95
  - README.md
103
96
  - Rakefile
104
- - app/models/spree/apple_pay_order_decorator.rb
105
- - app/models/spree/apple_pay_payment_decorator.rb
106
97
  - app/models/spree/billing_integration.rb
107
98
  - app/models/spree/check.rb
108
- - app/models/spree/credit_card_decorator.rb
109
99
  - app/models/spree/gateway/authorize_net.rb
110
100
  - app/models/spree/gateway/authorize_net_cim.rb
111
101
  - app/models/spree/gateway/balanced_gateway.rb
@@ -136,8 +126,11 @@ files:
136
126
  - app/models/spree/gateway/stripe_gateway.rb
137
127
  - app/models/spree/gateway/usa_epay_transaction.rb
138
128
  - app/models/spree/gateway/worldpay.rb
139
- - app/models/spree/order_decorator.rb
140
- - app/models/spree/payment_decorator.rb
129
+ - app/models/spree_gateway/apple_pay_order_decorator.rb
130
+ - app/models/spree_gateway/apple_pay_payment_decorator.rb
131
+ - app/models/spree_gateway/credit_card_decorator.rb
132
+ - app/models/spree_gateway/order_decorator.rb
133
+ - app/models/spree_gateway/payment_decorator.rb
141
134
  - app/views/spree/checkout/_payment_confirm.html.erb
142
135
  - config/initializers/inflections.rb
143
136
  - config/initializers/spree_permitted_attributes.rb
@@ -153,9 +146,6 @@ files:
153
146
  - db/migrate/20131112133401_migrate_stripe_preferences.rb
154
147
  - db/migrate/20200317135551_add_spree_check_payment_source.rb
155
148
  - db/migrate/20200422114908_add_intent_key_to_payment.rb
156
- - gemfiles/spree_3_7.gemfile
157
- - gemfiles/spree_4_1.gemfile
158
- - gemfiles/spree_master.gemfile
159
149
  - lib/active_merchant/billing/stripe_gateway_decorator.rb
160
150
  - lib/controllers/spree/api/v2/storefront/intents_controller.rb
161
151
  - lib/controllers/spree/apple_pay_domain_verification_controller.rb
@@ -194,7 +184,7 @@ files:
194
184
  - spec/models/gateway/braintree_gateway_spec.rb
195
185
  - spec/models/gateway/card_save_spec.rb
196
186
  - spec/models/gateway/cyber_source_spec.rb
197
- - spec/models/gateway/data_cache_spec.rb
187
+ - spec/models/gateway/data_cash_spec.rb
198
188
  - spec/models/gateway/epay_spec.rb
199
189
  - spec/models/gateway/eway_rapid_spec.rb
200
190
  - spec/models/gateway/eway_spec.rb
@@ -224,9 +214,9 @@ licenses:
224
214
  - BSD-3-Clause
225
215
  metadata:
226
216
  bug_tracker_uri: https://github.com/spree/spree_gateway/issues
227
- changelog_uri: https://github.com/spree/spree_gateway/releases/tag/v3.9.3
217
+ changelog_uri: https://github.com/spree/spree_gateway/releases/tag/v3.9.4
228
218
  documentation_uri: https://guides.spreecommerce.org/
229
- source_code_uri: https://github.com/spree/spree_gateway/tree/v3.9.3
219
+ source_code_uri: https://github.com/spree/spree_gateway/tree/v3.9.4
230
220
  post_install_message:
231
221
  rdoc_options: []
232
222
  require_paths:
@@ -260,7 +250,7 @@ test_files:
260
250
  - spec/models/gateway/braintree_gateway_spec.rb
261
251
  - spec/models/gateway/card_save_spec.rb
262
252
  - spec/models/gateway/cyber_source_spec.rb
263
- - spec/models/gateway/data_cache_spec.rb
253
+ - spec/models/gateway/data_cash_spec.rb
264
254
  - spec/models/gateway/epay_spec.rb
265
255
  - spec/models/gateway/eway_rapid_spec.rb
266
256
  - spec/models/gateway/eway_spec.rb
data/Appraisals DELETED
@@ -1,15 +0,0 @@
1
- appraise 'spree-3-7' do
2
- gem 'spree', '~> 3.7.0'
3
- gem 'rails-controller-testing'
4
- gem 'sass-rails'
5
- end
6
-
7
- appraise 'spree-4-1' do
8
- gem 'spree', '~> 4.1.0'
9
- gem 'rails-controller-testing'
10
- end
11
-
12
- appraise 'spree-master' do
13
- gem 'spree', github: 'spree/spree', branch: 'master'
14
- gem 'rails-controller-testing'
15
- end
@@ -1,9 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "rails-controller-testing"
6
- gem "spree", "~> 3.7.0"
7
- gem "sass-rails"
8
-
9
- gemspec path: "../"
@@ -1,8 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "rails-controller-testing"
6
- gem "spree", "~> 4.1.0"
7
-
8
- gemspec path: "../"
@@ -1,8 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "rails-controller-testing"
6
- gem "spree", github: "spree/spree", branch: "master"
7
-
8
- gemspec path: "../"