activemerchant 1.79.2 → 1.80.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (219) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +33 -0
  3. data/README.md +10 -2
  4. data/lib/active_merchant.rb +1 -1
  5. data/lib/active_merchant/billing/check.rb +4 -4
  6. data/lib/active_merchant/billing/compatibility.rb +1 -1
  7. data/lib/active_merchant/billing/credit_card.rb +21 -21
  8. data/lib/active_merchant/billing/credit_card_formatting.rb +2 -2
  9. data/lib/active_merchant/billing/credit_card_methods.rb +2 -2
  10. data/lib/active_merchant/billing/gateway.rb +13 -13
  11. data/lib/active_merchant/billing/gateways/adyen.rb +31 -15
  12. data/lib/active_merchant/billing/gateways/allied_wallet.rb +22 -22
  13. data/lib/active_merchant/billing/gateways/authorize_net.rb +72 -72
  14. data/lib/active_merchant/billing/gateways/authorize_net_arb.rb +3 -3
  15. data/lib/active_merchant/billing/gateways/authorize_net_cim.rb +3 -3
  16. data/lib/active_merchant/billing/gateways/axcessms.rb +51 -51
  17. data/lib/active_merchant/billing/gateways/balanced.rb +29 -29
  18. data/lib/active_merchant/billing/gateways/bank_frick.rb +3 -3
  19. data/lib/active_merchant/billing/gateways/banwire.rb +8 -8
  20. data/lib/active_merchant/billing/gateways/barclaycard_smartpay.rb +5 -5
  21. data/lib/active_merchant/billing/gateways/barclays_epdq_extra_plus.rb +6 -6
  22. data/lib/active_merchant/billing/gateways/be2bill.rb +2 -2
  23. data/lib/active_merchant/billing/gateways/beanstream.rb +1 -1
  24. data/lib/active_merchant/billing/gateways/beanstream/beanstream_core.rb +69 -69
  25. data/lib/active_merchant/billing/gateways/blue_pay.rb +19 -19
  26. data/lib/active_merchant/billing/gateways/blue_snap.rb +42 -42
  27. data/lib/active_merchant/billing/gateways/bogus.rb +10 -10
  28. data/lib/active_merchant/billing/gateways/borgun.rb +10 -10
  29. data/lib/active_merchant/billing/gateways/bpoint.rb +1 -1
  30. data/lib/active_merchant/billing/gateways/braintree/braintree_common.rb +2 -2
  31. data/lib/active_merchant/billing/gateways/braintree_blue.rb +94 -94
  32. data/lib/active_merchant/billing/gateways/braintree_orange.rb +1 -1
  33. data/lib/active_merchant/billing/gateways/bridge_pay.rb +39 -39
  34. data/lib/active_merchant/billing/gateways/cams.rb +12 -12
  35. data/lib/active_merchant/billing/gateways/card_connect.rb +38 -13
  36. data/lib/active_merchant/billing/gateways/card_stream.rb +116 -116
  37. data/lib/active_merchant/billing/gateways/cardknox.rb +7 -7
  38. data/lib/active_merchant/billing/gateways/cardprocess.rb +1 -1
  39. data/lib/active_merchant/billing/gateways/cashnet.rb +10 -10
  40. data/lib/active_merchant/billing/gateways/cc5.rb +3 -5
  41. data/lib/active_merchant/billing/gateways/cecabank.rb +6 -6
  42. data/lib/active_merchant/billing/gateways/cenpos.rb +36 -36
  43. data/lib/active_merchant/billing/gateways/checkout.rb +5 -5
  44. data/lib/active_merchant/billing/gateways/checkout_v2.rb +31 -31
  45. data/lib/active_merchant/billing/gateways/clearhaus.rb +5 -5
  46. data/lib/active_merchant/billing/gateways/commercegate.rb +6 -6
  47. data/lib/active_merchant/billing/gateways/conekta.rb +24 -19
  48. data/lib/active_merchant/billing/gateways/creditcall.rb +41 -41
  49. data/lib/active_merchant/billing/gateways/credorax.rb +104 -103
  50. data/lib/active_merchant/billing/gateways/culqi.rb +25 -25
  51. data/lib/active_merchant/billing/gateways/cyber_source.rb +65 -65
  52. data/lib/active_merchant/billing/gateways/data_cash.rb +4 -4
  53. data/lib/active_merchant/billing/gateways/dibs.rb +24 -24
  54. data/lib/active_merchant/billing/gateways/digitzs.rb +35 -35
  55. data/lib/active_merchant/billing/gateways/ebanx.rb +26 -26
  56. data/lib/active_merchant/billing/gateways/efsnet.rb +10 -10
  57. data/lib/active_merchant/billing/gateways/elavon.rb +5 -5
  58. data/lib/active_merchant/billing/gateways/element.rb +35 -35
  59. data/lib/active_merchant/billing/gateways/epay.rb +4 -4
  60. data/lib/active_merchant/billing/gateways/evo_ca.rb +1 -1
  61. data/lib/active_merchant/billing/gateways/eway.rb +65 -65
  62. data/lib/active_merchant/billing/gateways/eway_managed.rb +11 -11
  63. data/lib/active_merchant/billing/gateways/eway_rapid.rb +31 -31
  64. data/lib/active_merchant/billing/gateways/exact.rb +12 -12
  65. data/lib/active_merchant/billing/gateways/ezic.rb +13 -13
  66. data/lib/active_merchant/billing/gateways/fat_zebra.rb +24 -24
  67. data/lib/active_merchant/billing/gateways/federated_canada.rb +3 -3
  68. data/lib/active_merchant/billing/gateways/first_giving.rb +16 -16
  69. data/lib/active_merchant/billing/gateways/first_pay.rb +7 -4
  70. data/lib/active_merchant/billing/gateways/firstdata_e4.rb +71 -71
  71. data/lib/active_merchant/billing/gateways/flo2cash.rb +12 -12
  72. data/lib/active_merchant/billing/gateways/flo2cash_simple.rb +1 -1
  73. data/lib/active_merchant/billing/gateways/forte.rb +26 -16
  74. data/lib/active_merchant/billing/gateways/garanti.rb +10 -12
  75. data/lib/active_merchant/billing/gateways/global_collect.rb +88 -88
  76. data/lib/active_merchant/billing/gateways/global_transport.rb +4 -4
  77. data/lib/active_merchant/billing/gateways/hdfc.rb +33 -33
  78. data/lib/active_merchant/billing/gateways/hps.rb +28 -28
  79. data/lib/active_merchant/billing/gateways/iats_payments.rb +26 -26
  80. data/lib/active_merchant/billing/gateways/inspire.rb +15 -15
  81. data/lib/active_merchant/billing/gateways/instapay.rb +4 -4
  82. data/lib/active_merchant/billing/gateways/ipp.rb +17 -17
  83. data/lib/active_merchant/billing/gateways/iridium.rb +207 -207
  84. data/lib/active_merchant/billing/gateways/iveri.rb +8 -8
  85. data/lib/active_merchant/billing/gateways/jetpay.rb +134 -134
  86. data/lib/active_merchant/billing/gateways/jetpay_v2.rb +141 -141
  87. data/lib/active_merchant/billing/gateways/komoju.rb +15 -15
  88. data/lib/active_merchant/billing/gateways/kushki.rb +31 -37
  89. data/lib/active_merchant/billing/gateways/latitude19.rb +64 -64
  90. data/lib/active_merchant/billing/gateways/linkpoint.rb +22 -22
  91. data/lib/active_merchant/billing/gateways/litle.rb +4 -4
  92. data/lib/active_merchant/billing/gateways/mastercard.rb +3 -3
  93. data/lib/active_merchant/billing/gateways/maxipago.rb +2 -2
  94. data/lib/active_merchant/billing/gateways/mercado_pago.rb +28 -28
  95. data/lib/active_merchant/billing/gateways/merchant_e_solutions.rb +9 -9
  96. data/lib/active_merchant/billing/gateways/merchant_one.rb +6 -6
  97. data/lib/active_merchant/billing/gateways/merchant_partners.rb +24 -24
  98. data/lib/active_merchant/billing/gateways/merchant_ware.rb +49 -49
  99. data/lib/active_merchant/billing/gateways/merchant_ware_version_four.rb +36 -36
  100. data/lib/active_merchant/billing/gateways/merchant_warrior.rb +4 -4
  101. data/lib/active_merchant/billing/gateways/mercury.rb +28 -28
  102. data/lib/active_merchant/billing/gateways/metrics_global.rb +7 -7
  103. data/lib/active_merchant/billing/gateways/micropayment.rb +31 -31
  104. data/lib/active_merchant/billing/gateways/migs.rb +11 -9
  105. data/lib/active_merchant/billing/gateways/modern_payments.rb +1 -1
  106. data/lib/active_merchant/billing/gateways/modern_payments_cim.rb +16 -16
  107. data/lib/active_merchant/billing/gateways/monei.rb +5 -5
  108. data/lib/active_merchant/billing/gateways/moneris.rb +26 -26
  109. data/lib/active_merchant/billing/gateways/moneris_us.rb +81 -37
  110. data/lib/active_merchant/billing/gateways/money_movers.rb +3 -3
  111. data/lib/active_merchant/billing/gateways/mundipagg.rb +1 -1
  112. data/lib/active_merchant/billing/gateways/nab_transact.rb +6 -6
  113. data/lib/active_merchant/billing/gateways/ncr_secure_pay.rb +3 -3
  114. data/lib/active_merchant/billing/gateways/netaxept.rb +15 -15
  115. data/lib/active_merchant/billing/gateways/netbanx.rb +2 -2
  116. data/lib/active_merchant/billing/gateways/netbilling.rb +1 -1
  117. data/lib/active_merchant/billing/gateways/netpay.rb +5 -5
  118. data/lib/active_merchant/billing/gateways/nmi.rb +18 -18
  119. data/lib/active_merchant/billing/gateways/ogone.rb +22 -22
  120. data/lib/active_merchant/billing/gateways/omise.rb +3 -3
  121. data/lib/active_merchant/billing/gateways/openpay.rb +6 -4
  122. data/lib/active_merchant/billing/gateways/opp.rb +4 -4
  123. data/lib/active_merchant/billing/gateways/optimal_payment.rb +2 -2
  124. data/lib/active_merchant/billing/gateways/orbital.rb +61 -61
  125. data/lib/active_merchant/billing/gateways/orbital/orbital_soft_descriptors.rb +4 -4
  126. data/lib/active_merchant/billing/gateways/pac_net_raven.rb +5 -5
  127. data/lib/active_merchant/billing/gateways/pagarme.rb +27 -27
  128. data/lib/active_merchant/billing/gateways/pago_facil.rb +8 -8
  129. data/lib/active_merchant/billing/gateways/pay_conex.rb +25 -25
  130. data/lib/active_merchant/billing/gateways/pay_gate_xml.rb +32 -32
  131. data/lib/active_merchant/billing/gateways/pay_hub.rb +29 -29
  132. data/lib/active_merchant/billing/gateways/pay_junction.rb +7 -7
  133. data/lib/active_merchant/billing/gateways/pay_junction_v2.rb +30 -30
  134. data/lib/active_merchant/billing/gateways/pay_secure.rb +4 -4
  135. data/lib/active_merchant/billing/gateways/paybox_direct.rb +15 -15
  136. data/lib/active_merchant/billing/gateways/payeezy.rb +5 -5
  137. data/lib/active_merchant/billing/gateways/payex.rb +4 -4
  138. data/lib/active_merchant/billing/gateways/payflow.rb +7 -7
  139. data/lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb +23 -22
  140. data/lib/active_merchant/billing/gateways/payflow_express.rb +2 -2
  141. data/lib/active_merchant/billing/gateways/payment_express.rb +40 -37
  142. data/lib/active_merchant/billing/gateways/paymentez.rb +11 -3
  143. data/lib/active_merchant/billing/gateways/paymill.rb +115 -115
  144. data/lib/active_merchant/billing/gateways/paypal.rb +1 -1
  145. data/lib/active_merchant/billing/gateways/paypal_digital_goods.rb +1 -1
  146. data/lib/active_merchant/billing/gateways/payscout.rb +1 -1
  147. data/lib/active_merchant/billing/gateways/paystation.rb +14 -14
  148. data/lib/active_merchant/billing/gateways/payu_in.rb +43 -43
  149. data/lib/active_merchant/billing/gateways/payu_latam.rb +41 -41
  150. data/lib/active_merchant/billing/gateways/payway.rb +6 -6
  151. data/lib/active_merchant/billing/gateways/pin.rb +7 -7
  152. data/lib/active_merchant/billing/gateways/plugnpay.rb +62 -62
  153. data/lib/active_merchant/billing/gateways/pro_pay.rb +123 -123
  154. data/lib/active_merchant/billing/gateways/psigate.rb +16 -16
  155. data/lib/active_merchant/billing/gateways/psl_card.rb +13 -13
  156. data/lib/active_merchant/billing/gateways/qbms.rb +52 -52
  157. data/lib/active_merchant/billing/gateways/quantum.rb +5 -5
  158. data/lib/active_merchant/billing/gateways/quickbooks.rb +10 -10
  159. data/lib/active_merchant/billing/gateways/quickpay.rb +1 -1
  160. data/lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb +11 -11
  161. data/lib/active_merchant/billing/gateways/quickpay/quickpay_v4to7.rb +3 -3
  162. data/lib/active_merchant/billing/gateways/qvalent.rb +55 -55
  163. data/lib/active_merchant/billing/gateways/realex.rb +16 -15
  164. data/lib/active_merchant/billing/gateways/redsys.rb +128 -121
  165. data/lib/active_merchant/billing/gateways/s5.rb +5 -5
  166. data/lib/active_merchant/billing/gateways/safe_charge.rb +16 -16
  167. data/lib/active_merchant/billing/gateways/sage.rb +20 -20
  168. data/lib/active_merchant/billing/gateways/sage_pay.rb +32 -32
  169. data/lib/active_merchant/billing/gateways/sallie_mae.rb +11 -11
  170. data/lib/active_merchant/billing/gateways/secure_net.rb +19 -19
  171. data/lib/active_merchant/billing/gateways/secure_pay.rb +5 -5
  172. data/lib/active_merchant/billing/gateways/secure_pay_au.rb +7 -7
  173. data/lib/active_merchant/billing/gateways/secure_pay_tech.rb +9 -9
  174. data/lib/active_merchant/billing/gateways/securion_pay.rb +12 -12
  175. data/lib/active_merchant/billing/gateways/skip_jack.rb +28 -28
  176. data/lib/active_merchant/billing/gateways/smart_ps.rb +31 -31
  177. data/lib/active_merchant/billing/gateways/so_easy_pay.rb +3 -3
  178. data/lib/active_merchant/billing/gateways/spreedly_core.rb +1 -1
  179. data/lib/active_merchant/billing/gateways/stripe.rb +63 -63
  180. data/lib/active_merchant/billing/gateways/swipe_checkout.rb +5 -5
  181. data/lib/active_merchant/billing/gateways/telr.rb +26 -26
  182. data/lib/active_merchant/billing/gateways/trans_first.rb +28 -28
  183. data/lib/active_merchant/billing/gateways/trans_first_transaction_express.rb +224 -224
  184. data/lib/active_merchant/billing/gateways/transact_pro.rb +7 -7
  185. data/lib/active_merchant/billing/gateways/transnational.rb +1 -1
  186. data/lib/active_merchant/billing/gateways/trexle.rb +5 -5
  187. data/lib/active_merchant/billing/gateways/trust_commerce.rb +38 -38
  188. data/lib/active_merchant/billing/gateways/usa_epay.rb +3 -3
  189. data/lib/active_merchant/billing/gateways/usa_epay_advanced.rb +37 -37
  190. data/lib/active_merchant/billing/gateways/usa_epay_transaction.rb +3 -3
  191. data/lib/active_merchant/billing/gateways/vanco.rb +25 -25
  192. data/lib/active_merchant/billing/gateways/verifi.rb +40 -40
  193. data/lib/active_merchant/billing/gateways/viaklix.rb +5 -5
  194. data/lib/active_merchant/billing/gateways/visanet_peru.rb +64 -36
  195. data/lib/active_merchant/billing/gateways/webpay.rb +8 -8
  196. data/lib/active_merchant/billing/gateways/wepay.rb +25 -25
  197. data/lib/active_merchant/billing/gateways/wirecard.rb +26 -26
  198. data/lib/active_merchant/billing/gateways/worldpay.rb +15 -15
  199. data/lib/active_merchant/billing/gateways/worldpay_online_payments.rb +42 -42
  200. data/lib/active_merchant/billing/gateways/worldpay_us.rb +17 -17
  201. data/lib/active_merchant/billing/model.rb +2 -2
  202. data/lib/active_merchant/billing/network_tokenization_credit_card.rb +1 -1
  203. data/lib/active_merchant/billing/rails.rb +1 -1
  204. data/lib/active_merchant/connection.rb +10 -8
  205. data/lib/active_merchant/country.rb +1 -1
  206. data/lib/active_merchant/net_http_ssl_connection.rb +1 -0
  207. data/lib/active_merchant/network_connection_retries.rb +12 -12
  208. data/lib/active_merchant/post_data.rb +1 -1
  209. data/lib/active_merchant/posts_data.rb +1 -1
  210. data/lib/active_merchant/version.rb +1 -1
  211. data/lib/certs/cacert.pem +37 -0
  212. data/lib/support/gateway_support.rb +2 -2
  213. data/lib/support/ssl_verify.rb +5 -5
  214. data/lib/support/ssl_version.rb +7 -7
  215. metadata +3 -7
  216. data/lib/active_merchant/billing/gateways/ideal/ideal_base.rb +0 -246
  217. data/lib/active_merchant/billing/gateways/ideal/ideal_rabobank.pem +0 -13
  218. data/lib/active_merchant/billing/gateways/ideal/ideal_response.rb +0 -29
  219. data/lib/active_merchant/billing/gateways/ideal_rabobank.rb +0 -66
