activemerchant 1.105.0 → 1.107.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (173) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +99 -1
  3. data/README.md +2 -2
  4. data/lib/active_merchant/billing/credit_card_methods.rb +12 -3
  5. data/lib/active_merchant/billing/gateway.rb +22 -22
  6. data/lib/active_merchant/billing/gateways/adyen.rb +18 -7
  7. data/lib/active_merchant/billing/gateways/allied_wallet.rb +2 -2
  8. data/lib/active_merchant/billing/gateways/authorize_net.rb +19 -19
  9. data/lib/active_merchant/billing/gateways/authorize_net_arb.rb +11 -11
  10. data/lib/active_merchant/billing/gateways/authorize_net_cim.rb +35 -35
  11. data/lib/active_merchant/billing/gateways/axcessms.rb +3 -3
  12. data/lib/active_merchant/billing/gateways/bambora_apac.rb +1 -1
  13. data/lib/active_merchant/billing/gateways/bank_frick.rb +1 -1
  14. data/lib/active_merchant/billing/gateways/banwire.rb +2 -2
  15. data/lib/active_merchant/billing/gateways/barclaycard_smartpay.rb +5 -5
  16. data/lib/active_merchant/billing/gateways/be2bill.rb +4 -4
  17. data/lib/active_merchant/billing/gateways/beanstream.rb +1 -1
  18. data/lib/active_merchant/billing/gateways/beanstream/beanstream_core.rb +27 -27
  19. data/lib/active_merchant/billing/gateways/beanstream_interac.rb +1 -1
  20. data/lib/active_merchant/billing/gateways/blue_pay.rb +8 -8
  21. data/lib/active_merchant/billing/gateways/blue_snap.rb +5 -2
  22. data/lib/active_merchant/billing/gateways/bogus.rb +20 -20
  23. data/lib/active_merchant/billing/gateways/borgun.rb +17 -6
  24. data/lib/active_merchant/billing/gateways/bpoint.rb +1 -1
  25. data/lib/active_merchant/billing/gateways/braintree_blue.rb +81 -77
  26. data/lib/active_merchant/billing/gateways/bridge_pay.rb +3 -3
  27. data/lib/active_merchant/billing/gateways/card_connect.rb +1 -1
  28. data/lib/active_merchant/billing/gateways/card_stream.rb +19 -19
  29. data/lib/active_merchant/billing/gateways/cc5.rb +7 -7
  30. data/lib/active_merchant/billing/gateways/cecabank.rb +3 -3
  31. data/lib/active_merchant/billing/gateways/cenpos.rb +3 -3
  32. data/lib/active_merchant/billing/gateways/checkout_v2.rb +20 -9
  33. data/lib/active_merchant/billing/gateways/clearhaus.rb +1 -1
  34. data/lib/active_merchant/billing/gateways/commercegate.rb +2 -2
  35. data/lib/active_merchant/billing/gateways/conekta.rb +1 -1
  36. data/lib/active_merchant/billing/gateways/creditcall.rb +4 -4
  37. data/lib/active_merchant/billing/gateways/ct_payment.rb +1 -1
  38. data/lib/active_merchant/billing/gateways/culqi.rb +2 -2
  39. data/lib/active_merchant/billing/gateways/cyber_source.rb +154 -91
  40. data/lib/active_merchant/billing/gateways/d_local.rb +4 -2
  41. data/lib/active_merchant/billing/gateways/data_cash.rb +33 -33
  42. data/lib/active_merchant/billing/gateways/decidir.rb +7 -2
  43. data/lib/active_merchant/billing/gateways/ebanx.rb +14 -2
  44. data/lib/active_merchant/billing/gateways/efsnet.rb +23 -23
  45. data/lib/active_merchant/billing/gateways/elavon.rb +70 -18
  46. data/lib/active_merchant/billing/gateways/element.rb +12 -4
  47. data/lib/active_merchant/billing/gateways/epay.rb +40 -40
  48. data/lib/active_merchant/billing/gateways/evo_ca.rb +11 -11
  49. data/lib/active_merchant/billing/gateways/eway.rb +3 -3
  50. data/lib/active_merchant/billing/gateways/eway_managed.rb +40 -40
  51. data/lib/active_merchant/billing/gateways/eway_rapid.rb +7 -7
  52. data/lib/active_merchant/billing/gateways/exact.rb +11 -11
  53. data/lib/active_merchant/billing/gateways/fat_zebra.rb +3 -2
  54. data/lib/active_merchant/billing/gateways/federated_canada.rb +5 -5
  55. data/lib/active_merchant/billing/gateways/firstdata_e4.rb +21 -21
  56. data/lib/active_merchant/billing/gateways/firstdata_e4_v27.rb +20 -20
  57. data/lib/active_merchant/billing/gateways/flo2cash.rb +4 -4
  58. data/lib/active_merchant/billing/gateways/forte.rb +8 -7
  59. data/lib/active_merchant/billing/gateways/garanti.rb +8 -8
  60. data/lib/active_merchant/billing/gateways/global_collect.rb +30 -24
  61. data/lib/active_merchant/billing/gateways/hdfc.rb +3 -3
  62. data/lib/active_merchant/billing/gateways/hps.rb +5 -3
  63. data/lib/active_merchant/billing/gateways/iats_payments.rb +32 -15
  64. data/lib/active_merchant/billing/gateways/inspire.rb +7 -7
  65. data/lib/active_merchant/billing/gateways/instapay.rb +3 -3
  66. data/lib/active_merchant/billing/gateways/ipp.rb +1 -1
  67. data/lib/active_merchant/billing/gateways/iridium.rb +12 -10
  68. data/lib/active_merchant/billing/gateways/itransact.rb +7 -7
  69. data/lib/active_merchant/billing/gateways/iveri.rb +6 -3
  70. data/lib/active_merchant/billing/gateways/ixopay.rb +22 -0
  71. data/lib/active_merchant/billing/gateways/jetpay.rb +4 -4
  72. data/lib/active_merchant/billing/gateways/jetpay_v2.rb +5 -5
  73. data/lib/active_merchant/billing/gateways/kushki.rb +34 -5
  74. data/lib/active_merchant/billing/gateways/latitude19.rb +2 -2
  75. data/lib/active_merchant/billing/gateways/linkpoint.rb +62 -62
  76. data/lib/active_merchant/billing/gateways/litle.rb +8 -3
  77. data/lib/active_merchant/billing/gateways/mastercard.rb +2 -2
  78. data/lib/active_merchant/billing/gateways/mercado_pago.rb +1 -0
  79. data/lib/active_merchant/billing/gateways/merchant_e_solutions.rb +5 -5
  80. data/lib/active_merchant/billing/gateways/merchant_one.rb +2 -2
  81. data/lib/active_merchant/billing/gateways/merchant_partners.rb +4 -4
  82. data/lib/active_merchant/billing/gateways/merchant_ware.rb +12 -12
  83. data/lib/active_merchant/billing/gateways/merchant_ware_version_four.rb +11 -11
  84. data/lib/active_merchant/billing/gateways/merchant_warrior.rb +12 -2
  85. data/lib/active_merchant/billing/gateways/mercury.rb +9 -9
  86. data/lib/active_merchant/billing/gateways/metrics_global.rb +15 -15
  87. data/lib/active_merchant/billing/gateways/migs.rb +13 -13
  88. data/lib/active_merchant/billing/gateways/modern_payments_cim.rb +7 -7
  89. data/lib/active_merchant/billing/gateways/monei.rb +19 -19
  90. data/lib/active_merchant/billing/gateways/moneris.rb +10 -10
  91. data/lib/active_merchant/billing/gateways/money_movers.rb +5 -5
  92. data/lib/active_merchant/billing/gateways/mundipagg.rb +1 -1
  93. data/lib/active_merchant/billing/gateways/nab_transact.rb +15 -15
  94. data/lib/active_merchant/billing/gateways/ncr_secure_pay.rb +1 -1
  95. data/lib/active_merchant/billing/gateways/net_registry.rb +6 -6
  96. data/lib/active_merchant/billing/gateways/netaxept.rb +4 -4
  97. data/lib/active_merchant/billing/gateways/netbanx.rb +14 -14
  98. data/lib/active_merchant/billing/gateways/netbilling.rb +12 -12
  99. data/lib/active_merchant/billing/gateways/netpay.rb +2 -2
  100. data/lib/active_merchant/billing/gateways/network_merchants.rb +5 -5
  101. data/lib/active_merchant/billing/gateways/ogone.rb +7 -7
  102. data/lib/active_merchant/billing/gateways/openpay.rb +2 -2
  103. data/lib/active_merchant/billing/gateways/opp.rb +13 -7
  104. data/lib/active_merchant/billing/gateways/optimal_payment.rb +13 -9
  105. data/lib/active_merchant/billing/gateways/orbital.rb +54 -12
  106. data/lib/active_merchant/billing/gateways/pac_net_raven.rb +7 -7
  107. data/lib/active_merchant/billing/gateways/pay_conex.rb +2 -2
  108. data/lib/active_merchant/billing/gateways/pay_gate_xml.rb +16 -16
  109. data/lib/active_merchant/billing/gateways/pay_junction.rb +16 -16
  110. data/lib/active_merchant/billing/gateways/pay_junction_v2.rb +18 -2
  111. data/lib/active_merchant/billing/gateways/pay_secure.rb +6 -6
  112. data/lib/active_merchant/billing/gateways/paybox_direct.rb +36 -36
  113. data/lib/active_merchant/billing/gateways/payflow.rb +7 -7
  114. data/lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb +12 -12
  115. data/lib/active_merchant/billing/gateways/payflow_express.rb +4 -4
  116. data/lib/active_merchant/billing/gateways/payment_express.rb +9 -9
  117. data/lib/active_merchant/billing/gateways/paymill.rb +3 -3
  118. data/lib/active_merchant/billing/gateways/paypal.rb +1 -1
  119. data/lib/active_merchant/billing/gateways/paypal/paypal_common_api.rb +5 -5
  120. data/lib/active_merchant/billing/gateways/paypal_express_common.rb +1 -1
  121. data/lib/active_merchant/billing/gateways/payscout.rb +5 -5
  122. data/lib/active_merchant/billing/gateways/paystation.rb +2 -2
  123. data/lib/active_merchant/billing/gateways/payu_latam.rb +3 -3
  124. data/lib/active_merchant/billing/gateways/payway.rb +12 -12
  125. data/lib/active_merchant/billing/gateways/pin.rb +16 -16
  126. data/lib/active_merchant/billing/gateways/plugnpay.rb +10 -10
  127. data/lib/active_merchant/billing/gateways/psigate.rb +26 -26
  128. data/lib/active_merchant/billing/gateways/psl_card.rb +4 -4
  129. data/lib/active_merchant/billing/gateways/qbms.rb +23 -23
  130. data/lib/active_merchant/billing/gateways/quantum.rb +4 -4
  131. data/lib/active_merchant/billing/gateways/quickpay/quickpay_common.rb +95 -95
  132. data/lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb +9 -9
  133. data/lib/active_merchant/billing/gateways/quickpay/quickpay_v4to7.rb +2 -2
  134. data/lib/active_merchant/billing/gateways/qvalent.rb +1 -1
  135. data/lib/active_merchant/billing/gateways/realex.rb +17 -10
  136. data/lib/active_merchant/billing/gateways/redsys.rb +24 -16
  137. data/lib/active_merchant/billing/gateways/safe_charge.rb +1 -1
  138. data/lib/active_merchant/billing/gateways/sage.rb +10 -10
  139. data/lib/active_merchant/billing/gateways/sage_pay.rb +35 -35
  140. data/lib/active_merchant/billing/gateways/sallie_mae.rb +2 -2
  141. data/lib/active_merchant/billing/gateways/secure_net.rb +9 -9
  142. data/lib/active_merchant/billing/gateways/secure_pay.rb +13 -13
  143. data/lib/active_merchant/billing/gateways/secure_pay_au.rb +16 -16
  144. data/lib/active_merchant/billing/gateways/secure_pay_tech.rb +2 -2
  145. data/lib/active_merchant/billing/gateways/skip_jack.rb +8 -8
  146. data/lib/active_merchant/billing/gateways/smart_ps.rb +16 -16
  147. data/lib/active_merchant/billing/gateways/so_easy_pay.rb +6 -6
  148. data/lib/active_merchant/billing/gateways/spreedly_core.rb +4 -4
  149. data/lib/active_merchant/billing/gateways/stripe.rb +15 -10
  150. data/lib/active_merchant/billing/gateways/stripe_payment_intents.rb +50 -9
  151. data/lib/active_merchant/billing/gateways/swipe_checkout.rb +2 -2
  152. data/lib/active_merchant/billing/gateways/trans_first.rb +4 -4
  153. data/lib/active_merchant/billing/gateways/trust_commerce.rb +19 -19
  154. data/lib/active_merchant/billing/gateways/usa_epay_advanced.rb +110 -110
  155. data/lib/active_merchant/billing/gateways/usa_epay_transaction.rb +29 -29
  156. data/lib/active_merchant/billing/gateways/verifi.rb +10 -10
  157. data/lib/active_merchant/billing/gateways/viaklix.rb +6 -6
  158. data/lib/active_merchant/billing/gateways/visanet_peru.rb +6 -6
  159. data/lib/active_merchant/billing/gateways/webpay.rb +2 -2
  160. data/lib/active_merchant/billing/gateways/wirecard.rb +6 -6
  161. data/lib/active_merchant/billing/gateways/worldpay.rb +22 -20
  162. data/lib/active_merchant/billing/gateways/worldpay_online_payments.rb +32 -32
  163. data/lib/active_merchant/billing/gateways/worldpay_us.rb +2 -2
  164. data/lib/active_merchant/billing/network_tokenization_credit_card.rb +1 -1
  165. data/lib/active_merchant/connection.rb +1 -1
  166. data/lib/active_merchant/network_connection_retries.rb +3 -3
  167. data/lib/active_merchant/post_data.rb +1 -1
  168. data/lib/active_merchant/version.rb +1 -1
  169. data/lib/certs/cacert.pem +75 -0
  170. data/lib/support/ssl_verify.rb +2 -2
  171. data/lib/support/ssl_version.rb +2 -2
  172. metadata +4 -4
  173. data/lib/active_merchant/billing/gateways/moneris_us.rb +0 -352
