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
@@ -17,12 +17,12 @@ module ActiveMerchant #:nodoc:
17
17
  self.homepage_url = 'https://www.transactpro.lv/business/online-payments-acceptance'
18
18
  self.display_name = 'Transact Pro'
19
19
 
20
- def initialize(options={})
20
+ def initialize(options = {})
21
21
  requires!(options, :guid, :password, :terminal)
22
22
  super
23
23
  end
24
24
 
25
- def purchase(amount, payment, options={})
25
+ def purchase(amount, payment, options = {})
26
26
  post = PostData.new
27
27
  add_invoice(post, amount, options)
28
28
  add_payment(post, payment)
@@ -44,7 +44,7 @@ module ActiveMerchant #:nodoc:
44
44
  end
45
45
  end
46
46
 
47
- def authorize(amount, payment, options={})
47
+ def authorize(amount, payment, options = {})
48
48
  post = PostData.new
49
49
  add_invoice(post, amount, options)
50
50
  add_payment(post, payment)
@@ -66,7 +66,7 @@ module ActiveMerchant #:nodoc:
66
66
  end
67
67
  end
68
68
 
69
- def capture(amount, authorization, options={})
69
+ def capture(amount, authorization, options = {})
70
70
  identifier, original_amount = split_authorization(authorization)
71
71
  raise ArgumentError.new("Partial capture is not supported, and #{amount.inspect} != #{original_amount.inspect}") if amount && (amount != original_amount)
72
72
 
@@ -78,7 +78,7 @@ module ActiveMerchant #:nodoc:
78
78
  commit('charge_hold', post, original_amount)
79
79
  end
80
80
 
81
- def refund(amount, authorization, options={})
81
+ def refund(amount, authorization, options = {})
82
82
  identifier, original_amount = split_authorization(authorization)
83
83
 
84
84
  post = PostData.new
@@ -89,7 +89,7 @@ module ActiveMerchant #:nodoc:
89
89
  commit('refund', post)
90
90
  end
91
91
 
92
- def void(authorization, options={})
92
+ def void(authorization, options = {})
93
93
  identifier, amount = split_authorization(authorization)
94
94
 
95
95
  post = PostData.new
@@ -99,7 +99,7 @@ module ActiveMerchant #:nodoc:
99
99
  commit('cancel_dms', post)
100
100
  end
101
101
 
102
- def verify(credit_card, options={})
102
+ def verify(credit_card, options = {})
103
103
  MultiResponse.run(:use_first_response) do |r|
104
104
  r.process { authorize(100, credit_card, options) }
105
105
  r.process(:ignore_result) { void(r.authorization, options) }
@@ -156,7 +156,7 @@ module ActiveMerchant #:nodoc:
156
156
  post[:expire] = "#{month}/#{year[2..3]}"
157
157
  end
158
158
 
159
- def add_credentials(post, key=:guid)
159
+ def add_credentials(post, key = :guid)
160
160
  post[key] = @options[:guid]
161
161
  post[:pwd] = Digest::SHA1.hexdigest(@options[:password])
162
162
  end
@@ -176,7 +176,7 @@ module ActiveMerchant #:nodoc:
176
176
  end
177
177
  end
178
178
 
179
- def commit(action, parameters, amount=nil)
179
+ def commit(action, parameters, amount = nil)
180
180
  url = (test? ? test_url : live_url)
181
181
  response = parse(ssl_post(url, post_data(action, parameters)))
182
182
 
@@ -447,8 +447,7 @@ module ActiveMerchant #:nodoc:
447
447
  test: test?,
448
448
  authorization: authorization_from(action, data),
449
449
  cvv_result: data['cvv'],
450
- avs_result: { code: data['avs'] }
451
- )
450
+ avs_result: { code: data['avs'] })
452
451
  end
453
452
 
454
453
  def parse(body)
@@ -12,7 +12,7 @@ module ActiveMerchant #:nodoc:
12
12
  # :software id or :live_url are passed in the options hash it will
