activemerchant 1.103.0 → 1.104.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (171) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +41 -0
  3. data/lib/active_merchant.rb +1 -1
  4. data/lib/active_merchant/billing/avs_result.rb +8 -8
  5. data/lib/active_merchant/billing/compatibility.rb +2 -1
  6. data/lib/active_merchant/billing/credit_card.rb +3 -1
  7. data/lib/active_merchant/billing/credit_card_methods.rb +12 -0
  8. data/lib/active_merchant/billing/cvv_result.rb +0 -1
  9. data/lib/active_merchant/billing/gateway.rb +3 -0
  10. data/lib/active_merchant/billing/gateways/adyen.rb +32 -9
  11. data/lib/active_merchant/billing/gateways/allied_wallet.rb +2 -2
  12. data/lib/active_merchant/billing/gateways/authorize_net.rb +10 -9
  13. data/lib/active_merchant/billing/gateways/authorize_net_arb.rb +10 -0
  14. data/lib/active_merchant/billing/gateways/authorize_net_cim.rb +1 -0
  15. data/lib/active_merchant/billing/gateways/axcessms.rb +1 -0
  16. data/lib/active_merchant/billing/gateways/balanced.rb +18 -15
  17. data/lib/active_merchant/billing/gateways/barclaycard_smartpay.rb +4 -0
  18. data/lib/active_merchant/billing/gateways/beanstream/beanstream_core.rb +3 -1
  19. data/lib/active_merchant/billing/gateways/blue_pay.rb +6 -5
  20. data/lib/active_merchant/billing/gateways/blue_snap.rb +31 -3
  21. data/lib/active_merchant/billing/gateways/borgun.rb +1 -1
  22. data/lib/active_merchant/billing/gateways/bpoint.rb +0 -2
  23. data/lib/active_merchant/billing/gateways/braintree/braintree_common.rb +1 -0
  24. data/lib/active_merchant/billing/gateways/braintree_blue.rb +11 -4
  25. data/lib/active_merchant/billing/gateways/bridge_pay.rb +1 -1
  26. data/lib/active_merchant/billing/gateways/card_connect.rb +2 -1
  27. data/lib/active_merchant/billing/gateways/card_save.rb +2 -3
  28. data/lib/active_merchant/billing/gateways/card_stream.rb +6 -6
  29. data/lib/active_merchant/billing/gateways/cardprocess.rb +2 -0
  30. data/lib/active_merchant/billing/gateways/cashnet.rb +1 -0
  31. data/lib/active_merchant/billing/gateways/cc5.rb +1 -1
  32. data/lib/active_merchant/billing/gateways/cecabank.rb +1 -0
  33. data/lib/active_merchant/billing/gateways/cenpos.rb +4 -3
  34. data/lib/active_merchant/billing/gateways/checkout_v2.rb +2 -0
  35. data/lib/active_merchant/billing/gateways/citrus_pay.rb +0 -1
  36. data/lib/active_merchant/billing/gateways/clearhaus.rb +3 -2
  37. data/lib/active_merchant/billing/gateways/conekta.rb +5 -3
  38. data/lib/active_merchant/billing/gateways/creditcall.rb +1 -0
  39. data/lib/active_merchant/billing/gateways/credorax.rb +17 -10
  40. data/lib/active_merchant/billing/gateways/ct_payment.rb +1 -0
  41. data/lib/active_merchant/billing/gateways/cyber_source.rb +38 -0
  42. data/lib/active_merchant/billing/gateways/d_local.rb +6 -0
  43. data/lib/active_merchant/billing/gateways/data_cash.rb +1 -1
  44. data/lib/active_merchant/billing/gateways/decidir.rb +18 -2
  45. data/lib/active_merchant/billing/gateways/digitzs.rb +3 -0
  46. data/lib/active_merchant/billing/gateways/ebanx.rb +13 -2
  47. data/lib/active_merchant/billing/gateways/efsnet.rb +3 -2
  48. data/lib/active_merchant/billing/gateways/elavon.rb +1 -1
  49. data/lib/active_merchant/billing/gateways/eway.rb +2 -1
  50. data/lib/active_merchant/billing/gateways/eway_managed.rb +2 -3
  51. data/lib/active_merchant/billing/gateways/eway_rapid.rb +1 -0
  52. data/lib/active_merchant/billing/gateways/exact.rb +3 -3
  53. data/lib/active_merchant/billing/gateways/fat_zebra.rb +2 -1
  54. data/lib/active_merchant/billing/gateways/first_giving.rb +2 -1
  55. data/lib/active_merchant/billing/gateways/firstdata_e4.rb +2 -2
  56. data/lib/active_merchant/billing/gateways/firstdata_e4_v27.rb +1 -0
  57. data/lib/active_merchant/billing/gateways/flo2cash.rb +2 -2
  58. data/lib/active_merchant/billing/gateways/forte.rb +1 -0
  59. data/lib/active_merchant/billing/gateways/garanti.rb +0 -1
  60. data/lib/active_merchant/billing/gateways/global_collect.rb +29 -0
  61. data/lib/active_merchant/billing/gateways/global_transport.rb +0 -1
  62. data/lib/active_merchant/billing/gateways/hdfc.rb +1 -0
  63. data/lib/active_merchant/billing/gateways/hps.rb +9 -7
  64. data/lib/active_merchant/billing/gateways/iats_payments.rb +4 -4
  65. data/lib/active_merchant/billing/gateways/iridium.rb +1 -1
  66. data/lib/active_merchant/billing/gateways/itransact.rb +3 -2
  67. data/lib/active_merchant/billing/gateways/iveri.rb +1 -0
  68. data/lib/active_merchant/billing/gateways/jetpay.rb +1 -1
  69. data/lib/active_merchant/billing/gateways/jetpay_v2.rb +1 -1
  70. data/lib/active_merchant/billing/gateways/latitude19.rb +2 -1
  71. data/lib/active_merchant/billing/gateways/litle.rb +3 -0
  72. data/lib/active_merchant/billing/gateways/mastercard.rb +1 -0
  73. data/lib/active_merchant/billing/gateways/mercado_pago.rb +45 -0
  74. data/lib/active_merchant/billing/gateways/merchant_one.rb +0 -1
  75. data/lib/active_merchant/billing/gateways/merchant_partners.rb +3 -3
  76. data/lib/active_merchant/billing/gateways/merchant_ware.rb +1 -1
  77. data/lib/active_merchant/billing/gateways/merchant_warrior.rb +16 -1
  78. data/lib/active_merchant/billing/gateways/mercury.rb +2 -2
  79. data/lib/active_merchant/billing/gateways/metrics_global.rb +2 -2
  80. data/lib/active_merchant/billing/gateways/micropayment.rb +0 -1
  81. data/lib/active_merchant/billing/gateways/migs/migs_codes.rb +7 -7
  82. data/lib/active_merchant/billing/gateways/moneris.rb +36 -8
  83. data/lib/active_merchant/billing/gateways/moneris_us.rb +2 -0
  84. data/lib/active_merchant/billing/gateways/mundipagg.rb +6 -1
  85. data/lib/active_merchant/billing/gateways/nab_transact.rb +2 -2
  86. data/lib/active_merchant/billing/gateways/net_registry.rb +1 -1
  87. data/lib/active_merchant/billing/gateways/netbanx.rb +3 -1
  88. data/lib/active_merchant/billing/gateways/netbilling.rb +3 -3
  89. data/lib/active_merchant/billing/gateways/netpay.rb +1 -0
  90. data/lib/active_merchant/billing/gateways/nmi.rb +5 -6
  91. data/lib/active_merchant/billing/gateways/ogone.rb +4 -2
  92. data/lib/active_merchant/billing/gateways/omise.rb +1 -2
  93. data/lib/active_merchant/billing/gateways/openpay.rb +3 -1
  94. data/lib/active_merchant/billing/gateways/opp.rb +1 -0
  95. data/lib/active_merchant/billing/gateways/optimal_payment.rb +4 -5
  96. data/lib/active_merchant/billing/gateways/orbital.rb +17 -13
  97. data/lib/active_merchant/billing/gateways/orbital/orbital_soft_descriptors.rb +1 -1
  98. data/lib/active_merchant/billing/gateways/pac_net_raven.rb +1 -1
  99. data/lib/active_merchant/billing/gateways/pagarme.rb +1 -0
  100. data/lib/active_merchant/billing/gateways/pay_conex.rb +1 -1
  101. data/lib/active_merchant/billing/gateways/pay_gate_xml.rb +1 -1
  102. data/lib/active_merchant/billing/gateways/pay_hub.rb +1 -0
  103. data/lib/active_merchant/billing/gateways/pay_junction_v2.rb +1 -0
  104. data/lib/active_merchant/billing/gateways/pay_secure.rb +1 -1
  105. data/lib/active_merchant/billing/gateways/paybox_direct.rb +4 -2
  106. data/lib/active_merchant/billing/gateways/payeezy.rb +2 -0
  107. data/lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb +1 -0
  108. data/lib/active_merchant/billing/gateways/payment_express.rb +2 -2
  109. data/lib/active_merchant/billing/gateways/paymentez.rb +4 -0
  110. data/lib/active_merchant/billing/gateways/paypal_digital_goods.rb +1 -1
  111. data/lib/active_merchant/billing/gateways/paystation.rb +1 -3
  112. data/lib/active_merchant/billing/gateways/payu_in.rb +1 -1
  113. data/lib/active_merchant/billing/gateways/payu_latam.rb +6 -0
  114. data/lib/active_merchant/billing/gateways/payway.rb +3 -2
  115. data/lib/active_merchant/billing/gateways/pin.rb +1 -0
  116. data/lib/active_merchant/billing/gateways/plugnpay.rb +4 -4
  117. data/lib/active_merchant/billing/gateways/pro_pay.rb +1 -0
  118. data/lib/active_merchant/billing/gateways/psigate.rb +2 -1
  119. data/lib/active_merchant/billing/gateways/psl_card.rb +1 -1
  120. data/lib/active_merchant/billing/gateways/qbms.rb +2 -2
  121. data/lib/active_merchant/billing/gateways/quantum.rb +0 -1
  122. data/lib/active_merchant/billing/gateways/quickbooks.rb +2 -0
  123. data/lib/active_merchant/billing/gateways/quickpay.rb +0 -1
  124. data/lib/active_merchant/billing/gateways/quickpay/quickpay_common.rb +5 -5
  125. data/lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb +1 -0
  126. data/lib/active_merchant/billing/gateways/quickpay/quickpay_v4to7.rb +1 -0
  127. data/lib/active_merchant/billing/gateways/qvalent.rb +2 -0
  128. data/lib/active_merchant/billing/gateways/realex.rb +3 -1
  129. data/lib/active_merchant/billing/gateways/redsys.rb +3 -2
  130. data/lib/active_merchant/billing/gateways/s5.rb +1 -0
  131. data/lib/active_merchant/billing/gateways/safe_charge.rb +2 -0
  132. data/lib/active_merchant/billing/gateways/sage.rb +1 -1
  133. data/lib/active_merchant/billing/gateways/sage_pay.rb +8 -6
  134. data/lib/active_merchant/billing/gateways/secure_net.rb +2 -4
  135. data/lib/active_merchant/billing/gateways/secure_pay.rb +2 -2
  136. data/lib/active_merchant/billing/gateways/secure_pay_au.rb +1 -1
  137. data/lib/active_merchant/billing/gateways/secure_pay_tech.rb +1 -1
  138. data/lib/active_merchant/billing/gateways/securion_pay.rb +2 -0
  139. data/lib/active_merchant/billing/gateways/skip_jack.rb +6 -5
  140. data/lib/active_merchant/billing/gateways/smart_ps.rb +0 -1
  141. data/lib/active_merchant/billing/gateways/so_easy_pay.rb +0 -1
  142. data/lib/active_merchant/billing/gateways/spreedly_core.rb +1 -0
  143. data/lib/active_merchant/billing/gateways/stripe.rb +7 -0
  144. data/lib/active_merchant/billing/gateways/stripe_payment_intents.rb +9 -4
  145. data/lib/active_merchant/billing/gateways/swipe_checkout.rb +1 -1
  146. data/lib/active_merchant/billing/gateways/telr.rb +3 -0
  147. data/lib/active_merchant/billing/gateways/tns.rb +0 -1
  148. data/lib/active_merchant/billing/gateways/trans_first.rb +1 -0
  149. data/lib/active_merchant/billing/gateways/trans_first_transaction_express.rb +4 -2
  150. data/lib/active_merchant/billing/gateways/transax.rb +0 -1
  151. data/lib/active_merchant/billing/gateways/trexle.rb +3 -0
  152. data/lib/active_merchant/billing/gateways/usa_epay.rb +0 -1
  153. data/lib/active_merchant/billing/gateways/usa_epay_advanced.rb +15 -16
  154. data/lib/active_merchant/billing/gateways/usa_epay_transaction.rb +5 -0
  155. data/lib/active_merchant/billing/gateways/vanco.rb +1 -1
  156. data/lib/active_merchant/billing/gateways/visanet_peru.rb +1 -0
  157. data/lib/active_merchant/billing/gateways/wepay.rb +7 -6
  158. data/lib/active_merchant/billing/gateways/wirecard.rb +6 -3
  159. data/lib/active_merchant/billing/gateways/world_net.rb +1 -0
  160. data/lib/active_merchant/billing/gateways/worldpay.rb +4 -0
  161. data/lib/active_merchant/billing/gateways/worldpay_online_payments.rb +0 -1
  162. data/lib/active_merchant/billing/gateways/worldpay_us.rb +2 -2
  163. data/lib/active_merchant/billing/response.rb +1 -1
  164. data/lib/active_merchant/connection.rb +2 -0
  165. data/lib/active_merchant/country.rb +1 -0
  166. data/lib/active_merchant/net_http_ssl_connection.rb +1 -0
  167. data/lib/active_merchant/post_data.rb +1 -0
  168. data/lib/active_merchant/version.rb +1 -1
  169. data/lib/support/ssl_verify.rb +0 -2
  170. data/lib/support/ssl_version.rb +0 -1
  171. metadata +2 -2