@@ -196,8 +196,8 @@ module ActiveMerchant #:nodoc:
196
196
  succeeded,
197
197
  message_from(succeeded, raw),
198
198
  raw,
199
- :authorization => authorization_from(raw),
200
- :test => test?
199
+ authorization: authorization_from(raw),
200
+ test: test?
201
201
  )
202
202
  end
203
203
 
@@ -17,7 +17,7 @@ module ActiveMerchant #:nodoc:
17
17
  attr_accessor :payment_cryptogram, :eci, :transaction_id
18
18
  attr_writer :source
19
19
 
20
- SOURCES = %i(apple_pay android_pay google_pay)
20
+ SOURCES = %i(apple_pay android_pay google_pay network_token)
21
21
 
22
22
  def source
23
23
  if defined?(@source) && SOURCES.include?(@source)
@@ -72,7 +72,7 @@ module ActiveMerchant
72
72
  headers = headers.dup
73
73
  headers['connection'] ||= 'close'
74
74
 
75
- retry_exceptions(:max_retries => max_retries, :logger => logger, :tag => tag) do
75
+ retry_exceptions(max_retries: max_retries, logger: logger, tag: tag) do
76
76
  begin
77
77
  info "connection_http_method=#{method.to_s.upcase} connection_uri=#{endpoint}", tag