13
13
  # create an instance of UsaEpayAdvancedGateway.
14
14
  #
15
- def self.new(options={})
15
+ def self.new(options = {})
16
16
  if options.has_key?(:software_id) || options.has_key?(:live_url)
17
17
  UsaEpayAdvancedGateway.new(options)
18
18
  else
@@ -289,7 +289,7 @@ module ActiveMerchant #:nodoc:
289
289
  #
290
290
  # Note: See run_transaction for additional options.
291
291
  #
292
- def purchase(money, creditcard, options={})
292
+ def purchase(money, creditcard, options = {})
293
293
  run_sale(options.merge!(amount: money, payment_method: creditcard))
294
294
  end
295
295
 
@@ -297,7 +297,7 @@ module ActiveMerchant #:nodoc:
297
297
  #
298
298
  # Note: See run_transaction for additional options.
299
299
  #
300
- def authorize(money, creditcard, options={})
300
+ def authorize(money, creditcard, options = {})
301
301
  run_auth_only(options.merge!(amount: money, payment_method: creditcard))
302
302
  end
303
303
 
@@ -305,7 +305,7 @@ module ActiveMerchant #:nodoc:
305
305
  #
306
306
  # Note: See run_transaction for additional options.
307
307
  #
308
- def capture(money, identification, options={})
308
+ def capture(money, identification, options = {})
309
309
  capture_transaction(options.merge!(amount: money, reference_number: identification))
310
310
  end
311
311
 
@@ -313,7 +313,7 @@ module ActiveMerchant #:nodoc:
313
313
  #
314
314
  # Note: See run_transaction for additional options.
315
315
  #
316
- def void(identification, options={})
316
+ def void(identification, options = {})
317
317
  void_transaction(options.merge!(reference_number: identification))
318
318
  end
319
319
 
@@ -321,11 +321,11 @@ module ActiveMerchant #:nodoc:
321
321
  #
322
322
  # Note: See run_transaction for additional options.
323
323
  #
324
- def refund(money, identification, options={})
324
+ def refund(money, identification, options = {})
325
325
  refund_transaction(options.merge!(amount: money, reference_number: identification))
326
326
  end
327
327
 
328
- def credit(money, identification, options={})
328
+ def credit(money, identification, options = {})
329
329
  ActiveMerchant.deprecated CREDIT_DEPRECATION_MESSAGE
330
330
  refund(money, identification, options)
331
331
  end
@@ -368,7 +368,7 @@ module ActiveMerchant #:nodoc:
368
368
  # ==== Response
369
369
  # * <tt>#message</tt> -- customer number assigned by gateway
370
370
  #
371
- def add_customer(options={})
371
+ def add_customer(options = {})
372
372
  request = build_request(__method__, options)
373
373
  commit(__method__, request)
374
374
  end
@@ -381,7 +381,7 @@ module ActiveMerchant #:nodoc:
381
381
  # ==== Options
382
382
  # * Same as add_customer
383
383
  #
384
- def update_customer(options={})
384
+ def update_customer(options = {})
385
385
  requires! options, :customer_number
386
386
 
387
387
  request = build_request(__method__, options)
@@ -429,7 +429,7 @@ module ActiveMerchant #:nodoc:
429
429
  # ==== Response
430
430
  # * <tt>#message</tt> -- boolean; Returns true if successful. Exception thrown all failures.
431
431
  #
432
- def quick_update_customer(options={})
432
+ def quick_update_customer(options = {})
433
433
  requires! options, :customer_number
434
434
  requires! options, :update_data
435
435
 
@@ -444,7 +444,7 @@ module ActiveMerchant #:nodoc:
444
444
  # ==== Required
445
445
  # * <tt>:customer_number</tt>
446
446
  #
447
- def enable_customer(options={})
447
+ def enable_customer(options = {})
448
448
  requires! options, :customer_number
449
449
 
