activemerchant 1.105.0 → 1.107.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (173) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +99 -1
  3. data/README.md +2 -2
  4. data/lib/active_merchant/billing/credit_card_methods.rb +12 -3
  5. data/lib/active_merchant/billing/gateway.rb +22 -22
  6. data/lib/active_merchant/billing/gateways/adyen.rb +18 -7
  7. data/lib/active_merchant/billing/gateways/allied_wallet.rb +2 -2
  8. data/lib/active_merchant/billing/gateways/authorize_net.rb +19 -19
  9. data/lib/active_merchant/billing/gateways/authorize_net_arb.rb +11 -11
  10. data/lib/active_merchant/billing/gateways/authorize_net_cim.rb +35 -35
  11. data/lib/active_merchant/billing/gateways/axcessms.rb +3 -3
  12. data/lib/active_merchant/billing/gateways/bambora_apac.rb +1 -1
  13. data/lib/active_merchant/billing/gateways/bank_frick.rb +1 -1
  14. data/lib/active_merchant/billing/gateways/banwire.rb +2 -2
  15. data/lib/active_merchant/billing/gateways/barclaycard_smartpay.rb +5 -5
  16. data/lib/active_merchant/billing/gateways/be2bill.rb +4 -4
  17. data/lib/active_merchant/billing/gateways/beanstream.rb +1 -1
  18. data/lib/active_merchant/billing/gateways/beanstream/beanstream_core.rb +27 -27
  19. data/lib/active_merchant/billing/gateways/beanstream_interac.rb +1 -1
  20. data/lib/active_merchant/billing/gateways/blue_pay.rb +8 -8
  21. data/lib/active_merchant/billing/gateways/blue_snap.rb +5 -2
  22. data/lib/active_merchant/billing/gateways/bogus.rb +20 -20
  23. data/lib/active_merchant/billing/gateways/borgun.rb +17 -6
  24. data/lib/active_merchant/billing/gateways/bpoint.rb +1 -1
  25. data/lib/active_merchant/billing/gateways/braintree_blue.rb +81 -77
  26. data/lib/active_merchant/billing/gateways/bridge_pay.rb +3 -3
  27. data/lib/active_merchant/billing/gateways/card_connect.rb +1 -1
  28. data/lib/active_merchant/billing/gateways/card_stream.rb +19 -19
  29. data/lib/active_merchant/billing/gateways/cc5.rb +7 -7
  30. data/lib/active_merchant/billing/gateways/cecabank.rb +3 -3
  31. data/lib/active_merchant/billing/gateways/cenpos.rb +3 -3
  32. data/lib/active_merchant/billing/gateways/checkout_v2.rb +20 -9
  33. data/lib/active_merchant/billing/gateways/clearhaus.rb +1 -1
  34. data/lib/active_merchant/billing/gateways/commercegate.rb +2 -2
  35. data/lib/active_merchant/billing/gateways/conekta.rb +1 -1
  36. data/lib/active_merchant/billing/gateways/creditcall.rb +4 -4
  37. data/lib/active_merchant/billing/gateways/ct_payment.rb +1 -1
  38. data/lib/active_merchant/billing/gateways/culqi.rb +2 -2
  39. data/lib/active_merchant/billing/gateways/cyber_source.rb +154 -91
  40. data/lib/active_merchant/billing/gateways/d_local.rb +4 -2
  41. data/lib/active_merchant/billing/gateways/data_cash.rb +33 -33
  42. data/lib/active_merchant/billing/gateways/decidir.rb +7 -2
  43. data/lib/active_merchant/billing/gateways/ebanx.rb +14 -2
  44. data/lib/active_merchant/billing/gateways/efsnet.rb +23 -23
  45. data/lib/active_merchant/billing/gateways/elavon.rb +70 -18
  46. data/lib/active_merchant/billing/gateways/element.rb +12 -4
  47. data/lib/active_merchant/billing/gateways/epay.rb +40 -40
  48. data/lib/active_merchant/billing/gateways/evo_ca.rb +11 -11
  49. data/lib/active_merchant/billing/gateways/eway.rb +3 -3
  50. data/lib/active_merchant/billing/gateways/eway_managed.rb +40 -40
  51. data/lib/active_merchant/billing/gateways/eway_rapid.rb +7 -7
  52. data/lib/active_merchant/billing/gateways/exact.rb +11 -11
  53. data/lib/active_merchant/billing/gateways/fat_zebra.rb +3 -2
  54. data/lib/active_merchant/billing/gateways/federated_canada.rb +5 -5
  55. data/lib/active_merchant/billing/gateways/firstdata_e4.rb +21 -21
  56. data/lib/active_merchant/billing/gateways/firstdata_e4_v27.rb +20 -20
  57. data/lib/active_merchant/billing/gateways/flo2cash.rb +4 -4
  58. data/lib/active_merchant/billing/gateways/forte.rb +8 -7
  59. data/lib/active_merchant/billing/gateways/garanti.rb +8 -8
  60. data/lib/active_merchant/billing/gateways/global_collect.rb +30 -24
  61. data/lib/active_merchant/billing/gateways/hdfc.rb +3 -3
  62. data/lib/active_merchant/billing/gateways/hps.rb +5 -3
  63. data/lib/active_merchant/billing/gateways/iats_payments.rb +32 -15
  64. data/lib/active_merchant/billing/gateways/inspire.rb +7 -7
  65. data/lib/active_merchant/billing/gateways/instapay.rb +3 -3
  66. data/lib/active_merchant/billing/gateways/ipp.rb +1 -1
  67. data/lib/active_merchant/billing/gateways/iridium.rb +12 -10
  68. data/lib/active_merchant/billing/gateways/itransact.rb +7 -7
  69. data/lib/active_merchant/billing/gateways/iveri.rb +6 -3
  70. data/lib/active_merchant/billing/gateways/ixopay.rb +22 -0
  71. data/lib/active_merchant/billing/gateways/jetpay.rb +4 -4
  72. data/lib/active_merchant/billing/gateways/jetpay_v2.rb +5 -5
  73. data/lib/active_merchant/billing/gateways/kushki.rb +34 -5
  74. data/lib/active_merchant/billing/gateways/latitude19.rb +2 -2
  75. data/lib/active_merchant/billing/gateways/linkpoint.rb +62 -62
  76. data/lib/active_merchant/billing/gateways/litle.rb +8 -3
  77. data/lib/active_merchant/billing/gateways/mastercard.rb +2 -2
  78. data/lib/active_merchant/billing/gateways/mercado_pago.rb +1 -0
  79. data/lib/active_merchant/billing/gateways/merchant_e_solutions.rb +5 -5
  80. data/lib/active_merchant/billing/gateways/merchant_one.rb +2 -2
  81. data/lib/active_merchant/billing/gateways/merchant_partners.rb +4 -4
  82. data/lib/active_merchant/billing/gateways/merchant_ware.rb +12 -12
  83. data/lib/active_merchant/billing/gateways/merchant_ware_version_four.rb +11 -11
  84. data/lib/active_merchant/billing/gateways/merchant_warrior.rb +12 -2
  85. data/lib/active_merchant/billing/gateways/mercury.rb +9 -9
  86. data/lib/active_merchant/billing/gateways/metrics_global.rb +15 -15
  87. data/lib/active_merchant/billing/gateways/migs.rb +13 -13
  88. data/lib/active_merchant/billing/gateways/modern_payments_cim.rb +7 -7
  89. data/lib/active_merchant/billing/gateways/monei.rb +19 -19
  90. data/lib/active_merchant/billing/gateways/moneris.rb +10 -10
  91. data/lib/active_merchant/billing/gateways/money_movers.rb +5 -5
  92. data/lib/active_merchant/billing/gateways/mundipagg.rb +1 -1
  93. data/lib/active_merchant/billing/gateways/nab_transact.rb +15 -15
  94. data/lib/active_merchant/billing/gateways/ncr_secure_pay.rb +1 -1
  95. data/lib/active_merchant/billing/gateways/net_registry.rb +6 -6
  96. data/lib/active_merchant/billing/gateways/netaxept.rb +4 -4
  97. data/lib/active_merchant/billing/gateways/netbanx.rb +14 -14
  98. data/lib/active_merchant/billing/gateways/netbilling.rb +12 -12
  99. data/lib/active_merchant/billing/gateways/netpay.rb +2 -2
  100. data/lib/active_merchant/billing/gateways/network_merchants.rb +5 -5
  101. data/lib/active_merchant/billing/gateways/ogone.rb +7 -7
  102. data/lib/active_merchant/billing/gateways/openpay.rb +2 -2
  103. data/lib/active_merchant/billing/gateways/opp.rb +13 -7
  104. data/lib/active_merchant/billing/gateways/optimal_payment.rb +13 -9
  105. data/lib/active_merchant/billing/gateways/orbital.rb +54 -12
  106. data/lib/active_merchant/billing/gateways/pac_net_raven.rb +7 -7
  107. data/lib/active_merchant/billing/gateways/pay_conex.rb +2 -2
  108. data/lib/active_merchant/billing/gateways/pay_gate_xml.rb +16 -16
  109. data/lib/active_merchant/billing/gateways/pay_junction.rb +16 -16
  110. data/lib/active_merchant/billing/gateways/pay_junction_v2.rb +18 -2
  111. data/lib/active_merchant/billing/gateways/pay_secure.rb +6 -6
  112. data/lib/active_merchant/billing/gateways/paybox_direct.rb +36 -36
  113. data/lib/active_merchant/billing/gateways/payflow.rb +7 -7
  114. data/lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb +12 -12
  115. data/lib/active_merchant/billing/gateways/payflow_express.rb +4 -4
  116. data/lib/active_merchant/billing/gateways/payment_express.rb +9 -9
  117. data/lib/active_merchant/billing/gateways/paymill.rb +3 -3
  118. data/lib/active_merchant/billing/gateways/paypal.rb +1 -1
  119. data/lib/active_merchant/billing/gateways/paypal/paypal_common_api.rb +5 -5
  120. data/lib/active_merchant/billing/gateways/paypal_express_common.rb +1 -1
  121. data/lib/active_merchant/billing/gateways/payscout.rb +5 -5
  122. data/lib/active_merchant/billing/gateways/paystation.rb +2 -2
  123. data/lib/active_merchant/billing/gateways/payu_latam.rb +3 -3
  124. data/lib/active_merchant/billing/gateways/payway.rb +12 -12
  125. data/lib/active_merchant/billing/gateways/pin.rb +16 -16
  126. data/lib/active_merchant/billing/gateways/plugnpay.rb +10 -10
  127. data/lib/active_merchant/billing/gateways/psigate.rb +26 -26
  128. data/lib/active_merchant/billing/gateways/psl_card.rb +4 -4
  129. data/lib/active_merchant/billing/gateways/qbms.rb +23 -23
  130. data/lib/active_merchant/billing/gateways/quantum.rb +4 -4
  131. data/lib/active_merchant/billing/gateways/quickpay/quickpay_common.rb +95 -95
  132. data/lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb +9 -9
  133. data/lib/active_merchant/billing/gateways/quickpay/quickpay_v4to7.rb +2 -2
  134. data/lib/active_merchant/billing/gateways/qvalent.rb +1 -1
  135. data/lib/active_merchant/billing/gateways/realex.rb +17 -10
  136. data/lib/active_merchant/billing/gateways/redsys.rb +24 -16
  137. data/lib/active_merchant/billing/gateways/safe_charge.rb +1 -1
  138. data/lib/active_merchant/billing/gateways/sage.rb +10 -10
  139. data/lib/active_merchant/billing/gateways/sage_pay.rb +35 -35
  140. data/lib/active_merchant/billing/gateways/sallie_mae.rb +2 -2
  141. data/lib/active_merchant/billing/gateways/secure_net.rb +9 -9
  142. data/lib/active_merchant/billing/gateways/secure_pay.rb +13 -13
  143. data/lib/active_merchant/billing/gateways/secure_pay_au.rb +16 -16
  144. data/lib/active_merchant/billing/gateways/secure_pay_tech.rb +2 -2
  145. data/lib/active_merchant/billing/gateways/skip_jack.rb +8 -8
  146. data/lib/active_merchant/billing/gateways/smart_ps.rb +16 -16
  147. data/lib/active_merchant/billing/gateways/so_easy_pay.rb +6 -6
  148. data/lib/active_merchant/billing/gateways/spreedly_core.rb +4 -4
  149. data/lib/active_merchant/billing/gateways/stripe.rb +15 -10
  150. data/lib/active_merchant/billing/gateways/stripe_payment_intents.rb +50 -9
  151. data/lib/active_merchant/billing/gateways/swipe_checkout.rb +2 -2
  152. data/lib/active_merchant/billing/gateways/trans_first.rb +4 -4
  153. data/lib/active_merchant/billing/gateways/trust_commerce.rb +19 -19
  154. data/lib/active_merchant/billing/gateways/usa_epay_advanced.rb +110 -110
  155. data/lib/active_merchant/billing/gateways/usa_epay_transaction.rb +29 -29
  156. data/lib/active_merchant/billing/gateways/verifi.rb +10 -10
  157. data/lib/active_merchant/billing/gateways/viaklix.rb +6 -6
  158. data/lib/active_merchant/billing/gateways/visanet_peru.rb +6 -6
  159. data/lib/active_merchant/billing/gateways/webpay.rb +2 -2
  160. data/lib/active_merchant/billing/gateways/wirecard.rb +6 -6
  161. data/lib/active_merchant/billing/gateways/worldpay.rb +22 -20
  162. data/lib/active_merchant/billing/gateways/worldpay_online_payments.rb +32 -32
  163. data/lib/active_merchant/billing/gateways/worldpay_us.rb +2 -2
  164. data/lib/active_merchant/billing/network_tokenization_credit_card.rb +1 -1
  165. data/lib/active_merchant/connection.rb +1 -1
  166. data/lib/active_merchant/network_connection_retries.rb +3 -3
  167. data/lib/active_merchant/post_data.rb +1 -1
  168. data/lib/active_merchant/version.rb +1 -1
  169. data/lib/certs/cacert.pem +75 -0
  170. data/lib/support/ssl_verify.rb +2 -2
  171. data/lib/support/ssl_version.rb +2 -2
  172. metadata +4 -4
  173. data/lib/active_merchant/billing/gateways/moneris_us.rb +0 -352
