activemerchant 1.123.0 → 1.126.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.
Files changed (63) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +206 -0
  3. data/lib/active_merchant/billing/check.rb +5 -8
  4. data/lib/active_merchant/billing/credit_card.rb +10 -0
  5. data/lib/active_merchant/billing/credit_card_methods.rb +18 -3
  6. data/lib/active_merchant/billing/gateway.rb +3 -2
  7. data/lib/active_merchant/billing/gateways/adyen.rb +66 -11
  8. data/lib/active_merchant/billing/gateways/airwallex.rb +341 -0
  9. data/lib/active_merchant/billing/gateways/barclaycard_smartpay.rb +2 -1
  10. data/lib/active_merchant/billing/gateways/blue_pay.rb +1 -1
  11. data/lib/active_merchant/billing/gateways/blue_snap.rb +31 -21
  12. data/lib/active_merchant/billing/gateways/braintree/braintree_common.rb +6 -1
  13. data/lib/active_merchant/billing/gateways/braintree/token_nonce.rb +113 -0
  14. data/lib/active_merchant/billing/gateways/braintree_blue.rb +87 -15
  15. data/lib/active_merchant/billing/gateways/card_connect.rb +1 -1
  16. data/lib/active_merchant/billing/gateways/card_stream.rb +17 -13
  17. data/lib/active_merchant/billing/gateways/cashnet.rb +15 -5
  18. data/lib/active_merchant/billing/gateways/checkout_v2.rb +34 -5
  19. data/lib/active_merchant/billing/gateways/credorax.rb +10 -0
  20. data/lib/active_merchant/billing/gateways/cyber_source.rb +24 -36
  21. data/lib/active_merchant/billing/gateways/d_local.rb +61 -6
  22. data/lib/active_merchant/billing/gateways/decidir.rb +17 -1
  23. data/lib/active_merchant/billing/gateways/decidir_plus.rb +344 -0
  24. data/lib/active_merchant/billing/gateways/ebanx.rb +19 -3
  25. data/lib/active_merchant/billing/gateways/elavon.rb +6 -3
  26. data/lib/active_merchant/billing/gateways/element.rb +20 -2
  27. data/lib/active_merchant/billing/gateways/global_collect.rb +137 -32
  28. data/lib/active_merchant/billing/gateways/ipg.rb +415 -0
  29. data/lib/active_merchant/billing/gateways/kushki.rb +7 -0
  30. data/lib/active_merchant/billing/gateways/litle.rb +93 -1
  31. data/lib/active_merchant/billing/gateways/mercado_pago.rb +3 -1
  32. data/lib/active_merchant/billing/gateways/mit.rb +260 -0
  33. data/lib/active_merchant/billing/gateways/moka.rb +24 -11
  34. data/lib/active_merchant/billing/gateways/moneris.rb +35 -8
  35. data/lib/active_merchant/billing/gateways/mundipagg.rb +8 -6
  36. data/lib/active_merchant/billing/gateways/nmi.rb +27 -8
  37. data/lib/active_merchant/billing/gateways/orbital.rb +357 -319
  38. data/lib/active_merchant/billing/gateways/pay_arc.rb +9 -7
  39. data/lib/active_merchant/billing/gateways/pay_conex.rb +3 -1
  40. data/lib/active_merchant/billing/gateways/pay_trace.rb +1 -1
  41. data/lib/active_merchant/billing/gateways/payflow.rb +76 -6
  42. data/lib/active_merchant/billing/gateways/paymentez.rb +35 -9
  43. data/lib/active_merchant/billing/gateways/paysafe.rb +155 -34
  44. data/lib/active_merchant/billing/gateways/payu_latam.rb +31 -16
  45. data/lib/active_merchant/billing/gateways/payway_dot_com.rb +3 -3
  46. data/lib/active_merchant/billing/gateways/pin.rb +31 -4
  47. data/lib/active_merchant/billing/gateways/priority.rb +369 -0
  48. data/lib/active_merchant/billing/gateways/rapyd.rb +258 -0
  49. data/lib/active_merchant/billing/gateways/realex.rb +18 -0
  50. data/lib/active_merchant/billing/gateways/safe_charge.rb +7 -6
  51. data/lib/active_merchant/billing/gateways/simetrik.rb +362 -0
  52. data/lib/active_merchant/billing/gateways/stripe.rb +30 -8
  53. data/lib/active_merchant/billing/gateways/stripe_payment_intents.rb +175 -72
  54. data/lib/active_merchant/billing/gateways/trans_first_transaction_express.rb +2 -1
  55. data/lib/active_merchant/billing/gateways/trust_commerce.rb +2 -1
  56. data/lib/active_merchant/billing/gateways/usa_epay_transaction.rb +20 -6
  57. data/lib/active_merchant/billing/gateways/visanet_peru.rb +6 -2
  58. data/lib/active_merchant/billing/gateways/wompi.rb +193 -0
  59. data/lib/active_merchant/billing/gateways/worldpay.rb +196 -64
  60. data/lib/active_merchant/billing/network_tokenization_credit_card.rb +1 -1
  61. data/lib/active_merchant/billing/response.rb +4 -0
  62. data/lib/active_merchant/version.rb +1 -1
  63. metadata +11 -2
