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
@@ -23,7 +23,7 @@ module ActiveMerchant #:nodoc:
23
23
  quasi: 'Q'
24
24
  }
25
25
 
26
- SUCCESS_CODES = ['1', 'T']
26
+ SUCCESS_CODES = %w[1 T]
27
27
  SUCCESS_MESSAGE = 'The transaction was approved'
28
28
  FAILURE_MESSAGE = 'The transaction failed'
29
29
  TEST_LOGIN = '104901072025'
@@ -31,7 +31,7 @@ module ActiveMerchant #:nodoc:
31
31
  self.display_name = 'NETbilling'
32
32
  self.homepage_url = 'http://www.netbilling.com'
33
33
  self.supported_countries = ['US']
34
- self.supported_cardtypes = [:visa, :master, :american_express, :discover, :jcb, :diners_club]
34
+ self.supported_cardtypes = %i[visa master american_express discover jcb diners_club]
35
35
 
36
36
  def initialize(options = {})
37
37
  requires!(options, :login)
@@ -42,7 +42,7 @@ module ActiveMerchant #:nodoc:
42
42
  self.default_currency = 'MXN'
43
43
 
44
44
  # The card types supported by the payment gateway
45
- self.supported_cardtypes = [:visa, :master, :american_express, :diners_club]
45
+ self.supported_cardtypes = %i[visa master american_express diners_club]
46
46
 
47
47
  # The homepage URL of the gateway
48
48
  self.homepage_url = 'http://www.netpay.com.mx'
@@ -55,7 +55,7 @@ module ActiveMerchant #:nodoc:
55
55
  }
56
56
 
57
57
  # The header keys that we will provide in the response params hash
58
- RESPONSE_KEYS = ['ResponseMsg', 'ResponseText', 'ResponseCode', 'TimeIn', 'TimeOut', 'AuthCode', 'OrderId', 'CardTypeName', 'MerchantId', 'IssuerAuthDate']
58
+ RESPONSE_KEYS = %w[ResponseMsg ResponseText ResponseCode TimeIn TimeOut AuthCode OrderId CardTypeName MerchantId IssuerAuthDate]
59
59
 
60
60
  def initialize(options = {})
61
61
  requires!(options, :store_id, :login, :password)
@@ -4,7 +4,7 @@ module ActiveMerchant #:nodoc:
4
4
  self.live_url = self.test_url = 'https://secure.networkmerchants.com/api/transact.php'
5
5
 
6
6
  self.supported_countries = ['US']
7
- self.supported_cardtypes = [:visa, :master, :american_express, :discover]
7
+ self.supported_cardtypes = %i[visa master american_express discover]
8
8
 
9
9
  self.homepage_url = 'http://www.nmi.com/'
10
10
  self.display_name = 'Network Merchants (NMI)'
@@ -9,7 +9,7 @@ module ActiveMerchant #:nodoc:
9
9
  self.default_currency = 'USD'
10
10
  self.money_format = :dollars
11
11
  self.supported_countries = ['US']
12
- self.supported_cardtypes = [:visa, :master, :american_express, :discover]
12
+ self.supported_cardtypes = %i[visa master american_express discover]
13
13
  self.homepage_url = 'http://nmi.com/'
14
14
  self.display_name = 'NMI'
15
15
 
@@ -138,7 +138,7 @@ module ActiveMerchant #:nodoc:
138
138
  private
139
139
 
140
140
  def add_level3_fields(post, options)
141
- add_fields_to_post_if_present(post, options, [:tax, :shipping, :ponumber])
141
+ add_fields_to_post_if_present(post, options, %i[tax shipping ponumber])
142
142
  end
143
143
 
144
144
  def add_invoice(post, money, options)
@@ -154,7 +154,7 @@ module ActiveMerchant #:nodoc:
154
154
 
155
155
  def add_payment_method(post, payment_method, options)
156
156
  if payment_method.is_a?(String)
157
- customer_vault_id, _ = split_authorization(payment_method)
157
+ customer_vault_id, = split_authorization(payment_method)
158
158
  post[:customer_vault_id] = customer_vault_id
159
159
  elsif payment_method.is_a?(NetworkTokenizationCreditCard)
160
160
  post[:ccnumber] = payment_method.number
@@ -249,7 +249,7 @@ module ActiveMerchant #:nodoc:
249
249
  end
250
250
 
251
251
  def add_reference(post, authorization)
