activemerchant 1.114.0 → 1.116.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (196) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +45 -0
  3. data/lib/active_merchant.rb +1 -1
  4. data/lib/active_merchant/billing/avs_result.rb +1 -1
  5. data/lib/active_merchant/billing/compatibility.rb +3 -3
  6. data/lib/active_merchant/billing/credit_card_methods.rb +5 -5
  7. data/lib/active_merchant/billing/gateways/adyen.rb +23 -13
  8. data/lib/active_merchant/billing/gateways/allied_wallet.rb +7 -7
  9. data/lib/active_merchant/billing/gateways/authorize_net.rb +13 -11
  10. data/lib/active_merchant/billing/gateways/authorize_net_arb.rb +3 -4
  11. data/lib/active_merchant/billing/gateways/authorize_net_cim.rb +1 -1
  12. data/lib/active_merchant/billing/gateways/axcessms.rb +8 -9
  13. data/lib/active_merchant/billing/gateways/balanced.rb +4 -3
  14. data/lib/active_merchant/billing/gateways/bambora_apac.rb +7 -7
  15. data/lib/active_merchant/billing/gateways/bank_frick.rb +7 -7
  16. data/lib/active_merchant/billing/gateways/banwire.rb +1 -1
  17. data/lib/active_merchant/billing/gateways/barclaycard_smartpay.rb +6 -4
  18. data/lib/active_merchant/billing/gateways/beanstream.rb +3 -3
  19. data/lib/active_merchant/billing/gateways/beanstream/beanstream_core.rb +4 -5
  20. data/lib/active_merchant/billing/gateways/blue_pay.rb +2 -3
  21. data/lib/active_merchant/billing/gateways/blue_snap.rb +19 -17
  22. data/lib/active_merchant/billing/gateways/bogus.rb +19 -19
  23. data/lib/active_merchant/billing/gateways/borgun.rb +11 -11
  24. data/lib/active_merchant/billing/gateways/bpoint.rb +8 -8
  25. data/lib/active_merchant/billing/gateways/braintree.rb +1 -1
  26. data/lib/active_merchant/billing/gateways/braintree_blue.rb +7 -10
  27. data/lib/active_merchant/billing/gateways/bridge_pay.rb +7 -7
  28. data/lib/active_merchant/billing/gateways/cams.rb +8 -8
  29. data/lib/active_merchant/billing/gateways/card_connect.rb +1 -1
  30. data/lib/active_merchant/billing/gateways/card_save.rb +1 -1
  31. data/lib/active_merchant/billing/gateways/card_stream.rb +2 -2
  32. data/lib/active_merchant/billing/gateways/cardknox.rb +7 -7
  33. data/lib/active_merchant/billing/gateways/cardprocess.rb +1 -1
  34. data/lib/active_merchant/billing/gateways/cecabank.rb +5 -5
  35. data/lib/active_merchant/billing/gateways/cenpos.rb +10 -10
  36. data/lib/active_merchant/billing/gateways/checkout.rb +2 -2
  37. data/lib/active_merchant/billing/gateways/checkout_v2.rb +16 -19
  38. data/lib/active_merchant/billing/gateways/clearhaus.rb +7 -7
  39. data/lib/active_merchant/billing/gateways/commercegate.rb +1 -1
  40. data/lib/active_merchant/billing/gateways/conekta.rb +2 -2
  41. data/lib/active_merchant/billing/gateways/creditcall.rb +10 -10
  42. data/lib/active_merchant/billing/gateways/credorax.rb +9 -9
  43. data/lib/active_merchant/billing/gateways/ct_payment.rb +10 -10
  44. data/lib/active_merchant/billing/gateways/culqi.rb +9 -9
  45. data/lib/active_merchant/billing/gateways/cyber_source.rb +30 -31
  46. data/lib/active_merchant/billing/gateways/d_local.rb +11 -11
  47. data/lib/active_merchant/billing/gateways/data_cash.rb +2 -3
  48. data/lib/active_merchant/billing/gateways/decidir.rb +9 -8
  49. data/lib/active_merchant/billing/gateways/dibs.rb +8 -8
  50. data/lib/active_merchant/billing/gateways/digitzs.rb +5 -5
  51. data/lib/active_merchant/billing/gateways/ebanx.rb +9 -9
  52. data/lib/active_merchant/billing/gateways/efsnet.rb +2 -3
  53. data/lib/active_merchant/billing/gateways/elavon.rb +251 -232
  54. data/lib/active_merchant/billing/gateways/element.rb +8 -8
  55. data/lib/active_merchant/billing/gateways/evo_ca.rb +5 -6
  56. data/lib/active_merchant/billing/gateways/eway.rb +3 -4
  57. data/lib/active_merchant/billing/gateways/eway_managed.rb +6 -7
  58. data/lib/active_merchant/billing/gateways/eway_rapid.rb +6 -6
  59. data/lib/active_merchant/billing/gateways/exact.rb +8 -9
  60. data/lib/active_merchant/billing/gateways/ezic.rb +7 -7
  61. data/lib/active_merchant/billing/gateways/fat_zebra.rb +4 -4
  62. data/lib/active_merchant/billing/gateways/federated_canada.rb +2 -3
  63. data/lib/active_merchant/billing/gateways/first_giving.rb +1 -1
  64. data/lib/active_merchant/billing/gateways/first_pay.rb +6 -6
  65. data/lib/active_merchant/billing/gateways/firstdata_e4.rb +7 -7
  66. data/lib/active_merchant/billing/gateways/firstdata_e4_v27.rb +4 -4
  67. data/lib/active_merchant/billing/gateways/flo2cash.rb +8 -8
  68. data/lib/active_merchant/billing/gateways/flo2cash_simple.rb +1 -1
  69. data/lib/active_merchant/billing/gateways/forte.rb +14 -8
  70. data/lib/active_merchant/billing/gateways/global_collect.rb +10 -10
  71. data/lib/active_merchant/billing/gateways/global_transport.rb +7 -7
  72. data/lib/active_merchant/billing/gateways/hdfc.rb +9 -9
  73. data/lib/active_merchant/billing/gateways/hps.rb +7 -7
  74. data/lib/active_merchant/billing/gateways/iats_payments.rb +9 -4
  75. data/lib/active_merchant/billing/gateways/in_context_paypal_express.rb +1 -1
  76. data/lib/active_merchant/billing/gateways/inspire.rb +3 -4
  77. data/lib/active_merchant/billing/gateways/instapay.rb +1 -2
  78. data/lib/active_merchant/billing/gateways/ipp.rb +5 -5
  79. data/lib/active_merchant/billing/gateways/iridium.rb +14 -15
  80. data/lib/active_merchant/billing/gateways/iveri.rb +7 -7
  81. data/lib/active_merchant/billing/gateways/ixopay.rb +7 -7
  82. data/lib/active_merchant/billing/gateways/jetpay.rb +1 -2
  83. data/lib/active_merchant/billing/gateways/jetpay_v2.rb +4 -5
  84. data/lib/active_merchant/billing/gateways/kushki.rb +6 -6
  85. data/lib/active_merchant/billing/gateways/latitude19.rb +14 -14
  86. data/lib/active_merchant/billing/gateways/linkpoint.rb +4 -5
  87. data/lib/active_merchant/billing/gateways/litle.rb +11 -11
  88. data/lib/active_merchant/billing/gateways/mastercard.rb +10 -10
  89. data/lib/active_merchant/billing/gateways/mercado_pago.rb +7 -7
  90. data/lib/active_merchant/billing/gateways/merchant_e_solutions.rb +1 -2
  91. data/lib/active_merchant/billing/gateways/merchant_one.rb +1 -1
  92. data/lib/active_merchant/billing/gateways/merchant_partners.rb +10 -10
  93. data/lib/active_merchant/billing/gateways/merchant_ware.rb +5 -7
  94. data/lib/active_merchant/billing/gateways/merchant_ware_version_four.rb +4 -6
  95. data/lib/active_merchant/billing/gateways/mercury.rb +4 -4
  96. data/lib/active_merchant/billing/gateways/metrics_global.rb +4 -5
  97. data/lib/active_merchant/billing/gateways/micropayment.rb +8 -8
  98. data/lib/active_merchant/billing/gateways/migs.rb +3 -4
  99. data/lib/active_merchant/billing/gateways/modern_payments_cim.rb +2 -4
  100. data/lib/active_merchant/billing/gateways/monei.rb +7 -7
  101. data/lib/active_merchant/billing/gateways/moneris.rb +4 -3
  102. data/lib/active_merchant/billing/gateways/money_movers.rb +2 -3
  103. data/lib/active_merchant/billing/gateways/mundipagg.rb +37 -10
  104. data/lib/active_merchant/billing/gateways/nab_transact.rb +2 -4
  105. data/lib/active_merchant/billing/gateways/ncr_secure_pay.rb +7 -7
  106. data/lib/active_merchant/billing/gateways/net_registry.rb +1 -2
  107. data/lib/active_merchant/billing/gateways/netaxept.rb +6 -6
  108. data/lib/active_merchant/billing/gateways/netbanx.rb +8 -8
  109. data/lib/active_merchant/billing/gateways/netbilling.rb +4 -5
  110. data/lib/active_merchant/billing/gateways/network_merchants.rb +2 -3
  111. data/lib/active_merchant/billing/gateways/nmi.rb +21 -7
  112. data/lib/active_merchant/billing/gateways/ogone.rb +3 -3
  113. data/lib/active_merchant/billing/gateways/omise.rb +13 -13
  114. data/lib/active_merchant/billing/gateways/openpay.rb +3 -4
  115. data/lib/active_merchant/billing/gateways/opp.rb +9 -9
  116. data/lib/active_merchant/billing/gateways/optimal_payment.rb +2 -3
  117. data/lib/active_merchant/billing/gateways/orbital.rb +61 -66
  118. data/lib/active_merchant/billing/gateways/pac_net_raven.rb +3 -4
  119. data/lib/active_merchant/billing/gateways/pagarme.rb +8 -8
  120. data/lib/active_merchant/billing/gateways/pago_facil.rb +2 -2
  121. data/lib/active_merchant/billing/gateways/pay_conex.rb +8 -8
  122. data/lib/active_merchant/billing/gateways/pay_gate_xml.rb +6 -7
  123. data/lib/active_merchant/billing/gateways/pay_hub.rb +7 -8
  124. data/lib/active_merchant/billing/gateways/pay_junction.rb +2 -3
  125. data/lib/active_merchant/billing/gateways/pay_junction_v2.rb +9 -9
  126. data/lib/active_merchant/billing/gateways/pay_secure.rb +2 -3
  127. data/lib/active_merchant/billing/gateways/paybox_direct.rb +23 -1
  128. data/lib/active_merchant/billing/gateways/payeezy.rb +9 -9
  129. data/lib/active_merchant/billing/gateways/payex.rb +6 -7
  130. data/lib/active_merchant/billing/gateways/payflow.rb +1 -1
  131. data/lib/active_merchant/billing/gateways/payment_express.rb +1 -2
  132. data/lib/active_merchant/billing/gateways/paymentez.rb +5 -5
  133. data/lib/active_merchant/billing/gateways/paymill.rb +7 -7
  134. data/lib/active_merchant/billing/gateways/paypal_express.rb +1 -1
  135. data/lib/active_merchant/billing/gateways/paypal_express_common.rb +1 -1
  136. data/lib/active_merchant/billing/gateways/payscout.rb +1 -2
  137. data/lib/active_merchant/billing/gateways/paystation.rb +3 -4
  138. data/lib/active_merchant/billing/gateways/payu_in.rb +3 -3
  139. data/lib/active_merchant/billing/gateways/payu_latam.rb +17 -10
  140. data/lib/active_merchant/billing/gateways/payway.rb +8 -9
  141. data/lib/active_merchant/billing/gateways/plugnpay.rb +1 -2
  142. data/lib/active_merchant/billing/gateways/pro_pay.rb +8 -8
  143. data/lib/active_merchant/billing/gateways/psigate.rb +2 -3
  144. data/lib/active_merchant/billing/gateways/psl_card.rb +1 -2
  145. data/lib/active_merchant/billing/gateways/qbms.rb +1 -2
  146. data/lib/active_merchant/billing/gateways/quantum.rb +1 -2
  147. data/lib/active_merchant/billing/gateways/quickbooks.rb +1 -1
  148. data/lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb +3 -4
  149. data/lib/active_merchant/billing/gateways/quickpay/quickpay_v4to7.rb +1 -2
  150. data/lib/active_merchant/billing/gateways/qvalent.rb +8 -8
  151. data/lib/active_merchant/billing/gateways/realex.rb +1 -1
  152. data/lib/active_merchant/billing/gateways/redsys.rb +4 -4
  153. data/lib/active_merchant/billing/gateways/s5.rb +7 -7
  154. data/lib/active_merchant/billing/gateways/safe_charge.rb +12 -12
  155. data/lib/active_merchant/billing/gateways/sage.rb +3 -5
  156. data/lib/active_merchant/billing/gateways/sage_pay.rb +2 -3
  157. data/lib/active_merchant/billing/gateways/sallie_mae.rb +1 -2
  158. data/lib/active_merchant/billing/gateways/secure_net.rb +1 -2
  159. data/lib/active_merchant/billing/gateways/secure_pay.rb +3 -4
  160. data/lib/active_merchant/billing/gateways/secure_pay_au.rb +2 -4
  161. data/lib/active_merchant/billing/gateways/secure_pay_tech.rb +1 -2
  162. data/lib/active_merchant/billing/gateways/securion_pay.rb +5 -6
  163. data/lib/active_merchant/billing/gateways/skip_jack.rb +2 -3
  164. data/lib/active_merchant/billing/gateways/smart_ps.rb +5 -6
  165. data/lib/active_merchant/billing/gateways/so_easy_pay.rb +7 -7
  166. data/lib/active_merchant/billing/gateways/spreedly_core.rb +6 -6
  167. data/lib/active_merchant/billing/gateways/stripe.rb +9 -9
  168. data/lib/active_merchant/billing/gateways/stripe_payment_intents.rb +9 -0
  169. data/lib/active_merchant/billing/gateways/swipe_checkout.rb +3 -4
  170. data/lib/active_merchant/billing/gateways/telr.rb +8 -8
  171. data/lib/active_merchant/billing/gateways/trans_first.rb +2 -2
  172. data/lib/active_merchant/billing/gateways/trans_first_transaction_express.rb +12 -12
  173. data/lib/active_merchant/billing/gateways/transact_pro.rb +9 -9
  174. data/lib/active_merchant/billing/gateways/trust_commerce.rb +1 -2
  175. data/lib/active_merchant/billing/gateways/usa_epay.rb +1 -1
  176. data/lib/active_merchant/billing/gateways/usa_epay_advanced.rb +32 -32
  177. data/lib/active_merchant/billing/gateways/usa_epay_transaction.rb +3 -4
  178. data/lib/active_merchant/billing/gateways/vanco.rb +3 -3
  179. data/lib/active_merchant/billing/gateways/verifi.rb +1 -2
  180. data/lib/active_merchant/billing/gateways/viaklix.rb +1 -2
  181. data/lib/active_merchant/billing/gateways/visanet_peru.rb +10 -10
  182. data/lib/active_merchant/billing/gateways/webpay.rb +2 -2
  183. data/lib/active_merchant/billing/gateways/wepay.rb +3 -2
  184. data/lib/active_merchant/billing/gateways/wirecard.rb +1 -2
  185. data/lib/active_merchant/billing/gateways/worldpay.rb +12 -8
  186. data/lib/active_merchant/billing/gateways/worldpay_online_payments.rb +14 -16
  187. data/lib/active_merchant/billing/gateways/worldpay_us.rb +7 -7
  188. data/lib/active_merchant/billing/response.rb +1 -1
  189. data/lib/active_merchant/country.rb +1 -1
  190. data/lib/active_merchant/network_connection_retries.rb +2 -2
  191. data/lib/active_merchant/post_data.rb +1 -1
  192. data/lib/active_merchant/posts_data.rb +1 -1
  193. data/lib/active_merchant/version.rb +1 -1
  194. data/lib/support/ssl_verify.rb +2 -2
  195. data/lib/support/ssl_version.rb +2 -2
  196. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4d467cbeefbc698298d8e87dc6f9655cb8105cd6b949753082696802cd667d15