450
450
  request = build_request(__method__, options)
@@ -456,7 +456,7 @@ module ActiveMerchant #:nodoc:
456
456
  # ==== Required
457
457
  # * <tt>:customer_number</tt>
458
458
  #
459
- def disable_customer(options={})
459
+ def disable_customer(options = {})
460
460
  requires! options, :customer_number
461
461
 
462
462
  request = build_request(__method__, options)
@@ -479,7 +479,7 @@ module ActiveMerchant #:nodoc:
479
479
  # ==== Response
480
480
  # * <tt>#message</tt> -- method_id of new customer payment method
481
481
  #
482
- def add_customer_payment_method(options={})
482
+ def add_customer_payment_method(options = {})
483
483
  requires! options, :customer_number
484
484
 
485
485
  request = build_request(__method__, options)
@@ -494,7 +494,7 @@ module ActiveMerchant #:nodoc:
494
494
  # ==== Response
495
495
  # * <tt>#message</tt> -- either a single hash or an array of hashes of payment methods
496
496
  #
497
- def get_customer_payment_methods(options={})
497
+ def get_customer_payment_methods(options = {})
498
498
  requires! options, :customer_number
499
499
 
500
500
  request = build_request(__method__, options)
@@ -510,7 +510,7 @@ module ActiveMerchant #:nodoc:
510
510
  # ==== Response
511
511
  # * <tt>#message</tt> -- hash of payment method
512
512
  #
513
- def get_customer_payment_method(options={})
513
+ def get_customer_payment_method(options = {})
514
514
  requires! options, :customer_number, :method_id
515
515
 
516
516
  request = build_request(__method__, options)
@@ -531,7 +531,7 @@ module ActiveMerchant #:nodoc:
531
531
  # ==== Response
532
532
  # * <tt>#message</tt> -- hash of payment method
533
533
  #
534
- def update_customer_payment_method(options={})
534
+ def update_customer_payment_method(options = {})
535
535
  requires! options, :method_id
536
536
 
537
537
  request = build_request(__method__, options)
@@ -544,7 +544,7 @@ module ActiveMerchant #:nodoc:
544
544
  # * <tt>:customer_number</tt>
545
545
  # * <tt>:method_id</tt>
546
546
  #
547
- def delete_customer_payment_method(options={})
547
+ def delete_customer_payment_method(options = {})
548
548
  requires! options, :customer_number, :method_id
549
549
 
550
550
  request = build_request(__method__, options)
@@ -556,7 +556,7 @@ module ActiveMerchant #:nodoc:
556
556
  # ==== Required
557
557
  # * <tt>:customer_number</tt>
558
558
  #
559
- def delete_customer(options={})
559
+ def delete_customer(options = {})
560
560
  requires! options, :customer_number
561
561
 
562
562
  request = build_request(__method__, options)
@@ -607,7 +607,7 @@ module ActiveMerchant #:nodoc:
607
607
  # ==== Response
608
608
  # * <tt>#message</tt> -- transaction response hash
609
609
  #
610
- def run_customer_transaction(options={})
610
+ def run_customer_transaction(options = {})
611
611
  requires! options, :customer_number, :command, :amount
612
612
 
613
613
  request = build_request(__method__, options)
@@ -671,7 +671,7 @@ module ActiveMerchant #:nodoc:
671
671
  # ==== Response
672
672
  # * <tt>#message</tt> -- transaction response hash
673
673
  #
674
- def run_transaction(options={})
674
+ def run_transaction(options = {})
675
675
  request = build_request(__method__, options)
676
676
  commit(__method__, request)
677
677
  end
@@ -699,7 +699,7 @@ module ActiveMerchant #:nodoc:
699
699
  # ==== Response
700
700
  # * <tt>#message</tt> -- transaction response hash
701
701
  #
702
- def post_auth(options={})
702
+ def post_auth(options = {})
703
703
  requires! options, :authorization_code
704
704
 
