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
  SERVICE_TEST_URL = 'https://certservices.elementexpress.com/express.asmx'
18
18
  SERVICE_LIVE_URL = 'https://services.elementexpress.com/express.asmx'
19
19
 
20
- def initialize(options={})
20
+ def initialize(options = {})
21
21
  requires!(options, :account_id, :account_token, :application_id, :acceptor_id, :application_name, :application_version)
22
22
  super
23
23
  end
24
24
 
25
- def purchase(money, payment, options={})
25
+ def purchase(money, payment, options = {})
26
26
  action = payment.is_a?(Check) ? 'CheckSale' : 'CreditCardSale'
27
27
 
28
28
  request = build_soap_request do |xml|
@@ -38,7 +38,7 @@ module ActiveMerchant #:nodoc:
38
38
  commit(action, request, money)
39
39
  end
40
40
 
41
- def authorize(money, payment, options={})
41
+ def authorize(money, payment, options = {})
42
42
  request = build_soap_request do |xml|
43
43
  xml.CreditCardAuthorization(xmlns: 'https://transaction.elementexpress.com') do
44
44
  add_credentials(xml)
@@ -52,7 +52,7 @@ module ActiveMerchant #:nodoc:
52
52
  commit('CreditCardAuthorization', request, money)
53
53
  end
54
54
 
55
- def capture(money, authorization, options={})
55
+ def capture(money, authorization, options = {})
56
56
  trans_id, = split_authorization(authorization)
57
57
  options[:trans_id] = trans_id
58
58
 
@@ -67,7 +67,7 @@ module ActiveMerchant #:nodoc:
67
67
  commit('CreditCardAuthorizationCompletion', request, money)
68
68
  end
69
69
 
70
- def refund(money, authorization, options={})
70
+ def refund(money, authorization, options = {})
71
71
  trans_id, = split_authorization(authorization)
72
72
  options[:trans_id] = trans_id
73
73
 
@@ -82,9 +82,9 @@ module ActiveMerchant #:nodoc:
82
82
  commit('CreditCardReturn', request, money)
83
83
  end
84
84
 
85
- def void(authorization, options={})
85
+ def void(authorization, options = {})
86
86
  trans_id, trans_amount = split_authorization(authorization)
87
- options.merge!({trans_id: trans_id, trans_amount: trans_amount, reversal_type: 'Full'})
87
+ options.merge!({ trans_id: trans_id, trans_amount: trans_amount, reversal_type: 'Full' })
88
88
 
89
89
  request = build_soap_request do |xml|
90
90
  xml.CreditCardReversal(xmlns: 'https://transaction.elementexpress.com') do
@@ -110,7 +110,7 @@ module ActiveMerchant #:nodoc:
110
110
  commit('PaymentAccountCreate', request, nil)
111
111
  end
112
112
 
113
- def verify(credit_card, options={})
113
+ def verify(credit_card, options = {})
114
114
  request = build_soap_request do |xml|
115
115
  xml.CreditCardAVSOnly(xmlns: 'https://transaction.elementexpress.com') do
116
116
  add_credentials(xml)
@@ -153,7 +153,7 @@ module ActiveMerchant #:nodoc:
153
153
  # The <tt>identification</tt> parameter is the transaction ID, retrieved
154
154
  # from {Response#authorization}.
155
155
  def refund(money, identification)
156
- post = {transactionid: identification}
156
+ post = { transactionid: identification }
157
157
  commit('refund', money, post)
158
158
  end
159
159
 
@@ -181,7 +181,7 @@ module ActiveMerchant #:nodoc:
181
181
  # The <tt>identification</tt> parameter is the transaction ID, retrieved
182
182
  # from {Response#authorization}.
183
183
  def void(identification)
184
- post = {transactionid: identification}
184
+ post = { transactionid: identification }
185
185
  commit('void', nil, post)
186
186
  end
187
187
 
@@ -192,7 +192,7 @@ module ActiveMerchant #:nodoc:
192
192
  # The <tt>identification</tt> parameter is the transaction ID, retrieved
193
193
  # from {Response#authorization}.
194
194
  def update(identification, options)
195
- post = {transactionid: identification}
195
+ post = { transactionid: identification }
196
196
  add_order(post, options)
197
197
  commit('update', nil, post)
198
198
  end
@@ -283,8 +283,7 @@ module ActiveMerchant #:nodoc:
283
283
  test: test?,
284
284
  authorization: response['transactionid'],
285
285
  avs_result: { code: response['avsresponse'] },
286
- cvv_result: response['cvvresponse']
287
- )
286
+ cvv_result: response['cvvresponse'])
288
287
  end