4
- data.tar.gz: e7a09ed0f9dbead854bf3bab3940e2a335109aa4a76c2a8f2f824c27a2236833
3
+ metadata.gz: c32d76816ad9cdc73be63181629990b876d69e62e84c324b0cf0b240bb4fab42
4
+ data.tar.gz: 8c4263133c364d786f480ac146e174765ac1a5b5c462680c17f4f104af9f0d49
5
5
  SHA512:
6
- metadata.gz: 45db32004cb0fb161a6ae422b64b3401d9c6b3bf780549ba17cc50b2f94e79f94baa76353fdc5cfbad771423613ab5a3030b164e69f1de8ae44c612cd6982bf2
7
- data.tar.gz: 2ea821b491e9c6cd21442c7563fcac422d42190a8a222583d15783fc1e1a87f77894a6d4eac7a41a5bb1c63d69c59cc17f2d6aaf1540d0d01e5ae4ee168e2b5f
6
+ metadata.gz: 167eff38aa013365fab6ff2ba49cee58b15b8b5aa7f604f2c58d0040fac2fe931a4550c3fe594df618326630138ef63265767f2270f3ae6838642a26694fb921
7
+ data.tar.gz: 23a60e19999c1ce903bfc35503eac491d5cff0de0b59ab8dfe99e67f2f0d4b31380ef3826926c70cc60303c348bfa9377e642ed420f58d519a1ec779521516db
data/CHANGELOG CHANGED
@@ -2,6 +2,51 @@
2
2
 