705
705
  request = build_request(__method__, options)
@@ -721,7 +721,7 @@ module ActiveMerchant #:nodoc:
721
721
  # ==== Response
722
722
  # * <tt>#message</tt> -- transaction response hash
723
723
  #
724
- def capture_transaction(options={})
724
+ def capture_transaction(options = {})
725
725
  requires! options, :reference_number
726
726
 
727
727
  request = build_request(__method__, options)
@@ -738,7 +738,7 @@ module ActiveMerchant #:nodoc:
738
738
  # ==== Response
739
739
  # * <tt>#message</tt> -- transaction response hash
740
740
  #
741
- def void_transaction(options={})
741
+ def void_transaction(options = {})
742
742
  requires! options, :reference_number
743
743
 
744
744
  request = build_request(__method__, options)
@@ -757,7 +757,7 @@ module ActiveMerchant #:nodoc:
757
757
  # ==== Response
758
758
  # * <tt>#message</tt> -- transaction response hash
759
759
  #
760
- def refund_transaction(options={})
760
+ def refund_transaction(options = {})
761
761
  requires! options, :reference_number, :amount
762
762
 
763
763
  request = build_request(__method__, options)
@@ -777,7 +777,7 @@ module ActiveMerchant #:nodoc:
777
777
  # ==== Response
778
778
  # * <tt>#message</tt> -- transaction response hash
779
779
  #
780
- def override_transaction(options={})
780
+ def override_transaction(options = {})
781
781
  requires! options, :reference_number
782
782
 
783
783
  request = build_request(__method__, options)
@@ -820,7 +820,7 @@ module ActiveMerchant #:nodoc:
820
820
  # ==== Response
821
821
  # * <tt>#message</tt> -- transaction response hash
822
822
  #
823
- def run_quick_sale(options={})
823
+ def run_quick_sale(options = {})
824
824
  requires! options, :reference_number, :amount
825
825
 
826
826
  request = build_request(__method__, options)
@@ -858,7 +858,7 @@ module ActiveMerchant #:nodoc:
858
858
  # ==== Response
859
859
  # * <tt>#message</tt> -- transaction response hash
860
860
  #
861
- def run_quick_credit(options={})
861
+ def run_quick_credit(options = {})
862
862
  requires! options, :reference_number
863
863
 
864
864
  request = build_request(__method__, options)
@@ -875,7 +875,7 @@ module ActiveMerchant #:nodoc:
875
875
  # ==== Response
876
876
  # * <tt>#message</tt> -- transaction hash
877
877
  #
878
- def get_transaction(options={})
878
+ def get_transaction(options = {})
879
879
  requires! options, :reference_number
880
880
 
881
881
  request = build_request(__method__, options)
@@ -892,7 +892,7 @@ module ActiveMerchant #:nodoc:
892
892
  # * <tt>response.message</tt> -- message of the referenced transaction
893
893
  # * <tt>response.authorization</tt> -- same as :reference_number in options
894
894
  #
895
- def get_transaction_status(options={})
895
+ def get_transaction_status(options = {})
896
896
  requires! options, :reference_number
897
897
 
898
898
  request = build_request(__method__, options)
@@ -990,7 +990,7 @@ module ActiveMerchant #:nodoc:
990
990
  # ==== Response
991
991
  # * <tt>#message</tt> -- hash; keys are the field values
992
992
  #
993
- def get_transaction_custom(options={})
993
+ def get_transaction_custom(options = {})
994
994
  requires! options, :reference_number, :fields
995
995
 
996
996
  request = build_request(__method__, options)
@@ -1005,7 +1005,7 @@ module ActiveMerchant #:nodoc:
1005
1005
  # ==== Response
1006
1006
  # * <tt>#message</tt> -- check trace hash
1007
1007
  #
1008
- def get_check_trace(options={})
1008
+ def get_check_trace(options = {})
1009
1009
  requires! options, :reference_number
1010
1010
 