@@ -106,6 +106,7 @@ module ActiveMerchant #:nodoc:
106
106
 
107
107
  def add_address(post, creditcard, options)
108
108
  return if creditcard.kind_of?(String)
109
+
109
110
  address = (options[:billing_address] || options[:address])
110
111
  return unless address
111
112
 
@@ -181,6 +182,7 @@ module ActiveMerchant #:nodoc:
181
182
 
182
183
  def error_response(body)
183
184
  return invalid_response unless body['error']
185
+
184
186
  Response.new(
185
187
  false,
186
188
  body['error'],
@@ -207,6 +209,7 @@ module ActiveMerchant #:nodoc:
207
209
 
208
210
  def parse(body)
209
211
  return {} if body.blank?
212
+
210
213
  JSON.parse(body)
211
214
  end
212
215
 
@@ -5,7 +5,6 @@ module ActiveMerchant #:nodoc:
5
5
  # depending on options passed to new.
6
6
  #
7
7
  class UsaEpayGateway < Gateway
8
-
9
8
  self.abstract_class = true
10
9
 
11
10
  ##
@@ -230,21 +230,21 @@ module ActiveMerchant #:nodoc:
230
230
  } #:nodoc:
231
231
 
232
232
  AVS_RESULTS = {
233
- 'Y' => %w( YYY Y YYA YYD ),
234
- 'Z' => %w( NYZ Z ),
235
- 'A' => %w( YNA A YNY ),
236
- 'N' => %w( NNN N NN ),
237
- 'X' => %w( YYX X ),
238
- 'W' => %w( NYW W ),
239
- 'XXW' => %w( XXW ),
240
- 'XXU' => %w( XXU ),
241
- 'R' => %w( XXR R U E ),
242
- 'S' => %w( XXS S ),
243
- 'XXE' => %w( XXE ),
244
- 'G' => %w( XXG G C I ),
245
- 'B' => %w( YYG B M ),
246
- 'D' => %w( GGG D ),
247
- 'P' => %w( YGG P )
233
+ 'Y' => %w(YYY Y YYA YYD),
234
+ 'Z' => %w(NYZ Z),
235
+ 'A' => %w(YNA A YNY),
236
+ 'N' => %w(NNN N NN),
237
+ 'X' => %w(YYX X),
238
+ 'W' => %w(NYW W),
239
+ 'XXW' => %w(XXW),
240
+ 'XXU' => %w(XXU),
241
+ 'R' => %w(XXR R U E),
242
+ 'S' => %w(XXS S),
243
+ 'XXE' => %w(XXE),
244
+ 'G' => %w(XXG G C I),
245
+ 'B' => %w(YYG B M),
246
+ 'D' => %w(GGG D),
247
+ 'P' => %w(YGG P)
248
248
  }.inject({}) do |map, (type, codes)|