3
3
  == HEAD
4
4
 
5
+ == Version 1.116.0 (October 28th)
6
+ * Remove Braintree specific version dependency [pi3r] #38000
7
+
8
+ == Version 1.115.0 (October 27th)
9
+ * Checkout v2: $0 Auth on gateway [jessiagee] #3762
10
+ * Adyen: Safely add execute_threeds: false [curiousepic] #3756
11
+ * RuboCop: Fix Layout/SpaceAroundEqualsInParameterDefault [leila-alderman] #3720
12
+ * iATS: Allow email to be passed outside of the billing_address context [naashton] #3750
13
+ * Orbital: Don't pass xid for transactions using network tokens [britth] #3757
14
+ * Forte: Add service_fee_amount field [meagabeth] #3751
15
+ * WorldPay: Add support for idempotency_key[cdmackeyfree] #3759
16
+ * Orbital: Handle line_tot key as a string [naashton] #3760
17
+ * RuboCop: Fix Lint/UnusedMethodArgument [leila-alderman] #3721
18
+ * RuboCop: Fix Naming/MemoizedInstanceVariableName [leila-alderman] #3722
19
+ * RuboCop: Fix Style/BlockComments [leila-alderman] #3729
20
+ * Checkout V2: Move to single-transaction Purchases [curiousepic] #3761
21
+ * RuboCop: Fix Naming/ConstantName [leila-alderman] #3723
22
+ * Orbital: Fix schema errors [britth] #3766
23
+ * Checkout V2: Start testing via amount code [curiousepic] #3767
24
+ * CyberSource: Don't include empty `mdd_` fields [arbianchi] #3758
25
+ * RuboCop: Fix Naming/VariableNumber [leila-alderman] #3725
26
+ * Update BIN ranges for Elo cardtype [cdmackeyfree] #3769
27
+ * Orbital: Resolve CardIndicators issue [meagabeth] #3771
28
+ * Adyen: Add subMerchant fields [naashton] #3772
29
+ * PayPal Express: reduce param requirements [shasum] #3773
30
+ * PayU Latam: Support partial refunds [leila-alderman] #3774
31
+ * RuboCop: Fix Style/Alias [leila-alderman] #3727
32
+ * Stripe PI: Allow `on_behalf_of` to be passed alone #3776
33
+ * RuboCop: Fix Performance/RedundantMatch [leila-alderman] #3765
34
+ * RuboCop: Fix Layout/MultilineMethodCallBraceLayout [leila-alderman] #3763
35
+ * NMI: Add standardized 3DS fields [meagabeth] #3775
36
+ * Mundipagg: Add support for SubMerchant fields [meagabeth] #3779
37
+ * Stripe Payment Intents: Add request_three_d_secure option [molbrown] #3787
38
+ * Decidir: Add support for csmdds fields [naashton] #3786
39
+ * RuboCop: Fix Performance/StringReplacement [leila-alderman] #3782
40
+ * RuboCop: Fix Naming/HeredocDelimiterCase & Naming [leila-alderman] #3781
41
+ * BlueSnap: Add address fields to contact info [naashton] #3777
42
+ * RuboCop: Fix Layout/SpaceInsideHashLiteralBraces [leila-alderman] #3780
43
+ * RuboCop: Fix Style/AndOr [leila-alderman] #3783
44
+ * Checkout V2: Support ability to pass attempt_n3d 3ds field [naashton] #3788
45
+ * Elavon: Upgrade to `processxml.do` [therufs] #3784
46
+ * Checkout V2: Support for attempt_n3d 3DS field [naashton] #3790
47
+ * Elavon: Strip ampersands [therufs] #3795
48
+ * Paybox: Add support for 3DS 1.0 values [jcpaybox] #3335
49
+
5
50
  == Version 1.114.0