@@ -1,12 +1,12 @@
1
- require "nokogiri"
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 = "Worldpay US"
9
- self.homepage_url = "http://www.worldpay.com/us"
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("refund", options, post)
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 == "true" ? self.backup_url : self.live_url
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
- "checking" => "1",
142
- "savings" => "2",
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("//plaintext")
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
- "purchase" => "ns_quicksale_cc",
178
- "refund" => "ns_credit",
179
- "authorize" => "ns_quicksale_cc",
180
- "capture" => "ns_quicksale_cc",
181
- "void" => "ns_void",
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
- "Succeeded"
210
+ 'Succeeded'
211
211
  else
212
- (response['transresult'] || response['Reason'] || "Unable to read error message")
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
@@ -1,5 +1,5 @@
1
- require "active_merchant/billing/compatibility"
2
- require "active_merchant/empty"
1
+ require 'active_merchant/billing/compatibility'
2
+ require 'active_merchant/empty'
3
3
 
4
4
  module ActiveMerchant
5
5
  module Billing
@@ -32,7 +32,7 @@ module ActiveMerchant #:nodoc:
32
32
  end
33
33
 
34
34
  def type
35
- "network_tokenization"
35
+ 'network_tokenization'
36
36
  end
37
37
  end
38
38
  end
@@ -1,3 +1,3 @@
1
- require "active_merchant/billing/compatibility"
1
+ require 'active_merchant/billing/compatibility'
2
2
 