249
249
  codes.each { |code| map[code] = type }
250
250
  map
@@ -1607,7 +1607,6 @@ module ActiveMerchant #:nodoc:
1607
1607
 
1608
1608
  response
1609
1609
  end
1610
-
1611
1610
  end
1612
1611
  end
1613
1612
  end
@@ -204,6 +204,7 @@ module ActiveMerchant #:nodoc:
204
204
  if payment.account_type
205
205
  account_type = payment.account_type.to_s.capitalize
206
206
  raise ArgumentError, 'account_type must be checking or savings' unless %w(Checking Savings).include?(account_type)
207
+
207
208
  post[:accounttype] = account_type
208
209
  end
209
210
  post[:account] = payment.account_number
@@ -228,6 +229,7 @@ module ActiveMerchant #:nodoc:
228
229
  # see: http://wiki.usaepay.com/developer/transactionapi#split_payments
229
230
  def add_split_payments(post, options)
230
231
  return unless options[:split_payments].is_a?(Array)
232
+
231
233
  options[:split_payments].each_with_index do |payment, index|
232
234
  prefix = '%02d' % (index + 2)
233
235
  post["#{prefix}key"] = payment[:key]
@@ -241,6 +243,7 @@ module ActiveMerchant #:nodoc:
241
243
 