6
51
  * BlueSnap: Add address1,address2,phone,shipping_* support #3749
7
52
  * BlueSnap: Protect against `nil` metadata [carrigan] #3752
@@ -50,7 +50,7 @@ require 'active_merchant/version'
50
50
  require 'active_merchant/country'
51
51
 
52
52
  module ActiveMerchant
53
- def self.deprecated(message, caller=Kernel.caller[1])
53
+ def self.deprecated(message, caller = Kernel.caller[1])
54
54
  warning = caller + ': ' + message
55
55
  if respond_to?(:logger) && logger.present?
56
56
  logger.warn(warning)
@@ -88,7 +88,7 @@ module ActiveMerchant
88
88
  { 'code' => code,
89
89
  'message' => message,
90
90
  'street_match' => street_match,
91
- 'postal_match' => postal_match}
91
+ 'postal_match' => postal_match }
92
92
  end
93
93
  end
94
94
  end
@@ -28,7 +28,7 @@ module ActiveMerchant
28
28
  def self.humanize(lower_case_and_underscored_word)
29
29
  result = lower_case_and_underscored_word.to_s.dup
30
30
  result.gsub!(/_id$/, '')
31
- result.gsub!(/_/, ' ')
31
+ result.tr!('_', ' ')
32
32
  result.gsub(/([a-z\d]*)/i, &:downcase).gsub(/^\w/) { $&.upcase }