78
78
 
@@ -52,17 +52,17 @@ module ActiveMerchant
52
52
  begin
53
53
  request_start = Process.clock_gettime(Process::CLOCK_MONOTONIC)
54
54
  result = yield
55
- log_with_retry_details(options[:logger], initial_retries-retries + 1, Process.clock_gettime(Process::CLOCK_MONOTONIC) - request_start, 'success', options[:tag])
55
+ log_with_retry_details(options[:logger], initial_retries - retries + 1, Process.clock_gettime(Process::CLOCK_MONOTONIC) - request_start, 'success', options[:tag])
56
56
  result
57
57
  rescue ActiveMerchant::RetriableConnectionError => e
58
58
  retries -= 1
59
59
 
60
- log_with_retry_details(options[:logger], initial_retries-retries, Process.clock_gettime(Process::CLOCK_MONOTONIC) - request_start, e.message, options[:tag])
60
+ log_with_retry_details(options[:logger], initial_retries - retries, Process.clock_gettime(Process::CLOCK_MONOTONIC) - request_start, e.message, options[:tag])
61
61
  retry unless retries.zero?
62
62
  raise ActiveMerchant::ConnectionError.new(e.message, e)
63
63
  rescue ActiveMerchant::ConnectionError, ActiveMerchant::InvalidResponseError => e