@@ -5,7 +5,7 @@ module ActiveMerchant #:nodoc:
5
5
 
6
6
  DUP_WINDOW_DEPRECATION_MESSAGE = 'The class-level duplicate_window variable is deprecated. Please use the :dup_seconds transaction option instead.'
7
7
 
8
- self.test_url = self.live_url = 'https://secure.nmi.com/api/transact.php'
8
+ self.test_url = self.live_url = 'https://secure.networkmerchants.com/api/transact.php'
9
9
  self.default_currency = 'USD'
10
10
  self.money_format = :dollars
11
11
  self.supported_countries = ['US']
@@ -23,7 +23,11 @@ module ActiveMerchant #:nodoc:
23
23
  end
24
24
 
25
25
  def initialize(options = {})
26
- requires!(options, :login, :password)
26
+ if options.has_key?(:security_key)
27
+ requires!(options, :security_key)
28
+ else
29
+ requires!(options, :login, :password)
30
+ end
27
31
  super
28
32
  end
29
33
 
@@ -51,7 +55,6 @@ module ActiveMerchant #:nodoc:
51
55
  add_merchant_defined_fields(post, options)
52
56
  add_level3_fields(post, options)
53
57
  add_three_d_secure(post, options)
54
-
55
58
  commit('auth', post)
56
59
  end
57
60
 
@@ -126,6 +129,7 @@ module ActiveMerchant #:nodoc:
126
129
  def scrub(transcript)
127
130
  transcript.
128
131
  gsub(%r((password=)[^&\n]*), '\1[FILTERED]').
132
+ gsub(%r((security_key=)[^&\n]*), '\1[FILTERED]').
129
133
  gsub(%r((ccnumber=)\d+), '\1[FILTERED]').
130
134
  gsub(%r((cvv=)\d+), '\1[FILTERED]').
131
135
  gsub(%r((checkaba=)\d+), '\1[FILTERED]').
@@ -206,7 +210,8 @@ module ActiveMerchant #:nodoc:
206
210
  post[:stored_credential_indicator] = 'stored'
207
211
  else
208
212
  post[:stored_credential_indicator] = 'used'
209
- post[:initial_transaction_id] = stored_credential[:network_transaction_id]
213
+ # should only send :initial_transaction_id if it is a MIT
214
+ post[:initial_transaction_id] = stored_credential[:network_transaction_id] if post[:initiated_by] == 'merchant'
210
215
  end
211
216
  end
212
217
 
@@ -236,6 +241,19 @@ module ActiveMerchant #:nodoc:
236
241
  post[:shipping_zip] = shipping_address[:zip]
237
242
  post[:shipping_phone] = shipping_address[:phone]
238
243
  end
244
+
245
+ if (descriptor = options[:descriptors])
246
+ post[:descriptor] = descriptor[:descriptor]
247
+ post[:descriptor_phone] = descriptor[:descriptor_phone]
248
+ post[:descriptor_address] = descriptor[:descriptor_address]
249
+ post[:descriptor_city] = descriptor[:descriptor_city]
250
+ post[:descriptor_state] = descriptor[:descriptor_state]
251
+ post[:descriptor_postal] = descriptor[:descriptor_postal]
252
+ post[:descriptor_country] = descriptor[:descriptor_country]
253
+ post[:descriptor_mcc] = descriptor[:descriptor_mcc]
254
+ post[:descriptor_merchant_id] = descriptor[:descriptor_merchant_id]
255
+ post[:descriptor_url] = descriptor[:descriptor_url]
256
+ end
239
257
  end
240
258
 
241
259
  def add_vendor_data(post, options)
@@ -283,9 +301,9 @@ module ActiveMerchant #:nodoc:
283
301
 
284
302
  def commit(action, params)
285
303
  params[action == 'add_customer' ? :customer_vault : :type] = action
286
- params[:username] = @options[:login]
287
- params[:password] = @options[:password]
288
-
304
+ params[:username] = @options[:login] unless @options[:login].nil?
305
+ params[:password] = @options[:password] unless @options[:password].nil?
306
+ params[:security_key] = @options[:security_key] unless @options[:security_key].nil?
289
307
  raw_response = ssl_post(url, post_data(action, params), headers)
290
308
  response = parse(raw_response)
291
309
  succeeded = success_from(response)
@@ -311,7 +329,8 @@ module ActiveMerchant #:nodoc:
311
329
  end
312
330
 
313
331
  def headers
314
- { 'Content-Type' => 'application/x-www-form-urlencoded;charset=UTF-8' }
332
+ headers = { 'Content-Type' => 'application/x-www-form-urlencoded;charset=UTF-8' }
333
+ headers
315
334
  end
316
335
 
317
336
  def post_data(action, params)