3
3
  ActiveMerchant::Billing::Compatibility.rails_required!
@@ -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 = { "Content-Type" => "application/x-www-form-urlencoded" }
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 = nil
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, "GET requests do not support a request body" if body
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 "--> %d %s (%d %.4fs)" % [result.code, result.message, result.body ? result.body.length : 0, realtime], tag
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 "connection_request_total_time=%.4fs" % [Process.clock_gettime(Process::CLOCK_MONOTONIC) - request_start], tag
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 == "https"
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, "Cannot lookup country for an empty name" if name.blank?
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
@@ -3,6 +3,7 @@ require 'net/http'
3
3
  module NetHttpSslConnection
4
4
  refine Net::HTTP do
5
5
  def ssl_connection
6
+ return {} unless @socket.present?
6
7
  { version: @socket.io.ssl_version, cipher: @socket.io.cipher[0] }
7
8
  end
8
9
  end
@@ -4,13 +4,13 @@ module ActiveMerchant
4
4
  module NetworkConnectionRetries
5
5
  DEFAULT_RETRIES = 3
6
6
  DEFAULT_CONNECTION_ERRORS = {
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"
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("The remote server refused the connection", e)
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, "The remote server did not accept the provided SSL certificate"
30
+ raise ActiveMerchant::ClientCertificateError, 'The remote server did not accept the provided SSL certificate'
31
31
  rescue Zlib::BufError => e
32
- raise ActiveMerchant::InvalidResponseError, "The remote server replied with an invalid response"
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, "success", options[:tag])
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, "connection_attempt=%d connection_request_time=%.4fs connection_msg=\"%s\"" % [attempts, time, message], tag)
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)
@@ -11,7 +11,7 @@ module ActiveMerchant
11
11
  end