64
64
  retries -= 1
65
- log_with_retry_details(options[:logger], initial_retries-retries, Process.clock_gettime(Process::CLOCK_MONOTONIC) - request_start, e.message, options[:tag])
65
+ log_with_retry_details(options[:logger], initial_retries - retries, Process.clock_gettime(Process::CLOCK_MONOTONIC) - request_start, e.message, options[:tag])
66
66
  retry if (options[:retry_safe] || retry_safe) && !retries.zero?
67
67
  raise
68
68
  end
@@ -2,7 +2,7 @@ require 'cgi'
2
2
 
3
3
  module ActiveMerchant
4
4
  class PostData < Hash
5
- class_attribute :required_fields, :instance_writer => false
5
+ class_attribute :required_fields, instance_writer: false
6
6
  self.required_fields = []
7
7
 
8
8
  def []=(key, value)
@@ -1,3 +1,3 @@
1
1
  module ActiveMerchant
2
- VERSION = '1.105.0'
2
+ VERSION = '1.107.4'
3
3
  end
@@ -3986,3 +3986,78 @@ QOhTsiedSrnAdyGN/4fy3ryM7xfft0kL0fJuMAsaDk527RH89elWsn2/x20Kk4yl
3986
3986
  0MC2Hb46TpSi125sC8KKfPog88Tk5c0NqMuRkrF8hey1FGlmDoLnzc7ILaZRfyHB
3987
3987
  NVOFBkpdn627G190
3988
3988
  -----END CERTIFICATE-----