242
244
  def add_recurring_fields(post, options)
243
245
  return unless options[:recurring_fields].is_a?(Hash)
246
+
244
247
  options[:recurring_fields].each do |key, value|
245
248
  if value == true
246
249
  value = 'yes'
@@ -268,6 +271,7 @@ module ActiveMerchant #:nodoc:
268
271
  # see: https://wiki.usaepay.com/developer/transactionapi#line_item_details
269
272
  def add_line_items(post, options)
270
273
  return unless options[:line_items].is_a?(Array)
274
+
271
275
  options[:line_items].each_with_index do |line_item, index|
272
276
  %w(product_ref_num sku qty name description taxable tax_rate tax_amount commodity_code discount_rate discount_amount).each do |key|
273
277
  post["line#{index}#{key.delete('_')}"] = line_item[key.to_sym] if line_item.has_key?(key.to_sym)
@@ -329,6 +333,7 @@ module ActiveMerchant #:nodoc:
329
333
  return 'Success'
330
334
  else
331
335
  return 'Unspecified error' if response[:error].blank?
336
+
332
337
  return response[:error]
333
338
  end
334
339
  end
@@ -108,6 +108,7 @@ module ActiveMerchant
108
108
 
109
109
  def message_from(succeeded, response)
110
110
  return 'Success' if succeeded