33
33
  end
34
34
  end
@@ -56,7 +56,7 @@ module ActiveMerchant
56
56
  private
57
57
 
58
58
  def internal_errors
59
- @errors ||= Errors.new
59
+ @internal_errors ||= Errors.new
60
60
  end
61
61
 
62
62
  class Errors < Hash
@@ -75,7 +75,7 @@ module ActiveMerchant
75
75
  end
76
76
 
77
77
  def empty?
78
- all? { |k, v| v&.empty? }
78
+ all? { |_k, v| v&.empty? }
79
79
  end
80
80
 
81
81
  def on(field)
@@ -104,11 +104,11 @@ module ActiveMerchant #:nodoc:
104
104
  506707..506708, 506715..506715, 506718..506722, 506724..506724, 506726..506736, 506739..506739, 506741..506743,
105
105
  506745..506747, 506753..506753, 506774..506776, 506778..506778, 509000..509001, 509003..509003, 509007..509007,
106
106
  509020..509022, 509035..509035, 509039..509042, 509045..509045, 509048..509048, 509051..509071, 509073..509074,
107
- 509077..509080, 509084..509084, 509091..509094, 509098..509098, 509100..509100, 509104..509104, 509106..509109,
108
- 627780..627780, 636368..636368, 650031..650033, 650035..650045, 650047..650047, 650406..650410, 650434..650436,
109
- 650439..650439, 650485..650504, 650506..650530, 650577..650580, 650582..650591, 650721..650727, 650901..650922,
110
- 650928..650928, 650938..650939, 650946..650948, 650954..650955, 650962..650963, 650967..650967, 650971..650971,
111
- 651652..651667, 651675..651678, 655000..655010, 655012..655015, 655051..655052, 655056..655057
107
+ 509077..509080, 509084..509089, 509091..509094, 509098..509098, 509100..509100, 509104..509104, 509106..509109,
108
+ 509257..509257, 627780..627780, 636368..636368, 650031..650033, 650035..650045, 650047..650047, 650406..650410,
109
+ 650434..650436, 650439..650439, 650485..650504, 650506..650530, 650577..650580, 650582..650591, 650721..650727,
110
+ 650901..650922, 650928..650928, 650938..650939, 650946..650948, 650954..650955, 650962..650963, 650967..650967,
111
+ 650971..650971, 651652..651667, 651675..651678, 655000..655010, 655012..655015, 655051..655052, 655056..655057
112
112
  ]
113
113
 
114
114
  # Alelo provides BIN ranges by e-mailing them out periodically.
@@ -29,13 +29,13 @@ module ActiveMerchant #:nodoc:
29
29
  '135' => STANDARD_ERROR_CODE[:incorrect_address]
30
30
  }
31
31
 
32
- def initialize(options={})
32
+ def initialize(options = {})
33
33
  requires!(options, :username, :password, :merchant_account)
34
34
  @username, @password, @merchant_account = options.values_at(:username, :password, :merchant_account)
35
35
  super
36
36
  end
37
37
 
38
- def purchase(money, payment, options={})
38
+ def purchase(money, payment, options = {})
39
39
  if options[:execute_threed] || options[:threed_dynamic]
40
40
  authorize(money, payment, options)
41
41
  else
@@ -46,7 +46,7 @@ module ActiveMerchant #:nodoc:
46
46
  end
47
47
  end
48
48
 
49
- def authorize(money, payment, options={})
49
+ def authorize(money, payment, options = {})
50
50
  requires!(options, :order_id)
51
51
  post = init_post(options)
52
52
  add_invoice(post, money, options)
@@ -62,7 +62,7 @@ module ActiveMerchant #:nodoc:
62
62
  commit('authorise', post, options)
63
63
  end
64
64
 
65
- def capture(money, authorization, options={})
65
+ def capture(money, authorization, options = {})
66
66
  post = init_post(options)