@@ -17,8 +17,8 @@ module ActiveMerchant #:nodoc:
17
17
 
18
18
  self.supported_countries = %w[AU FJ GB HK IE MY NZ PG SG US]
19
19
 
20
- self.homepage_url = 'http://www.paymentexpress.com/'
21
- self.display_name = 'PaymentExpress'
20
+ self.homepage_url = 'https://www.windcave.com/'
21
+ self.display_name = 'Windcave (formerly PaymentExpress)'
22
22
 
23
23
  self.live_url = 'https://sec.paymentexpress.com/pxpost.aspx'
24
24
  self.test_url = 'https://uat.paymentexpress.com/pxpost.aspx'
@@ -26,11 +26,11 @@ module ActiveMerchant #:nodoc:
26
26
  APPROVED = '1'
27
27
 
28
28
  TRANSACTIONS = {
29
- :purchase => 'Purchase',
30
- :credit => 'Refund',
31
- :authorization => 'Auth',
32
- :capture => 'Complete',
33
- :validate => 'Validate'
29
+ purchase: 'Purchase',
30
+ credit: 'Refund',
31
+ authorization: 'Auth',
32
+ capture: 'Complete',
33
+ validate: 'Validate'
34
34
  }
35
35
 
36
36
  # We require the DPS gateway username and password when the object is created.