1011
1011
  request = build_request(__method__, options)
@@ -1078,7 +1078,7 @@ module ActiveMerchant #:nodoc:
1078
1078
  end
1079
1079
  end
1080
1080
 
1081
- def build_customer(soap, options, type, add_customer_data=false)
1081
+ def build_customer(soap, options, type, add_customer_data = false)
1082
1082
  soap.tag! "ns1:#{type}" do
1083
1083
  build_token soap, options
1084
1084
  build_tag soap, :integer, 'CustNum', options[:customer_number]
@@ -1378,7 +1378,7 @@ module ActiveMerchant #:nodoc:
1378
1378
 
1379
1379
  # Transaction Helpers ===========================================
1380
1380
 
1381
- def build_transaction_request_object(soap, options, name='Params')
1381
+ def build_transaction_request_object(soap, options, name = 'Params')
1382
1382
  soap.tag! name, 'xsi:type' => 'ns1:TransactionRequestObject' do
1383
1383
  TRANSACTION_REQUEST_OBJECT_OPTIONS.each do |k, v|
1384
1384
  build_tag soap, v[0], v[1], options[k]
@@ -198,7 +198,7 @@ module ActiveMerchant #:nodoc:
198
198
  post[:description] = options[:description]
199
199
  end
200
200
 
201
- def add_payment(post, payment, options={})
201
+ def add_payment(post, payment, options = {})
202
202
  if payment.respond_to?(:routing_number)
203
203
  post[:checkformat] = options[:check_format] if options[:check_format]
204
204
  if payment.account_type
@@ -310,7 +310,7 @@ module ActiveMerchant #:nodoc:
310
310
  error_code: fields['UMerrorcode'],
311
311
  acs_url: fields['UMacsurl'],
312
312
  payload: fields['UMpayload']
313
- }.delete_if { |k, v| v.nil? }
313
+ }.delete_if { |_k, v| v.nil? }
314
314
  end
315
315
 
316
316
  def commit(action, parameters)
@@ -324,8 +324,7 @@ module ActiveMerchant #:nodoc:
324
324
  authorization: response[:ref_num],
325
325
  cvv_result: response[:cvv2_result_code],
326
326
  avs_result: { code: response[:avs_result_code] },
327
- error_code: error_code
328
- )
327
+ error_code: error_code)
329
328
  end
330
329
 
331
330
  def message_from(response)
@@ -15,19 +15,19 @@ module ActiveMerchant
15
15
  self.homepage_url = 'http://vancopayments.com/'
16
16
  self.display_name = 'Vanco Payment Solutions'
17
17
 
18
- def initialize(options={})
18
+ def initialize(options = {})
19
19
  requires!(options, :user_id, :password, :client_id)
20
20
  super
21
21
  end
22
22
 
23
- def purchase(money, payment_method, options={})
23
+ def purchase(money, payment_method, options = {})
24
24
  MultiResponse.run do |r|
25
25
  r.process { login }
26
26
  r.process { commit(purchase_request(money, payment_method, r.params['response_sessionid'], options), :response_transactionref) }
27
27
  end
28
28
  end
29
29
 
30
- def refund(money, authorization, options={})
30
+ def refund(money, authorization, options = {})
31
31
  MultiResponse.run do |r|
32
32
  r.process { login }
33
33
  r.process { commit(refund_request(money, authorization, r.params['response_sessionid']), :response_creditrequestreceived) }
@@ -198,8 +198,7 @@ module ActiveMerchant #:nodoc:
198
198
  test: test?,
199
199
  authorization: response[:transactionid],
200
200
  avs_result: { code: response[:avsresponse] },
201
- cvv_result: response[:cvvresponse]
202
- )
201
+ cvv_result: response[:cvvresponse])
203
202
  end
204
203
 
205
204
  def message_from(response)
@@ -140,8 +140,7 @@ module ActiveMerchant #:nodoc:
140
140
  test: @options[:test] || test?,