67
67
  add_invoice_for_modification(post, money, options)
68
68
  add_reference(post, authorization, options)
@@ -70,7 +70,7 @@ module ActiveMerchant #:nodoc:
70
70
  commit('capture', post, options)
71
71
  end
72
72
 
73
- def refund(money, authorization, options={})
73
+ def refund(money, authorization, options = {})
74
74
  post = init_post(options)
75
75
  add_invoice_for_modification(post, money, options)
76
76
  add_original_reference(post, authorization, options)
@@ -78,13 +78,13 @@ module ActiveMerchant #:nodoc:
78
78
  commit('refund', post, options)
79
79
  end
80
80
 
81
- def void(authorization, options={})
81
+ def void(authorization, options = {})
82
82
  post = init_post(options)
83
83
  add_reference(post, authorization, options)
84
84
  commit('cancel', post, options)
85
85
  end
86
86
 
87
- def adjust(money, authorization, options={})
87
+ def adjust(money, authorization, options = {})
88
88
  post = init_post(options)
89
89
  add_invoice_for_modification(post, money, options)
90
90
  add_reference(post, authorization, options)
@@ -92,7 +92,7 @@ module ActiveMerchant #:nodoc:
92
92
  commit('adjustAuthorisation', post, options)
93
93
  end
94
94
 
95
- def store(credit_card, options={})
95
+ def store(credit_card, options = {})
96
96
  requires!(options, :order_id)
97
97
  post = init_post(options)
98
98
  add_invoice(post, 0, options)
@@ -115,7 +115,7 @@ module ActiveMerchant #:nodoc:
115
115
  end
116
116
  end
117
117
 
118
- def unstore(options={})
118
+ def unstore(options = {})
119
119
  requires!(options, :shopper_reference, :recurring_detail_reference)
120
120
  post = {}
121
121
 
@@ -126,7 +126,7 @@ module ActiveMerchant #:nodoc:
126
126
  commit('disable', post, options)
127
127
  end
128
128
 
129
- def verify(credit_card, options={})
129
+ def verify(credit_card, options = {})
130
130
  MultiResponse.run(:use_first_response) do |r|
131
131
  r.process { authorize(0, credit_card, options) }
132
132
  options[:idempotency_key] = nil
@@ -228,6 +228,15 @@ module ActiveMerchant #:nodoc:
228
228
 
229
229
  def add_merchant_data(post, options)
230
230
  post[:additionalData][:subMerchantId] = options[:sub_merchant_id] if options[:sub_merchant_id]
231
+ post[:additionalData][:subMerchantName] = options[:sub_merchant_name] if options[:sub_merchant_name]
232
+ post[:additionalData][:subMerchantStreet] = options[:sub_merchant_street] if options[:sub_merchant_street]
233
+ post[:additionalData][:subMerchantCity] = options[:sub_merchant_city] if options[:sub_merchant_city]
234
+ post[:additionalData][:subMerchantState] = options[:sub_merchant_state] if options[:sub_merchant_state]
235
+ post[:additionalData][:subMerchantPostalCode] = options[:sub_merchant_postal_code] if options[:sub_merchant_postal_code]
236
+ post[:additionalData][:subMerchantCountry] = options[:sub_merchant_country] if options[:sub_merchant_country]
237
+ post[:additionalData][:subMerchantTaxId] = options[:sub_merchant_tax_id] if options[:sub_merchant_tax_id]
238
+ post[:additionalData][:subMerchantId] = options[:sub_merchant_id] if options[:sub_merchant_id]
239
+ post[:additionalData][:subMerchantMCC] = options[:sub_merchant_mcc] if options[:sub_merchant_mcc]
231
240
  end
232
241
 
233
242
  def add_risk_data(post, options)
@@ -271,7 +280,7 @@ module ActiveMerchant #:nodoc:
271
280
  post[:shopperReference] = options[:shopper_reference] if options[:shopper_reference]
272
281
  end
273
282
 
274
- def add_shopper_interaction(post, payment, options={})
283
+ def add_shopper_interaction(post, payment, options = {})
275
284
  if (options.dig(:stored_credential, :initial_transaction) && options.dig(:stored_credential, :initiator) == 'cardholder') ||
276
285
  (payment.respond_to?(:verification_value) && payment.verification_value && options.dig(:stored_credential, :initial_transaction).nil?) ||
277
286
  payment.is_a?(NetworkTokenizationCreditCard)
@@ -364,7 +373,7 @@ module ActiveMerchant #:nodoc:
364
373
  cvc: credit_card.verification_value
365
374
  }
366
375
 
367
- card.delete_if { |k, v| v.blank? }
376
+ card.delete_if { |_k, v| v.blank? }
368
377
  card[:holderName] ||= 'Not Provided' if credit_card.is_a?(NetworkTokenizationCreditCard)
369
378
  requires!(card, :expiryMonth, :expiryYear, :holderName, :number)
370
379
  post[:card] = card
@@ -432,7 +441,8 @@ module ActiveMerchant #:nodoc:
432
441
  return unless !options[:execute_threed].nil? || !options[:threed_dynamic].nil?
433
442
 
434
443
  post[:browserInfo] = { userAgent: options[:user_agent], acceptHeader: options[:accept_header] } if options[:execute_threed] || options[:threed_dynamic]
