activemerchant 1.79.2 → 1.80.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 +33 -0
- data/README.md +10 -2
- data/lib/active_merchant.rb +1 -1
- data/lib/active_merchant/billing/check.rb +4 -4
- data/lib/active_merchant/billing/compatibility.rb +1 -1
- data/lib/active_merchant/billing/credit_card.rb +21 -21
- data/lib/active_merchant/billing/credit_card_formatting.rb +2 -2
- data/lib/active_merchant/billing/credit_card_methods.rb +2 -2
- data/lib/active_merchant/billing/gateway.rb +13 -13
- data/lib/active_merchant/billing/gateways/adyen.rb +31 -15
- data/lib/active_merchant/billing/gateways/allied_wallet.rb +22 -22
- data/lib/active_merchant/billing/gateways/authorize_net.rb +72 -72
- data/lib/active_merchant/billing/gateways/authorize_net_arb.rb +3 -3
- data/lib/active_merchant/billing/gateways/authorize_net_cim.rb +3 -3
- data/lib/active_merchant/billing/gateways/axcessms.rb +51 -51
- data/lib/active_merchant/billing/gateways/balanced.rb +29 -29
- data/lib/active_merchant/billing/gateways/bank_frick.rb +3 -3
- data/lib/active_merchant/billing/gateways/banwire.rb +8 -8
- data/lib/active_merchant/billing/gateways/barclaycard_smartpay.rb +5 -5
- data/lib/active_merchant/billing/gateways/barclays_epdq_extra_plus.rb +6 -6
- data/lib/active_merchant/billing/gateways/be2bill.rb +2 -2
- data/lib/active_merchant/billing/gateways/beanstream.rb +1 -1
- data/lib/active_merchant/billing/gateways/beanstream/beanstream_core.rb +69 -69
- data/lib/active_merchant/billing/gateways/blue_pay.rb +19 -19
- data/lib/active_merchant/billing/gateways/blue_snap.rb +42 -42
- data/lib/active_merchant/billing/gateways/bogus.rb +10 -10
- data/lib/active_merchant/billing/gateways/borgun.rb +10 -10
- data/lib/active_merchant/billing/gateways/bpoint.rb +1 -1
- data/lib/active_merchant/billing/gateways/braintree/braintree_common.rb +2 -2
- data/lib/active_merchant/billing/gateways/braintree_blue.rb +94 -94
- data/lib/active_merchant/billing/gateways/braintree_orange.rb +1 -1
- data/lib/active_merchant/billing/gateways/bridge_pay.rb +39 -39
- data/lib/active_merchant/billing/gateways/cams.rb +12 -12
- data/lib/active_merchant/billing/gateways/card_connect.rb +38 -13
- data/lib/active_merchant/billing/gateways/card_stream.rb +116 -116
- data/lib/active_merchant/billing/gateways/cardknox.rb +7 -7
- data/lib/active_merchant/billing/gateways/cardprocess.rb +1 -1
- data/lib/active_merchant/billing/gateways/cashnet.rb +10 -10
- data/lib/active_merchant/billing/gateways/cc5.rb +3 -5
- data/lib/active_merchant/billing/gateways/cecabank.rb +6 -6
- data/lib/active_merchant/billing/gateways/cenpos.rb +36 -36
- data/lib/active_merchant/billing/gateways/checkout.rb +5 -5
- data/lib/active_merchant/billing/gateways/checkout_v2.rb +31 -31
- data/lib/active_merchant/billing/gateways/clearhaus.rb +5 -5
- data/lib/active_merchant/billing/gateways/commercegate.rb +6 -6
- data/lib/active_merchant/billing/gateways/conekta.rb +24 -19
- data/lib/active_merchant/billing/gateways/creditcall.rb +41 -41
- data/lib/active_merchant/billing/gateways/credorax.rb +104 -103
- data/lib/active_merchant/billing/gateways/culqi.rb +25 -25
- data/lib/active_merchant/billing/gateways/cyber_source.rb +65 -65
- data/lib/active_merchant/billing/gateways/data_cash.rb +4 -4
- data/lib/active_merchant/billing/gateways/dibs.rb +24 -24
- data/lib/active_merchant/billing/gateways/digitzs.rb +35 -35
- data/lib/active_merchant/billing/gateways/ebanx.rb +26 -26
- data/lib/active_merchant/billing/gateways/efsnet.rb +10 -10
- data/lib/active_merchant/billing/gateways/elavon.rb +5 -5
- data/lib/active_merchant/billing/gateways/element.rb +35 -35
- data/lib/active_merchant/billing/gateways/epay.rb +4 -4
- data/lib/active_merchant/billing/gateways/evo_ca.rb +1 -1
- data/lib/active_merchant/billing/gateways/eway.rb +65 -65
- data/lib/active_merchant/billing/gateways/eway_managed.rb +11 -11
- data/lib/active_merchant/billing/gateways/eway_rapid.rb +31 -31
- data/lib/active_merchant/billing/gateways/exact.rb +12 -12
- data/lib/active_merchant/billing/gateways/ezic.rb +13 -13
- data/lib/active_merchant/billing/gateways/fat_zebra.rb +24 -24
- data/lib/active_merchant/billing/gateways/federated_canada.rb +3 -3
- data/lib/active_merchant/billing/gateways/first_giving.rb +16 -16
- data/lib/active_merchant/billing/gateways/first_pay.rb +7 -4
- data/lib/active_merchant/billing/gateways/firstdata_e4.rb +71 -71
- data/lib/active_merchant/billing/gateways/flo2cash.rb +12 -12
- data/lib/active_merchant/billing/gateways/flo2cash_simple.rb +1 -1
- data/lib/active_merchant/billing/gateways/forte.rb +26 -16
- data/lib/active_merchant/billing/gateways/garanti.rb +10 -12
- data/lib/active_merchant/billing/gateways/global_collect.rb +88 -88
- data/lib/active_merchant/billing/gateways/global_transport.rb +4 -4
- data/lib/active_merchant/billing/gateways/hdfc.rb +33 -33
- data/lib/active_merchant/billing/gateways/hps.rb +28 -28
- data/lib/active_merchant/billing/gateways/iats_payments.rb +26 -26
- data/lib/active_merchant/billing/gateways/inspire.rb +15 -15
- data/lib/active_merchant/billing/gateways/instapay.rb +4 -4
- data/lib/active_merchant/billing/gateways/ipp.rb +17 -17
- data/lib/active_merchant/billing/gateways/iridium.rb +207 -207
- data/lib/active_merchant/billing/gateways/iveri.rb +8 -8
- data/lib/active_merchant/billing/gateways/jetpay.rb +134 -134
- data/lib/active_merchant/billing/gateways/jetpay_v2.rb +141 -141
- data/lib/active_merchant/billing/gateways/komoju.rb +15 -15
- data/lib/active_merchant/billing/gateways/kushki.rb +31 -37
- data/lib/active_merchant/billing/gateways/latitude19.rb +64 -64
- data/lib/active_merchant/billing/gateways/linkpoint.rb +22 -22
- data/lib/active_merchant/billing/gateways/litle.rb +4 -4
- data/lib/active_merchant/billing/gateways/mastercard.rb +3 -3
- data/lib/active_merchant/billing/gateways/maxipago.rb +2 -2
- data/lib/active_merchant/billing/gateways/mercado_pago.rb +28 -28
- data/lib/active_merchant/billing/gateways/merchant_e_solutions.rb +9 -9
- data/lib/active_merchant/billing/gateways/merchant_one.rb +6 -6
- data/lib/active_merchant/billing/gateways/merchant_partners.rb +24 -24
- data/lib/active_merchant/billing/gateways/merchant_ware.rb +49 -49
- data/lib/active_merchant/billing/gateways/merchant_ware_version_four.rb +36 -36
- data/lib/active_merchant/billing/gateways/merchant_warrior.rb +4 -4
- data/lib/active_merchant/billing/gateways/mercury.rb +28 -28
- data/lib/active_merchant/billing/gateways/metrics_global.rb +7 -7
- data/lib/active_merchant/billing/gateways/micropayment.rb +31 -31
- data/lib/active_merchant/billing/gateways/migs.rb +11 -9
- data/lib/active_merchant/billing/gateways/modern_payments.rb +1 -1
- data/lib/active_merchant/billing/gateways/modern_payments_cim.rb +16 -16
- data/lib/active_merchant/billing/gateways/monei.rb +5 -5
- data/lib/active_merchant/billing/gateways/moneris.rb +26 -26
- data/lib/active_merchant/billing/gateways/moneris_us.rb +81 -37
- data/lib/active_merchant/billing/gateways/money_movers.rb +3 -3
- data/lib/active_merchant/billing/gateways/mundipagg.rb +1 -1
- data/lib/active_merchant/billing/gateways/nab_transact.rb +6 -6
- data/lib/active_merchant/billing/gateways/ncr_secure_pay.rb +3 -3
- data/lib/active_merchant/billing/gateways/netaxept.rb +15 -15
- data/lib/active_merchant/billing/gateways/netbanx.rb +2 -2
- data/lib/active_merchant/billing/gateways/netbilling.rb +1 -1
- data/lib/active_merchant/billing/gateways/netpay.rb +5 -5
- data/lib/active_merchant/billing/gateways/nmi.rb +18 -18
- data/lib/active_merchant/billing/gateways/ogone.rb +22 -22
- data/lib/active_merchant/billing/gateways/omise.rb +3 -3
- data/lib/active_merchant/billing/gateways/openpay.rb +6 -4
- data/lib/active_merchant/billing/gateways/opp.rb +4 -4
- data/lib/active_merchant/billing/gateways/optimal_payment.rb +2 -2
- data/lib/active_merchant/billing/gateways/orbital.rb +61 -61
- data/lib/active_merchant/billing/gateways/orbital/orbital_soft_descriptors.rb +4 -4
- data/lib/active_merchant/billing/gateways/pac_net_raven.rb +5 -5
- data/lib/active_merchant/billing/gateways/pagarme.rb +27 -27
- data/lib/active_merchant/billing/gateways/pago_facil.rb +8 -8
- data/lib/active_merchant/billing/gateways/pay_conex.rb +25 -25
- data/lib/active_merchant/billing/gateways/pay_gate_xml.rb +32 -32
- data/lib/active_merchant/billing/gateways/pay_hub.rb +29 -29
- data/lib/active_merchant/billing/gateways/pay_junction.rb +7 -7
- data/lib/active_merchant/billing/gateways/pay_junction_v2.rb +30 -30
- data/lib/active_merchant/billing/gateways/pay_secure.rb +4 -4
- data/lib/active_merchant/billing/gateways/paybox_direct.rb +15 -15
- data/lib/active_merchant/billing/gateways/payeezy.rb +5 -5
- data/lib/active_merchant/billing/gateways/payex.rb +4 -4
- data/lib/active_merchant/billing/gateways/payflow.rb +7 -7
- data/lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb +23 -22
- data/lib/active_merchant/billing/gateways/payflow_express.rb +2 -2
- data/lib/active_merchant/billing/gateways/payment_express.rb +40 -37
- data/lib/active_merchant/billing/gateways/paymentez.rb +11 -3
- data/lib/active_merchant/billing/gateways/paymill.rb +115 -115
- data/lib/active_merchant/billing/gateways/paypal.rb +1 -1
- data/lib/active_merchant/billing/gateways/paypal_digital_goods.rb +1 -1
- data/lib/active_merchant/billing/gateways/payscout.rb +1 -1
- data/lib/active_merchant/billing/gateways/paystation.rb +14 -14
- data/lib/active_merchant/billing/gateways/payu_in.rb +43 -43
- data/lib/active_merchant/billing/gateways/payu_latam.rb +41 -41
- data/lib/active_merchant/billing/gateways/payway.rb +6 -6
- data/lib/active_merchant/billing/gateways/pin.rb +7 -7
- data/lib/active_merchant/billing/gateways/plugnpay.rb +62 -62
- data/lib/active_merchant/billing/gateways/pro_pay.rb +123 -123
- data/lib/active_merchant/billing/gateways/psigate.rb +16 -16
- data/lib/active_merchant/billing/gateways/psl_card.rb +13 -13
- data/lib/active_merchant/billing/gateways/qbms.rb +52 -52
- data/lib/active_merchant/billing/gateways/quantum.rb +5 -5
- data/lib/active_merchant/billing/gateways/quickbooks.rb +10 -10
- data/lib/active_merchant/billing/gateways/quickpay.rb +1 -1
- data/lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb +11 -11
- data/lib/active_merchant/billing/gateways/quickpay/quickpay_v4to7.rb +3 -3
- data/lib/active_merchant/billing/gateways/qvalent.rb +55 -55
- data/lib/active_merchant/billing/gateways/realex.rb +16 -15
- data/lib/active_merchant/billing/gateways/redsys.rb +128 -121
- data/lib/active_merchant/billing/gateways/s5.rb +5 -5
- data/lib/active_merchant/billing/gateways/safe_charge.rb +16 -16
- data/lib/active_merchant/billing/gateways/sage.rb +20 -20
- data/lib/active_merchant/billing/gateways/sage_pay.rb +32 -32
- data/lib/active_merchant/billing/gateways/sallie_mae.rb +11 -11
- data/lib/active_merchant/billing/gateways/secure_net.rb +19 -19
- data/lib/active_merchant/billing/gateways/secure_pay.rb +5 -5
- data/lib/active_merchant/billing/gateways/secure_pay_au.rb +7 -7
- data/lib/active_merchant/billing/gateways/secure_pay_tech.rb +9 -9
- data/lib/active_merchant/billing/gateways/securion_pay.rb +12 -12
- data/lib/active_merchant/billing/gateways/skip_jack.rb +28 -28
- data/lib/active_merchant/billing/gateways/smart_ps.rb +31 -31
- data/lib/active_merchant/billing/gateways/so_easy_pay.rb +3 -3
- data/lib/active_merchant/billing/gateways/spreedly_core.rb +1 -1
- data/lib/active_merchant/billing/gateways/stripe.rb +63 -63
- data/lib/active_merchant/billing/gateways/swipe_checkout.rb +5 -5
- data/lib/active_merchant/billing/gateways/telr.rb +26 -26
- data/lib/active_merchant/billing/gateways/trans_first.rb +28 -28
- data/lib/active_merchant/billing/gateways/trans_first_transaction_express.rb +224 -224
- data/lib/active_merchant/billing/gateways/transact_pro.rb +7 -7
- data/lib/active_merchant/billing/gateways/transnational.rb +1 -1
- data/lib/active_merchant/billing/gateways/trexle.rb +5 -5
- data/lib/active_merchant/billing/gateways/trust_commerce.rb +38 -38
- data/lib/active_merchant/billing/gateways/usa_epay.rb +3 -3
- data/lib/active_merchant/billing/gateways/usa_epay_advanced.rb +37 -37
- data/lib/active_merchant/billing/gateways/usa_epay_transaction.rb +3 -3
- data/lib/active_merchant/billing/gateways/vanco.rb +25 -25
- data/lib/active_merchant/billing/gateways/verifi.rb +40 -40
- data/lib/active_merchant/billing/gateways/viaklix.rb +5 -5
- data/lib/active_merchant/billing/gateways/visanet_peru.rb +64 -36
- data/lib/active_merchant/billing/gateways/webpay.rb +8 -8
- data/lib/active_merchant/billing/gateways/wepay.rb +25 -25
- data/lib/active_merchant/billing/gateways/wirecard.rb +26 -26
- data/lib/active_merchant/billing/gateways/worldpay.rb +15 -15
- data/lib/active_merchant/billing/gateways/worldpay_online_payments.rb +42 -42
- data/lib/active_merchant/billing/gateways/worldpay_us.rb +17 -17
- data/lib/active_merchant/billing/model.rb +2 -2
- data/lib/active_merchant/billing/network_tokenization_credit_card.rb +1 -1
- data/lib/active_merchant/billing/rails.rb +1 -1
- data/lib/active_merchant/connection.rb +10 -8
- data/lib/active_merchant/country.rb +1 -1
- data/lib/active_merchant/net_http_ssl_connection.rb +1 -0
- data/lib/active_merchant/network_connection_retries.rb +12 -12
- data/lib/active_merchant/post_data.rb +1 -1
- data/lib/active_merchant/posts_data.rb +1 -1
- data/lib/active_merchant/version.rb +1 -1
- data/lib/certs/cacert.pem +37 -0
- data/lib/support/gateway_support.rb +2 -2
- data/lib/support/ssl_verify.rb +5 -5
- data/lib/support/ssl_version.rb +7 -7
- metadata +3 -7
- data/lib/active_merchant/billing/gateways/ideal/ideal_base.rb +0 -246
- data/lib/active_merchant/billing/gateways/ideal/ideal_rabobank.pem +0 -13
- data/lib/active_merchant/billing/gateways/ideal/ideal_response.rb +0 -29
- data/lib/active_merchant/billing/gateways/ideal_rabobank.rb +0 -66
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
require
|
|
1
|
+
require 'nokogiri'
|
|
2
2
|
|
|
3
3
|
module ActiveMerchant #:nodoc:
|
|
4
4
|
module Billing #:nodoc:
|
|
5
5
|
class WorldpayUsGateway < Gateway
|
|
6
6
|
class_attribute :backup_url
|
|
7
7
|
|
|
8
|
-
self.display_name =
|
|
9
|
-
self.homepage_url =
|
|
8
|
+
self.display_name = 'Worldpay US'
|
|
9
|
+
self.homepage_url = 'http://www.worldpay.com/us'
|
|
10
10
|
|
|
11
11
|
# No sandbox, just use test cards.
|
|
12
12
|
self.live_url = 'https://trans.worldpay.us/cgi-bin/process.cgi'
|
|
@@ -55,7 +55,7 @@ module ActiveMerchant #:nodoc:
|
|
|
55
55
|
add_reference(post, authorization)
|
|
56
56
|
add_customer_data(post, options)
|
|
57
57
|
|
|
58
|
-
commit(
|
|
58
|
+
commit('refund', options, post)
|
|
59
59
|
end
|
|
60
60
|
|
|
61
61
|
def void(authorization, options={})
|
|
@@ -87,7 +87,7 @@ module ActiveMerchant #:nodoc:
|
|
|
87
87
|
private
|
|
88
88
|
|
|
89
89
|
def url(options)
|
|
90
|
-
options[:use_backup_url].to_s ==
|
|
90
|
+
options[:use_backup_url].to_s == 'true' ? self.backup_url : self.live_url
|
|
91
91
|
end
|
|
92
92
|
|
|
93
93
|
def add_customer_data(post, options)
|
|
@@ -138,8 +138,8 @@ module ActiveMerchant #:nodoc:
|
|
|
138
138
|
end
|
|
139
139
|
|
|
140
140
|
ACCOUNT_TYPES = {
|
|
141
|
-
|
|
142
|
-
|
|
141
|
+
'checking' => '1',
|
|
142
|
+
'savings' => '2',
|
|
143
143
|
}
|
|
144
144
|
|
|
145
145
|
def add_check(post, payment_method)
|
|
@@ -151,7 +151,7 @@ module ActiveMerchant #:nodoc:
|
|
|
151
151
|
end
|
|
152
152
|
|
|
153
153
|
def split_authorization(authorization)
|
|
154
|
-
historyid, orderid = authorization.split(
|
|
154
|
+
historyid, orderid = authorization.split('|')
|
|
155
155
|
[historyid, orderid]
|
|
156
156
|
end
|
|
157
157
|
|
|
@@ -165,7 +165,7 @@ module ActiveMerchant #:nodoc:
|
|
|
165
165
|
def parse(xml)
|
|
166
166
|
response = {}
|
|
167
167
|
doc = Nokogiri::XML(xml)
|
|
168
|
-
message = doc.xpath(
|
|
168
|
+
message = doc.xpath('//plaintext')
|
|
169
169
|
message.text.split(/\r?\n/).each do |line|
|
|
170
170
|
key, value = line.split(%r{=})
|
|
171
171
|
response[key] = value if key
|
|
@@ -174,11 +174,11 @@ module ActiveMerchant #:nodoc:
|
|
|
174
174
|
end
|
|
175
175
|
|
|
176
176
|
ACTIONS = {
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
177
|
+
'purchase' => 'ns_quicksale_cc',
|
|
178
|
+
'refund' => 'ns_credit',
|
|
179
|
+
'authorize' => 'ns_quicksale_cc',
|
|
180
|
+
'capture' => 'ns_quicksale_cc',
|
|
181
|
+
'void' => 'ns_void',
|
|
182
182
|
}
|
|
183
183
|
|
|
184
184
|
def commit(action, options, post)
|
|
@@ -207,14 +207,14 @@ module ActiveMerchant #:nodoc:
|
|
|
207
207
|
|
|
208
208
|
def message_from(succeeded, response)
|
|
209
209
|
if succeeded
|
|
210
|
-
|
|
210
|
+
'Succeeded'
|
|
211
211
|
else
|
|
212
|
-
(response['transresult'] || response['Reason'] ||
|
|
212
|
+
(response['transresult'] || response['Reason'] || 'Unable to read error message')
|
|
213
213
|
end
|
|
214
214
|
end
|
|
215
215
|
|
|
216
216
|
def authorization_from(response)
|
|
217
|
-
[response['historyid'], response['orderid']].join(
|
|
217
|
+
[response['historyid'], response['orderid']].join('|')
|
|
218
218
|
end
|
|
219
219
|
end
|
|
220
220
|
end
|
|
@@ -14,8 +14,9 @@ module ActiveMerchant
|
|
|
14
14
|
VERIFY_PEER = true
|
|
15
15
|
CA_FILE = File.expand_path('../certs/cacert.pem', File.dirname(__FILE__))
|
|
16
16
|
CA_PATH = nil
|
|
17
|
+
MIN_VERSION = :TLS1_1
|
|
17
18
|
RETRY_SAFE = false
|
|
18
|
-
RUBY_184_POST_HEADERS = {
|
|
19
|
+
RUBY_184_POST_HEADERS = { 'Content-Type' => 'application/x-www-form-urlencoded' }
|
|
19
20
|
|
|
20
21
|
attr_accessor :endpoint
|
|
21
22
|
attr_accessor :open_timeout
|
|
@@ -51,7 +52,7 @@ module ActiveMerchant
|
|
|
51
52
|
@ignore_http_status = false
|
|
52
53
|
@ssl_version = nil
|
|
53
54
|
if Net::HTTP.instance_methods.include?(:min_version=)
|
|
54
|
-
@min_version =
|
|
55
|
+
@min_version = MIN_VERSION
|
|
55
56
|
@max_version = nil
|
|
56
57
|
end
|
|
57
58
|
@ssl_connection = {}
|
|
@@ -65,10 +66,11 @@ module ActiveMerchant
|
|
|
65
66
|
end
|
|
66
67
|
|
|
67
68
|
def request(method, body, headers = {})
|
|
68
|
-
headers['connection'] ||= 'close'
|
|
69
|
-
|
|
70
69
|
request_start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
|
71
70
|
|
|
71
|
+
headers = headers.dup
|
|
72
|
+
headers['connection'] ||= 'close'
|
|
73
|
+
|
|
72
74
|
retry_exceptions(:max_retries => max_retries, :logger => logger, :tag => tag) do
|
|
73
75
|
begin
|
|
74
76
|
info "connection_http_method=#{method.to_s.upcase} connection_uri=#{endpoint}", tag
|
|
@@ -82,7 +84,7 @@ module ActiveMerchant
|
|
|
82
84
|
|
|
83
85
|
result = case method
|
|
84
86
|
when :get
|
|
85
|
-
raise ArgumentError,
|
|
87
|
+
raise ArgumentError, 'GET requests do not support a request body' if body
|
|
86
88
|
http.get(endpoint.request_uri, headers)
|
|
87
89
|
when :post
|
|
88
90
|
debug body
|
|
@@ -110,14 +112,14 @@ module ActiveMerchant
|
|
|
110
112
|
end
|
|
111
113
|
end
|
|
112
114
|
|
|
113
|
-
info
|
|
115
|
+
info '--> %d %s (%d %.4fs)' % [result.code, result.message, result.body ? result.body.length : 0, realtime], tag
|
|
114
116
|
debug result.body
|
|
115
117
|
result
|
|
116
118
|
end
|
|
117
119
|
end
|
|
118
120
|
|
|
119
121
|
ensure
|
|
120
|
-
info
|
|
122
|
+
info 'connection_request_total_time=%.4fs' % [Process.clock_gettime(Process::CLOCK_MONOTONIC) - request_start], tag
|
|
121
123
|
http.finish if http.started?
|
|
122
124
|
end
|
|
123
125
|
|
|
@@ -144,7 +146,7 @@ module ActiveMerchant
|
|
|
144
146
|
end
|
|
145
147
|
|
|
146
148
|
def configure_ssl(http)
|
|
147
|
-
return unless endpoint.scheme ==
|
|
149
|
+
return unless endpoint.scheme == 'https'
|
|
148
150
|
|
|
149
151
|
http.use_ssl = true
|
|
150
152
|
http.ssl_version = ssl_version if ssl_version
|
|
@@ -317,7 +317,7 @@ module ActiveMerchant #:nodoc:
|
|
|
317
317
|
]
|
|
318
318
|
|
|
319
319
|
def self.find(name)
|
|
320
|
-
raise InvalidCountryCodeError,
|
|
320
|
+
raise InvalidCountryCodeError, 'Cannot lookup country for an empty name' if name.blank?
|
|
321
321
|
|
|
322
322
|
case name.length
|
|
323
323
|
when 2, 3
|
|
@@ -4,13 +4,13 @@ module ActiveMerchant
|
|
|
4
4
|
module NetworkConnectionRetries
|
|
5
5
|
DEFAULT_RETRIES = 3
|
|
6
6
|
DEFAULT_CONNECTION_ERRORS = {
|
|
7
|
-
EOFError =>
|
|
8
|
-
Errno::ECONNRESET =>
|
|
9
|
-
Timeout::Error =>
|
|
10
|
-
Errno::ETIMEDOUT =>
|
|
11
|
-
SocketError =>
|
|
12
|
-
Errno::EHOSTUNREACH =>
|
|
13
|
-
OpenSSL::SSL::SSLError =>
|
|
7
|
+
EOFError => 'The remote server dropped the connection',
|
|
8
|
+
Errno::ECONNRESET => 'The remote server reset the connection',
|
|
9
|
+
Timeout::Error => 'The connection to the remote server timed out',
|
|
10
|
+
Errno::ETIMEDOUT => 'The connection to the remote server timed out',
|
|
11
|
+
SocketError => 'The connection to the remote server could not be established',
|
|
12
|
+
Errno::EHOSTUNREACH => 'The connection to the remote server could not be established',
|
|
13
|
+
OpenSSL::SSL::SSLError => 'The SSL connection to the remote server could not be established'
|
|
14
14
|
}
|
|
15
15
|
|
|
16
16
|
def self.included(base)
|
|
@@ -24,12 +24,12 @@ module ActiveMerchant
|
|
|
24
24
|
begin
|
|
25
25
|
yield
|
|
26
26
|
rescue Errno::ECONNREFUSED => e
|
|
27
|
-
raise ActiveMerchant::RetriableConnectionError.new(
|
|
27
|
+
raise ActiveMerchant::RetriableConnectionError.new('The remote server refused the connection', e)
|
|
28
28
|
rescue OpenSSL::X509::CertificateError => e
|
|
29
29
|
NetworkConnectionRetries.log(options[:logger], :error, e.message, options[:tag])
|
|
30
|
-
raise ActiveMerchant::ClientCertificateError,
|
|
30
|
+
raise ActiveMerchant::ClientCertificateError, 'The remote server did not accept the provided SSL certificate'
|
|
31
31
|
rescue Zlib::BufError => e
|
|
32
|
-
raise ActiveMerchant::InvalidResponseError,
|
|
32
|
+
raise ActiveMerchant::InvalidResponseError, 'The remote server replied with an invalid response'
|
|
33
33
|
rescue *connection_errors.keys => e
|
|
34
34
|
raise ActiveMerchant::ConnectionError.new(derived_error_message(connection_errors, e.class), e)
|
|
35
35
|
end
|
|
@@ -46,7 +46,7 @@ module ActiveMerchant
|
|
|
46
46
|
begin
|
|
47
47
|
request_start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
|
|
48
48
|
result = yield
|
|
49
|
-
log_with_retry_details(options[:logger], initial_retries-retries + 1, Process.clock_gettime(Process::CLOCK_MONOTONIC) - request_start,
|
|
49
|
+
log_with_retry_details(options[:logger], initial_retries-retries + 1, Process.clock_gettime(Process::CLOCK_MONOTONIC) - request_start, 'success', options[:tag])
|
|
50
50
|
result
|
|
51
51
|
rescue ActiveMerchant::RetriableConnectionError => e
|
|
52
52
|
retries -= 1
|
|
@@ -70,7 +70,7 @@ module ActiveMerchant
|
|
|
70
70
|
|
|
71
71
|
private
|
|
72
72
|
def log_with_retry_details(logger, attempts, time, message, tag)
|
|
73
|
-
NetworkConnectionRetries.log(logger, :info,
|
|
73
|
+
NetworkConnectionRetries.log(logger, :info, 'connection_attempt=%d connection_request_time=%.4fs connection_msg="%s"' % [attempts, time, message], tag)
|
|
74
74
|
end
|
|
75
75
|
|
|
76
76
|
def derived_error_message(errors, klass)
|
data/lib/certs/cacert.pem
CHANGED
|
@@ -3949,3 +3949,40 @@ TZVHO8mvbaG0weyJ9rQPOLXiZNwlz6bb65pcmaHFCN795trV1lpFDMS3wrUU77QR/w4VtfX128a9
|
|
|
3949
3949
|
61qn8FYiqTxlVMYVqL2Gns2Dlmh6cYGJ4Qvh6hEbaAjMaZ7snkGeRDImeuKHCnE96+RapNLbxc3G
|
|
3950
3950
|
3mB/ufNPRJLvKrcYPqcZ2Qt9sTdBQrC6YB3y/gkRsPCHe6ed
|
|
3951
3951
|
-----END CERTIFICATE-----
|
|
3952
|
+
|
|
3953
|
+
COMODO RSA Certification Authority
|
|
3954
|
+
==================================
|
|
3955
|
+
-----BEGIN CERTIFICATE-----
|
|
3956
|
+
MIIF2DCCA8CgAwIBAgIQTKr5yttjb+Af907YWwOGnTANBgkqhkiG9w0BAQwFADCB
|
|
3957
|
+
hTELMAkGA1UEBhMCR0IxGzAZBgNVBAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4G
|
|
3958
|
+
A1UEBxMHU2FsZm9yZDEaMBgGA1UEChMRQ09NT0RPIENBIExpbWl0ZWQxKzApBgNV
|
|
3959
|
+
BAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMTAwMTE5
|
|
3960
|
+
MDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBhTELMAkGA1UEBhMCR0IxGzAZBgNVBAgT
|
|
3961
|
+
EkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU2FsZm9yZDEaMBgGA1UEChMR
|
|
3962
|
+
Q09NT0RPIENBIExpbWl0ZWQxKzApBgNVBAMTIkNPTU9ETyBSU0EgQ2VydGlmaWNh
|
|
3963
|
+
dGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIKAoICAQCR
|
|
3964
|
+
6FSS0gpWsawNJN3Fz0RndJkrN6N9I3AAcbxT38T6KhKPS38QVr2fcHK3YX/JSw8X
|
|
3965
|
+
pz3jsARh7v8Rl8f0hj4K+j5c+ZPmNHrZFGvnnLOFoIJ6dq9xkNfs/Q36nGz637CC
|
|
3966
|
+
9BR++b7Epi9Pf5l/tfxnQ3K9DADWietrLNPtj5gcFKt+5eNu/Nio5JIk2kNrYrhV
|
|
3967
|
+
/erBvGy2i/MOjZrkm2xpmfh4SDBF1a3hDTxFYPwyllEnvGfDyi62a+pGx8cgoLEf
|
|
3968
|
+
Zd5ICLqkTqnyg0Y3hOvozIFIQ2dOciqbXL1MGyiKXCJ7tKuY2e7gUYPDCUZObT6Z
|
|
3969
|
+
+pUX2nwzV0E8jVHtC7ZcryxjGt9XyD+86V3Em69FmeKjWiS0uqlWPc9vqv9JWL7w
|
|
3970
|
+
qP/0uK3pN/u6uPQLOvnoQ0IeidiEyxPx2bvhiWC4jChWrBQdnArncevPDt09qZah
|
|
3971
|
+
SL0896+1DSJMwBGB7FY79tOi4lu3sgQiUpWAk2nojkxl8ZEDLXB0AuqLZxUpaVIC
|
|
3972
|
+
u9ffUGpVRr+goyhhf3DQw6KqLCGqR84onAZFdr+CGCe01a60y1Dma/RMhnEw6abf
|
|
3973
|
+
Fobg2P9A3fvQQoh/ozM6LlweQRGBY84YcWsr7KaKtzFcOmpH4MN5WdYgGq/yapiq
|
|
3974
|
+
crxXStJLnbsQ/LBMQeXtHT1eKJ2czL+zUdqnR+WEUwIDAQABo0IwQDAdBgNVHQ4E
|
|
3975
|
+
FgQUu69+Aj36pvE8hI6t7jiY7NkyMtQwDgYDVR0PAQH/BAQDAgEGMA8GA1UdEwEB
|
|
3976
|
+
/wQFMAMBAf8wDQYJKoZIhvcNAQEMBQADggIBAArx1UaEt65Ru2yyTUEUAJNMnMvl
|
|
3977
|
+
wFTPoCWOAvn9sKIN9SCYPBMtrFaisNZ+EZLpLrqeLppysb0ZRGxhNaKatBYSaVqM
|
|
3978
|
+
4dc+pBroLwP0rmEdEBsqpIt6xf4FpuHA1sj+nq6PK7o9mfjYcwlYRm6mnPTXJ9OV
|
|
3979
|
+
2jeDchzTc+CiR5kDOF3VSXkAKRzH7JsgHAckaVd4sjn8OoSgtZx8jb8uk2Intzna
|
|
3980
|
+
FxiuvTwJaP+EmzzV1gsD41eeFPfR60/IvYcjt7ZJQ3mFXLrrkguhxuhoqEwWsRqZ
|
|
3981
|
+
CuhTLJK7oQkYdQxlqHvLI7cawiiFwxv/0Cti76R7CZGYZ4wUAc1oBmpjIXUDgIiK
|
|
3982
|
+
boHGhfKppC3n9KUkEEeDys30jXlYsQab5xoq2Z0B15R97QNKyvDb6KkBPvVWmcke
|
|
3983
|
+
jkk9u+UJueBPSZI9FoJAzMxZxuY67RIuaTxslbH9qh17f4a+Hg4yRvv7E491f0yL
|
|
3984
|
+
S0Zj/gA0QHDBw7mh3aZw4gSzQbzpgJHqZJx64SIDqZxubw5lT2yHh17zbqD5daWb
|
|
3985
|
+
QOhTsiedSrnAdyGN/4fy3ryM7xfft0kL0fJuMAsaDk527RH89elWsn2/x20Kk4yl
|
|
3986
|
+
0MC2Hb46TpSi125sC8KKfPog88Tk5c0NqMuRkrF8hey1FGlmDoLnzc7ILaZRfyHB
|
|
3987
|
+
NVOFBkpdn627G190
|
|
3988
|
+
-----END CERTIFICATE-----
|
|
@@ -17,7 +17,7 @@ class GatewaySupport #:nodoc:
|
|
|
17
17
|
begin
|
|
18
18
|
gateway_class = ('ActiveMerchant::Billing::' + gateway_name.camelize).constantize
|
|
19
19
|
rescue NameError
|
|
20
|
-
puts
|
|
20
|
+
puts 'Could not load gateway ' + gateway_name.camelize + ' from ' + f + '.'
|
|
21
21
|
end
|
|
22
22
|
end
|
|
23
23
|
@gateways = Gateway.implementations.sort_by(&:name)
|
|
@@ -31,7 +31,7 @@ class GatewaySupport #:nodoc:
|
|
|
31
31
|
def features
|
|
32
32
|
width = 15
|
|
33
33
|
|
|
34
|
-
print
|
|
34
|
+
print 'Name'.center(width + 20)
|
|
35
35
|
ACTIONS.each{|f| print "#{f.to_s.capitalize.center(width)}" }
|
|
36
36
|
puts
|
|
37
37
|
|
data/lib/support/ssl_verify.rb
CHANGED
|
@@ -26,13 +26,13 @@ class SSLVerify
|
|
|
26
26
|
result,message = ssl_verify_peer?(uri)
|
|
27
27
|
case result
|
|
28
28
|
when :success
|
|
29
|
-
print
|
|
29
|
+
print '.'
|
|
30
30
|
success << g
|
|
31
31
|
when :fail
|
|
32
|
-
print
|
|
32
|
+
print 'F'
|
|
33
33
|
failed << {:gateway => g, :message => message}
|
|
34
34
|
when :error
|
|
35
|
-
print
|
|
35
|
+
print 'E'
|
|
36
36
|
errored << {:gateway => g, :message => message}
|
|
37
37
|
end
|
|
38
38
|
end
|
|
@@ -66,7 +66,7 @@ class SSLVerify
|
|
|
66
66
|
def try_host(http, path)
|
|
67
67
|
http.get(path)
|
|
68
68
|
rescue Net::HTTPBadResponse, EOFError, SocketError
|
|
69
|
-
http.post(path,
|
|
69
|
+
http.post(path, '')
|
|
70
70
|
end
|
|
71
71
|
|
|
72
72
|
def ssl_verify_peer?(uri)
|
|
@@ -78,7 +78,7 @@ class SSLVerify
|
|
|
78
78
|
http.read_timeout = 60
|
|
79
79
|
|
|
80
80
|
if uri.path.blank?
|
|
81
|
-
try_host(http,
|
|
81
|
+
try_host(http, '/')
|
|
82
82
|
else
|
|
83
83
|
try_host(http, uri.path)
|
|
84
84
|
end
|
data/lib/support/ssl_version.rb
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
require
|
|
2
|
-
require
|
|
1
|
+
require 'active_merchant'
|
|
2
|
+
require 'support/gateway_support'
|
|
3
3
|
|
|
4
4
|
class SSLVersion
|
|
5
5
|
attr_accessor :success, :failed, :missing, :errored
|
|
@@ -10,7 +10,7 @@ class SSLVersion
|
|
|
10
10
|
end
|
|
11
11
|
|
|
12
12
|
def test_gateways(min_version = :TLS1_1)
|
|
13
|
-
raise
|
|
13
|
+
raise 'Requires Ruby 2.5 or better' unless Net::HTTP.instance_methods.include?(:min_version=)
|
|
14
14
|
|
|
15
15
|
puts "Verifying #{@gateways.count} gateways for SSL min_version=#{min_version}\n\n"
|
|
16
16
|
|
|
@@ -25,13 +25,13 @@ class SSLVersion
|
|
|
25
25
|
|
|
26
26
|
case result
|
|
27
27
|
when :success
|
|
28
|
-
print
|
|
28
|
+
print '.'
|
|
29
29
|
success << g
|
|
30
30
|
when :fail
|
|
31
|
-
print
|
|
31
|
+
print 'F'
|
|
32
32
|
failed << {:gateway => g, :message => message}
|
|
33
33
|
when :error
|
|
34
|
-
print
|
|
34
|
+
print 'E'
|
|
35
35
|
errored << {:gateway => g, :message => message}
|
|
36
36
|
end
|
|
37
37
|
end
|
|
@@ -70,7 +70,7 @@ class SSLVersion
|
|
|
70
70
|
http.open_timeout = 10
|
|
71
71
|
http.read_timeout = 10
|
|
72
72
|
|
|
73
|
-
http.post(
|
|
73
|
+
http.post('/', '')
|
|
74
74
|
|
|
75
75
|
return :success
|
|
76
76
|
rescue Net::HTTPBadResponse
|
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.80.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-07-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
@@ -235,10 +235,6 @@ files:
|
|
|
235
235
|
- lib/active_merchant/billing/gateways/hdfc.rb
|
|
236
236
|
- lib/active_merchant/billing/gateways/hps.rb
|
|
237
237
|
- lib/active_merchant/billing/gateways/iats_payments.rb
|
|
238
|
-
- lib/active_merchant/billing/gateways/ideal/ideal_base.rb
|
|
239
|
-
- lib/active_merchant/billing/gateways/ideal/ideal_rabobank.pem
|
|
240
|
-
- lib/active_merchant/billing/gateways/ideal/ideal_response.rb
|
|
241
|
-
- lib/active_merchant/billing/gateways/ideal_rabobank.rb
|
|
242
238
|
- lib/active_merchant/billing/gateways/in_context_paypal_express.rb
|
|
243
239
|
- lib/active_merchant/billing/gateways/inspire.rb
|
|
244
240
|
- lib/active_merchant/billing/gateways/instapay.rb
|
|
@@ -411,7 +407,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
411
407
|
requirements:
|
|
412
408
|
- - ">="
|
|
413
409
|
- !ruby/object:Gem::Version
|
|
414
|
-
version: '2.
|
|
410
|
+
version: '2.3'
|
|
415
411
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
416
412
|
requirements:
|
|
417
413
|
- - ">="
|