@@ -302,8 +302,8 @@ module ActiveMerchant #:nodoc:
302
302
 
303
303
  # Return a response
304
304
  PaymentExpressResponse.new(response[:success] == APPROVED, message_from(response), response,
305
- :test => response[:test_mode] == '1',
306
- :authorization => authorization_from(action, response)
305
+ test: response[:test_mode] == '1',
306
+ authorization: authorization_from(action, response)
307
307
  )
308
308
  end
309
309
 
@@ -112,8 +112,8 @@ module ActiveMerchant #:nodoc:
112
112
  def response_from(raw_response)
113
113
  parsed = JSON.parse(raw_response)
114
114
  options = {
115
- :authorization => authorization_from(parsed),
116
- :test => (parsed['mode'] == 'test'),
115
+ authorization: authorization_from(parsed),
116
+ test: (parsed['mode'] == 'test'),
117
117
  }
118
118
 
119
119
  succeeded = (parsed['data'] == []) || (parsed['data']['response_code'].to_i == 20000)
@@ -181,7 +181,7 @@ module ActiveMerchant #:nodoc:
181
181
  end
182
182
 
183
183
  def response_for_save_from(raw_response)
184
- options = { :test => test? }
184
+ options = { test: test? }
185
185
 
186
186
  parser = ResponseParser.new(raw_response, options)