435
- post[:additionalData] = { executeThreeD: options[:execute_threed] } if !options[:execute_threed].nil?
444
+ post[:additionalData] ||= {}
445
+ post[:additionalData][:executeThreeD] = options[:execute_threed] if !options[:execute_threed].nil?
436
446
  end
437
447
  end
438
448
 
@@ -12,12 +12,12 @@ module ActiveMerchant #:nodoc:
12
12
  self.supported_cardtypes = %i[visa master american_express discover
13
13
  diners_club jcb maestro]
14
14
 
15
- def initialize(options={})
15
+ def initialize(options = {})
16
16
  requires!(options, :site_id, :merchant_id, :token)
17
17
  super
18
18
  end
19
19
 
20
- def purchase(amount, payment_method, options={})
20
+ def purchase(amount, payment_method, options = {})
21
21
  post = {}
22
22
  add_invoice(post, amount, options)
23
23
  add_payment_method(post, payment_method)
@@ -26,7 +26,7 @@ module ActiveMerchant #:nodoc:
26
26
  commit(:purchase, post)
27
27
  end
28
28
 
29
- def authorize(amount, payment_method, options={})
29
+ def authorize(amount, payment_method, options = {})
30
30
  post = {}
31
31
  add_invoice(post, amount, options)
32
32
  add_payment_method(post, payment_method)
@@ -35,7 +35,7 @@ module ActiveMerchant #:nodoc:
35
35
  commit(:authorize, post)
36
36
  end
37
37
 
38
- def capture(amount, authorization, options={})
38
+ def capture(amount, authorization, options = {})
39
39
  post = {}
40
40
  add_invoice(post, amount, options)
41
41
  add_reference(post, authorization, :capture)
@@ -44,14 +44,14 @@ module ActiveMerchant #:nodoc:
44
44
  commit(:capture, post)
45
45
  end
46
46
 
47
- def void(authorization, options={})
47
+ def void(authorization, options = {})
48
48
  post = {}
49
49
  add_reference(post, authorization, :void)
50
50
 
51
51
  commit(:void, post)
52
52
  end
53
53
 
54
- def refund(amount, authorization, options={})
54
+ def refund(amount, authorization, options = {})
55
55
  post = {}
56
56
  add_invoice(post, amount, options)
57
57
  add_reference(post, authorization, :refund)
@@ -61,7 +61,7 @@ module ActiveMerchant #:nodoc:
61
61
  commit(:refund, post)
62
62
  end
63
63
 
64
- def verify(credit_card, options={})
64
+ def verify(credit_card, options = {})
65
65
  MultiResponse.run(:use_first_response) do |r|
66
66
  r.process { authorize(100, credit_card, options) }
67
67
  r.process(:ignore_result) { void(r.authorization, options) }
@@ -94,7 +94,7 @@ module ActiveMerchant
94
94
  PAYMENT_METHOD_NOT_SUPPORTED_ERROR = '155'
95
95
  INELIGIBLE_FOR_ISSUING_CREDIT_ERROR = '54'
96
96
 
97
- def initialize(options={})
97
+ def initialize(options = {})
98
98
  requires!(options, :login, :password)
99
99
  super
100
100
  end
@@ -111,7 +111,7 @@ module ActiveMerchant
111
111
  end
112
112
  end
113
113
 
114
- def authorize(amount, payment, options={})
114
+ def authorize(amount, payment, options = {})
115
115
  if payment.is_a?(String)
116
116
  commit(:cim_authorize, options) do |xml|
117
117
  add_cim_auth_purchase(xml, 'profileTransAuthOnly', amount, payment, options)
@@ -123,7 +123,7 @@ module ActiveMerchant
123
123
  end
124
124
  end
125
125
 
126
- def capture(amount, authorization, options={})
126
+ def capture(amount, authorization, options = {})
127
127
  if auth_was_for_cim?(authorization)
128
128
  cim_capture(amount, authorization, options)
129
129
  else
@@ -131,7 +131,7 @@ module ActiveMerchant
131
131
  end
132
132
  end
133
133
 
134
- def refund(amount, authorization, options={})
134
+ def refund(amount, authorization, options = {})
135
135
  response =
136
136
  if auth_was_for_cim?(authorization)
137
137
  cim_refund(amount, authorization, options)
@@ -149,7 +149,7 @@ module ActiveMerchant
149
149
  end
150
150
  end
151
151
 
152
- def void(authorization, options={})
152
+ def void(authorization, options = {})
153
153
  if auth_was_for_cim?(authorization)
154
154
  cim_void(authorization, options)
155
155
  else
@@ -157,7 +157,7 @@ module ActiveMerchant
157
157
  end
158
158
  end
159
159
 
160
- def credit(amount, payment, options={})
160
+ def credit(amount, payment, options = {})
161
161
  raise ArgumentError, 'Reference credits are not supported. Please supply the original credit card or use the #refund method.' if payment.is_a?(String)
162
162
 
163
163
  commit(:credit) do |xml|
@@ -568,9 +568,11 @@ module ActiveMerchant
568
568
  xml.cardholderAuthentication do
569
569
  three_d_secure = options.fetch(:three_d_secure, {})
570
570
  xml.authenticationIndicator(
571
- options[:authentication_indicator] || three_d_secure[:eci])
571
+ options[:authentication_indicator] || three_d_secure[:eci]
572
+ )
572
573
  xml.cardholderAuthenticationValue(
573
- options[:cardholder_authentication_value] || three_d_secure[:cavv])
574
+ options[:cardholder_authentication_value] || three_d_secure[:cavv]
575
+ )
574
576
  end