141
141
  authorization: authorization_from(response),
142
142
  avs_result: { code: response['avs_response'] },
143
- cvv_result: response['cvv2_response']
144
- )
143
+ cvv_result: response['cvv2_response'])
145
144
  end
146
145
 
147
146
  def authorization_from(response)
@@ -13,19 +13,19 @@ module ActiveMerchant #:nodoc:
13
13
  self.money_format = :dollars
14
14
  self.supported_cardtypes = %i[visa master american_express discover]
15
15
 
16
- def initialize(options={})
16
+ def initialize(options = {})
17
17
  requires!(options, :access_key_id, :secret_access_key, :merchant_id)
18
18
  super
19
19
  end
20
20
 
21
- def purchase(amount, payment_method, options={})
21
+ def purchase(amount, payment_method, options = {})
22
22
  MultiResponse.run() do |r|
23
23
  r.process { authorize(amount, payment_method, options) }
24
24
  r.process { capture(amount, r.authorization, options) }
25
25
  end
26
26
  end
27
27
 
28
- def authorize(amount, payment_method, options={})
28
+ def authorize(amount, payment_method, options = {})
29
29
  params = {}
30
30
 
31
31
  add_invoice(params, amount, options)
@@ -37,20 +37,20 @@ module ActiveMerchant #:nodoc:
37
37
  commit('authorize', params, options)
38
38
  end
39
39
 
40
- def capture(amount, authorization, options={})
40
+ def capture(amount, authorization, options = {})
41
41
  params = {}
42
42
  options[:id_unico] = split_authorization(authorization)[1]
43
43
  add_auth_order_id(params, authorization, options)
44
44
  commit('deposit', params, options)
45
45
  end
46
46
 
47
- def void(authorization, options={})
47
+ def void(authorization, options = {})
48
48
  params = {}
49
49
  add_auth_order_id(params, authorization, options)
50
50
  commit('void', params, options)
51
51
  end
52
52
 
53
- def refund(amount, authorization, options={})
53
+ def refund(amount, authorization, options = {})
54
54
  params = {}
55
55
  params[:amount] = amount(amount) if amount
56
56
  add_auth_order_id(params, authorization, options)
@@ -65,7 +65,7 @@ module ActiveMerchant #:nodoc:
65
65
  commit('refund', params, options)
66
66
  end
67
67
 
68
- def verify(credit_card, options={})
68
+ def verify(credit_card, options = {})
69
69
  MultiResponse.run(:use_first_response) do |r|
70
70
  r.process { authorize(100, credit_card, options) }
71
71
  r.process(:ignore_result) { void(r.authorization, options) }
@@ -85,7 +85,7 @@ module ActiveMerchant #:nodoc:
85
85
 
86
86
  private
87
87
 
88
- CURRENCY_CODES = Hash.new { |h, k| raise ArgumentError.new("Unsupported currency: #{k}") }
88
+ CURRENCY_CODES = Hash.new { |_h, k| raise ArgumentError.new("Unsupported currency: #{k}") }
89
89
  CURRENCY_CODES['USD'] = 840
90
90
  CURRENCY_CODES['PEN'] = 604
91
91
 
@@ -142,7 +142,7 @@ module ActiveMerchant #:nodoc:
142
142
  authorization.split('|')
143
143
  end
144
144
 
145
- def commit(action, params, options={})
145
+ def commit(action, params, options = {})
146
146
  raw_response = ssl_request(method(action), url(action, params, options), params.to_json, headers)
147
147
  response = parse(raw_response)
148
148
  rescue ResponseError => e
@@ -168,7 +168,7 @@ module ActiveMerchant #:nodoc:
168
168
  }
169
169
  end
170
170
 
171
- def url(action, params, options={})
171
+ def url(action, params, options = {})
172
172
  if action == 'authorize'
173
173
  "#{base_url}/#{@options[:merchant_id]}"
174
174
  elsif action == 'refund'