187
187
  parser.generate_response
@@ -55,7 +55,7 @@ module ActiveMerchant #:nodoc:
55
55
  billing_address = options[:billing_address] || options[:address]
56
56
  currency_code = options[:currency] || currency(money)
57
57
 
58
- xml = Builder::XmlMarkup.new :indent => 2
58
+ xml = Builder::XmlMarkup.new indent: 2
59
59
  xml.tag! transaction_type + 'Req', 'xmlns' => PAYPAL_NAMESPACE do
60
60
  xml.tag! transaction_type + 'Request', 'xmlns:n2' => EBAY_NAMESPACE do
61
61
  xml.tag! 'n2:Version', API_VERSION
@@ -586,11 +586,11 @@ module ActiveMerchant #:nodoc:
586
586
  xml.tag! 'n2:OrderTotal', localized_amount(money, currency_code), 'currencyID' => currency_code
587
587
 
588
588
  # All of the values must be included together and add up to the order total
589
- if [:subtotal, :shipping, :handling, :tax].all?{ |o| options[o].present?}
590
- xml.tag! 'n2:ItemTotal', localized_amount(options[:subtotal].to_i, currency_code), 'currencyID' => currency_code
591
- xml.tag! 'n2:ShippingTotal', localized_amount(options[:shipping].to_i, currency_code),'currencyID' => currency_code
592
- xml.tag! 'n2:HandlingTotal', localized_amount(options[:handling].to_i, currency_code),'currencyID' => currency_code
593
- xml.tag! 'n2:TaxTotal', localized_amount(options[:tax].to_i, currency_code), 'currencyID' => currency_code
589
+ if [:subtotal, :shipping, :handling, :tax].all?{ |o| options[o].present? }
590
+ xml.tag! 'n2:ItemTotal', localized_amount(options[:subtotal], currency_code), 'currencyID' => currency_code
591
+ xml.tag! 'n2:ShippingTotal', localized_amount(options[:shipping], currency_code),'currencyID' => currency_code
592
+ xml.tag! 'n2:HandlingTotal', localized_amount(options[:handling], currency_code),'currencyID' => currency_code
593
+ xml.tag! 'n2:TaxTotal', localized_amount(options[:tax], currency_code), 'currencyID' => currency_code
594
594
  end