111
+
111
112
  response[:error_message]
112
113
  end
113
114
 
@@ -288,7 +289,6 @@ module ActiveMerchant
288
289
  'Content-Type' => 'text/xml'
289
290
  }
290
291
  end
291
-
292
292
  end
293
293
  end
294
294
  end
@@ -213,6 +213,7 @@ module ActiveMerchant #:nodoc:
213
213
 
214
214
  def action_code_description(response)
215
215
  return nil unless response['data']
216
+
216
217
  response['data']['DSC_COD_ACCION']
217
218
  end
218
219
 
@@ -81,7 +81,7 @@ module ActiveMerchant #:nodoc:
81
81
  post[:expiration_month] = creditcard.month
82
82
  post[:expiration_year] = creditcard.year
83
83
 
84
- if(billing_address = (options[:billing_address] || options[:address]))
84
+ if (billing_address = (options[:billing_address] || options[:address]))
85
85
  post[:address] = {}
86
86
  post[:address]['address1'] = billing_address[:address1] if billing_address[:address1]
87
87
  post[:address]['city'] = billing_address[:city] if billing_address[:city]
@@ -170,11 +170,12 @@ module ActiveMerchant #:nodoc:
170
170
 
171
171
  def commit(action, params, options={})
172
172
  begin
173
- response = parse(ssl_post(
174
- ((test? ? test_url : live_url) + action),
175
- params.to_json,
176
- headers(options)
177
- ))
173
+ response = parse(
174
+ ssl_post(
175
+ ((test? ? test_url : live_url) + action),
176
+ params.to_json,
177
+ headers(options)
178
+ ))
178
179
  rescue ResponseError => e
179
180
  response = parse(e.response.body)
180
181
  end
@@ -13,9 +13,9 @@ module ActiveMerchant #:nodoc:
13
13
  'xsi:noNamespaceSchemaLocation' => 'wirecard.xsd'
14
14
  }
15
15
 
