activemerchant 1.108.0 → 1.109.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (202) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +28 -0
  3. data/lib/active_merchant/billing/base.rb +0 -13
  4. data/lib/active_merchant/billing/check.rb +1 -1
  5. data/lib/active_merchant/billing/credit_card.rb +2 -0
  6. data/lib/active_merchant/billing/credit_card_methods.rb +9 -6
  7. data/lib/active_merchant/billing/gateways/adyen.rb +8 -8
  8. data/lib/active_merchant/billing/gateways/allied_wallet.rb +2 -2
  9. data/lib/active_merchant/billing/gateways/authorize_net.rb +7 -7
  10. data/lib/active_merchant/billing/gateways/authorize_net_arb.rb +3 -3
  11. data/lib/active_merchant/billing/gateways/authorize_net_cim.rb +3 -3
  12. data/lib/active_merchant/billing/gateways/axcessms.rb +1 -1
  13. data/lib/active_merchant/billing/gateways/balanced.rb +1 -1
  14. data/lib/active_merchant/billing/gateways/bambora_apac.rb +2 -2
  15. data/lib/active_merchant/billing/gateways/bank_frick.rb +2 -2
  16. data/lib/active_merchant/billing/gateways/banwire.rb +2 -2
  17. data/lib/active_merchant/billing/gateways/barclaycard_smartpay.rb +2 -2
  18. data/lib/active_merchant/billing/gateways/barclays_epdq_extra_plus.rb +1 -1
  19. data/lib/active_merchant/billing/gateways/be2bill.rb +1 -1
  20. data/lib/active_merchant/billing/gateways/beanstream/beanstream_core.rb +4 -4
  21. data/lib/active_merchant/billing/gateways/blue_pay.rb +2 -2
  22. data/lib/active_merchant/billing/gateways/blue_snap.rb +1 -1
  23. data/lib/active_merchant/billing/gateways/borgun.rb +3 -3
  24. data/lib/active_merchant/billing/gateways/bpoint.rb +1 -1
  25. data/lib/active_merchant/billing/gateways/braintree/braintree_common.rb +1 -1
  26. data/lib/active_merchant/billing/gateways/braintree_blue.rb +78 -28
  27. data/lib/active_merchant/billing/gateways/bridge_pay.rb +2 -2
  28. data/lib/active_merchant/billing/gateways/cams.rb +2 -2
  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 +4 -4
  32. data/lib/active_merchant/billing/gateways/cardknox.rb +4 -4
  33. data/lib/active_merchant/billing/gateways/cardprocess.rb +1 -1
  34. data/lib/active_merchant/billing/gateways/cashnet.rb +1 -1
  35. data/lib/active_merchant/billing/gateways/cecabank.rb +1 -1
  36. data/lib/active_merchant/billing/gateways/cenpos.rb +12 -12
  37. data/lib/active_merchant/billing/gateways/checkout.rb +3 -3
  38. data/lib/active_merchant/billing/gateways/checkout_v2.rb +2 -2
  39. data/lib/active_merchant/billing/gateways/citrus_pay.rb +1 -1
  40. data/lib/active_merchant/billing/gateways/clearhaus.rb +3 -3
  41. data/lib/active_merchant/billing/gateways/commercegate.rb +1 -1
  42. data/lib/active_merchant/billing/gateways/conekta.rb +1 -1
  43. data/lib/active_merchant/billing/gateways/creditcall.rb +1 -1
  44. data/lib/active_merchant/billing/gateways/credorax.rb +6 -2
  45. data/lib/active_merchant/billing/gateways/ct_payment.rb +2 -2
  46. data/lib/active_merchant/billing/gateways/culqi.rb +1 -1
  47. data/lib/active_merchant/billing/gateways/cyber_source.rb +13 -4
  48. data/lib/active_merchant/billing/gateways/d_local.rb +7 -3
  49. data/lib/active_merchant/billing/gateways/data_cash.rb +1 -1
  50. data/lib/active_merchant/billing/gateways/dibs.rb +2 -2
  51. data/lib/active_merchant/billing/gateways/digitzs.rb +2 -2
  52. data/lib/active_merchant/billing/gateways/ebanx.rb +4 -4
  53. data/lib/active_merchant/billing/gateways/efsnet.rb +2 -2
  54. data/lib/active_merchant/billing/gateways/elavon.rb +1 -1
  55. data/lib/active_merchant/billing/gateways/element.rb +3 -3
  56. data/lib/active_merchant/billing/gateways/epay.rb +3 -3
  57. data/lib/active_merchant/billing/gateways/evo_ca.rb +1 -1
  58. data/lib/active_merchant/billing/gateways/eway.rb +1 -1
  59. data/lib/active_merchant/billing/gateways/eway_managed.rb +1 -1
  60. data/lib/active_merchant/billing/gateways/eway_rapid.rb +2 -2
  61. data/lib/active_merchant/billing/gateways/exact.rb +3 -3
  62. data/lib/active_merchant/billing/gateways/ezic.rb +1 -1
  63. data/lib/active_merchant/billing/gateways/fat_zebra.rb +4 -4
  64. data/lib/active_merchant/billing/gateways/federated_canada.rb +1 -1
  65. data/lib/active_merchant/billing/gateways/finansbank.rb +2 -2
  66. data/lib/active_merchant/billing/gateways/first_giving.rb +1 -1
  67. data/lib/active_merchant/billing/gateways/first_pay.rb +1 -1
  68. data/lib/active_merchant/billing/gateways/firstdata_e4.rb +4 -4
  69. data/lib/active_merchant/billing/gateways/firstdata_e4_v27.rb +3 -3
  70. data/lib/active_merchant/billing/gateways/flo2cash.rb +10 -10
  71. data/lib/active_merchant/billing/gateways/forte.rb +2 -2
  72. data/lib/active_merchant/billing/gateways/garanti.rb +2 -2
  73. data/lib/active_merchant/billing/gateways/global_collect.rb +5 -5
  74. data/lib/active_merchant/billing/gateways/global_transport.rb +1 -1
  75. data/lib/active_merchant/billing/gateways/hdfc.rb +9 -9
  76. data/lib/active_merchant/billing/gateways/hps.rb +1 -1
  77. data/lib/active_merchant/billing/gateways/iats_payments.rb +2 -2
  78. data/lib/active_merchant/billing/gateways/inspire.rb +1 -1
  79. data/lib/active_merchant/billing/gateways/instapay.rb +1 -1
  80. data/lib/active_merchant/billing/gateways/ipp.rb +1 -1
  81. data/lib/active_merchant/billing/gateways/iridium.rb +3 -3
  82. data/lib/active_merchant/billing/gateways/itransact.rb +1 -1
  83. data/lib/active_merchant/billing/gateways/iveri.rb +2 -2
  84. data/lib/active_merchant/billing/gateways/ixopay.rb +1 -1
  85. data/lib/active_merchant/billing/gateways/jetpay.rb +2 -2
  86. data/lib/active_merchant/billing/gateways/jetpay_v2.rb +2 -2
  87. data/lib/active_merchant/billing/gateways/komoju.rb +1 -1
  88. data/lib/active_merchant/billing/gateways/kushki.rb +4 -4
  89. data/lib/active_merchant/billing/gateways/latitude19.rb +2 -2
  90. data/lib/active_merchant/billing/gateways/linkpoint.rb +2 -2
  91. data/lib/active_merchant/billing/gateways/litle.rb +4 -4
  92. data/lib/active_merchant/billing/gateways/maxipago.rb +2 -2
  93. data/lib/active_merchant/billing/gateways/mercado_pago.rb +11 -6
  94. data/lib/active_merchant/billing/gateways/merchant_e_solutions.rb +1 -1
  95. data/lib/active_merchant/billing/gateways/merchant_one.rb +2 -2
  96. data/lib/active_merchant/billing/gateways/merchant_partners.rb +1 -1
  97. data/lib/active_merchant/billing/gateways/merchant_ware.rb +1 -1
  98. data/lib/active_merchant/billing/gateways/merchant_ware_version_four.rb +1 -1
  99. data/lib/active_merchant/billing/gateways/merchant_warrior.rb +2 -2
  100. data/lib/active_merchant/billing/gateways/mercury.rb +4 -4
  101. data/lib/active_merchant/billing/gateways/metrics_global.rb +1 -1
  102. data/lib/active_merchant/billing/gateways/micropayment.rb +2 -2
  103. data/lib/active_merchant/billing/gateways/migs.rb +1 -1
  104. data/lib/active_merchant/billing/gateways/modern_payments_cim.rb +1 -1
  105. data/lib/active_merchant/billing/gateways/monei.rb +2 -2
  106. data/lib/active_merchant/billing/gateways/moneris.rb +17 -17
  107. data/lib/active_merchant/billing/gateways/money_movers.rb +1 -1
  108. data/lib/active_merchant/billing/gateways/mundipagg.rb +1 -1
  109. data/lib/active_merchant/billing/gateways/nab_transact.rb +2 -2
  110. data/lib/active_merchant/billing/gateways/ncr_secure_pay.rb +1 -1
  111. data/lib/active_merchant/billing/gateways/net_registry.rb +2 -2
  112. data/lib/active_merchant/billing/gateways/netaxept.rb +2 -2
  113. data/lib/active_merchant/billing/gateways/netbanx.rb +46 -22
  114. data/lib/active_merchant/billing/gateways/netbilling.rb +2 -2
  115. data/lib/active_merchant/billing/gateways/netpay.rb +2 -2
  116. data/lib/active_merchant/billing/gateways/network_merchants.rb +1 -1
  117. data/lib/active_merchant/billing/gateways/nmi.rb +4 -4
  118. data/lib/active_merchant/billing/gateways/ogone.rb +2 -2
  119. data/lib/active_merchant/billing/gateways/omise.rb +1 -1
  120. data/lib/active_merchant/billing/gateways/openpay.rb +1 -1
  121. data/lib/active_merchant/billing/gateways/opp.rb +1 -1
  122. data/lib/active_merchant/billing/gateways/optimal_payment.rb +4 -4
  123. data/lib/active_merchant/billing/gateways/orbital.rb +6 -6
  124. data/lib/active_merchant/billing/gateways/orbital/orbital_soft_descriptors.rb +1 -1
  125. data/lib/active_merchant/billing/gateways/pac_net_raven.rb +1 -1
  126. data/lib/active_merchant/billing/gateways/pagarme.rb +2 -2
  127. data/lib/active_merchant/billing/gateways/pago_facil.rb +1 -1
  128. data/lib/active_merchant/billing/gateways/pay_conex.rb +1 -1
  129. data/lib/active_merchant/billing/gateways/pay_gate_xml.rb +2 -2
  130. data/lib/active_merchant/billing/gateways/pay_hub.rb +1 -1
  131. data/lib/active_merchant/billing/gateways/pay_junction.rb +3 -3
  132. data/lib/active_merchant/billing/gateways/pay_junction_v2.rb +2 -2
  133. data/lib/active_merchant/billing/gateways/pay_secure.rb +1 -1
  134. data/lib/active_merchant/billing/gateways/paybox_direct.rb +3 -3
  135. data/lib/active_merchant/billing/gateways/payeezy.rb +2 -2
  136. data/lib/active_merchant/billing/gateways/payex.rb +13 -13
  137. data/lib/active_merchant/billing/gateways/payflow.rb +5 -5
  138. data/lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb +1 -1
  139. data/lib/active_merchant/billing/gateways/payflow_uk.rb +1 -1
  140. data/lib/active_merchant/billing/gateways/payment_express.rb +1 -1
  141. data/lib/active_merchant/billing/gateways/paymentez.rb +1 -1
  142. data/lib/active_merchant/billing/gateways/paymill.rb +1 -1
  143. data/lib/active_merchant/billing/gateways/paypal.rb +2 -2
  144. data/lib/active_merchant/billing/gateways/paypal_ca.rb +1 -1
  145. data/lib/active_merchant/billing/gateways/payscout.rb +1 -1
  146. data/lib/active_merchant/billing/gateways/paystation.rb +1 -1
  147. data/lib/active_merchant/billing/gateways/payu_in.rb +1 -1
  148. data/lib/active_merchant/billing/gateways/payu_latam.rb +6 -7
  149. data/lib/active_merchant/billing/gateways/payway.rb +1 -1
  150. data/lib/active_merchant/billing/gateways/pin.rb +1 -1
  151. data/lib/active_merchant/billing/gateways/plugnpay.rb +5 -5
  152. data/lib/active_merchant/billing/gateways/pro_pay.rb +2 -2
  153. data/lib/active_merchant/billing/gateways/psigate.rb +1 -1
  154. data/lib/active_merchant/billing/gateways/psl_card.rb +2 -2
  155. data/lib/active_merchant/billing/gateways/qbms.rb +1 -1
  156. data/lib/active_merchant/billing/gateways/quantum.rb +3 -3
  157. data/lib/active_merchant/billing/gateways/quickbooks.rb +6 -6
  158. data/lib/active_merchant/billing/gateways/quickpay/quickpay_common.rb +3 -3
  159. data/lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb +4 -4
  160. data/lib/active_merchant/billing/gateways/qvalent.rb +1 -1
  161. data/lib/active_merchant/billing/gateways/realex.rb +1 -1
  162. data/lib/active_merchant/billing/gateways/redsys.rb +4 -4
  163. data/lib/active_merchant/billing/gateways/s5.rb +1 -1
  164. data/lib/active_merchant/billing/gateways/safe_charge.rb +2 -2
  165. data/lib/active_merchant/billing/gateways/sage.rb +3 -3
  166. data/lib/active_merchant/billing/gateways/sage_pay.rb +3 -3
  167. data/lib/active_merchant/billing/gateways/sallie_mae.rb +1 -1
  168. data/lib/active_merchant/billing/gateways/secure_net.rb +1 -1
  169. data/lib/active_merchant/billing/gateways/secure_pay.rb +1 -1
  170. data/lib/active_merchant/billing/gateways/secure_pay_au.rb +2 -2
  171. data/lib/active_merchant/billing/gateways/secure_pay_tech.rb +2 -2
  172. data/lib/active_merchant/billing/gateways/securion_pay.rb +1 -1
  173. data/lib/active_merchant/billing/gateways/skip_jack.rb +5 -5
  174. data/lib/active_merchant/billing/gateways/so_easy_pay.rb +6 -6
  175. data/lib/active_merchant/billing/gateways/spreedly_core.rb +1 -1
  176. data/lib/active_merchant/billing/gateways/stripe.rb +6 -6
  177. data/lib/active_merchant/billing/gateways/stripe_payment_intents.rb +20 -1
  178. data/lib/active_merchant/billing/gateways/swipe_checkout.rb +1 -1
  179. data/lib/active_merchant/billing/gateways/telr.rb +4 -4
  180. data/lib/active_merchant/billing/gateways/tns.rb +1 -1
  181. data/lib/active_merchant/billing/gateways/trans_first.rb +2 -2
  182. data/lib/active_merchant/billing/gateways/trans_first_transaction_express.rb +1 -1
  183. data/lib/active_merchant/billing/gateways/transact_pro.rb +1 -1
  184. data/lib/active_merchant/billing/gateways/transax.rb +1 -1
  185. data/lib/active_merchant/billing/gateways/trexle.rb +1 -1
  186. data/lib/active_merchant/billing/gateways/trust_commerce.rb +5 -5
  187. data/lib/active_merchant/billing/gateways/usa_epay_advanced.rb +6 -6
  188. data/lib/active_merchant/billing/gateways/usa_epay_transaction.rb +1 -1
  189. data/lib/active_merchant/billing/gateways/vanco.rb +1 -1
  190. data/lib/active_merchant/billing/gateways/verifi.rb +3 -3
  191. data/lib/active_merchant/billing/gateways/viaklix.rb +1 -1
  192. data/lib/active_merchant/billing/gateways/visanet_peru.rb +3 -3
  193. data/lib/active_merchant/billing/gateways/webpay.rb +1 -1
  194. data/lib/active_merchant/billing/gateways/wepay.rb +2 -2
  195. data/lib/active_merchant/billing/gateways/wirecard.rb +1 -1
  196. data/lib/active_merchant/billing/gateways/world_net.rb +35 -35
  197. data/lib/active_merchant/billing/gateways/worldpay.rb +6 -6
  198. data/lib/active_merchant/billing/gateways/worldpay_online_payments.rb +1 -1
  199. data/lib/active_merchant/billing/gateways/worldpay_us.rb +1 -1
  200. data/lib/active_merchant/version.rb +1 -1
  201. data/lib/support/gateway_support.rb +1 -1
  202. metadata +35 -35