595
595
 
596
596
  xml.tag! 'n2:InsuranceTotal', localized_amount(options[:insurance_total], currency_code),'currencyID' => currency_code unless options[:insurance_total].blank?
@@ -17,7 +17,7 @@ module ActiveMerchant
17
17
  end
18
18
 
19
19
  def redirect_url_for(token, options = {})
20
- options = {:review => true, :mobile => false}.update(options)
20
+ options = {review: true, mobile: false}.update(options)
21
21
 
22
22
  cmd = options[:mobile] ? '_express-checkout-mobile' : '_express-checkout'
23
23
  url = "#{redirect_url}?cmd=#{cmd}&token=#{token}"
@@ -116,11 +116,11 @@ module ActiveMerchant #:nodoc:
116
116
  message = message_from(response)
117
117
  test_mode = (test? || message =~ /TESTMODE/)
118
118
  Response.new(success?(response), message, response,
119
- :test => test_mode,
120
- :authorization => response['transactionid'],
121
- :fraud_review => fraud_review?(response),
122
- :avs_result => { :code => response['avsresponse'] },
123
- :cvv_result => response['cvvresponse']
119
+ test: test_mode,
120
+ authorization: response['transactionid'],
121
+ fraud_review: fraud_review?(response),
122
+ avs_result: { code: response['avsresponse'] },
123
+ cvv_result: response['cvvresponse']
124
124
  )
125
125
  end
126
126
 
@@ -178,8 +178,8 @@ module ActiveMerchant #:nodoc:
178
178
  message = message_from(response)
179
179
 
180
180
  PaystationResponse.new(success?(response), message, response,
181
- :test => (response[:tm]&.casecmp('t')&.zero?),
182
- :authorization => response[:paystation_transaction_id]
181
+ test: (response[:tm]&.casecmp('t')&.zero?),
182
+ authorization: response[:paystation_transaction_id]
183
183
  )
184
184
  end
185
185
 
@@ -347,8 +347,8 @@ module ActiveMerchant #:nodoc:
347
347
 
348
348
  def headers
349
349
  {
350
- 'Content-Type' => 'application/json',
351
- 'Accept' => 'application/json'
350
+ 'Content-Type' => 'application/json',
351
+ 'Accept' => 'application/json'
352
352
  }
353
353
  end
354
354
 
@@ -441,7 +441,7 @@ module ActiveMerchant #:nodoc:
441
441
  false,
442
442
  message_from('', false, response),
443
443
  response,
444
- :test => test?
444
+ test: test?
445
445
  )
446
446
  end
447
447
 
@@ -17,7 +17,7 @@ module ActiveMerchant
17
17
  '3' => 'Rejected'
18
18
  }
19
19
 
