spree_gateway 3.6.4 → 3.6.5

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: 0552edd565bc5548c37193554fab4ac475fdafc0e46a50cd35cb9dea9f008752
4
- data.tar.gz: b9de992c711cd14a26e22c7ba7e395d0b81dd9acbdee55f032d274b6e1712f40
3
+ metadata.gz: 45ebf88e0291245508aaa7e9d363a78003284ad6092372b45bbd0c3548da1f43
4
+ data.tar.gz: ce11757b811330f039063c710c9532bc145341562d110f80579817b71b8b2fb7
5
5
  SHA512:
6
- metadata.gz: 4ef24a0aff0e214d043c325f95e00b72d86def24a51d97d603ba424d6df5df7ebc2a42dea8a6de69c6d8a2ff95ff042c2ba9363bfb53637682b04dd5ec722fb7
7
- data.tar.gz: 422e86964485e15bc21347324d923f4108b1e9b7ed132e3023a1b177668c6942178a578fc8cbb97149a3eee0ef6c78609380184768d788e258bf2406dff3c0e9
6
+ metadata.gz: 90c4d92e24b00d8cf1db041b093a774493008b90a973af9ea91d0e4ddf0bbc2bd3666b7bd8e310d4ba0f92208219f805ddeb9055dcdab5b3b9eb8628609f8ee8
7
+ data.tar.gz: da3e8fd208f11959336f6218b599ee4335a79635f9610796f75a55fb65e6523d4c62ca91bab56832502d125dbbcd3d1824591af5a4a05604b2cb9eae1d7cf6b6
data/.travis.yml CHANGED
@@ -12,7 +12,6 @@ env:
12
12
  - DB=mysql
13
13
 
14
14
  gemfile:
15
- # - gemfiles/spree_3_2.gemfile
16
15
  - gemfiles/spree_3_5.gemfile
17
16
  - gemfiles/spree_3_7.gemfile
18
17
  - gemfiles/spree_4_0.gemfile
@@ -25,24 +24,20 @@ script:
25
24
  rvm:
26
25
  - 2.5.1
27
26
  - 2.4.4
28
- - 2.3.7
27
+ - 2.3.8
29
28
 
30
29
  matrix:
31
30
  allow_failures:
32
31
  - gemfile: gemfiles/spree_master.gemfile
33
32
  exclude:
34
- - rvm: 2.3.7
33
+ - rvm: 2.3.8
35
34
  gemfile: gemfiles/spree_master.gemfile
36
35
  - rvm: 2.4.4
37
36
  gemfile: gemfiles/spree_master.gemfile
38
- - rvm: 2.3.7
37
+ - rvm: 2.3.8
39
38
  gemfile: gemfiles/spree_4_0.gemfile
40
39
  - rvm: 2.4.4
41
40
  gemfile: gemfiles/spree_4_0.gemfile
42
- - rvm: 2.5.1
43
- gemfile: gemfiles/spree_3_2.gemfile
44
- - rvm: 2.4.4
45
- gemfile: gemfiles/spree_3_2.gemfile
46
41
  - rvm: 2.5.1
47
42
  gemfile: gemfiles/spree_3_5.gemfile
48
43
 
data/Appraisals CHANGED
@@ -1,8 +1,3 @@
1
- appraise 'spree-3-2' do
2
- gem 'spree', '~> 3.2.0'
3
- gem 'rails-controller-testing'
4
- end
5
-
6
1
  appraise 'spree-3-5' do
7
2
  gem 'spree', '~> 3.5.0'
8
3
  gem 'rails-controller-testing'
@@ -70,7 +70,7 @@ module Spree
70
70
  def create_profile(payment)
71
71
  if payment.source.gateway_customer_profile_id.nil?
72
72
  profile_hash = create_customer_profile(payment)
73
- payment.source.update_attributes(gateway_customer_profile_id: profile_hash[:customer_profile_id], gateway_payment_profile_id: profile_hash[:customer_payment_profile_id])
73
+ payment.source.update(gateway_customer_profile_id: profile_hash[:customer_profile_id], gateway_payment_profile_id: profile_hash[:customer_payment_profile_id])
74
74
  end
75
75
  end
76
76
 
@@ -27,7 +27,7 @@ module Spree
27
27
  card_uri = card_store_response.authorization.split(';').first
28
28
 
29
29
  # A success just returns a string of the token. A failed request returns a bad request response with a message.
30
- payment.source.update_attributes!(:gateway_payment_profile_id => card_uri)
30
+ payment.source.update!(:gateway_payment_profile_id => card_uri)
31
31
  rescue Error => ex
32
32
  payment.send(:gateway_error, ex.message)
33
33
  end
@@ -20,7 +20,7 @@ module Spree
20
20
  verify_creditcard_name!(creditcard)
21
21
  result = provider.store(creditcard, options)
22
22
  if result.success?
23
- creditcard.update_attributes(:gateway_customer_profile_id => result.params['customerCode'], :gateway_payment_profile_id => result.params['customer_vault_id'])
23
+ creditcard.update(:gateway_customer_profile_id => result.params['customerCode'], :gateway_payment_profile_id => result.params['customer_vault_id'])
24
24
  else
25
25
  payment.send(:gateway_error, result)
26
26
  end
@@ -57,7 +57,7 @@ module Spree
57
57
  response = provider.store(payment.source, options_for_payment(payment))
58
58
 
59
59
  if response.success?
60
- payment.source.update_attributes!(:gateway_customer_profile_id => response.params['customer_vault_id'])
60
+ payment.source.update!(:gateway_customer_profile_id => response.params['customer_vault_id'])
61
61
  cc = response.params['braintree_customer'].fetch('credit_cards',[]).first
62
62
  update_card_number(payment.source, cc) if cc
63
63
  else
@@ -16,10 +16,10 @@ module Spree
16
16
  response = provider.store(payment.source, options_for_payment(payment))
17
17
 
18
18
  if response.success?
19
- payment.source.update_attributes!(:gateway_customer_profile_id => response.authorization)
19
+ payment.source.update!(:gateway_customer_profile_id => response.authorization)
20
20
 
21
21
  cc = response.params['response']['card']
22
- payment.source.update_attributes!(:gateway_payment_profile_id => cc['token']) if cc
22
+ payment.source.update!(:gateway_payment_profile_id => cc['token']) if cc
23
23
  else
24
24
  payment.send(:gateway_error, response.message)
25
25
  end
@@ -40,7 +40,7 @@ module Spree
40
40
  provider.capture(money, response_code, gateway_options)
41
41
  end
42
42
 
43
- def credit(money, creditcard, response_code, gateway_options)tes
43
+ def credit(money, creditcard, response_code, gateway_options)
44
44
  provider.refund(money, response_code, {}, gateway_options)
45
45
  end
46
46
 
@@ -72,7 +72,7 @@ module Spree
72
72
  response_cc_type = response.params['sources']['data'].first['brand']
73
73
  cc_type = CARD_TYPE_MAPPING[response_cc_type] if CARD_TYPE_MAPPING.include?(response_cc_type)
74
74
 
75
- payment.source.update_attributes!({
75
+ payment.source.update!({
76
76
  cc_type: cc_type, # side-effect of update_source!
77
77
  gateway_customer_profile_id: response.params['id'],
78
78
  gateway_payment_profile_id: response.params['default_source'] || response.params['default_card']
@@ -1,5 +1,5 @@
1
1
  module SpreeGateway
2
2
  def self.version
3
- '3.6.4'
3
+ '3.6.5'
4
4
  end
5
5
  end
@@ -153,7 +153,7 @@ describe Spree::Gateway::BraintreeGateway do
153
153
  describe 'authorize' do
154
154
  context "the credit card has a token" do
155
155
  before(:each) do
156
- @credit_card.update_attributes(gateway_payment_profile_id: 'test')
156
+ @credit_card.update(gateway_payment_profile_id: 'test')
157
157
  end
158
158
 
159
159
  it 'calls provider#authorize using the gateway_payment_profile_id' do
@@ -165,7 +165,7 @@ describe Spree::Gateway::BraintreeGateway do
165
165
  context "the given credit card does not have a token" do
166
166
  context "the credit card has a customer profile id" do
167
167
  before(:each) do
168
- @credit_card.update_attributes(gateway_customer_profile_id: '12345')
168
+ @credit_card.update(gateway_customer_profile_id: '12345')
169
169
  end
170
170
 
171
171
  it 'calls provider#authorize using the gateway_customer_profile_id' do
@@ -31,7 +31,7 @@ describe Spree::Gateway::StripeGateway do
31
31
 
32
32
  describe '#create_profile' do
33
33
  before do
34
- payment.source.stub(:update_attributes!)
34
+ payment.source.stub(:update!)
35
35
  end
36
36
 
37
37
  context 'with an order that has a bill address' do
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.6.4
4
+ version: 3.6.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Spree Commerce
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-27 00:00:00.000000000 Z
11
+ date: 2019-09-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: spree_core