activemerchant 1.125.0 → 1.126.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (39) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +75 -0
  3. data/lib/active_merchant/billing/credit_card_methods.rb +12 -0
  4. data/lib/active_merchant/billing/gateway.rb +2 -1
  5. data/lib/active_merchant/billing/gateways/adyen.rb +7 -4
  6. data/lib/active_merchant/billing/gateways/airwallex.rb +341 -0
  7. data/lib/active_merchant/billing/gateways/barclaycard_smartpay.rb +2 -1
  8. data/lib/active_merchant/billing/gateways/blue_pay.rb +1 -1
  9. data/lib/active_merchant/billing/gateways/blue_snap.rb +31 -21
  10. data/lib/active_merchant/billing/gateways/braintree/braintree_common.rb +6 -1
  11. data/lib/active_merchant/billing/gateways/braintree/token_nonce.rb +113 -0
  12. data/lib/active_merchant/billing/gateways/braintree_blue.rb +87 -15
  13. data/lib/active_merchant/billing/gateways/card_connect.rb +1 -1
  14. data/lib/active_merchant/billing/gateways/checkout_v2.rb +1 -1
  15. data/lib/active_merchant/billing/gateways/credorax.rb +10 -0
  16. data/lib/active_merchant/billing/gateways/cyber_source.rb +13 -33
  17. data/lib/active_merchant/billing/gateways/d_local.rb +49 -0
  18. data/lib/active_merchant/billing/gateways/decidir.rb +17 -1
  19. data/lib/active_merchant/billing/gateways/decidir_plus.rb +185 -14
  20. data/lib/active_merchant/billing/gateways/ebanx.rb +3 -2
  21. data/lib/active_merchant/billing/gateways/global_collect.rb +26 -16
  22. data/lib/active_merchant/billing/gateways/ipg.rb +1 -2
  23. data/lib/active_merchant/billing/gateways/litle.rb +93 -1
  24. data/lib/active_merchant/billing/gateways/moneris.rb +35 -8
  25. data/lib/active_merchant/billing/gateways/nmi.rb +12 -7
  26. data/lib/active_merchant/billing/gateways/orbital.rb +349 -327
  27. data/lib/active_merchant/billing/gateways/payflow.rb +62 -0
  28. data/lib/active_merchant/billing/gateways/paymentez.rb +26 -7
  29. data/lib/active_merchant/billing/gateways/paysafe.rb +15 -15
  30. data/lib/active_merchant/billing/gateways/payu_latam.rb +25 -15
  31. data/lib/active_merchant/billing/gateways/priority.rb +158 -136
  32. data/lib/active_merchant/billing/gateways/rapyd.rb +258 -0
  33. data/lib/active_merchant/billing/gateways/safe_charge.rb +1 -4
  34. data/lib/active_merchant/billing/gateways/simetrik.rb +362 -0
  35. data/lib/active_merchant/billing/gateways/stripe.rb +4 -2
  36. data/lib/active_merchant/billing/gateways/stripe_payment_intents.rb +93 -48
  37. data/lib/active_merchant/billing/gateways/visanet_peru.rb +6 -2
  38. data/lib/active_merchant/version.rb +1 -1
  39. metadata +6 -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]').
@@ -297,9 +301,9 @@ module ActiveMerchant #:nodoc:
297
301
 
298
302
  def commit(action, params)
299
303
  params[action == 'add_customer' ? :customer_vault : :type] = action
300
- params[:username] = @options[:login]
301
- params[:password] = @options[:password]
302
-
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?
303
307
  raw_response = ssl_post(url, post_data(action, params), headers)
304
308
  response = parse(raw_response)
305
309
  succeeded = success_from(response)
@@ -325,7 +329,8 @@ module ActiveMerchant #:nodoc:
325
329
  end
326
330
 
327
331
  def headers
328
- { 'Content-Type' => 'application/x-www-form-urlencoded;charset=UTF-8' }
332
+ headers = { 'Content-Type' => 'application/x-www-form-urlencoded;charset=UTF-8' }
333
+ headers
329
334
  end
330
335
 
331
336
  def post_data(action, params)