12
12
 
13
13
  def to_post_data
14
- collect { |key, value| "#{key}=#{CGI.escape(value.to_s)}" }.join("&")
14
+ collect { |key, value| "#{key}=#{CGI.escape(value.to_s)}" }.join('&')
15
15
  end
16
16
 
17
17
  alias_method :to_s, :to_post_data
@@ -9,7 +9,7 @@ module ActiveMerchant #:nodoc:
9
9
  base.ssl_version = nil
10
10
 
11
11
  base.class_attribute :min_version
12
- base.min_version = nil
12
+ base.min_version = Connection::MIN_VERSION
13
13
 
14
14
  base.class_attribute :max_version
15
15
  base.max_version = nil
@@ -1,3 +1,3 @@
1
1
  module ActiveMerchant
2
- VERSION = "1.79.2"
2
+ VERSION = '1.80.0'
3
3
  end
@@ -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 "Could not load gateway " + gateway_name.camelize + " from " + f + "."
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 "Name".center(width + 20)
34
+ print 'Name'.center(width + 20)
35
35
  ACTIONS.each{|f| print "#{f.to_s.capitalize.center(width)}" }
36
36
  puts
37
37
 
@@ -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 "F"
32
+ print 'F'
33
33
  failed << {:gateway => g, :message => message}
34
34
  when :error
35
- print "E"
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
@@ -1,5 +1,5 @@
1
- require "active_merchant"
2
- require "support/gateway_support"
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 "Requires Ruby 2.5 or better" unless Net::HTTP.instance_methods.include?(:min_version=)
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 "F"
31
+ print 'F'
32
32
  failed << {:gateway => g, :message => message}
33
33
  when :error
34
- print "E"
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.79.2
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-06-03 00:00:00.000000000 Z
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.1'
410
+ version: '2.3'
415
411
  required_rubygems_version: !ruby/object:Gem::Requirement
416
412
  requirements:
417
413
  - - ">="