252
- transaction_id, _ = split_authorization(authorization)
252
+ transaction_id, = split_authorization(authorization)
253
253
  post[:transactionid] = transaction_id
254
254
  end
255
255
 
@@ -133,9 +133,9 @@ module ActiveMerchant #:nodoc:
133
133
  self.test_url = 'https://secure.ogone.com/ncol/test/'
134
134
  self.live_url = 'https://secure.ogone.com/ncol/prod/'
135
135
 
136
- self.supported_countries = ['BE', 'DE', 'FR', 'NL', 'AT', 'CH']
136
+ self.supported_countries = %w[BE DE FR NL AT CH]
137
137
  # also supports Airplus and UATP
138
- self.supported_cardtypes = [:visa, :master, :american_express, :diners_club, :discover, :jcb, :maestro]
138
+ self.supported_cardtypes = %i[visa master american_express diners_club discover jcb maestro]
139
139
  self.homepage_url = 'http://www.ogone.com/'
140
140
  self.display_name = 'Ogone'
141
141
  self.default_currency = 'EUR'
@@ -27,7 +27,7 @@ module ActiveMerchant #:nodoc:
27
27
  # * VISA
28
28
  # * MasterCard
29
29
  # * JCB
30
- self.supported_cardtypes = [:visa, :master, :jcb]
30
+ self.supported_cardtypes = %i[visa master jcb]
31
31
 
32
32
  # Omise main page
33
33
  self.homepage_url = 'https://www.omise.co/'
@@ -5,7 +5,7 @@ module ActiveMerchant #:nodoc:
5
5
  self.test_url = 'https://sandbox-api.openpay.mx/v1/'
6
6
 
7
7
  self.supported_countries = ['MX']
8
- self.supported_cardtypes = [:visa, :master, :american_express, :carnet]
8
+ self.supported_cardtypes = %i[visa master american_express carnet]
9
9
  self.homepage_url = 'http://www.openpay.mx/'
10
10
  self.display_name = 'Openpay'
11
11
  self.default_currency = 'MXN'
@@ -112,7 +112,7 @@ module ActiveMerchant #:nodoc:
112
112
 
113
113
  self.supported_countries = %w(AD AI AG AR AU AT BS BB BE BZ BM BR BN BG CA HR CY CZ DK DM EE FI FR DE GR GD GY HK HU IS IN IL IT JP LV LI LT LU MY MT MX MC MS NL PA PL PT KN LC MF VC SM SG SK SI ZA ES SR SE CH TR GB US UY)
114
114
  self.default_currency = 'EUR'
115
- self.supported_cardtypes = [:visa, :master, :american_express, :diners_club, :discover, :jcb, :maestro, :dankort]
115
+ self.supported_cardtypes = %i[visa master american_express diners_club discover jcb maestro dankort]
116
116
 
117
117
  self.homepage_url = 'https://docs.oppwa.com'
118
118
  self.display_name = 'Open Payment Platform'
@@ -5,12 +5,12 @@ module ActiveMerchant #:nodoc:
5
5
  self.live_url = 'https://webservices.optimalpayments.com/creditcardWS/CreditCardServlet/v1'
6
6
 
7
7
  # The countries the gateway supports merchants from as 2 digit ISO country codes
8
- self.supported_countries = ['CA', 'US', 'GB', 'AU', 'AT', 'BE', 'BG', 'HR', 'CY', 'CZ', 'DK',
9
- 'EE', 'FI', 'DE', 'GR', 'HU', 'IE', 'IT', 'LV', 'LT', 'LU', 'MT',
10
- 'NL', 'NO', 'PL', 'PT', 'RO', 'SK', 'SI', 'ES', 'SE', 'CH']
8
+ self.supported_countries = %w[CA US GB AU AT BE BG HR CY CZ DK
9
+ EE FI DE GR HU IE IT LV LT LU MT
10
+ NL NO PL PT RO SK SI ES SE CH]
11
11
 
12
12
  # The card types supported by the payment gateway
13
- self.supported_cardtypes = [:visa, :master, :american_express, :discover, :diners_club]
13
+ self.supported_cardtypes = %i[visa master american_express discover diners_club]
14
14
 
15
15
  # The homepage URL of the gateway
16
16
  self.homepage_url = 'http://www.optimalpayments.com/'
@@ -71,16 +71,16 @@ module ActiveMerchant #:nodoc:
71
71
  self.live_url = 'https://orbital1.chasepaymentech.com/authorize'