16
- PERMITTED_TRANSACTIONS = %w[ PREAUTHORIZATION CAPTURE PURCHASE ]
16
+ PERMITTED_TRANSACTIONS = %w[PREAUTHORIZATION CAPTURE PURCHASE]
17
17
 
18
- RETURN_CODES = %w[ ACK NOK ]
18
+ RETURN_CODES = %w[ACK NOK]
19
19
 
20
20
  # Wirecard only allows phone numbers with a format like this: +xxx(yyy)zzz-zzzz-ppp, where:
21
21
  # xxx = Country code
@@ -26,7 +26,7 @@ module ActiveMerchant #:nodoc:
26
26
  # number 5551234 within area code 202 (country code 1).
27
27
  VALID_PHONE_FORMAT = /\+\d{1,3}(\(?\d{3}\)?)?\d{3}-\d{4}-\d{3}/
28
28
 
29
- self.supported_cardtypes = [ :visa, :master, :american_express, :diners_club, :jcb ]
29
+ self.supported_cardtypes = [:visa, :master, :american_express, :diners_club, :jcb]
30
30
  self.supported_countries = %w(AD CY GI IM MT RO CH AT DK GR IT MC SM TR BE EE HU LV NL SK GB BG FI IS LI NO SI VA FR IL LT PL ES CZ DE IE LU PT SE)
31
31
  self.homepage_url = 'http://www.wirecard.com'
32
32
  self.display_name = 'Wirecard'
@@ -263,6 +263,7 @@ module ActiveMerchant #:nodoc:
263
263
  # Includes the credit-card data to the transaction-xml
264
264
  def add_creditcard(xml, creditcard)
265
265
  raise 'Creditcard must be supplied!' if creditcard.nil?
266
+
266
267
  xml.tag! 'CREDIT_CARD_DATA' do
267
268
  xml.tag! 'CreditCardNumber', creditcard.number
268
269
  xml.tag! 'CVC2', creditcard.verification_value
@@ -275,6 +276,7 @@ module ActiveMerchant #:nodoc:
275
276
  # Includes the IP address of the customer to the transaction-xml
276
277
  def add_customer_data(xml, options)
277
278
  return unless options[:ip]
279
+
278
280
  xml.tag! 'CONTACT_DATA' do
279
281
  xml.tag! 'IPAddress', options[:ip]
280
282
  end
@@ -283,6 +285,7 @@ module ActiveMerchant #:nodoc:
283
285
  # Includes the address to the transaction-xml
284
286
  def add_address(xml, address)
285
287
  return if address.nil?
288
+
286
289
  xml.tag! 'CORPTRUSTCENTER_DATA' do
287
290
  xml.tag! 'ADDRESS' do
288
291
  xml.tag! 'Address1', address[:address1]
@@ -128,6 +128,7 @@ module ActiveMerchant #:nodoc:
128
128
  def add_address(post, _creditcard, options)
129
129
  address = options[:billing_address] || options[:address]
130
130
  return unless address
131
+
131
132
  post[:address1] = address[:address1]
132
133
  post[:address2] = address[:address2]
133
134
  post[:city] = address[:city]
@@ -379,6 +379,7 @@ module ActiveMerchant #:nodoc:
379
379
 
380
380
  def add_shopper(xml, options)
381
381
  return unless options[:execute_threed] || options[:email] || options[:customer]
382
+
382
383
  xml.tag! 'shopper' do
383
384
  xml.tag! 'shopperEmailAddress', options[:email] if options[:email]
384
385
  add_authenticated_shopper_id(xml, options)
@@ -545,6 +546,7 @@ module ActiveMerchant #:nodoc:
545
546
 
546
547
  def message_from(success, raw, success_criteria)
547
548
  return 'SUCCESS' if success
549
+
548
550
  raw[:iso8583_return_code_description] || raw[:error] || required_status_message(raw, success_criteria)
549
551
  end
550
552
 
@@ -633,6 +635,7 @@ module ActiveMerchant #:nodoc:
633
635
 
634
636
  def credit_fund_transfer_attribute(options)
635
637
  return unless options[:credit]
638
+
636
639
  {'action' => 'REFUND'}
637
640
  end
638
641
 
@@ -644,6 +647,7 @@ module ActiveMerchant #:nodoc:
644
647
  def currency_exponent(currency)
645
648
  return 0 if non_fractional_currency?(currency)