3989
+
3990
+ USERTrust RSA Certification Authority
3991
+ =====================================
3992
+ -----BEGIN CERTIFICATE-----
3993
+ MIIF3jCCA8agAwIBAgIQAf1tMPyjylGoG7xkDjUDLTANBgkqhkiG9w0BAQwFADCB
3994
+ iDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0pl
3995
+ cnNleSBDaXR5MR4wHAYDVQQKExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNV
3996
+ BAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMTAw
3997
+ MjAxMDAwMDAwWhcNMzgwMTE4MjM1OTU5WjCBiDELMAkGA1UEBhMCVVMxEzARBgNV
3998
+ BAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0plcnNleSBDaXR5MR4wHAYDVQQKExVU
3999
+ aGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNVBAMTJVVTRVJUcnVzdCBSU0EgQ2Vy
4000
+ dGlmaWNhdGlvbiBBdXRob3JpdHkwggIiMA0GCSqGSIb3DQEBAQUAA4ICDwAwggIK
4001
+ AoICAQCAE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CaXqeYalltiz8I+8jRRa8YFWSQEg9zKC7F4iRO/Fjs
4017
+ 8PRF/iKz6y+O0tlFYQXBl2+odnKPi4w2r78NBc5xjeambx9spnFixdjQg3IM8WcR
4018
+ iQycE0xyNN+81XHfqnHd4blsjDwSXWXavVcStkNr/+XeTWYRUc+ZruwXtuhxkYze
4019
+ Sf7dNXGiFSeUHM9h4ya7b6NnJSFd5t0dCy5oGzuCr+yDZ4XUmFF0sbmZgIn/f3gZ
4020
+ XHlKYC6SQK5MNyosycdiyA5d9zZbyuAlJQG03RoHnHcAP9Dc1ew91Pq7P8yF1m9/
4021
+ qS3fuQL39ZeatTXaw2ewh0qpKJ4jjv9cJ2vhsE/zB+4ALtRZh8tSQZXq9EfX7mRB
4022
+ VXyNWQKV3WKdwrnuWih0hKWbt5DHDAff9Yk2dDLWKMGwsAvgnEzDHNb842m1R0aB
4023
+ L6KCq9NjRHDEjf8tM7qtj3u1cIiuPhnPQCjY/MiQu12ZIvVS5ljFH4gxQ+6IHdfG
4024
+ jjxDah2nGN59PRbxYvnKkKj9
4025
+ -----END CERTIFICATE-----
4026
+
4027
+ Sectigo RSA Organization Validation Secure Server CA
4028
+ ====================================================
4029
+ -----BEGIN CERTIFICATE-----
4030
+ MIIGGTCCBAGgAwIBAgIQE31TnKp8MamkM3AZaIR6jTANBgkqhkiG9w0BAQwFADCB
4031
+ iDELMAkGA1UEBhMCVVMxEzARBgNVBAgTCk5ldyBKZXJzZXkxFDASBgNVBAcTC0pl
4032
+ cnNleSBDaXR5MR4wHAYDVQQKExVUaGUgVVNFUlRSVVNUIE5ldHdvcmsxLjAsBgNV
4033
+ BAMTJVVTRVJUcnVzdCBSU0EgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwHhcNMTgx
4034
+ MTAyMDAwMDAwWhcNMzAxMjMxMjM1OTU5WjCBlTELMAkGA1UEBhMCR0IxGzAZBgNV
4035
+ BAgTEkdyZWF0ZXIgTWFuY2hlc3RlcjEQMA4GA1UEBxMHU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LmNydDAlBggrBgEFBQcwAYYZ
4051
+ aHR0cDovL29jc3AudXNlcnRydXN0LmNvbTANBgkqhkiG9w0BAQwFAAOCAgEAThNA
4052
+ lsnD5m5bwOO69Bfhrgkfyb/LDCUW8nNTs3Yat6tIBtbNAHwgRUNFbBZaGxNh10m6
4053
+ pAKkrOjOzi3JKnSj3N6uq9BoNviRrzwB93fVC8+Xq+uH5xWo+jBaYXEgscBDxLmP
4054
+ bYox6xU2JPti1Qucj+lmveZhUZeTth2HvbC1bP6mESkGYTQxMD0gJ3NR0N6Fg9N3
4055
+ OSBGltqnxloWJ4Wyz04PToxcvr44APhL+XJ71PJ616IphdAEutNCLFGIUi7RPSRn
4056
+ R+xVzBv0yjTqJsHe3cQhifa6ezIejpZehEU4z4CqN2mLYBd0FUiRnG3wTqN3yhsc
4057
+ SPr5z0noX0+FCuKPkBurcEya67emP7SsXaRfz+bYipaQ908mgWB2XQ8kd5GzKjGf
4058
+ FlqyXYwcKapInI5v03hAcNt37N3j0VcFcC3mSZiIBYRiBXBWdoY5TtMibx3+bfEO
4059
+ s2LEPMvAhblhHrrhFYBZlAyuBbuMf1a+HNJav5fyakywxnB2sJCNwQs2uRHY1ihc
4060
+ 6k/+JLcYCpsM0MF8XPtpvcyiTcaQvKZN8rG61ppnW5YCUtCC+cQKXA0o4D/I+pWV
4061
+ idWkvklsQLI+qGu41SWyxP7x09fn1txDAXYw+zuLXfdKiXyaNb78yvBXAfCNP6CH
4062
+ MntHWpdLgtJmwsQt6j8k9Kf5qLnjatkYYaA7jBU=
4063
+ -----END CERTIFICATE-----
@@ -27,10 +27,10 @@ class SSLVerify
27
27
  success << g
28
28
  when :fail
29
29
  print 'F'
30
- failed << {:gateway => g, :message => message}
30
+ failed << {gateway: g, message: message}
31
31
  when :error
32
32
  print 'E'
33
- errored << {:gateway => g, :message => message}
33
+ errored << {gateway: g, message: message}
34
34
  end
35
35
  end
36
36
 
@@ -29,10 +29,10 @@ class SSLVersion
29
29
  success << g
30
30
  when :fail
31
31
  print 'F'
32
- failed << {:gateway => g, :message => message}
32
+ failed << {gateway: g, message: message}
33
33
  when :error
34
34
  print 'E'
35
- errored << {:gateway => g, :message => message}
35
+ errored << {gateway: g, message: message}
36
36
  end
37
37
  end
38
38
 
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.105.0
4
+ version: 1.107.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Luetke
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-20 00:00:00.000000000 Z
11
+ date: 2020-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -281,7 +281,6 @@ files:
281
281
  - lib/active_merchant/billing/gateways/modern_payments_cim.rb
282
282
  - lib/active_merchant/billing/gateways/monei.rb
283
283
  - lib/active_merchant/billing/gateways/moneris.rb
284
- - lib/active_merchant/billing/gateways/moneris_us.rb
285
284
  - lib/active_merchant/billing/gateways/money_movers.rb
286
285
  - lib/active_merchant/billing/gateways/mundipagg.rb
287
286
  - lib/active_merchant/billing/gateways/nab_transact.rb
@@ -413,7 +412,8 @@ files:
413
412
  homepage: http://activemerchant.org/
414
413
  licenses:
415
414
  - MIT
416
- metadata: {}
415
+ metadata:
416
+ allowed_push_host: https://rubygems.org
417
417
  post_install_message:
418
418
  rdoc_options: []
419
419
  require_paths:
@@ -1,352 +0,0 @@
1
- require 'rexml/document'
2
-
3
- module ActiveMerchant #:nodoc:
4
- module Billing #:nodoc:
5
- # To learn more about the Moneris (US) gateway, please contact
6
- # ussales@moneris.com for a copy of their integration guide. For
7
- # information on remote testing, please see "Test Environment Penny Value
8
- # Response Table", and "Test Environment eFraud (AVS and CVD) Penny
9
- # Response Values", available at Moneris' {eSelect Plus Documentation
10
- # Centre}[https://www3.moneris.com/connect/en/documents/index.html].
11
- class MonerisUsGateway < Gateway
12
- self.test_url = 'https://esplusqa.moneris.com/gateway_us/servlet/MpgRequest'
13
- self.live_url = 'https://esplus.moneris.com/gateway_us/servlet/MpgRequest'
14
-
15
- self.supported_countries = ['US']
16
- self.supported_cardtypes = [:visa, :master, :american_express, :diners_club, :discover]
17
- self.homepage_url = 'http://www.monerisusa.com/'
18
- self.display_name = 'Moneris (US)'
19
-
20
- # Initialize the Gateway
21
- #
22
- # The gateway requires that a valid login and password be passed
23
- # in the +options+ hash.
24
- #
25
- # ==== Options
26
- #
27
- # * <tt>:login</tt> -- Your Store ID
28
- # * <tt>:password</tt> -- Your API Token
29
- # * <tt>:cvv_enabled</tt> -- Specify that you would like the CVV passed to the gateway.
30
- # Only particular account types at Moneris will allow this.
31
- # Defaults to false. (optional)
32
- def initialize(options = {})
33
- requires!(options, :login, :password)
34
- @cvv_enabled = options[:cvv_enabled]
35
- @avs_enabled = options[:avs_enabled]
36
- options = { :crypt_type => 7 }.merge(options)
37
- super
38
- end
39
-
40
- def verify(creditcard_or_datakey, options = {})
41
- MultiResponse.run(:use_first_response) do |r|
42
- r.process { authorize(100, creditcard_or_datakey, options) }
43
- r.process(:ignore_result) { capture(0, r.authorization) }
44
- end
45
- end
46
-
47
- # Referred to as "PreAuth" in the Moneris integration guide, this action
48
- # verifies and locks funds on a customer's card, which then must be
49
- # captured at a later date.
50
- #
51
- # Pass in +order_id+ and optionally a +customer+ parameter.
52
- def authorize(money, creditcard_or_datakey, options = {})
53
- requires!(options, :order_id)
54
- post = {}
55
- add_payment_source(post, creditcard_or_datakey, options)
56
- post[:amount] = amount(money)
57
- post[:order_id] = options[:order_id]
58
- post[:address] = options[:billing_address] || options[:address]
59
- post[:crypt_type] = options[:crypt_type] || @options[:crypt_type]
60
- action = post[:data_key].blank? ? 'us_preauth' : 'us_res_preauth_cc'
61
- commit(action, post)
62
- end
63
-
64
- # This action verifies funding on a customer's card and readies them for
65
- # deposit in a merchant's account.
66
- #
67
- # Pass in <tt>order_id</tt> and optionally a <tt>customer</tt> parameter
68
- def purchase(money, creditcard_or_datakey, options = {})
69
- requires!(options, :order_id)
70
- post = {}
71
- add_payment_source(post, creditcard_or_datakey, options)
72
- post[:amount] = amount(money)
73
- post[:order_id] = options[:order_id]
74
- add_address(post, creditcard_or_datakey, options)
75
- post[:crypt_type] = options[:crypt_type] || @options[:crypt_type]
76
- action = if creditcard_or_datakey.is_a?(String)
77
- 'us_res_purchase_cc'
78
- elsif card_brand(creditcard_or_datakey) == 'check'
79
- 'us_ach_debit'
80
- elsif post[:data_key].blank?
81
- 'us_purchase'
82
- end
83
- commit(action, post)
84
- end
85
-
86
- # This method retrieves locked funds from a customer's account (from a
87
- # PreAuth) and prepares them for deposit in a merchant's account.
88
- #
89
- # Note: Moneris requires both the order_id and the transaction number of
90
- # the original authorization. To maintain the same interface as the other
91
- # gateways the two numbers are concatenated together with a ; separator as
92
- # the authorization number returned by authorization
93
- def capture(money, authorization, options = {})
94
- commit 'us_completion', crediting_params(authorization, :comp_amount => amount(money))
95
- end
96
-
97
- # Voiding requires the original transaction ID and order ID of some open
98
- # transaction. Closed transactions must be refunded. Note that the only
99
- # methods which may be voided are +capture+ and +purchase+.
100
- #
101
- # Concatenate your transaction number and order_id by using a semicolon
102
- # (';'). This is to keep the Moneris interface consistent with other
103
- # gateways. (See +capture+ for details.)
104
- def void(authorization, options = {})
105
- commit 'us_purchasecorrection', crediting_params(authorization)
106
- end
107
-
108
- # Performs a refund. This method requires that the original transaction
109
- # number and order number be included. Concatenate your transaction
110
- # number and order_id by using a semicolon (';'). This is to keep the
111
- # Moneris interface consistent with other gateways. (See +capture+ for
112
- # details.)
113
- def credit(money, authorization, options = {})
114
- ActiveMerchant.deprecated CREDIT_DEPRECATION_MESSAGE
115
- refund(money, authorization, options)
116
- end
117
-
118
- def refund(money, authorization, options = {})
119
- commit 'us_refund', crediting_params(authorization, :amount => amount(money))
120
- end
121
-
122
- def store(payment_source, options = {})
123
- post = {}
124
- add_payment_source(post, payment_source, options)
125
- post[:crypt_type] = options[:crypt_type] || @options[:crypt_type]
126
- card_brand(payment_source) == 'check' ? commit('us_res_add_ach', post) : commit('us_res_add_cc', post)
127
- end
128
-
129
- def unstore(data_key, options = {})
130
- post = {}
131
- post[:data_key] = data_key
132
- commit('us_res_delete', post)
133
- end
134
-
135
- def update(data_key, payment_source, options = {})
136
- post = {}
137
- add_payment_source(post, payment_source, options)
138
- post[:data_key] = data_key
139
- card_brand(payment_source) == 'check' ? commit('us_res_update_ach', post) : commit('us_res_update_cc', post)
140
- end
141
-
142
- def supports_scrubbing?
143
- true
144
- end
145
-
146
- def scrub(transcript)
147
- transcript.
148
- gsub(%r((<pan>)[^<]*(</pan>))i, '\1[FILTERED]\2').
149
- gsub(%r((<api_token>)[^<]*(</api_token>))i, '\1[FILTERED]\2').
150
- gsub(%r((<cvd_value>)[^<]*(</cvd_value>))i, '\1[FILTERED]\2')
151
- end
152
-
153
- private # :nodoc: all
154
-
155
- def expdate(creditcard)
156
- sprintf('%.4i', creditcard.year)[-2..-1] + sprintf('%.2i', creditcard.month)
157
- end
158
-
159
- def add_address(post, payment_method, options)
160
- if !payment_method.is_a?(String) && card_brand(payment_method) == 'check'
161
- post[:ach_info][:cust_first_name] = payment_method.first_name if payment_method.first_name
162
- post[:ach_info][:cust_last_name] = payment_method.last_name if payment_method.last_name
163
- if address = options[:billing_address] || options[:address]
164
- post[:ach_info][:cust_address1] = address[:address1] if address[:address1]
165
- post[:ach_info][:cust_address2] = address[:address2] if address[:address2]
166
- post[:ach_info][:city] = address[:city] if address[:city]
167
- post[:ach_info][:state] = address[:state] if address[:state]
168
- post[:ach_info][:zip] = address[:zip] if address[:zip]
169
- end
170
- else
171
- post[:address] = options[:billing_address] || options[:address]
172
- end
173
- end
174
-
175
- def add_payment_source(post, source, options)
176
- if source.is_a?(String)
177
- post[:data_key] = source
178
- post[:cust_id] = options[:customer]
179
- elsif card_brand(source) == 'check'
180
- ach_info = {}
181
- ach_info[:sec] = 'web'
182
- ach_info[:routing_num] = source.routing_number
183
- ach_info[:account_num] = source.account_number
184
- ach_info[:account_type] = source.account_type
185
- ach_info[:check_num] = source.number if source.number
186
- post[:ach_info] = ach_info
187
- else
188
- post[:pan] = source.number
189
- post[:expdate] = expdate(source)
190
- post[:cvd_value] = source.verification_value if source.verification_value?
191
- if crypt_type = options[:crypt_type] || @options[:crypt_type]
192
- post[:crypt_type] = crypt_type
193
- end
194
- post[:cust_id] = options[:customer] || source.name
195
- end
196
- end
197
-
198
- # Common params used amongst the +credit+, +void+ and +capture+ methods
199
- def crediting_params(authorization, options = {})
200
- {
201
- :txn_number => split_authorization(authorization).first,
202
- :order_id => split_authorization(authorization).last,
203
- :crypt_type => options[:crypt_type] || @options[:crypt_type]
204
- }.merge(options)
205
- end
206
-
207
- # Splits an +authorization+ param and retrieves the order id and
208
- # transaction number in that order.
209
- def split_authorization(authorization)
210
- if authorization.nil? || authorization.empty? || authorization !~ /;/
211
- raise ArgumentError, 'You must include a valid authorization code (e.g. "1234;567")'
212
- else
213
- authorization.split(';')
214
- end
215
- end
216
-
217
- def commit(action, parameters = {})
218
- data = post_data(action, parameters)
219
- url = test? ? self.test_url : self.live_url
220
- raw = ssl_post(url, data)
221
- response = parse(raw)
222
-
223
- Response.new(successful?(response), message_from(response[:message]), response,
224
- :test => test?,
225
- :avs_result => { :code => response[:avs_result_code] },
226
- :cvv_result => response[:cvd_result_code] && response[:cvd_result_code][-1, 1],
227
- :authorization => authorization_from(response)
228
- )
229
- end
230
-
231
- # Generates a Moneris authorization string of the form 'trans_id;receipt_id'.
232
- def authorization_from(response = {})
233
- "#{response[:trans_id]};#{response[:receipt_id]}" if response[:trans_id] && response[:receipt_id]
234
- end
235
-
236
- # Tests for a successful response from Moneris' servers
237
- def successful?(response)
238
- response[:response_code] &&
239
- response[:complete] &&
240
- (0..49).cover?(response[:response_code].to_i)
241
- end
242
-
243
- def parse(xml)
244
- response = { :message => 'Global Error Receipt', :complete => false }
245
- hashify_xml!(xml, response)
246
- response
247
- end
248
-
249
- def hashify_xml!(xml, response)
250
- xml = REXML::Document.new(xml)
251
- return if xml.root.nil?
252
-
253
- xml.elements.each('//receipt/*') do |node|
254
- response[node.name.underscore.to_sym] = normalize(node.text)
255
- end
256
- end
257
-
258
- def post_data(action, parameters = {})
259
- xml = REXML::Document.new
260
- root = xml.add_element('request')
261
- root.add_element('store_id').text = options[:login]
262
- root.add_element('api_token').text = options[:password]
263
- root.add_element(transaction_element(action, parameters))
264
-
265
- xml.to_s
266
- end
267
-
268
- def transaction_element(action, parameters)
269
- transaction = REXML::Element.new(action)
270
-
271
- # Must add the elements in the correct order
272
- actions[action].each do |key|
273
- case key
274
- when :avs_info
275
- transaction.add_element(avs_element(parameters[:address])) if @avs_enabled && parameters[:address]
276
- when :cvd_info
277
- transaction.add_element(cvd_element(parameters[:cvd_value])) if @cvv_enabled
278
- when :ach_info
279
- transaction.add_element(ach_element(parameters[:ach_info]))
280
- else
281
- transaction.add_element(key.to_s).text = parameters[key] unless parameters[key].blank?
282
- end
283
- end
284
-
285
- transaction
286
- end
287
-
288
- def avs_element(address)
289
- full_address = "#{address[:address1]} #{address[:address2]}"
290
- tokens = full_address.split(/\s+/)
291
-
292
- element = REXML::Element.new('avs_info')
293
- element.add_element('avs_street_number').text = tokens.select { |x| x =~ /\d/ }.join(' ')
294
- element.add_element('avs_street_name').text = tokens.reject { |x| x =~ /\d/ }.join(' ')
295
- element.add_element('avs_zipcode').text = address[:zip]
296
- element
297
- end
298
-
299
- def cvd_element(cvd_value)
300
- element = REXML::Element.new('cvd_info')
301
- if cvd_value
302
- element.add_element('cvd_indicator').text = '1'
303
- element.add_element('cvd_value').text = cvd_value
304
- else
305
- element.add_element('cvd_indicator').text = '0'
306
- end
307
- element
308
- end
309
-
310
- def ach_element(ach_info)
311
- element = REXML::Element.new('ach_info')
312
- actions['ach_info'].each do |key|
313
- element.add_element(key.to_s).text = ach_info[key] unless ach_info[key].blank?
314
- end
315
- element
316
- end
317
-
318
- def message_from(message)
319
- return 'Unspecified error' if message.blank?
320
-
321
- message.gsub(/[^\w]/, ' ').split.join(' ').capitalize
322
- end
323
-
324
- def actions
325
- {
326
- 'us_purchase' => [:order_id, :cust_id, :amount, :pan, :expdate, :crypt_type, :avs_info, :cvd_info],
327
- 'us_preauth' => [:order_id, :cust_id, :amount, :pan, :expdate, :crypt_type, :avs_info, :cvd_info],
328
- 'us_command' => [:order_id],
329
- 'us_refund' => [:order_id, :amount, :txn_number, :crypt_type],
330
- 'us_indrefund' => [:order_id, :cust_id, :amount, :pan, :expdate, :crypt_type],
331
- 'us_completion' => [:order_id, :comp_amount, :txn_number, :crypt_type],
332
- 'us_purchasecorrection' => [:order_id, :txn_number, :crypt_type],
333
- 'us_cavvpurcha' => [:order_id, :cust_id, :amount, :pan, :expdate, :cav],
334
- 'us_cavvpreaut' => [:order_id, :cust_id, :amount, :pan, :expdate, :cavv],
335
- 'us_transact' => [:order_id, :cust_id, :amount, :pan, :expdate, :crypt_type],
336
- 'us_Batchcloseall' => [],
337
- 'us_opentotals' => [:ecr_number],
338
- 'us_batchclose' => [:ecr_number],
339
- 'us_res_add_cc' => [:pan, :expdate, :crypt_type],
340
- 'us_res_delete' => [:data_key],
341
- 'us_res_update_cc' => [:data_key, :pan, :expdate, :crypt_type],
342
- 'us_res_purchase_cc' => [:data_key, :order_id, :cust_id, :amount, :crypt_type],
343
- 'us_res_preauth_cc' => [:data_key, :order_id, :cust_id, :amount, :crypt_type],
344
- 'us_ach_debit' => [:order_id, :cust_id, :amount, :ach_info],
345
- 'us_res_add_ach' => [:order_id, :cust_id, :amount, :ach_info],
346
- 'us_res_update_ach' => [:order_id, :data_key, :cust_id, :amount, :ach_info],
347
- 'ach_info' => [:sec, :cust_first_name, :cust_last_name, :cust_address1, :cust_address2, :cust_city, :cust_state, :cust_zip, :routing_num, :account_num, :check_num, :account_type]
348
- }
349
- end
350
- end
351
- end
352
- end