289
288
 
290
289
  def message_from(response)
@@ -292,7 +291,7 @@ module ActiveMerchant #:nodoc:
292
291
  end
293
292
 
294
293
  def post_data(action, parameters = {})
295
- post = {type: action}
294
+ post = { type: action }
296
295
 
297
296
  if test?
298
297
  post[:username] = 'demo'
@@ -38,7 +38,7 @@ module ActiveMerchant #:nodoc:
38
38
  commit(purchase_url(post[:CVN]), money, post)
39
39
  end
40
40
 
41
- def refund(money, authorization, options={})
41
+ def refund(money, authorization, options = {})
42
42
  post = {}
43
43
 
44
44
  add_customer_id(post)
@@ -66,7 +66,7 @@ module ActiveMerchant #:nodoc:
66
66
  private
67
67
 
68
68
  def requires_address!(options)
69
- raise ArgumentError.new('Missing eWay required parameters: address or billing_address') unless options.has_key?(:address) or options.has_key?(:billing_address)
69
+ raise ArgumentError.new('Missing eWay required parameters: address or billing_address') unless options.has_key?(:address) || options.has_key?(:billing_address)
70
70
  end
71
71
 
72
72
  def add_creditcard(post, creditcard)
@@ -115,8 +115,7 @@ module ActiveMerchant #:nodoc:
115
115
  message_from(response[:ewaytrxnerror]),
116
116
  response,
117
117
  authorization: response[:ewaytrxnnumber],
118
- test: test?
119
- )
118
+ test: test?)
120
119
  end
121
120
 
122
121
  def success?(response)
@@ -49,7 +49,7 @@ module ActiveMerchant #:nodoc:
49
49
  commit('CreateCustomer', post)
50
50
  end
51
51
 
52
- def update(billing_id, creditcard, options={})
52
+ def update(billing_id, creditcard, options = {})
53
53
  post = {}
54
54
 
55
55
  # Handle our required fields
@@ -80,7 +80,7 @@ module ActiveMerchant #:nodoc:
80
80
  # * <tt>:order_id</tt> -- The order number, passed to eWay as the "Invoice Reference"
81
81
  # * <tt>:invoice</tt> -- The invoice number, passed to eWay as the "Invoice Reference" unless :order_id is also given
82
82
  # * <tt>:description</tt> -- A description of the payment, passed to eWay as the "Invoice Description"
83
- def purchase(money, billing_id, options={})
83
+ def purchase(money, billing_id, options = {})
84
84
  post = {}
85
85
  post[:managedCustomerID] = billing_id.to_s
86
86
  post[:amount] = money
@@ -224,8 +224,7 @@ module ActiveMerchant #:nodoc:
224
224
 
225
225
  EwayResponse.new(response[:success], response[:message], response,
226
226
  test: test?,
227
- authorization: response[:auth_code]
228
- )
227
+ authorization: response[:auth_code])
229
228
  end
230
229
 
231
230
  # Where we build the full SOAP 1.2 request using builder
@@ -244,16 +243,16 @@ module ActiveMerchant #:nodoc:
244
243
 
245
244
  xml = Builder::XmlMarkup.new indent: 2
246
245
  xml.instruct!