20
- RESPONSE_CODES= {
20
+ RESPONSE_CODES = {
21
21
  '00' => 'Completed Successfully',
22
22
  '01' => 'Refer to card issuer',
23
23
  '03' => 'Invalid merchant',
@@ -74,13 +74,13 @@ module ActiveMerchant
74
74
  'QZ' => 'Zero value transaction'
75
75
  }
76
76
 
77
- TRANSACTIONS = {
78
- :authorize => 'preauth',
79
- :purchase => 'capture',
80
- :capture => 'captureWithoutAuth',
81
- :status => 'query',
82
- :refund => 'refund',
83
- :store => 'registerAccount'
77
+ TRANSACTIONS = {
78
+ authorize: 'preauth',
79
+ purchase: 'capture',
80
+ capture: 'captureWithoutAuth',
81
+ status: 'query',
82
+ refund: 'refund',
83
+ store: 'registerAccount'
84
84
  }
85
85
 
86
86
  def initialize(options={})
@@ -193,15 +193,15 @@ module ActiveMerchant
193
193
  success = (params[:summary_code] ? (params[:summary_code] == '0') : (params[:response_code] == '00'))
194
194
 
195
195
  Response.new(success, message, params,
196
- :test => (@options[:merchant].to_s == 'TEST'),
197
- :authorization => post[:order_number]
196
+ test: (@options[:merchant].to_s == 'TEST'),
197
+ authorization: post[:order_number]
198
198
  )
199
199
  rescue ActiveMerchant::ResponseError => e
200
200
  raise unless e.response.code == '403'
201
201
 
202
- return Response.new(false, 'Invalid credentials', {}, :test => test?)
202
+ return Response.new(false, 'Invalid credentials', {}, test: test?)
203
203
  rescue ActiveMerchant::ClientCertificateError
204
- return Response.new(false, 'Invalid certificate', {}, :test => test?)
204
+ return Response.new(false, 'Invalid certificate', {}, test: test?)
205
205
  end
206
206
  end
207
207
  end
@@ -47,7 +47,7 @@ module ActiveMerchant #:nodoc:
47
47
 
48
48
  # Refund a transaction
49
49
  def refund(money, token, options = {})
50
- commit(:post, "charges/#{CGI.escape(token)}/refunds", { :amount => amount(money) }, options)
50
+ commit(:post, "charges/#{CGI.escape(token)}/refunds", { amount: amount(money) }, options)
51
51
  end
52
52
 
53
53
  # Authorize an amount on a credit card. Once authorized, you can later
@@ -61,7 +61,7 @@ module ActiveMerchant #:nodoc:
61
61
  # Captures a previously authorized charge. Capturing only part of the original
62
62
  # authorization is currently not supported.
63
63
  def capture(money, token, options = {})
64
- commit(:put, "charges/#{CGI.escape(token)}/capture", { :amount => amount(money) }, options)
64
+ commit(:put, "charges/#{CGI.escape(token)}/capture", { amount: amount(money) }, options)
65
65
  end
66
66
 
67
67
  # Updates the credit card for the customer.
@@ -107,11 +107,11 @@ module ActiveMerchant #:nodoc:
107
107
 
108
108
  post[:card] ||= {}
109
109
  post[:card].merge!(
110
- :address_line1 => address[:address1],
111
- :address_city => address[:city],
112
- :address_postcode => address[:zip],
113
- :address_state => address[:state],
114
- :address_country => address[:country]
110
+ address_line1: address[:address1],
111
+ address_city: address[:city],
112
+ address_postcode: address[:zip],
113
+ address_state: address[:state],
114
+ address_country: address[:country]
115
115
  )
116
116
  end
117
117
 
@@ -131,11 +131,11 @@ module ActiveMerchant #:nodoc:
131
131
  post[:card] ||= {}
132
132
 
133
133
  post[:card].merge!(
134
- :number => creditcard.number,
135
- :expiry_month => creditcard.month,
136
- :expiry_year => creditcard.year,
137
- :cvc => creditcard.verification_value,
138
- :name => creditcard.name
134
+ number: creditcard.number,
135
+ expiry_month: creditcard.month,
136
+ expiry_year: creditcard.year,
137
+ cvc: creditcard.verification_value,
138
+ name: creditcard.name
139
139
  )
140
140
  elsif creditcard.kind_of?(String)
141
141
  if creditcard =~ /^card_/
@@ -194,8 +194,8 @@ module ActiveMerchant #:nodoc:
194
194
  true,
195
195
  response['status_message'],
196
196
  body,
197
- :authorization => token(response),
198
- :test => test?
197
+ authorization: token(response),
198
+ test: test?
199
199
  )
200
200
  end
201
201
 
@@ -204,8 +204,8 @@ module ActiveMerchant #:nodoc:
204
204
  false,
205
205
  body['error_description'],
206
206
  body,
207
- :authorization => nil,
208
- :test => test?
207
+ authorization: nil,
208
+ test: test?
209
209
  )
210
210
  end
211
211
 
@@ -80,12 +80,12 @@ module ActiveMerchant
80
80
  }
81
81
 
82
82
  TRANSACTIONS = {
83
- :authorization => 'auth',
84
- :purchase => 'auth',
85
- :capture => 'mark',
86
- :void => 'void',
87
- :refund => 'return',
88
- :credit => 'newreturn'
83
+ authorization: 'auth',
84
+ purchase: 'auth',
85
+ capture: 'mark',
86
+ void: 'void',
87
+ refund: 'return',
88
+ credit: 'newreturn'
89
89
  }
90
90
 
91
91
  SUCCESS_CODES = ['pending', 'success']
@@ -179,10 +179,10 @@ module ActiveMerchant
179
179
  message = success ? 'Success' : message_from(response)
180
180
 
181
181
  Response.new(success, message, response,
182
- :test => test?,
183
- :authorization => response[:orderid],
184
- :avs_result => { :code => response[:avs_code] },
185
- :cvv_result => response[:cvvresp]
182
+ test: test?,
183
+ authorization: response[:orderid],
184
+ avs_result: { code: response[:avs_code] },
185
+ cvv_result: response[:cvvresp]
186
186
  )
187
187
  end
188
188
 
@@ -103,10 +103,10 @@ module ActiveMerchant #:nodoc:
103
103
  response = parse(ssl_post(url, post_data(money, creditcard, options)))
104
104
 