72
72
  self.secondary_live_url = 'https://orbital2.chasepaymentech.com/authorize'
73
73
 
74
- self.supported_countries = ['US', 'CA']
74
+ self.supported_countries = %w[US CA]
75
75
  self.default_currency = 'CAD'
76
- self.supported_cardtypes = [:visa, :master, :american_express, :discover, :diners_club, :jcb]
76
+ self.supported_cardtypes = %i[visa master american_express discover diners_club jcb]
77
77
 
78
78
  self.display_name = 'Orbital Paymentech'
79
79
  self.homepage_url = 'http://chasepaymentech.com/'
80
80
 
81
81
  self.money_format = :cents
82
82
 
83
- AVS_SUPPORTED_COUNTRIES = ['US', 'CA', 'UK', 'GB']
83
+ AVS_SUPPORTED_COUNTRIES = %w[US CA UK GB]
84
84
 
85
85
  CURRENCY_CODES = {
86
86
  'AUD' => '036',
@@ -181,7 +181,7 @@ module ActiveMerchant #:nodoc:
181
181
  USE_ORDER_ID = 'O' # Use OrderID field
182
182
  USE_COMMENTS = 'D' # Use Comments field
183
183
 
184
- SENSITIVE_FIELDS = [:account_num, :cc_account_num]
184
+ SENSITIVE_FIELDS = %i[account_num cc_account_num]
185
185
 
186
186
  def initialize(options = {})
187
187
  requires!(options, :merchant_id)
@@ -678,7 +678,7 @@ module ActiveMerchant #:nodoc:
678
678
  end
679
679
 
680
680
  def success?(response, message_type)
681
- if [:refund, :void].include?(message_type)
681
+ if %i[refund void].include?(message_type)
682
682
  response[:proc_status] == SUCCESS
683
683
  elsif response[:customer_profile_action]
684
684
  response[:profile_proc_status] == SUCCESS
@@ -749,7 +749,7 @@ module ActiveMerchant #:nodoc:
749
749
 
750
750
  # Append Transaction Reference Number at the end for Refund transactions
751
751
  if action == REFUND
752
- tx_ref_num, _ = split_authorization(parameters[:authorization])
752
+ tx_ref_num, = split_authorization(parameters[:authorization])
753
753
  xml.tag! :TxRefNum, tx_ref_num
754
754
  end
755
755
 
@@ -32,7 +32,7 @@ module ActiveMerchant #:nodoc:
32
32
 
33
33
  errors << [:merchant_phone, 'is required to follow "NNN-NNN-NNNN" or "NNN-AAAAAAA" format'] if !empty?(self.merchant_phone) && !self.merchant_phone.match(PHONE_FORMAT_1) && !self.merchant_phone.match(PHONE_FORMAT_2)
34
34
 
35
- [:merchant_email, :merchant_url].each do |attr|
35
+ %i[merchant_email merchant_url].each do |attr|
36
36
  unless self.send(attr).blank?
37
37
  errors << [attr, 'is required to be 13 bytes or less'] if self.send(attr).bytesize > 13
38
38
  end
@@ -28,7 +28,7 @@ module ActiveMerchant #:nodoc:
28
28
  self.test_url = self.live_url
29
29
 
30
30
  self.supported_countries = ['US']
31
- self.supported_cardtypes = [:visa, :master]
31
+ self.supported_cardtypes = %i[visa master]
32
32
  self.money_format = :cents
33
33
  self.default_currency = 'USD'
34
34
  self.homepage_url = 'https://www.deepcovelabs.com/raven'
@@ -6,7 +6,7 @@ module ActiveMerchant #:nodoc:
6
6
  self.supported_countries = ['BR']
7
7
  self.default_currency = 'BRL'
8
8
  self.money_format = :cents
9
- self.supported_cardtypes = [:visa, :master, :american_express, :discover, :diners_club]
9
+ self.supported_cardtypes = %i[visa master american_express discover diners_club]
10
10
 
11
11
  self.homepage_url = 'https://pagar.me/'
12
12
  self.display_name = 'Pagar.me'
@@ -207,7 +207,7 @@ module ActiveMerchant #:nodoc:
207
207
  when 'refunded'
208
208
  'Transação estornada'
209
209
  else
210
- "Transação com status '#{response["status"]}'"
210
+ "Transação com status '#{response['status']}'"
211
211
  end
212
212
  elsif failure_from(response)
213
213
  'Transação recusada'
@@ -6,7 +6,7 @@ module ActiveMerchant #:nodoc:
6
6
 
7
7
  self.supported_countries = ['MX']
8
8
  self.default_currency = 'MXN'
9
- self.supported_cardtypes = [:visa, :master, :american_express, :jcb]
9
+ self.supported_cardtypes = %i[visa master american_express jcb]
10
10
 
11
11
  self.homepage_url = 'http://www.pagofacil.net/'
12
12
  self.display_name = 'PagoFacil'
@@ -8,7 +8,7 @@ module ActiveMerchant #:nodoc:
8
8
 
9
9
  self.supported_countries = %w(US CA)
10
10
  self.default_currency = 'USD'
11
- self.supported_cardtypes = [:visa, :master, :american_express, :discover, :jcb, :diners_club]
11
+ self.supported_cardtypes = %i[visa master american_express discover jcb diners_club]
12
12
 
13
13
  self.homepage_url = 'http://www.bluefincommerce.com/'
14
14
  self.display_name = 'PayConex'
@@ -76,10 +76,10 @@ module ActiveMerchant #:nodoc:
76
76
  self.live_url = 'https://www.paygate.co.za/payxml/process.trans'
77
77
 
78
78
  # The countries the gateway supports merchants from as 2 digit ISO country codes
79
- self.supported_countries = ['US', 'ZA']
79
+ self.supported_countries = %w[US ZA]
80
80
 
81
81
  # The card types supported by the payment gateway
82
- self.supported_cardtypes = [:visa, :master, :american_express, :diners_club]
82
+ self.supported_cardtypes = %i[visa master american_express diners_club]
83
83
 
84
84
  # The homepage URL of the gateway
85
85
  self.homepage_url = 'http://paygate.co.za/'
@@ -5,7 +5,7 @@ module ActiveMerchant #:nodoc:
5
5
 
6
6
  self.supported_countries = ['US']
7
7
  self.default_currency = 'USD'
8
- self.supported_cardtypes = [:visa, :master, :american_express, :discover]
8
+ self.supported_cardtypes = %i[visa master american_express discover]
9
9
 
10
10
  self.homepage_url = 'http://www.payhub.com/'
11
11
  self.display_name = 'PayHub'
@@ -107,7 +107,7 @@ module ActiveMerchant #:nodoc:
107
107
  TEST_LOGIN = 'pj-ql-01'
108
108
  TEST_PASSWORD = 'pj-ql-01p'
109
109
 
110
- SUCCESS_CODES = ['00', '85']
110
+ SUCCESS_CODES = %w[00 85]
111
111
  SUCCESS_MESSAGE = 'The transaction was approved.'
112
112
 
113
113
  FAILURE_MESSAGE = 'The transaction was declined.'
@@ -150,7 +150,7 @@ module ActiveMerchant #:nodoc:
150
150
  'AB' => 'Aborted because of an upstream system error, please try again later.'
151
151
  }