247
- xml.tag! 'soap12:Envelope', {'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance', 'xmlns:xsd' => 'http://www.w3.org/2001/XMLSchema', 'xmlns:soap12' => 'http://www.w3.org/2003/05/soap-envelope'} do
246
+ xml.tag! 'soap12:Envelope', { 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance', 'xmlns:xsd' => 'http://www.w3.org/2001/XMLSchema', 'xmlns:soap12' => 'http://www.w3.org/2003/05/soap-envelope' } do
248
247
  xml.tag! 'soap12:Header' do
249
- xml.tag! 'eWAYHeader', {'xmlns' => 'https://www.eway.com.au/gateway/managedpayment'} do
248
+ xml.tag! 'eWAYHeader', { 'xmlns' => 'https://www.eway.com.au/gateway/managedpayment' } do
250
249
  xml.tag! 'eWAYCustomerID', @options[:login]
251
250
  xml.tag! 'Username', @options[:username]
252
251
  xml.tag! 'Password', @options[:password]
253
252
  end
254
253
  end
255
254
  xml.tag! 'soap12:Body' do |x|
256
- x.tag! action, {'xmlns' => 'https://www.eway.com.au/gateway/managedpayment'} do |y|
255
+ x.tag! action, { 'xmlns' => 'https://www.eway.com.au/gateway/managedpayment' } do |y|
257
256
  post.each do |key, value|
258
257
  y.tag! key, value
259
258
  end
@@ -47,7 +47,7 @@ module ActiveMerchant #:nodoc:
47
47
  # (default: "https://github.com/activemerchant/active_merchant")
48
48
  #
49
49
  # Returns an ActiveMerchant::Billing::Response object where authorization is the Transaction ID on success
50
- def purchase(amount, payment_method, options={})
50
+ def purchase(amount, payment_method, options = {})
51
51
  params = {}
52
52
  add_metadata(params, options)
53
53
  add_invoice(params, amount, options)
@@ -57,7 +57,7 @@ module ActiveMerchant #:nodoc:
57
57
  commit(url_for('Transaction'), params)
58
58
  end
59
59
 
60
- def authorize(amount, payment_method, options={})
60
+ def authorize(amount, payment_method, options = {})
61
61
  params = {}
62
62
  add_metadata(params, options)
63
63
  add_invoice(params, amount, options)
@@ -232,7 +232,7 @@ module ActiveMerchant #:nodoc:
232
232
  params[key] = {}
233
233
 
234
234
  add_name_and_email(params[key], options[:shipping_address], options[:email])
235
- add_address(params[key], options[:shipping_address], {skip_company: true})
235
+ add_address(params[key], options[:shipping_address], { skip_company: true })
236
236
  end
237
237
 
238
238
  def add_name_and_email(params, address, email, payment_method = nil)
@@ -251,7 +251,7 @@ module ActiveMerchant #:nodoc:
251
251
  payment_method.first_name.present? && payment_method.last_name.present?
252
252
  end
253
253
 
254
- def add_address(params, address, options={})
254
+ def add_address(params, address, options = {})
255
255
  return unless address
256
256
 
257
257
  params['Title'] = address[:title]
@@ -310,7 +310,7 @@ module ActiveMerchant #:nodoc:
310
310
  cvv_result: cvv_result_from(raw)
311
311
  )
312
312
  rescue ActiveMerchant::ResponseError => e
313
- return ActiveMerchant::Billing::Response.new(false, e.response.message, {status_code: e.response.code}, test: test?)
313
+ return ActiveMerchant::Billing::Response.new(false, e.response.message, { status_code: e.response.code }, test: test?)
314
314
  end
315
315
 
316
316
  def parse(data)
@@ -365,7 +365,7 @@ module ActiveMerchant #:nodoc:
365
365
  else
366
366
  'I'
367
367
  end
368
- {code: code}
368
+ { code: code }
369
369
  end
370
370
 
371
371
  def cvv_result_from(response)
@@ -5,8 +5,8 @@ module ActiveMerchant #:nodoc:
5
5
 
6
6
  API_VERSION = '8.5'
7
7
 
8
- TEST_LOGINS = [{login: 'A00049-01', password: 'test1'},
9
- {login: 'A00427-01', password: 'testus'}]
8
+ TEST_LOGINS = [{ login: 'A00049-01', password: 'test1' },
9
+ { login: 'A00427-01', password: 'testus' }]
10
10
 
11
11
  TRANSACTIONS = { sale: '00',
12
12
  authorization: '01',
@@ -15,16 +15,16 @@ module ActiveMerchant #:nodoc:
15
15
 
16
16
  ENVELOPE_NAMESPACES = { 'xmlns:xsd' => 'http://www.w3.org/2001/XMLSchema',
17
17
  'xmlns:env' => 'http://schemas.xmlsoap.org/soap/envelope/',
18
- 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance'}
18
+ 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance' }
19
19
 
20
20
  SEND_AND_COMMIT_ATTRIBUTES = { 'xmlns:n1' => 'http://secure2.e-xact.com/vplug-in/transaction/rpc-enc/Request',
21
- 'env:encodingStyle' => 'http://schemas.xmlsoap.org/soap/encoding/'}
21
+ 'env:encodingStyle' => 'http://schemas.xmlsoap.org/soap/encoding/' }
22
22
 
23
23
  SEND_AND_COMMIT_SOURCE_ATTRIBUTES = { 'xmlns:n2' => 'http://secure2.e-xact.com/vplug-in/transaction/rpc-enc/encodedTypes',
24
- 'xsi:type' => 'n2:Transaction'}
24
+ 'xsi:type' => 'n2:Transaction' }
25
25
 
26
26
  POST_HEADERS = { 'soapAction' => 'http://secure2.e-xact.com/vplug-in/transaction/rpc-enc/SendAndCommit',
27
- 'Content-Type' => 'text/xml'}
27
+ 'Content-Type' => 'text/xml' }
28
28
 
29
29
  SUCCESS = 'true'
30
30
 