105
105
  Response.new(successful?(response), message_from(response), response,
106
- :test => test?,
107
- :authorization => build_authorization(response),
108
- :avs_result => { :code => response[:avsresult] },
109
- :cvv_result => response[:cardidresult]
106
+ test: test?,
107
+ authorization: build_authorization(response),
108
+ avs_result: { code: response[:avsresult] },
109
+ cvv_result: response[:cardidresult]
110
110
  )
111
111
  end
112
112
 
@@ -119,7 +119,7 @@ module ActiveMerchant #:nodoc:
119
119
  end
120
120
 
121
121
  def parse(xml)
122
- response = {:message => 'Global Error Receipt', :complete => false}
122
+ response = {message: 'Global Error Receipt', complete: false}
123
123
 
124
124
  xml = REXML::Document.new(xml)
125
125
  xml.elements.each('//Result/*') do |node|
@@ -144,26 +144,26 @@ module ActiveMerchant #:nodoc:
144
144
  def parameters(money, creditcard, options = {})
145
145
  params = {
146
146
  # General order parameters
147
- :StoreID => @options[:login],
148
- :Passphrase => @options[:password],
149
- :TestResult => options[:test_result],
150
- :OrderID => options[:order_id],
151
- :UserID => options[:user_id],
152
- :Phone => options[:phone],
153
- :Fax => options[:fax],
154
- :Email => options[:email],
155
- :TransRefNumber => options[:trans_ref_number],
147
+ StoreID: @options[:login],
148
+ Passphrase: @options[:password],
149
+ TestResult: options[:test_result],
150
+ OrderID: options[:order_id],
151
+ UserID: options[:user_id],
152
+ Phone: options[:phone],
153
+ Fax: options[:fax],
154
+ Email: options[:email],
155
+ TransRefNumber: options[:trans_ref_number],
156
156
 
157
157
  # Credit Card parameters
158
- :PaymentType => 'CC',
159
- :CardAction => options[:CardAction],
158
+ PaymentType: 'CC',
159
+ CardAction: options[:CardAction],
160
160
 
161
161
  # Financial parameters
162
- :CustomerIP => options[:ip],
163
- :SubTotal => amount(money),
164
- :Tax1 => options[:tax1],
165
- :Tax2 => options[:tax2],
166
- :ShippingTotal => options[:shipping_total],
162
+ CustomerIP: options[:ip],
163
+ SubTotal: amount(money),
164
+ Tax1: options[:tax1],
165
+ Tax2: options[:tax2],
166
+ ShippingTotal: options[:shipping_total],
167
167
  }
168
168
 
169
169
  if creditcard
@@ -172,11 +172,11 @@ module ActiveMerchant #:nodoc:
172
172
  card_id_code = (creditcard.verification_value.blank? ? nil : '1')
173
173
 
174
174
  params.update(
175
- :CardNumber => creditcard.number,
176
- :CardExpMonth => exp_month,
177
- :CardExpYear => exp_year,
178
- :CardIDCode => card_id_code,
179
- :CardIDNumber => creditcard.verification_value
175
+ CardNumber: creditcard.number,
176
+ CardExpMonth: exp_month,
177
+ CardExpYear: exp_year,
178
+ CardIDCode: card_id_code,
179
+ CardIDNumber: creditcard.verification_value
180
180
  )
181
181
  end
182
182
 
@@ -260,10 +260,10 @@ module ActiveMerchant
260
260
  response = parse(ssl_post(self.live_url, post_data(request)))
261
261
 
262
262
  Response.new(response[:ResponseCode] == APPROVED, response[:Message], response,
263
- :test => test?,
264
- :authorization => response[:CrossReference],
265
- :cvv_result => CVV_CODE[response[:AVSCV2Check]],
266
- :avs_result => { :code => AVS_CODE[response[:AVSCV2Check]] }
263
+ test: test?,
264
+ authorization: response[:CrossReference],
265
+ cvv_result: CVV_CODE[response[:AVSCV2Check]],
266
+ avs_result: { code: AVS_CODE[response[:AVSCV2Check]] }
267
267
  )
268
268
  end
269
269
 
@@ -15,12 +15,12 @@ module ActiveMerchant #:nodoc:
15
15
  self.supported_countries = ['US']
16
16
 
17
17
  TYPES = {
18
- :authorize => 'CustomerCreditCardAuth',
19
- :capture => 'CustomerCreditCardCapture',
20
- :purchase => 'CustomerCreditCardCharge',
21
- :refund => 'CustomerCreditCardTxnVoidOrRefund',
22
- :void => 'CustomerCreditCardTxnVoid',
23
- :query => 'MerchantAccountQuery',
18
+ authorize: 'CustomerCreditCardAuth',
19
+ capture: 'CustomerCreditCardCapture',
20
+ purchase: 'CustomerCreditCardCharge',
21
+ refund: 'CustomerCreditCardTxnVoidOrRefund',
22
+ void: 'CustomerCreditCardTxnVoid',
23
+ query: 'MerchantAccountQuery',
24
24
  }