152
152
 
153
- self.supported_cardtypes = [:visa, :master, :american_express, :discover]
153
+ self.supported_cardtypes = %i[visa master american_express discover]
154
154
  self.supported_countries = ['US']
155
155
  self.homepage_url = 'http://www.payjunction.com/'
156
156
  self.display_name = 'PayJunction'
@@ -241,7 +241,7 @@ module ActiveMerchant #:nodoc:
241
241
  def recurring(money, payment_source, options = {})
242
242
  ActiveMerchant.deprecated RECURRING_DEPRECATION_MESSAGE
243
243
 
244
- requires!(options, [:periodicity, :monthly, :weekly, :daily], :payments)
244
+ requires!(options, %i[periodicity monthly weekly daily], :payments)
245
245
 
246
246
  periodic_type =
247
247
  case options[:periodicity]
@@ -10,7 +10,7 @@ module ActiveMerchant #:nodoc:
10
10
  self.supported_countries = ['US']
11
11
  self.default_currency = 'USD'
12
12
  self.money_format = :dollars
13
- self.supported_cardtypes = [:visa, :master, :american_express, :discover]
13
+ self.supported_cardtypes = %i[visa master american_express discover]
14
14
 
15
15
  def initialize(options={})
16
16
  requires!(options, :api_login, :api_password, :api_key)
@@ -146,7 +146,7 @@ module ActiveMerchant #:nodoc:
146
146
  end
147
147
 
148
148
  def ssl_invoke(action, params)