@@ -162,8 +162,7 @@ module ActiveMerchant #:nodoc:
162
162
  test: test?,
163
163
  authorization: authorization_from(response),
164
164
  avs_result: { code: response[:avs] },
165
- cvv_result: response[:cvv2]
166
- )
165
+ cvv_result: response[:cvv2])
167
166
  rescue ResponseError => e
168
167
  case e.response.code
169
168
  when '401'
@@ -207,7 +206,7 @@ module ActiveMerchant #:nodoc:
207
206
  parse_elements(response, root)
208
207
  end
209
208
 
210
- response.delete_if { |k, v| SENSITIVE_FIELDS.include?(k) }
209
+ response.delete_if { |k, _v| SENSITIVE_FIELDS.include?(k) }
211
210
  end
212
211
 
213
212
  def parse_elements(response, root)
@@ -10,12 +10,12 @@ module ActiveMerchant
10
10
  self.homepage_url = 'http://www.ezic.com/'
11
11
  self.display_name = 'Ezic'
12
12
 
13
- def initialize(options={})
13
+ def initialize(options = {})
14
14
  requires!(options, :account_id)
15
15
  super
16
16
  end
17
17
 
18
- def purchase(money, payment, options={})
18
+ def purchase(money, payment, options = {})
19
19
  post = {}
20
20
 
21
21
  add_account_id(post)
@@ -26,7 +26,7 @@ module ActiveMerchant
26
26
  commit('S', post)
27
27
  end
28
28
 
29
- def authorize(money, payment, options={})
29
+ def authorize(money, payment, options = {})
30
30
  post = {}
31
31
 
32
32
  add_account_id(post)
@@ -37,7 +37,7 @@ module ActiveMerchant
37
37
  commit('A', post)
38
38
  end
39
39
 
40
- def capture(money, authorization, options={})
40
+ def capture(money, authorization, options = {})
41
41
  post = {}
42
42
 
43
43
  add_account_id(post)
@@ -48,7 +48,7 @@ module ActiveMerchant
48
48
  commit('D', post)
49
49
  end
50
50
 
51
- def refund(money, authorization, options={})
51
+ def refund(money, authorization, options = {})
52
52
  post = {}
53
53
 
54
54
  add_account_id(post)
@@ -59,7 +59,7 @@ module ActiveMerchant
59
59
  commit('R', post)
60
60
  end
61
61
 
62
- def void(authorization, options={})
62
+ def void(authorization, options = {})
63
63
  post = {}
64
64
 
65
65
  add_account_id(post)
@@ -69,7 +69,7 @@ module ActiveMerchant
69
69
  commit('U', post)
70
70
  end
71
71
 
72
- def verify(credit_card, options={})
72
+ def verify(credit_card, options = {})
73
73
  MultiResponse.run(:use_first_response) do |r|
74
74
  r.process { authorize(100, credit_card, options) }
75
75
  r.process(:ignore_result) { void(r.authorization, options) }
@@ -57,7 +57,7 @@ module ActiveMerchant #:nodoc:
57
57
  commit(:post, "purchases/#{CGI.escape(txn_id)}/capture", post)
58
58
  end
59
59
 
60
- def refund(money, authorization, options={})
60
+ def refund(money, authorization, options = {})
61
61
  txn_id, = authorization.to_s.split('|')
62
62
  post = {}
63
63
 
@@ -69,13 +69,13 @@ module ActiveMerchant #:nodoc:
69
69
  commit(:post, 'refunds', post)
70
70
  end
71
71
 
72
- def void(authorization, options={})
72
+ def void(authorization, options = {})
73
73
  txn_id, endpoint = authorization.to_s.split('|')
74
74
 
75
75
  commit(:post, "#{endpoint}/void?id=#{txn_id}", {})
76
76
  end
77
77
 
78
- def store(creditcard, options={})
78
+ def store(creditcard, options = {})
79
79
  post = {}
80
80
 
81
81
  add_creditcard(post, creditcard)
@@ -147,7 +147,7 @@ module ActiveMerchant #:nodoc:
147
147
  post[:metadata] = options.fetch(:metadata, {})
148
148
  end
149
149
 
150
- def commit(method, uri, parameters=nil)
150
+ def commit(method, uri, parameters = nil)
151
151
  response =
152
152
  begin
153
153
  parse(ssl_request(method, get_url(uri), parameters.to_json, headers))
@@ -124,9 +124,8 @@ module ActiveMerchant #:nodoc:
124
124
  Response.new(success?(response), message, response,
125
125
  test: test?,
126
126
  authorization: response['transactionid'],
127
- avs_result: {code: response['avsresponse']},
128
- cvv_result: response['cvvresponse']
129
- )
127
+ avs_result: { code: response['avsresponse'] },
128
+ cvv_result: response['cvvresponse'])
130
129
  end