25
25
 
26
26
  # Creates a new QbmsGateway
@@ -51,7 +51,7 @@ module ActiveMerchant #:nodoc:
51
51
  # * <tt>options</tt> -- A hash of optional parameters.
52
52
  #
53
53
  def authorize(money, creditcard, options = {})
54
- commit(:authorize, money, options.merge(:credit_card => creditcard))
54
+ commit(:authorize, money, options.merge(credit_card: creditcard))
55
55
  end
56
56
 
57
57
  # Perform a purchase, which is essentially an authorization and capture in a single operation.
@@ -63,7 +63,7 @@ module ActiveMerchant #:nodoc:
63
63
  # * <tt>options</tt> -- A hash of optional parameters.
64
64
  #
65
65
  def purchase(money, creditcard, options = {})
66
- commit(:purchase, money, options.merge(:credit_card => creditcard))
66
+ commit(:purchase, money, options.merge(credit_card: creditcard))
67
67
  end
68
68
 
69
69
  # Captures the funds from an authorized transaction.
@@ -74,7 +74,7 @@ module ActiveMerchant #:nodoc:
74
74
  # * <tt>authorization</tt> -- The authorization returned from the previous authorize request.
75
75
  #
76
76
  def capture(money, authorization, options = {})
77
- commit(:capture, money, options.merge(:transaction_id => authorization))
77
+ commit(:capture, money, options.merge(transaction_id: authorization))
78
78
  end
79
79
 
80
80
  # Void a previous transaction
@@ -84,7 +84,7 @@ module ActiveMerchant #:nodoc:
84
84
  # * <tt>authorization</tt> - The authorization returned from the previous authorize request.
85
85
  #
86
86
  def void(authorization, options = {})
87
- commit(:void, nil, options.merge(:transaction_id => authorization))
87
+ commit(:void, nil, options.merge(transaction_id: authorization))
88
88
  end
89
89
 
90
90
  # Credit an account.
@@ -105,7 +105,7 @@ module ActiveMerchant #:nodoc:
105
105
  end
106
106
 
107
107
  def refund(money, identification, options = {})
108
- commit(:refund, money, options.merge(:transaction_id => identification))
108
+ commit(:refund, money, options.merge(transaction_id: identification))
109
109
  end
110
110
 
111
111
  # Query the merchant account status
@@ -143,11 +143,11 @@ module ActiveMerchant #:nodoc:
143
143
  message = (response[:status_message] || '').strip
144
144
 
145
145
  Response.new(success?(response), message, response,
146
- :test => test?,
147
- :authorization => response[:credit_card_trans_id],
148
- :fraud_review => fraud_review?(response),
149
- :avs_result => { :code => avs_result(response) },
150
- :cvv_result => cvv_result(response)
146
+ test: test?,
147
+ authorization: response[:credit_card_trans_id],
148
+ fraud_review: fraud_review?(response),
149
+ avs_result: { code: avs_result(response) },
150
+ cvv_result: cvv_result(response)
151
151
  )
152
152
  end
153
153
 
@@ -167,16 +167,16 @@ module ActiveMerchant #:nodoc:
167
167
 
168
168
  if status_code != 0
169
169
  return {
170
- :status_code => status_code,
171
- :status_message => signon.attributes['statusMessage'],
170
+ status_code: status_code,
171
+ status_message: signon.attributes['statusMessage'],
172
172
  }
173
173
  end
174
174
 
175
175
  response = REXML::XPath.first(xml, "//QBMSXMLMsgsRs/#{type}Rs")
176
176
 
177
177
  results = {
178
- :status_code => response.attributes['statusCode'].to_i,
179
- :status_message => response.attributes['statusMessage'],
178
+ status_code: response.attributes['statusCode'].to_i,
179
+ status_message: response.attributes['statusMessage'],
180
180
  }
181
181
 
182
182
  response.elements.each do |e|
@@ -195,10 +195,10 @@ module ActiveMerchant #:nodoc:
195
195
  end
196
196
 
197
197
  def build_request(type, money, parameters = {})
198
- xml = Builder::XmlMarkup.new(:indent => 0)
198
+ xml = Builder::XmlMarkup.new(indent: 0)
199
199
 
200
- xml.instruct!(:xml, :version => '1.0', :encoding => 'utf-8')
201
- xml.instruct!(:qbmsxml, :version => API_VERSION)
200
+ xml.instruct!(:xml, version: '1.0', encoding: 'utf-8')
201
+ xml.instruct!(:qbmsxml, version: API_VERSION)
202
202
 
203
203
  xml.tag!('QBMSXML') do
204
204
  xml.tag!('SignonMsgsRq') do