149
- if ['purchase', 'authorize', 'refund', 'credit'].include?(action)
149
+ if %w[purchase authorize refund credit].include?(action)
150
150
  ssl_post(url(), post_data(params), headers)
151
151
  else
152
152
  ssl_request(:put, url(params), post_data(params), headers)
@@ -20,7 +20,7 @@ module ActiveMerchant #:nodoc:
20
20
  self.supported_countries = ['AU']
21
21
  self.homepage_url = 'http://www.commsecure.com.au/paysecure.shtml'
22
22
  self.display_name = 'PaySecure'
23
- self.supported_cardtypes = [:visa, :master, :american_express, :diners_club]
23
+ self.supported_cardtypes = %i[visa master american_express diners_club]
24
24
 
25
25
  def initialize(options = {})
26
26
  requires!(options, :login, :password)
@@ -39,7 +39,7 @@ module ActiveMerchant #:nodoc:
39
39
  }
40
40
 
41
41
  SUCCESS_CODES = ['00000']
42
- UNAVAILABILITY_CODES = ['00001', '00097', '00098']
42
+ UNAVAILABILITY_CODES = %w[00001 00097 00098]
43
43
  SUCCESS_MESSAGE = 'The transaction was approved'
44
44
  FAILURE_MESSAGE = 'The transaction failed'
45
45
 
@@ -51,7 +51,7 @@ module ActiveMerchant #:nodoc:
51
51
  self.supported_countries = ['FR']
52
52
 
53
53
  # The card types supported by the payment gateway
54
- self.supported_cardtypes = [:visa, :master, :american_express, :diners_club, :jcb]
54
+ self.supported_cardtypes = %i[visa master american_express diners_club jcb]
55
55
 
56
56
  # The homepage URL of the gateway
57
57
  self.homepage_url = 'http://www.paybox.com/'
@@ -160,7 +160,7 @@ module ActiveMerchant #:nodoc:
160
160
  test: test?,
161
161
  authorization: response[:numappel].to_s + response[:numtrans].to_s,
162
162
  fraud_review: false,
163
- sent_params: parameters.delete_if { |key, value| ['porteur', 'dateval', 'cvv'].include?(key.to_s) }
163
+ sent_params: parameters.delete_if { |key, value| %w[porteur dateval cvv].include?(key.to_s) }
164
164
  )
165
165
  end
166
166
 
@@ -11,7 +11,7 @@ module ActiveMerchant
11
11
  self.money_format = :cents
12
12
  self.supported_countries = %w(US CA)
13
13
 
14
- self.supported_cardtypes = [:visa, :master, :american_express, :discover, :jcb, :diners_club]
14
+ self.supported_cardtypes = %i[visa master american_express discover jcb diners_club]
15
15
 
16
16
  self.homepage_url = 'https://developer.payeezy.com/'
17
17
  self.display_name = 'Payeezy'
@@ -136,7 +136,7 @@ module ActiveMerchant
136
136
  end
137
137
 
138
138
  def add_authorization_info(params, authorization, options = {})
139
- transaction_id, transaction_tag, method, _ = authorization.split('|')
139
+ transaction_id, transaction_tag, method, = authorization.split('|')
140
140
  params[:method] = method == 'token' ? 'credit_card' : method
141
141
 
142
142
  if options[:reversal_id]
@@ -12,8 +12,8 @@ module ActiveMerchant #:nodoc:
12
12
  self.test_confined_url = 'https://test-confined.payex.com/'
13
13
 
14
14
  self.money_format = :cents
15
- self.supported_countries = ['DK', 'FI', 'NO', 'SE']
16
- self.supported_cardtypes = [:visa, :master, :american_express, :discover]
15
+ self.supported_countries = %w[DK FI NO SE]
16
+ self.supported_cardtypes = %i[visa master american_express discover]
17
17
  self.homepage_url = 'http://payex.com/'
18
18
  self.display_name = 'Payex'
19
19
  self.default_currency = 'EUR'
@@ -193,9 +193,9 @@ module ActiveMerchant #:nodoc:
193
193
  cancelUrl: nil,
194
194
  clientLanguage: nil
195
195
  }
196
- hash_fields = [:accountNumber, :purchaseOperation, :price, :priceArgList, :currency, :vat, :orderID,
197
- :productNumber, :description, :clientIPAddress, :clientIdentifier, :additionalValues,
198
- :externalID, :returnUrl, :view, :agreementRef, :cancelUrl, :clientLanguage]
196
+ hash_fields = %i[accountNumber purchaseOperation price priceArgList currency vat orderID
197
+ productNumber description clientIPAddress clientIdentifier additionalValues
198
+ externalID returnUrl view agreementRef cancelUrl clientLanguage]
199
199
  add_request_hash(properties, hash_fields)