575
577
  end
576
578
 
@@ -595,7 +597,7 @@ module ActiveMerchant
595
597
  end
596
598
  end
597
599
 
598
- def add_shipping_address(xml, options, root_node='shipTo')
600
+ def add_shipping_address(xml, options, root_node = 'shipTo')
599
601
  address = options[:shipping_address] || options[:address]
600
602
  return unless address
601
603
 
@@ -619,7 +621,7 @@ module ActiveMerchant
619
621
  end
620
622
  end
621
623
 
622
- def add_ship_from_address(xml, options, root_node='shipFrom')
624
+ def add_ship_from_address(xml, options, root_node = 'shipFrom')
623
625
  address = options[:ship_from_address]
624
626
  return unless address
625
627
 
@@ -842,7 +844,7 @@ module ActiveMerchant
842
844
  doc = Nokogiri::XML(body)
843
845
  doc.remove_namespaces!
844
846
 
845
- response = {action: action}
847
+ response = { action: action }
846
848
 
847
849
  response[:response_code] = if (element = doc.at_xpath('//transactionResponse/responseCode'))
848
850
  empty?(element.content) ? nil : element.content.to_i
@@ -82,7 +82,7 @@ module ActiveMerchant #:nodoc:
82
82
  # +:interval => { :unit => :months, :length => 3 }+ (REQUIRED)
83
83
  # * <tt>:duration</tt> -- A hash containing keys for the <tt>:start_date</tt> the subscription begins (also the date the
84
84
  # initial billing occurs) and the total number of billing <tt>:occurrences</tt> or payments for the subscription. (REQUIRED)
85
- def recurring(money, creditcard, options={})
85
+ def recurring(money, creditcard, options = {})
86
86
  requires!(options, :interval, :duration, :billing_address)
87
87
  requires!(options[:interval], :length, %i[unit days months])
88
88
  requires!(options[:duration], :start_date, :occurrences)
@@ -110,7 +110,7 @@ module ActiveMerchant #:nodoc:
110
110
  #
111
111
  # * <tt>:subscription_id</tt> -- A string containing the <tt>:subscription_id</tt> of the recurring payment already in place
112
112
  # for a given credit card. (REQUIRED)
113
- def update_recurring(options={})
113
+ def update_recurring(options = {})
114
114
  requires!(options, :subscription_id)
115
115
  request = build_recurring_request(:update, options)
116
116
  recurring_commit(:update, request)
@@ -395,8 +395,7 @@ module ActiveMerchant #:nodoc:
395
395
 
396
396
  Response.new(success, message, response,
397
397
  test: test_mode,
398
- authorization: response[:subscription_id]
399
- )
398
+ authorization: response[:subscription_id])
400
399
  end
401
400
 
402
401
  def recurring_parse(action, xml)
@@ -878,7 +878,7 @@ module ActiveMerchant #:nodoc:
878
878
 
879
879
  def parse_direct_response(params)
880
880
  delimiter = @options[:delimiter] || ','
881
- direct_response = {'raw' => params}
881
+ direct_response = { 'raw' => params }
882
882
  direct_response_fields = params.split(delimiter)
883
883
  direct_response.merge(
884
884
  {
@@ -23,33 +23,33 @@ module ActiveMerchant #:nodoc:
23
23
  PAYMENT_CODE_REFUND = 'CC.RF'
24
24
  PAYMENT_CODE_REBILL = 'CC.RB'
25
25
 
26
- def initialize(options={})
26
+ def initialize(options = {})
27
27
  requires!(options, :sender, :login, :password, :channel)
28
28
  super
29
29
  end
30
30
 
31
- def purchase(money, payment, options={})
31
+ def purchase(money, payment, options = {})
32
32
  payment_code = payment.respond_to?(:number) ? PAYMENT_CODE_DEBIT : PAYMENT_CODE_REBILL
33
33
  commit(payment_code, money, payment, options)
34
34
  end
35
35
 
36
- def authorize(money, authorization, options={})
36
+ def authorize(money, authorization, options = {})
37
37
  commit(PAYMENT_CODE_PREAUTHORIZATION, money, authorization, options)
38
38
  end
39
39
 
40
- def capture(money, authorization, options={})
40
+ def capture(money, authorization, options = {})
41
41
  commit(PAYMENT_CODE_CAPTURE, money, authorization, options)
42
42
  end
43
43
 
44
- def refund(money, authorization, options={})
44
+ def refund(money, authorization, options = {})
45
45
  commit(PAYMENT_CODE_REFUND, money, authorization, options)
46
46
  end
47
47
 
48
- def void(authorization, options={})
48
+ def void(authorization, options = {})
49
49
  commit(PAYMENT_CODE_REVERSAL, nil, authorization, options)
50
50
  end
51
51
 
52
- def verify(credit_card, options={})
52
+ def verify(credit_card, options = {})
53
53
  MultiResponse.run(:use_first_response) do |r|
54
54
  r.process { authorize(100, credit_card, options) }
55
55
  r.process(:ignore_result) { void(r.authorization, options) }
@@ -73,8 +73,7 @@ module ActiveMerchant #:nodoc:
73
73
 
74
74
  Response.new(success, message, response,
75
75
  authorization: authorization,
76
- test: (response[:mode] != 'LIVE')
77
- )
76
+ test: (response[:mode] != 'LIVE'))
78
77
  end
79
78
 
80
79
  def parse(body)