131
130
 
132
131
  def success?(response)
@@ -90,7 +90,7 @@ module ActiveMerchant #:nodoc:
90
90
  response
91
91
  end
92
92
 
93
- def commit(action, post=nil)
93
+ def commit(action, post = nil)
94
94
  url = (test? ? self.test_url : self.live_url) + action
95
95
 
96
96
  begin
@@ -13,12 +13,12 @@ module ActiveMerchant #:nodoc:
13
13
  self.homepage_url = 'http://1stpaygateway.net/'
14
14
  self.display_name = '1stPayGateway.Net'
15
15
 
16
- def initialize(options={})
16
+ def initialize(options = {})
17
17
  requires!(options, :transaction_center_id, :gateway_id)
18
18
  super
19
19
  end
20
20
 
21
- def purchase(money, payment, options={})
21
+ def purchase(money, payment, options = {})
22
22
  post = {}
23
23
  add_invoice(post, money, options)
24
24
  add_payment(post, payment, options)
@@ -28,7 +28,7 @@ module ActiveMerchant #:nodoc:
28
28
  commit('sale', post)
29
29
  end
30
30
 
31
- def authorize(money, payment, options={})
31
+ def authorize(money, payment, options = {})
32
32
  post = {}
33
33
  add_invoice(post, money, options)
34
34
  add_payment(post, payment, options)
@@ -38,19 +38,19 @@ module ActiveMerchant #:nodoc:
38
38
  commit('auth', post)
39
39
  end
40
40
 
41
- def capture(money, authorization, options={})
41
+ def capture(money, authorization, options = {})
42
42
  post = {}
43
43
  add_reference(post, 'settle', money, authorization)
44
44
  commit('settle', post)
45
45
  end
46
46
 
47
- def refund(money, authorization, options={})
47
+ def refund(money, authorization, options = {})
48
48
  post = {}
49
49
  add_reference(post, 'credit', money, authorization)
50
50
  commit('credit', post)
51
51
  end
52
52
 
53
- def void(authorization, options={})
53
+ def void(authorization, options = {})
54
54
  post = {}
55
55
  add_reference(post, 'void', nil, authorization)
56
56
  commit('void', post)
@@ -32,7 +32,7 @@ module ActiveMerchant #:nodoc:
32
32
  discover: 'Discover'
33
33
  }
34
34
 
35
- E4_BRANDS = BRANDS.merge({mastercard: 'Mastercard'})
35
+ E4_BRANDS = BRANDS.merge({ mastercard: 'Mastercard' })
36
36
 
37
37
  DEFAULT_ECI = '07'
38
38
 
@@ -302,7 +302,8 @@ module ActiveMerchant #:nodoc:
302
302
  first_name: params[2],
303
303
  last_name: params[3],
304
304
  month: params[4],
305
- year: params[5])
305
+ year: params[5]
306
+ )
306
307
 
307
308
  xml.tag! 'TransarmorToken', params[0]
308
309
  xml.tag! 'Expiry_Date', expdate(credit_card)
@@ -356,10 +357,9 @@ module ActiveMerchant #:nodoc:
356
357
  Response.new(successful?(response), message_from(response), response,
357
358
  test: test?,
358
359
  authorization: successful?(response) ? response_authorization(action, response, credit_card) : '',
359
- avs_result: {code: response[:avs]},
360
+ avs_result: { code: response[:avs] },
360
361
  cvv_result: response[:cvv2],
361
- error_code: standard_error_code(response)
362
- )
362
+ error_code: standard_error_code(response))
363
363
  end
364
364
 
365
365
  def successful?(response)
@@ -395,7 +395,7 @@ module ActiveMerchant #:nodoc:
395
395
  credit_card.last_name,
396
396
  credit_card.month,
397
397
  credit_card.year
398
- ].map { |value| value.to_s.gsub(/;/, '') }.join(';')
398
+ ].map { |value| value.to_s.delete(';') }.join(';')
399
399
  else
400
400
  raise StandardError, "TransArmor support is not enabled on your #{display_name} account"
401
401
  end
@@ -439,7 +439,7 @@ module ActiveMerchant #:nodoc:
439
439
  parse_elements(response, root)
440
440
  end
441
441
 
442
- response.delete_if { |k, v| SENSITIVE_FIELDS.include?(k) }
442
+ response.delete_if { |k, _v| SENSITIVE_FIELDS.include?(k) }
443
443
  end
444
444
 
445
445
  def parse_elements(response, root)