200
200
  soap_action = SOAP_ACTIONS[:initialize]
201
201
  request = build_xml_request(soap_action, properties)
@@ -213,8 +213,8 @@ module ActiveMerchant #:nodoc:
213
213
  cardHolderName: payment_method.name,
214
214
  cardNumberCVC: payment_method.verification_value
215
215
  }
216
- hash_fields = [:accountNumber, :orderRef, :transactionType, :cardNumber, :cardNumberExpireMonth,
217
- :cardNumberExpireYear, :cardNumberCVC, :cardHolderName]
216
+ hash_fields = %i[accountNumber orderRef transactionType cardNumber cardNumberExpireMonth
217
+ cardNumberExpireYear cardNumberCVC cardHolderName]
218
218
  add_request_hash(properties, hash_fields)
219
219
 
220
220
  soap_action = SOAP_ACTIONS[:purchasecc]
@@ -233,7 +233,7 @@ module ActiveMerchant #:nodoc:
233
233
  purchaseOperation: is_auth ? 'AUTHORIZATION' : 'SALE',
234
234
  currency: (options[:currency] || default_currency),
235
235
  }
236
- hash_fields = [:accountNumber, :agreementRef, :price, :productNumber, :description, :orderId, :purchaseOperation, :currency]
236
+ hash_fields = %i[accountNumber agreementRef price productNumber description orderId purchaseOperation currency]
237
237
  add_request_hash(properties, hash_fields)
238
238
 
239
239
  soap_action = SOAP_ACTIONS[:autopay]
@@ -250,7 +250,7 @@ module ActiveMerchant #:nodoc:
250
250
  vatAmount: options[:vat_amount] || 0,
251
251
  additionalValues: ''
252
252
  }
253
- hash_fields = [:accountNumber, :transactionNumber, :amount, :orderId, :vatAmount, :additionalValues]
253
+ hash_fields = %i[accountNumber transactionNumber amount orderId vatAmount additionalValues]
254
254
  add_request_hash(properties, hash_fields)
255
255
 
256
256
  soap_action = SOAP_ACTIONS[:capture]
@@ -267,7 +267,7 @@ module ActiveMerchant #:nodoc:
267
267
  vatAmount: options[:vat_amount] || 0,
268
268
  additionalValues: ''
269
269
  }
270
- hash_fields = [:accountNumber, :transactionNumber, :amount, :orderId, :vatAmount, :additionalValues]
270
+ hash_fields = %i[accountNumber transactionNumber amount orderId vatAmount additionalValues]
271
271
  add_request_hash(properties, hash_fields)
272
272
 
273
273
  soap_action = SOAP_ACTIONS[:credit]
@@ -280,7 +280,7 @@ module ActiveMerchant #:nodoc:
280
280
  accountNumber: @options[:account],
281
281
  transactionNumber: transaction_number,
282
282
  }
283
- hash_fields = [:accountNumber, :transactionNumber]
283
+ hash_fields = %i[accountNumber transactionNumber]
284
284
  add_request_hash(properties, hash_fields)
285
285
 
286
286
  soap_action = SOAP_ACTIONS[:cancel]
@@ -299,7 +299,7 @@ module ActiveMerchant #:nodoc:
299
299
  startDate: options[:startDate] || '',
300
300
  stopDate: options[:stopDate] || ''
301
301
  }
302
- hash_fields = [:accountNumber, :merchantRef, :description, :purchaseOperation, :maxAmount, :notifyUrl, :startDate, :stopDate]
302
+ hash_fields = %i[accountNumber merchantRef description purchaseOperation maxAmount notifyUrl startDate stopDate]
303
303
  add_request_hash(properties, hash_fields)
304
304
 
305
305
  soap_action = SOAP_ACTIONS[:create_agreement]
@@ -312,7 +312,7 @@ module ActiveMerchant #:nodoc:
312
312
  accountNumber: @options[:account],
313
313
  agreementRef: authorization,
314
314
  }
315
- hash_fields = [:accountNumber, :agreementRef]
315
+ hash_fields = %i[accountNumber agreementRef]
316
316
  add_request_hash(properties, hash_fields)
317
317
 
318
318
  soap_action = SOAP_ACTIONS[:delete_agreement]