646
649
  return 3 if three_decimal_currency?(currency)
650
+
647
651
  return 2
648
652
  end
649
653
 
@@ -205,7 +205,6 @@ module ActiveMerchant #:nodoc:
205
205
  def handle_response(response)
206
206
  response.body
207
207
  end
208
-
209
208
  end
210
209
  end
211
210
  end
@@ -91,7 +91,7 @@ module ActiveMerchant #:nodoc:
91
91
  end
92
92
 
93
93
  def add_customer_data(post, options)
94
- if(billing_address = (options[:billing_address] || options[:address]))
94
+ if (billing_address = (options[:billing_address] || options[:address]))
95
95
  post[:ci_companyname] = billing_address[:company]
96
96
  post[:ci_billaddr1] = billing_address[:address1]
97
97
  post[:ci_billaddr2] = billing_address[:address2]
@@ -105,7 +105,7 @@ module ActiveMerchant #:nodoc:
105
105
  post[:ci_ipaddress] = billing_address[:ip]
106
106
  end
107
107
 
108
- if(shipping_address = options[:shipping_address])
108
+ if (shipping_address = options[:shipping_address])
109
109
  post[:ci_shipaddr1] = shipping_address[:address1]
110
110
  post[:ci_shipaddr2] = shipping_address[:address2]
111
111
  post[:ci_shipcity] = shipping_address[:city]
@@ -60,7 +60,7 @@ module ActiveMerchant #:nodoc:
60
60
  self << response
61
61
 
62
62
  unless ignore_result
63
- if(@use_first_response && response.success?)
63
+ if @use_first_response && response.success?
64
64
  @primary_response ||= response
65
65
  else
66
66
  @primary_response = response
@@ -62,6 +62,7 @@ module ActiveMerchant
62
62
 
63
63
  def wiredump_device=(device)
64
64
  raise ArgumentError, "can't wiredump to frozen #{device.class}" if device&.frozen?
65
+
65
66
  @wiredump_device = device
66
67
  end
67
68
 
@@ -86,6 +87,7 @@ module ActiveMerchant
86
87
  case method
87
88
  when :get
88
89
  raise ArgumentError, 'GET requests do not support a request body' if body
90
+
89
91
  http.get(endpoint.request_uri, headers)
90
92
  when :post
91
93
  debug body
@@ -330,6 +330,7 @@ module ActiveMerchant #:nodoc:
330
330
  country = COUNTRIES.detect { |c| c[:name].casecmp(name).zero? }
331
331
  end
332
332
  raise InvalidCountryCodeError, "No country could be found for the country #{name}" if country.nil?
333
+
333
334
  Country.new(country.dup)
334
335
  end
335
336
  end
@@ -4,6 +4,7 @@ module NetHttpSslConnection
4
4
  refine Net::HTTP do
5
5
  def ssl_connection
6
6
  return {} unless use_ssl? && @socket.present?
7
+
7
8
  { version: @socket.io.ssl_version, cipher: @socket.io.cipher[0] }
8
9
  end
9
10
  end
@@ -7,6 +7,7 @@ module ActiveMerchant
7
7
 
8
8
  def []=(key, value)
9
9
  return if value.blank? && !required?(key)
10
+
10
11
  super
11
12
  end
12
13
 
@@ -1,3 +1,3 @@
1
1
  module ActiveMerchant
2
- VERSION = '1.103.0'
2
+ VERSION = '1.104.0'
3
3
  end
@@ -2,7 +2,6 @@ require 'active_merchant'
2
2
  require 'support/gateway_support'
3
3
 
4
4
  class SSLVerify
5
-
6
5
  def initialize
7
6
  @gateways = GatewaySupport.new.gateways
8
7
  end
@@ -86,5 +85,4 @@ class SSLVerify
86
85
  rescue Net::HTTPBadResponse, Errno::ETIMEDOUT, EOFError, SocketError, Errno::ECONNREFUSED, Timeout::Error => ex
87
86
  return :error, ex.inspect
88
87
  end
89
-
90
88
  end
@@ -83,5 +83,4 @@ class SSLVersion
83
83
  rescue StandardError => ex
84
84
  return :error, ex.inspect
85
85
  end
86
-
87
86
  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.103.0
4
+ version: 1.104.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: 2019-12-02 00:00:00.000000000 Z
11
+ date: 2020-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport