spree_gateway 3.6.4 → 3.6.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +3 -8
- data/Appraisals +0 -5
- data/app/models/spree/gateway/authorize_net_cim.rb +1 -1
- data/app/models/spree/gateway/balanced_gateway.rb +1 -1
- data/app/models/spree/gateway/beanstream.rb +1 -1
- data/app/models/spree/gateway/braintree_gateway.rb +1 -1
- data/app/models/spree/gateway/pin_gateway.rb +2 -2
- data/app/models/spree/gateway/stripe_gateway.rb +2 -2
- data/lib/spree_gateway/version.rb +1 -1
- data/spec/models/gateway/braintree_gateway_spec.rb +2 -2
- data/spec/models/gateway/stripe_gateway_spec.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 45ebf88e0291245508aaa7e9d363a78003284ad6092372b45bbd0c3548da1f43
|
4
|
+
data.tar.gz: ce11757b811330f039063c710c9532bc145341562d110f80579817b71b8b2fb7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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.
|
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.
|
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
@@ -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.
|
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.
|
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.
|
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.
|
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.
|
19
|
+
payment.source.update!(:gateway_customer_profile_id => response.authorization)
|
20
20
|
|
21
21
|
cc = response.params['response']['card']
|
22
|
-
payment.source.
|
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)
|
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.
|
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']
|
@@ -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.
|
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.
|
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
|
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
|
+
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-
|
11
|
+
date: 2019-09-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: spree_core
|