activemerchant 1.78.0 → 1.79.0
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 +4 -4
- data/CHANGELOG +49 -0
- data/lib/active_merchant.rb +2 -5
- data/lib/active_merchant/billing/credit_card_methods.rb +3 -1
- data/lib/active_merchant/billing/gateways/adyen.rb +17 -2
- data/lib/active_merchant/billing/gateways/authorize_net.rb +16 -11
- data/lib/active_merchant/billing/gateways/barclaycard_smartpay.rb +1 -0
- data/lib/active_merchant/billing/gateways/borgun.rb +0 -1
- data/lib/active_merchant/billing/gateways/braintree/braintree_common.rb +1 -0
- data/lib/active_merchant/billing/gateways/braintree_blue.rb +17 -4
- data/lib/active_merchant/billing/gateways/checkout_v2.rb +7 -0
- data/lib/active_merchant/billing/gateways/clearhaus.rb +0 -2
- data/lib/active_merchant/billing/gateways/cyber_source.rb +11 -2
- data/lib/active_merchant/billing/gateways/ebanx.rb +3 -3
- data/lib/active_merchant/billing/gateways/elavon.rb +1 -1
- data/lib/active_merchant/billing/gateways/first_pay.rb +10 -9
- data/lib/active_merchant/billing/gateways/merchant_e_solutions.rb +11 -0
- data/lib/active_merchant/billing/gateways/merchant_warrior.rb +12 -0
- data/lib/active_merchant/billing/gateways/migs.rb +0 -2
- data/lib/active_merchant/billing/gateways/mundipagg.rb +291 -0
- data/lib/active_merchant/billing/gateways/nab_transact.rb +4 -4
- data/lib/active_merchant/billing/gateways/paymentez.rb +6 -13
- data/lib/active_merchant/billing/gateways/paypal.rb +0 -12
- data/lib/active_merchant/billing/gateways/paypal/paypal_common_api.rb +14 -0
- data/lib/active_merchant/billing/gateways/paystation.rb +10 -0
- data/lib/active_merchant/billing/gateways/psigate.rb +11 -0
- data/lib/active_merchant/billing/gateways/qbms.rb +11 -0
- data/lib/active_merchant/billing/gateways/realex.rb +14 -1
- data/lib/active_merchant/billing/gateways/redsys.rb +1 -1
- data/lib/active_merchant/billing/gateways/safe_charge.rb +8 -4
- data/lib/active_merchant/billing/gateways/smart_ps.rb +1 -1
- data/lib/active_merchant/billing/gateways/spreedly_core.rb +41 -6
- data/lib/active_merchant/billing/gateways/stripe.rb +14 -4
- data/lib/active_merchant/billing/gateways/usa_epay_transaction.rb +6 -1
- data/lib/active_merchant/billing/gateways/worldpay.rb +45 -14
- data/lib/active_merchant/connection.rb +38 -9
- data/lib/active_merchant/net_http_ssl_connection.rb +9 -0
- data/lib/active_merchant/network_connection_retries.rb +2 -0
- data/lib/active_merchant/posts_data.rb +10 -0
- data/lib/active_merchant/version.rb +1 -1
- data/lib/support/ssl_version.rb +87 -0
- metadata +7 -4
@@ -8,6 +8,12 @@ module ActiveMerchant #:nodoc:
|
|
8
8
|
base.class_attribute :ssl_version
|
9
9
|
base.ssl_version = nil
|
10
10
|
|
11
|
+
base.class_attribute :min_version
|
12
|
+
base.min_version = nil
|
13
|
+
|
14
|
+
base.class_attribute :max_version
|
15
|
+
base.min_version = nil
|
16
|
+
|
11
17
|
base.class_attribute :retry_safe
|
12
18
|
base.retry_safe = false
|
13
19
|
|
@@ -53,6 +59,10 @@ module ActiveMerchant #:nodoc:
|
|
53
59
|
connection.max_retries = max_retries
|
54
60
|
connection.tag = self.class.name
|
55
61
|
connection.wiredump_device = wiredump_device
|
62
|
+
if connection.respond_to?(:min_version=)
|
63
|
+
connection.min_version = min_version
|
64
|
+
connection.max_version = max_version
|
65
|
+
end
|
56
66
|
|
57
67
|
connection.pem = @options[:pem] if @options
|
58
68
|
connection.pem_password = @options[:pem_password] if @options
|
@@ -0,0 +1,87 @@
|
|
1
|
+
require "active_merchant"
|
2
|
+
require "support/gateway_support"
|
3
|
+
|
4
|
+
class SSLVersion
|
5
|
+
attr_accessor :success, :failed, :missing, :errored
|
6
|
+
|
7
|
+
def initialize
|
8
|
+
@gateways = GatewaySupport.new.gateways
|
9
|
+
@success, @failed, @missing, @errored = [], [], [], []
|
10
|
+
end
|
11
|
+
|
12
|
+
def test_gateways(min_version = :TLS1_1)
|
13
|
+
raise "Requires Ruby 2.5 or better" unless Net::HTTP.instance_methods.include?(:min_version=)
|
14
|
+
|
15
|
+
puts "Verifying #{@gateways.count} gateways for SSL min_version=#{min_version}\n\n"
|
16
|
+
|
17
|
+
@gateways.each do |g|
|
18
|
+
unless g.live_url
|
19
|
+
missing << g unless g.abstract_class
|
20
|
+
next
|
21
|
+
end
|
22
|
+
|
23
|
+
uri = URI.parse(g.live_url)
|
24
|
+
result, message = test_min_version(uri, min_version)
|
25
|
+
|
26
|
+
case result
|
27
|
+
when :success
|
28
|
+
print "."
|
29
|
+
success << g
|
30
|
+
when :fail
|
31
|
+
print "F"
|
32
|
+
failed << {:gateway => g, :message => message}
|
33
|
+
when :error
|
34
|
+
print "E"
|
35
|
+
errored << {:gateway => g, :message => message}
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
print_summary
|
40
|
+
end
|
41
|
+
|
42
|
+
def print_summary
|
43
|
+
puts "\n\nSucceeded gateways (#{success.length})"
|
44
|
+
|
45
|
+
puts "\n\nFailed Gateways (#{failed.length}):"
|
46
|
+
failed.each do |f|
|
47
|
+
puts "#{f[:gateway].name} - #{f[:message]}"
|
48
|
+
end
|
49
|
+
|
50
|
+
puts "\n\nError Gateways (#{errored.length}):"
|
51
|
+
errored.each do |e|
|
52
|
+
puts "#{e[:gateway].name} - #{e[:message]}"
|
53
|
+
end
|
54
|
+
|
55
|
+
if missing.length > 0
|
56
|
+
puts "\n\nGateways missing live_url (#{missing.length}):"
|
57
|
+
missing.each do |m|
|
58
|
+
puts m.name
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
private
|
64
|
+
|
65
|
+
def test_min_version(uri, min_version)
|
66
|
+
http = Net::HTTP.new(uri.host, uri.port)
|
67
|
+
http.use_ssl = true
|
68
|
+
http.verify_mode = OpenSSL::SSL::VERIFY_NONE # don't care about certificate validity, just protocol version
|
69
|
+
http.min_version = min_version
|
70
|
+
http.open_timeout = 10
|
71
|
+
http.read_timeout = 10
|
72
|
+
|
73
|
+
http.post("/", "")
|
74
|
+
|
75
|
+
return :success
|
76
|
+
rescue Net::HTTPBadResponse
|
77
|
+
return :success # version negotiation succeeded
|
78
|
+
rescue OpenSSL::SSL::SSLError => ex
|
79
|
+
return :fail, ex.inspect
|
80
|
+
rescue Interrupt => ex
|
81
|
+
print_summary
|
82
|
+
raise ex
|
83
|
+
rescue StandardError => ex
|
84
|
+
return :error, ex.inspect
|
85
|
+
end
|
86
|
+
|
87
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activemerchant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.79.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tobias Luetke
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-05-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
19
|
+
version: '4.2'
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 6.x
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version:
|
29
|
+
version: '4.2'
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 6.x
|
@@ -273,6 +273,7 @@ files:
|
|
273
273
|
- lib/active_merchant/billing/gateways/moneris.rb
|
274
274
|
- lib/active_merchant/billing/gateways/moneris_us.rb
|
275
275
|
- lib/active_merchant/billing/gateways/money_movers.rb
|
276
|
+
- lib/active_merchant/billing/gateways/mundipagg.rb
|
276
277
|
- lib/active_merchant/billing/gateways/nab_transact.rb
|
277
278
|
- lib/active_merchant/billing/gateways/ncr_secure_pay.rb
|
278
279
|
- lib/active_merchant/billing/gateways/net_registry.rb
|
@@ -387,6 +388,7 @@ files:
|
|
387
388
|
- lib/active_merchant/country.rb
|
388
389
|
- lib/active_merchant/empty.rb
|
389
390
|
- lib/active_merchant/errors.rb
|
391
|
+
- lib/active_merchant/net_http_ssl_connection.rb
|
390
392
|
- lib/active_merchant/network_connection_retries.rb
|
391
393
|
- lib/active_merchant/post_data.rb
|
392
394
|
- lib/active_merchant/posts_data.rb
|
@@ -396,6 +398,7 @@ files:
|
|
396
398
|
- lib/support/gateway_support.rb
|
397
399
|
- lib/support/outbound_hosts.rb
|
398
400
|
- lib/support/ssl_verify.rb
|
401
|
+
- lib/support/ssl_version.rb
|
399
402
|
homepage: http://activemerchant.org/
|
400
403
|
licenses:
|
401
404
|
- MIT
|