@@ -22,7 +22,7 @@ module ActiveMerchant #:nodoc:
22
22
 
23
23
  SUCCESS = 'true'
24
24
 
25
- SENSITIVE_FIELDS = [:verification_str2, :expiry_date, :card_number]
25
+ SENSITIVE_FIELDS = %i[verification_str2 expiry_date card_number]
26
26
 
27
27
  BRANDS = {
28
28
  visa: 'Visa',
@@ -37,7 +37,7 @@ module ActiveMerchant #:nodoc:
37
37
  DEFAULT_ECI = '07'
38
38
 
39
39
  self.supported_cardtypes = BRANDS.keys
40
- self.supported_countries = ['CA', 'US']
40
+ self.supported_countries = %w[CA US]
41
41
  self.default_currency = 'USD'
42
42
  self.homepage_url = 'http://www.firstdata.com'
43
43
  self.display_name = 'FirstData Global Gateway e4'
@@ -217,7 +217,7 @@ module ActiveMerchant #:nodoc:
217
217
  end
218
218
 
219
219
  def add_identification(xml, identification)
220
- authorization_num, transaction_tag, _ = identification.split(';')
220
+ authorization_num, transaction_tag, = identification.split(';')
221
221
 
222
222
  xml.tag! 'Authorization_Num', authorization_num
223
223
  xml.tag! 'Transaction_Tag', transaction_tag
@@ -262,7 +262,7 @@ module ActiveMerchant #:nodoc:
262
262
  address = options[:billing_address] || options[:address]
263
263
  if address
264
264
  address_values = []
265
- [:address1, :zip, :city, :state, :country].each { |part| address_values << address[part].to_s.tr("\r\n", ' ').strip }
265
+ %i[address1 zip city state country].each { |part| address_values << address[part].to_s.tr("\r\n", ' ').strip }
266
266
  xml.tag! 'VerificationStr1', address_values.join('|')
267
267
  end
268
268
 
@@ -16,7 +16,7 @@ module ActiveMerchant #:nodoc:
16
16
 
17
17
  SUCCESS = 'true'
18
18
 
19
- SENSITIVE_FIELDS = [:cvdcode, :expiry_date, :card_number]
19
+ SENSITIVE_FIELDS = %i[cvdcode expiry_date card_number]
20
20
 
21
21
  BRANDS = {
22
22
  visa: 'Visa',
@@ -29,7 +29,7 @@ module ActiveMerchant #:nodoc:
29
29
  DEFAULT_ECI = '07'
30
30
 
31
31
  self.supported_cardtypes = BRANDS.keys
32
- self.supported_countries = ['CA', 'US']
32
+ self.supported_countries = %w[CA US]
33
33
  self.default_currency = 'USD'
34
34
  self.homepage_url = 'http://www.firstdata.com'
35
35
  self.display_name = 'FirstData Global Gateway e4 v27'
@@ -191,7 +191,7 @@ module ActiveMerchant #:nodoc:
191
191
  end
192
192
 
193
193
  def add_identification(xml, identification)
194
- authorization_num, transaction_tag, _ = identification.split(';')
194
+ authorization_num, transaction_tag, = identification.split(';')
195
195
 
196
196
  xml.tag! 'Authorization_Num', authorization_num
197
197
  xml.tag! 'Transaction_Tag', transaction_tag
@@ -10,7 +10,7 @@ module ActiveMerchant #:nodoc:
10
10
  self.supported_countries = ['NZ']
11
11
  self.default_currency = 'NZD'
12
12
  self.money_format = :dollars
13
- self.supported_cardtypes = [:visa, :master, :american_express, :diners_club]
13
+ self.supported_cardtypes = %i[visa master american_express diners_club]
14
14
 
15
15
  BRAND_MAP = {
16
16
  'visa' => 'VISA',
@@ -142,15 +142,15 @@ module ActiveMerchant #:nodoc:
142
142
  end
143
143
 
144
144
  def envelope_wrap(action, body)
145
- <<-EOS
146
- <?xml version="1.0" encoding="utf-8"?>
147
- <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
148
- <soap12:Body>
149
- <#{action} xmlns="http://www.flo2cash.co.nz/webservices/paymentwebservice">
150
- #{body}
151
- </#{action}>
152
- </soap12:Body>
153
- </soap12:Envelope>
145
+ <<~EOS
146
+ <?xml version="1.0" encoding="utf-8"?>
147
+ <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
148
+ <soap12:Body>
149
+ <#{action} xmlns="http://www.flo2cash.co.nz/webservices/paymentwebservice">
150
+ #{body}
151
+ </#{action}>
152
+ </soap12:Body>
153
+ </soap12:Envelope>
154
154
  EOS
155
155
  end
156
156
 
@@ -10,7 +10,7 @@ module ActiveMerchant #:nodoc:
10
10
 
11
11
  self.supported_countries = ['US']
12
12
  self.default_currency = 'USD'
13
- self.supported_cardtypes = [:visa, :master, :american_express, :discover]
13
+ self.supported_cardtypes = %i[visa master american_express discover]
14
14
 
15
15
  self.homepage_url = 'https://www.forte.net'
16
16
  self.display_name = 'Forte'
@@ -260,7 +260,7 @@ module ActiveMerchant #:nodoc:
260
260
  end
261
261
 
262
262
  def transaction_id_from(authorization)
263
- transaction_id, _, original_auth_transaction_id, _ = split_authorization(authorization)
263
+ transaction_id, _, original_auth_transaction_id, = split_authorization(authorization)
264
264
  original_auth_transaction_id.present? ? original_auth_transaction_id : transaction_id
265
265
  end
266
266
  end
@@ -5,10 +5,10 @@ module ActiveMerchant #:nodoc:
5
5
  self.test_url = 'https://sanalposprovtest.garanti.com.tr/VPServlet'
6
6
 
7
7
  # The countries the gateway supports merchants from as 2 digit ISO country codes
8
- self.supported_countries = ['US', 'TR']
8
+ self.supported_countries = %w[US TR]
9
9
 
10
10
  # The card types supported by the payment gateway
11
- self.supported_cardtypes = [:visa, :master, :american_express, :discover]
11
+ self.supported_cardtypes = %i[visa master american_express discover]
12
12
 
13
13
  # The homepage URL of the gateway
14
14
  self.homepage_url = 'https://sanalposweb.garanti.com.tr'
@@ -291,11 +291,11 @@ module ActiveMerchant #:nodoc:
291
291
  end
292
292
 
293
293
  def auth_digest(action, post, authorization = nil)
294
- data = <<-EOS
295
- POST
296
- #{content_type}
297
- #{date}
298
- #{uri(action, authorization)}
294
+ data = <<~EOS
295
+ POST
296
+ #{content_type}
297
+ #{date}
298
+ #{uri(action, authorization)}
299
299
  EOS
300
300
  digest = OpenSSL::Digest.new('sha256')
301
301
  key = @options[:secret_api_key]
@@ -8,7 +8,7 @@ module ActiveMerchant #:nodoc:
8
8
 
9
9
  self.supported_countries = %w(CA PR US)
10
10
  self.default_currency = 'USD'
11
- self.supported_cardtypes = [:visa, :master, :american_express, :discover, :diners_club, :jcb]
11
+ self.supported_cardtypes = %i[visa master american_express discover diners_club jcb]
12
12
 
13
13
  self.homepage_url = 'https://www.globalpaymentsinc.com'
14
14
  self.display_name = 'Global Transport'
@@ -12,7 +12,7 @@ module ActiveMerchant #:nodoc:
12
12
  self.supported_countries = ['IN']
13
13
  self.default_currency = 'INR'
14
14
  self.money_format = :dollars
15
- self.supported_cardtypes = [:visa, :master, :discover, :diners_club]
15
+ self.supported_cardtypes = %i[visa master discover diners_club]
16
16
 
17
17
  def initialize(options={})
18
18
  requires!(options, :login, :password)
@@ -81,14 +81,14 @@ module ActiveMerchant #:nodoc:
81
81
  post[:udf2] = escape(options[:email]) if options[:email]
82
82
  if address = (options[:billing_address] || options[:address])
83
83
  post[:udf3] = escape(address[:phone]) if address[:phone]
84
- post[:udf4] = escape(<<EOA)
85
- #{address[:name]}
86
- #{address[:company]}
87
- #{address[:address1]}
88
- #{address[:address2]}
89
- #{address[:city]} #{address[:state]} #{address[:zip]}
90
- #{address[:country]}
91
- EOA
84
+ post[:udf4] = escape(<<~EOA)
85
+ #{address[:name]}
86
+ #{address[:company]}
87
+ #{address[:address1]}
88
+ #{address[:address2]}
89
+ #{address[:city]} #{address[:state]} #{address[:zip]}
90
+ #{address[:country]}
91
+ EOA
92
92
  end
93
93
  end
94
94
 
@@ -8,7 +8,7 @@ module ActiveMerchant #:nodoc:
8
8
 
9
9
  self.supported_countries = ['US']
10
10
  self.default_currency = 'USD'
11
- self.supported_cardtypes = [:visa, :master, :american_express, :discover, :jbc, :diners_club]
11
+ self.supported_cardtypes = %i[visa master american_express discover jbc diners_club]
12
12
 
13
13
  self.homepage_url = 'http://developer.heartlandpaymentsystems.com/SecureSubmit/'
14
14
  self.display_name = 'Heartland Payment Systems'
@@ -8,7 +8,7 @@ module ActiveMerchant #:nodoc:
8
8
 
9
9
  self.supported_countries = %w(AU BR CA CH DE DK ES FI FR GR HK IE IT NL NO PT SE SG TR GB US TH ID PH BE)
10
10
  self.default_currency = 'USD'
11
- self.supported_cardtypes = [:visa, :master, :american_express, :discover]
11
+ self.supported_cardtypes = %i[visa master american_express discover]
12
12
 
13
13
  self.homepage_url = 'http://home.iatspayments.com/'
14
14
  self.display_name = 'iATS Payments'
@@ -260,7 +260,7 @@ module ActiveMerchant #:nodoc:
260
260
  end
261
261
 
262
262
  def authorization_from(action, response)
263
- if [:store, :unstore].include?(action)
263
+ if %i[store unstore].include?(action)
264
264
  response[:customercode]
265
265
  elsif [:purchase_check].include?(action)
266
266
  response[:transaction_id] ? "#{response[:transaction_id]}|check" : nil
@@ -5,7 +5,7 @@ module ActiveMerchant #:nodoc:
5
5
  self.live_url = self.test_url = 'https://secure.inspiregateway.net/api/transact.php'
6
6
 
7
7
  self.supported_countries = ['US']
8
- self.supported_cardtypes = [:visa, :master, :american_express]
8
+ self.supported_cardtypes = %i[visa master american_express]
9
9
  self.homepage_url = 'http://www.inspiregateway.com'
10
10
  self.display_name = 'Inspire Commerce'
11
11
 
@@ -8,7 +8,7 @@ module ActiveMerchant #:nodoc:
8
8
  self.money_format = :dollars
9
9
  self.default_currency = 'USD'
10
10
  # The card types supported by the payment gateway
11
- self.supported_cardtypes = [:visa, :master, :american_express, :discover]
11
+ self.supported_cardtypes = %i[visa master american_express discover]
12
12
 
13
13
  # The homepage URL of the gateway
14
14
  self.homepage_url = 'http://www.instapayllc.com'
@@ -7,7 +7,7 @@ module ActiveMerchant #:nodoc:
7
7
  self.test_url = 'https://demo.ippayments.com.au/interface/api/dts.asmx'
8
8
 
9
9
  self.supported_countries = ['AU']
10
- self.supported_cardtypes = [:visa, :master, :american_express, :diners_club, :jcb]
10
+ self.supported_cardtypes = %i[visa master american_express diners_club jcb]
11
11
 
12
12
  self.homepage_url = 'http://www.ippayments.com.au/'
13
13
  self.display_name = 'IPP'
@@ -10,12 +10,12 @@ module ActiveMerchant #:nodoc:
10
10
  self.live_url = self.test_url = 'https://gw1.iridiumcorp.net/'
11
11
 
12
12
  # The countries the gateway supports merchants from as 2 digit ISO country codes
13
- self.supported_countries = ['GB', 'ES']
13
+ self.supported_countries = %w[GB ES]
14
14
  self.default_currency = 'EUR'
15
15
  self.money_format = :cents
16
16
 
17
17
  # The card types supported by the payment gateway
18
- self.supported_cardtypes = [:visa, :master, :american_express, :discover, :maestro, :jcb, :diners_club]
18
+ self.supported_cardtypes = %i[visa master american_express discover maestro jcb diners_club]
19
19
 
20
20
  # The homepage URL of the gateway
21
21
  self.homepage_url = 'http://www.iridiumcorp.co.uk/'
@@ -288,7 +288,7 @@ module ActiveMerchant #:nodoc:
288
288
 
289
289
  def build_reference_request(type, money, authorization, options)
290
290
  options[:action] = 'CrossReferenceTransaction'
291
- order_id, cross_reference, _ = authorization.split(';')
291
+ order_id, cross_reference, = authorization.split(';')
292
292
  build_request(options) do |xml|
293
293
  if money
294
294
  currency = options[:currency] || currency(money)
@@ -38,7 +38,7 @@ module ActiveMerchant #:nodoc:
38
38
  self.supported_countries = ['US']
39
39
 
40
40
  # The card types supported by the payment gateway
41
- self.supported_cardtypes = [:visa, :master, :american_express, :discover]
41
+ self.supported_cardtypes = %i[visa master american_express discover]
42
42
 
43
43
  # The homepage URL of the gateway
44
44
  self.homepage_url = 'http://www.itransact.com/'
@@ -5,10 +5,10 @@ module ActiveMerchant #:nodoc:
5
5
  class IveriGateway < Gateway
6
6
  self.live_url = self.test_url = 'https://portal.nedsecure.co.za/iVeriWebService/Service.asmx'
7
7
 
8
- self.supported_countries = ['US', 'ZA', 'GB']
8
+ self.supported_countries = %w[US ZA GB]
9
9
  self.default_currency = 'ZAR'
10
10
  self.money_format = :cents
11
- self.supported_cardtypes = [:visa, :master, :american_express]
11
+ self.supported_cardtypes = %i[visa master american_express]
12
12
 
13
13
  self.homepage_url = 'http://www.iveri.com'
14
14
  self.display_name = 'iVeri'
@@ -9,7 +9,7 @@ module ActiveMerchant #:nodoc:
9
9
  self.supported_countries = %w(AO AQ AR AS AT AU AW AX AZ BA BB BD BE BF BG BH BI BJ BL BM BN BO BQ BQ BR BS BT BV BW BY BZ CA CC CD CF CG CH CI CK CL CM CN CO CR CU CV CW CX CY CZ DE DJ DK DM DO DZ EC EE EG EH ER ES ET FI FJ FK FM FO FR GA GB GD GE GF GG GH GI GL GM GN GP GQ GR GS GT GU GW GY HK HM HN HR HT HU ID IE IL IM IN IO IQ IR IS IT JE JM JO JP KE KG KH KI KM KN KP KR KW KY KZ LA LB LC LI LK LR LS LT LU LV LY MA MC MD ME MF MG MH MK ML MM MN MO MP MQ MR MS MT MU MV MW MX MY MZ NA NC NE NF NG NI NL NO NP NR NU NZ OM PA PE PF PG PH PK PL PM PN PR PS PT PW PY QA RE RO RS RU RW SA SB SC SD SE SG SH SI SJ SK SL SM SN SO SR SS ST SV SX SY SZ TC TD TF TG TH TJ TK TL TM TN TO TR TT TV TW TZ UA UG UM US UY UZ VA VC VE VG VI VN VU WF WS YE YT ZA ZM ZW)
10
10
  self.default_currency = 'EUR'
11
11
  self.currencies_with_three_decimal_places = %w(BHD IQD JOD KWD LWD OMR TND)
12
- self.supported_cardtypes = [:visa, :master, :american_express, :discover, :diners_club, :jcb, :maestro]
12
+ self.supported_cardtypes = %i[visa master american_express discover diners_club jcb maestro]
13
13
 
14
14
  self.homepage_url = 'https://www.ixopay.com'
15
15
  self.display_name = 'Ixopay'
@@ -8,10 +8,10 @@ module ActiveMerchant #:nodoc:
8
8
  self.live_ca_url = 'https://gateway17.jetpay.com/canada-bb'
9
9
 
10
10
  # The countries the gateway supports merchants from as 2 digit ISO country codes
11
- self.supported_countries = ['US', 'CA']
11
+ self.supported_countries = %w[US CA]
12
12
 
13
13
  # The card types supported by the payment gateway
14
- self.supported_cardtypes = [:visa, :master, :american_express, :discover]
14
+ self.supported_cardtypes = %i[visa master american_express discover]
15
15
 
16
16
  # The homepage URL of the gateway
17
17
  self.homepage_url = 'http://www.jetpay.com/'
@@ -6,8 +6,8 @@ module ActiveMerchant #:nodoc:
6
6
 
7
7
  self.money_format = :cents
8
8
  self.default_currency = 'USD'
9
- self.supported_countries = ['US', 'CA']
10
- self.supported_cardtypes = [:visa, :master, :american_express, :discover]
9
+ self.supported_countries = %w[US CA]
10
+ self.supported_cardtypes = %i[visa master american_express discover]
11
11
 
12
12
  self.homepage_url = 'http://www.jetpay.com'
13
13
  self.display_name = 'JetPay'
@@ -10,7 +10,7 @@ module ActiveMerchant #:nodoc:
10
10
  self.money_format = :cents
11
11
  self.homepage_url = 'https://www.komoju.com/'
12
12
  self.display_name = 'Komoju'
13
- self.supported_cardtypes = [:visa, :master, :american_express, :jcb]
13
+ self.supported_cardtypes = %i[visa master american_express jcb]
14
14
 
15
15
  STANDARD_ERROR_CODE_MAPPING = {
16
16
  'bad_verification_value' => 'incorrect_cvc',
@@ -7,10 +7,10 @@ module ActiveMerchant #:nodoc:
7
7
  self.test_url = 'https://api-uat.kushkipagos.com/'
8
8
  self.live_url = 'https://api.kushkipagos.com/'
9
9
 
10
- self.supported_countries = ['CL', 'CO', 'EC', 'MX', 'PE']
10
+ self.supported_countries = %w[CL CO EC MX PE]
11
11
  self.default_currency = 'USD'
12
12
  self.money_format = :dollars
13
- self.supported_cardtypes = [:visa, :master, :american_express, :discover, :diners_club]
13
+ self.supported_cardtypes = %i[visa master american_express discover diners_club alia]
14
14
 
15
15
  def initialize(options={})
16
16
  requires!(options, :public_merchant_id, :private_merchant_id)
@@ -184,7 +184,7 @@ module ActiveMerchant #:nodoc:
184
184
  end
185
185
 
186
186
  def ssl_invoke(action, params)
187
- if ['void', 'refund'].include?(action)
187
+ if %w[void refund].include?(action)
188
188
  ssl_request(:delete, url(action, params), nil, headers(action))
189
189
  else
190
190
  ssl_post(url(action, params), post_data(params), headers(action))
@@ -206,7 +206,7 @@ module ActiveMerchant #:nodoc:
206
206
  def url(action, params)
207
207
  base_url = test? ? test_url : live_url
208
208
 
209
- if ['void', 'refund'].include?(action)
209
+ if %w[void refund].include?(action)
210
210
  base_url + 'v1/' + ENDPOINT[action] + '/' + params[:ticketNumber].to_s
211
211
  else
212
212
  base_url + 'card/v1/' + ENDPOINT[action]
@@ -7,10 +7,10 @@ module ActiveMerchant #:nodoc:
7
7
  self.live_url = 'https://gateway.l19tech.com/payments/'
8
8
  self.test_url = 'https://gateway-sb.l19tech.com/payments/'
9
9
 
10
- self.supported_countries = ['US', 'CA']
10
+ self.supported_countries = %w[US CA]
11
11
  self.default_currency = 'USD'
12
12
  self.money_format = :dollars
13
- self.supported_cardtypes = [:visa, :master, :american_express, :discover, :diners_club, :jcb]
13
+ self.supported_cardtypes = %i[visa master american_express discover diners_club jcb]
14
14
 
15
15
  RESPONSE_CODE_MAPPING = {
16
16
  '100' => 'Approved',
@@ -130,7 +130,7 @@ module ActiveMerchant #:nodoc:
130
130
  self.live_url = 'https://secure.linkpt.net:1129/'
131
131
 
132
132
  self.supported_countries = ['US']
133
- self.supported_cardtypes = [:visa, :master, :american_express, :discover, :jcb, :diners_club]
133
+ self.supported_cardtypes = %i[visa master american_express discover jcb diners_club]
134
134
  self.homepage_url = 'http://www.linkpoint.com/'
135
135
  self.display_name = 'LinkPoint'
136
136
 
@@ -169,7 +169,7 @@ module ActiveMerchant #:nodoc:
169
169
  def recurring(money, creditcard, options={})
170
170
  ActiveMerchant.deprecated RECURRING_DEPRECATION_MESSAGE
171
171
 
172
- requires!(options, [:periodicity, :bimonthly, :monthly, :biweekly, :weekly, :yearly, :daily], :installments, :order_id)
172
+ requires!(options, %i[periodicity bimonthly monthly biweekly weekly yearly daily], :installments, :order_id)
173
173
 
174
174
  options.update(
175
175
  ordertype: 'SALE',
@@ -10,7 +10,7 @@ module ActiveMerchant #:nodoc:
10
10
 
11
11
  self.supported_countries = ['US']
12
12
  self.default_currency = 'USD'
13
- self.supported_cardtypes = [:visa, :master, :american_express, :discover, :diners_club, :jcb]
13
+ self.supported_cardtypes = %i[visa master american_express discover diners_club jcb]
14
14
 
15
15
  self.homepage_url = 'http://www.vantiv.com/'
16
16
  self.display_name = 'Vantiv eCommerce'
@@ -53,7 +53,7 @@ module ActiveMerchant #:nodoc:
53
53
  end
54
54
 
55
55
  def capture(money, authorization, options={})
56
- transaction_id, _, _ = split_authorization(authorization)
56
+ transaction_id, = split_authorization(authorization)
57
57
 
58
58
  request = build_xml_request do |doc|
59
59
  add_authentication(doc)
@@ -78,7 +78,7 @@ module ActiveMerchant #:nodoc:
78
78
  add_descriptor(doc, options)
79
79
  doc.send(refund_type(payment), transaction_attributes(options)) do
80
80
  if payment.is_a?(String)
81
- transaction_id, _, _ = split_authorization(payment)
81
+ transaction_id, = split_authorization(payment)
82
82
  doc.litleTxnId(transaction_id)
83
83
  doc.amount(money) if money
84
84
  elsif check?(payment)
@@ -192,7 +192,7 @@ module ActiveMerchant #:nodoc:
192
192
  end
193
193
 
194
194
  def refund_type(payment)
195
- _, kind, _ = split_authorization(payment)
195
+ _, kind, = split_authorization(payment)
196
196
  if check?(payment) || kind == 'echeckSales'
197
197
  :echeckCredit
198
198
  else
@@ -11,7 +11,7 @@ module ActiveMerchant #:nodoc:
11
11
  self.supported_countries = ['BR']
12
12
  self.default_currency = 'BRL'
13
13
  self.money_format = :dollars
14
- self.supported_cardtypes = [:visa, :master, :discover, :american_express, :diners_club]
14
+ self.supported_cardtypes = %i[visa master discover american_express diners_club]
15
15
  self.homepage_url = 'http://www.maxipago.com/'
16
16
  self.display_name = 'maxiPago!'
17
17
 
@@ -212,7 +212,7 @@ module ActiveMerchant #:nodoc:
212
212
  end
213
213
 
214
214
  def add_order_id(xml, authorization)
215
- order_id, _ = split_authorization(authorization)
215
+ order_id, = split_authorization(authorization)
216
216
  xml.orderID order_id
217
217
  end
218
218
  end