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
@@ -106,8 +106,7 @@ module ActiveMerchant #:nodoc:
106
106
  test: test?,
107
107
  authorization: build_authorization(response),
108
108
  avs_result: { code: response[:avsresult] },
109
- cvv_result: response[:cardidresult]
110
- )
109
+ cvv_result: response[:cardidresult])
111
110
  end
112
111
 
113
112
  def url
@@ -119,7 +118,7 @@ module ActiveMerchant #:nodoc:
119
118
  end
120
119
 
121
120
  def parse(xml)
122
- response = {message: 'Global Error Receipt', complete: false}
121
+ response = { message: 'Global Error Receipt', complete: false }
123
122
 
124
123
  xml = REXML::Document.new(xml)
125
124
  xml.elements.each('//Result/*') do |node|
@@ -263,8 +263,7 @@ module ActiveMerchant
263
263
  test: test?,
264
264
  authorization: response[:CrossReference],
265
265
  cvv_result: CVV_CODE[response[:AVSCV2Check]],
266
- avs_result: { code: AVS_CODE[response[:AVSCV2Check]] }
267
- )
266
+ avs_result: { code: AVS_CODE[response[:AVSCV2Check]] })
268
267
  end
269
268
 
270
269
  # Put the passed data into a format that can be submitted to PSL
@@ -147,8 +147,7 @@ module ActiveMerchant #:nodoc:
147
147
  authorization: response[:credit_card_trans_id],
148
148
  fraud_review: fraud_review?(response),
149
149
  avs_result: { code: avs_result(response) },
150
- cvv_result: cvv_result(response)
151
- )
150
+ cvv_result: cvv_result(response))
152
151
  end
153
152
 
154
153
  def success?(response)
@@ -219,8 +219,7 @@ module ActiveMerchant #:nodoc:
219
219
  test: test?,
220
220
  authorization: authorization,
221
221
  avs_result: { code: response[:AVSResponseCode] },
222
- cvv_result: response[:CVV2ResponseCode]
223
- )
222
+ cvv_result: response[:CVV2ResponseCode])
224
223
  end
225
224
 
226
225
  # Parse the SOAP response
@@ -260,7 +260,7 @@ module ActiveMerchant #:nodoc:
260
260
  hmac_signature = OpenSSL::HMAC.digest(OpenSSL::Digest.new('sha1'), oauth_signing_key, oauth_signature_base_string)
261
261
 
262
262
  # append signature to required OAuth parameters
263
- oauth_parameters[:oauth_signature] = CGI.escape(Base64.encode64(hmac_signature).chomp.gsub(/\n/, ''))
263
+ oauth_parameters[:oauth_signature] = CGI.escape(Base64.encode64(hmac_signature).chomp.delete("\n"))
264
264
 
265
265
  # prepare Authorization header string
266
266
  oauth_parameters = Hash[oauth_parameters.sort_by { |k, _| k }]
@@ -68,7 +68,7 @@ module ActiveMerchant
68
68
  commit(synchronized_path("/payments/#{identification}/refund"), post)
69
69
  end
70
70
 
71
- def verify(credit_card, options={})
71
+ def verify(credit_card, options = {})
72
72
  MultiResponse.run(:use_first_response) do |r|
73
73
  r.process { authorize(100, credit_card, options) }
74
74
  r.process(:ignore_result) { void(r.authorization, options) }
@@ -155,8 +155,7 @@ module ActiveMerchant
155
155
 
156
156
  Response.new(success, message_from(success, response), response,
157
157
  test: test?,
158
- authorization: authorization_from(response)
159
- )
158
+ authorization: authorization_from(response))
160
159
  end
161
160
 
162
161
  def authorization_from(response)
@@ -264,7 +263,7 @@ module ActiveMerchant
264
263
  end
265
264
 
266
265
  def format_order_id(order_id)
267
- truncate(order_id.to_s.gsub(/#/, ''), 20)
266
+ truncate(order_id.to_s.delete('#'), 20)
268
267
  end
269
268
 
270
269
  def headers
@@ -166,8 +166,7 @@ module ActiveMerchant #:nodoc:
166
166
 
167
167
  Response.new(successful?(response), message_from(response), response,
168
168
  test: test?,
169
- authorization: response[:transaction]
170
- )
169
+ authorization: response[:transaction])
171
170
  end
172
171
 
173
172
  def successful?(response)
@@ -16,12 +16,12 @@ module ActiveMerchant #:nodoc:
16
16
  'S' => 'D'
17
17
  }
18
18
 
19
- def initialize(options={})
19
+ def initialize(options = {})
20
20
  requires!(options, :username, :password, :merchant, :pem, :pem_password)
21
21
  super
22
22
  end
23
23
 
24
- def purchase(amount, payment_method, options={})
24
+ def purchase(amount, payment_method, options = {})
25
25
  post = {}
26
26
  add_invoice(post, amount, options)
27
27
  add_order_number(post, options)
@@ -34,7 +34,7 @@ module ActiveMerchant #:nodoc:
34
34
  commit('capture', post)
35
35
  end
36
36
 
37
- def authorize(amount, payment_method, options={})
37
+ def authorize(amount, payment_method, options = {})
38
38
  post = {}
39
39
  add_invoice(post, amount, options)
40
40
  add_order_number(post, options)
@@ -47,7 +47,7 @@ module ActiveMerchant #:nodoc:
47
47
  commit('preauth', post)
48
48
  end
49
49
 
50
- def capture(amount, authorization, options={})
50
+ def capture(amount, authorization, options = {})
51
51
  post = {}
52
52
  add_invoice(post, amount, options)
53
53
  add_reference(post, authorization, options)
@@ -57,7 +57,7 @@ module ActiveMerchant #:nodoc:
57
57
  commit('captureWithoutAuth', post)
58
58
  end
59
59
 
60
- def refund(amount, authorization, options={})
60
+ def refund(amount, authorization, options = {})
61
61
  post = {}
62
62
  add_invoice(post, amount, options)
63
63
  add_reference(post, authorization, options)
@@ -69,7 +69,7 @@ module ActiveMerchant #:nodoc:
69
69
  end
70
70
 
71
71
  # Credit requires the merchant account to be enabled for "Adhoc Refunds"
72
- def credit(amount, payment_method, options={})
72
+ def credit(amount, payment_method, options = {})
73
73
  post = {}
74
74
  add_invoice(post, amount, options)
75
75
  add_order_number(post, options)
@@ -80,7 +80,7 @@ module ActiveMerchant #:nodoc:
80
80
  commit('refund', post)
81
81
  end
82
82
 
83
- def void(authorization, options={})
83
+ def void(authorization, options = {})
84
84
  post = {}
85
85
  add_reference(post, authorization, options)
86
86
  add_customer_data(post, options)
@@ -110,7 +110,7 @@ module ActiveMerchant #:nodoc:
110
110
 
111
111
  private
112
112
 
113
- CURRENCY_CODES = Hash.new { |h, k| raise ArgumentError.new("Unsupported currency: #{k}") }
113
+ CURRENCY_CODES = Hash.new { |_h, k| raise ArgumentError.new("Unsupported currency: #{k}") }
114
114
  CURRENCY_CODES['AUD'] = 'AUD'
115
115
  CURRENCY_CODES['INR'] = 'INR'
116
116
 
@@ -300,7 +300,7 @@ module ActiveMerchant
300
300
  end
301
301
  xml.tag! 'supplementarydata' do
302
302
  xml.tag! 'item', 'type' => 'mobile' do
303
- xml.tag! 'field01', payment.source.to_s.gsub('_', '-')
303
+ xml.tag! 'field01', payment.source.to_s.tr('_', '-')
304
304
  end
305
305
  end
306
306
  end
@@ -322,7 +322,7 @@ module ActiveMerchant #:nodoc:
322
322
  end
323
323
 
324
324
  def add_threeds(data, options)
325
- data[:threeds] = {threeDSInfo: 'CardData'} if options[:execute_threed] == true
325
+ data[:threeds] = { threeDSInfo: 'CardData' } if options[:execute_threed] == true
326
326
  end
327
327
 
328
328
  def determine_3ds_action(threeds_hash)
@@ -334,7 +334,7 @@ module ActiveMerchant #:nodoc:
334
334
  def commit(data, options = {})
335
335
  if data[:threeds]
336
336
  action = determine_3ds_action(data[:threeds])
337
- request = <<-EOS
337
+ request = <<-REQUEST
338
338
  <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://webservice.sis.sermepa.es" xmlns:intf="http://webservice.sis.sermepa.es" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
339
339
  <soapenv:Header/>
340
340
  <soapenv:Body>
@@ -345,14 +345,14 @@ module ActiveMerchant #:nodoc:
345
345
  </intf:#{action}>
346
346
  </soapenv:Body>
347
347
  </soapenv:Envelope>
348
- EOS
348
+ REQUEST
349
349
  parse(ssl_post(threeds_url, request, headers(action)), action)
350
350
  else
351
351
  parse(ssl_post(url, "entrada=#{CGI.escape(xml_request_from(data, options))}", headers), action)
352
352
  end
353
353
  end
354
354
 
355
- def headers(action=nil)
355
+ def headers(action = nil)
356
356
  if action
357
357
  {
358
358
  'Content-Type' => 'text/xml',
@@ -22,12 +22,12 @@ module ActiveMerchant #:nodoc:
22
22
  'store' => 'CC.RG'
23
23
  }
24
24
 
25
- def initialize(options={})
25
+ def initialize(options = {})
26
26
  requires!(options, :sender, :channel, :login, :password)
27
27
  super
28
28
  end
29
29
 
30
- def purchase(money, payment, options={})
30
+ def purchase(money, payment, options = {})
31
31
  request = build_xml_request do |xml|
32
32
  add_identification(xml, options)
33
33
  add_payment(xml, money, 'sale', options)
@@ -39,7 +39,7 @@ module ActiveMerchant #:nodoc:
39
39
  commit(request)
40
40
  end
41
41
 
42
- def refund(money, authorization, options={})
42
+ def refund(money, authorization, options = {})
43
43
  request = build_xml_request do |xml|
44
44
  add_identification(xml, options, authorization)
45
45
  add_payment(xml, money, 'refund', options)
@@ -48,7 +48,7 @@ module ActiveMerchant #:nodoc:
48
48
  commit(request)
49
49
  end
50
50
 
51
- def authorize(money, payment, options={})
51
+ def authorize(money, payment, options = {})
52
52
  request = build_xml_request do |xml|
53
53
  add_identification(xml, options)
54
54
  add_payment(xml, money, 'authonly', options)
@@ -60,7 +60,7 @@ module ActiveMerchant #:nodoc:
60
60
  commit(request)
61
61
  end
62
62
 
63
- def capture(money, authorization, options={})
63
+ def capture(money, authorization, options = {})
64
64
  request = build_xml_request do |xml|
65
65
  add_identification(xml, options, authorization)
66
66
  add_payment(xml, money, 'capture', options)
@@ -69,7 +69,7 @@ module ActiveMerchant #:nodoc:
69
69
  commit(request)
70
70
  end
71
71
 
72
- def void(authorization, options={})
72
+ def void(authorization, options = {})
73
73
  request = build_xml_request do |xml|
74
74
  add_identification(xml, options, authorization)
75
75
  add_payment(xml, nil, 'void', options)
@@ -89,7 +89,7 @@ module ActiveMerchant #:nodoc:
89
89
  commit(request)
90
90
  end
91
91
 
92
- def verify(credit_card, options={})
92
+ def verify(credit_card, options = {})
93
93
  MultiResponse.run(:use_first_response) do |r|
94
94
  r.process { authorize(100, credit_card, options) }
95
95
  r.process(:ignore_result) { void(r.authorization, options) }
@@ -15,12 +15,12 @@ module ActiveMerchant #:nodoc:
15
15
 
16
16
  VERSION = '4.1.0'
17
17
 
18
- def initialize(options={})
18
+ def initialize(options = {})
19
19
  requires!(options, :client_login_id, :client_password)
20
20
  super
21
21
  end
22
22
 
23
- def purchase(money, payment, options={})
23
+ def purchase(money, payment, options = {})
24
24
  post = {}
25
25
  post[:sg_APIType] = 1 if options[:three_d_secure]
26
26
  trans_type = options[:three_d_secure] ? 'Sale3D' : 'Sale'
@@ -31,7 +31,7 @@ module ActiveMerchant #:nodoc:
31
31
  commit(post)
32
32
  end
33
33
 
34
- def authorize(money, payment, options={})
34
+ def authorize(money, payment, options = {})
35
35
  post = {}
36
36
  add_transaction_data('Auth', post, money, options)
37
37
  add_payment(post, payment, options)
@@ -40,10 +40,10 @@ module ActiveMerchant #:nodoc:
40
40
  commit(post)
41
41
  end
42
42
 
43
- def capture(money, authorization, options={})
43
+ def capture(money, authorization, options = {})
44
44
  post = {}
45
45
  auth, transaction_id, token, exp_month, exp_year, _, original_currency = authorization.split('|')
46
- add_transaction_data('Settle', post, money, options.merge!({currency: original_currency}))
46
+ add_transaction_data('Settle', post, money, options.merge!({ currency: original_currency }))
47
47
  post[:sg_AuthCode] = auth
48
48
  post[:sg_TransactionID] = transaction_id
49
49
  post[:sg_CCToken] = token
@@ -53,10 +53,10 @@ module ActiveMerchant #:nodoc:
53
53
  commit(post)
54
54
  end
55
55
 
56
- def refund(money, authorization, options={})
56
+ def refund(money, authorization, options = {})
57
57
  post = {}
58
58
  auth, transaction_id, token, exp_month, exp_year, _, original_currency = authorization.split('|')
59
- add_transaction_data('Credit', post, money, options.merge!({currency: original_currency}))
59
+ add_transaction_data('Credit', post, money, options.merge!({ currency: original_currency }))
60
60
  post[:sg_CreditType] = 2
61
61
  post[:sg_AuthCode] = auth
62
62
  post[:sg_TransactionID] = transaction_id
@@ -67,7 +67,7 @@ module ActiveMerchant #:nodoc:
67
67
  commit(post)
68
68
  end
69
69
 
70
- def credit(money, payment, options={})
70
+ def credit(money, payment, options = {})
71
71
  post = {}
72
72
  add_payment(post, payment, options)
73
73
  add_transaction_data('Credit', post, money, options)
@@ -76,10 +76,10 @@ module ActiveMerchant #:nodoc:
76
76
  commit(post)
77
77
  end
78
78
 
79
- def void(authorization, options={})
79
+ def void(authorization, options = {})
80
80
  post = {}
81
81
  auth, transaction_id, token, exp_month, exp_year, original_amount, original_currency = authorization.split('|')
82
- add_transaction_data('Void', post, (original_amount.to_f * 100), options.merge!({currency: original_currency}))
82
+ add_transaction_data('Void', post, (original_amount.to_f * 100), options.merge!({ currency: original_currency }))
83
83
  post[:sg_CreditType] = 2
84
84
  post[:sg_AuthCode] = auth
85
85
  post[:sg_TransactionID] = transaction_id
@@ -90,7 +90,7 @@ module ActiveMerchant #:nodoc:
90
90
  commit(post)
91
91
  end
92
92
 
93
- def verify(credit_card, options={})
93
+ def verify(credit_card, options = {})
94
94
  MultiResponse.run(:use_first_response) do |r|
95
95
  r.process { authorize(100, credit_card, options) }
96
96
  r.process(:ignore_result) { void(r.authorization, options) }
@@ -130,7 +130,7 @@ module ActiveMerchant #:nodoc:
130
130
  post[:sg_MerchantName] = options[:merchant_name] if options[:merchant_name]
131
131
  end
132
132
 
133
- def add_payment(post, payment, options={})
133
+ def add_payment(post, payment, options = {})
134
134
  post[:sg_NameOnCard] = payment.name
135
135
  post[:sg_CardNumber] = payment.number
136
136
  post[:sg_ExpMonth] = format(payment.month, :two_digits)
@@ -77,7 +77,7 @@ module ActiveMerchant #:nodoc:
77
77
  commit(:credit, post, source)
78
78
  end
79
79
 
80
- def refund(money, reference, options={})
80
+ def refund(money, reference, options = {})
81
81
  post = {}
82
82
  add_reference(post, reference)
83
83
  add_transaction_data(post, money, options)
@@ -264,8 +264,7 @@ module ActiveMerchant #:nodoc:
264
264
  test: test?,
265
265
  authorization: authorization_from(response, source),
266
266
  avs_result: { code: response[:avs_result] },
267
- cvv_result: response[:cvv_result]
268
- )
267
+ cvv_result: response[:cvv_result])
269
268
  end
270
269
 
271
270
  def url(params, source)
@@ -382,8 +381,7 @@ module ActiveMerchant #:nodoc:
382
381
  end
383
382
 
384
383
  Response.new(success, message, response,
385
- authorization: response[:guid]
386
- )
384
+ authorization: response[:guid])
387
385
  end
388
386
 
389
387
  ENVELOPE_NAMESPACES = {
@@ -162,7 +162,7 @@ module ActiveMerchant #:nodoc:
162
162
  commit(:unstore, post)
163
163
  end
164
164
 
165
- def verify(credit_card, options={})
165
+ def verify(credit_card, options = {})
166
166
  MultiResponse.run(:use_first_response) do |r|
167
167
  r.process { authorize(100, credit_card, options) }
168
168
  r.process(:ignore_result) { void(r.authorization, options) }
@@ -353,8 +353,7 @@ module ActiveMerchant #:nodoc:
353
353
  street_match: AVS_CODE[response['AddressResult']],
354
354
  postal_match: AVS_CODE[response['PostCodeResult']]
355
355
  },
356
- cvv_result: CVV_CODE[response['CV2Result']]
357
- )
356
+ cvv_result: CVV_CODE[response['CV2Result']])
358
357
  end
359
358
 
360
359
  def authorization_from(response, params, action)
@@ -122,8 +122,7 @@ module ActiveMerchant #:nodoc:
122
122
  response = parse(ssl_post(self.live_url, parameters.to_post_data) || '')
123
123
  Response.new(successful?(response), message_from(response), response,
124
124
  test: test?,
125
- authorization: response['refcode']
126
- )
125
+ authorization: response['refcode'])
127
126
  end
128
127
 
129
128
  def successful?(response)
@@ -83,8 +83,7 @@ module ActiveMerchant #:nodoc:
83
83
  test: test?,
84
84
  authorization: build_authorization(response),
85
85
  avs_result: { code: response[:avs_result_code] },
86
- cvv_result: response[:card_code_response_code]
87
- )
86
+ cvv_result: response[:card_code_response_code])
88
87
  end
89
88
 
90
89
  def build_request(request)
@@ -61,8 +61,7 @@ module ActiveMerchant #:nodoc:
61
61
  authorization: response[:transaction_id],
62
62
  fraud_review: fraud_review?(response),
63
63
  avs_result: { code: response[:avs_result_code] },
64
- cvv_result: response[:card_code]
65
- )
64
+ cvv_result: response[:card_code])
66
65
  end
67
66
 
68
67
  def success?(response)
@@ -115,7 +114,7 @@ module ActiveMerchant #:nodoc:
115
114
  post[:description] = options[:description]
116
115
  end
117
116
 
118
- def add_creditcard(post, creditcard, options={})
117
+ def add_creditcard(post, creditcard, options = {})
119
118
  post[:card_num] = creditcard.number
120
119
  post[:card_code] = creditcard.verification_value if creditcard.verification_value?
121
120
  post[:exp_date] = expdate(creditcard)
@@ -123,7 +122,7 @@ module ActiveMerchant #:nodoc:
123
122
  post[:last_name] = creditcard.last_name
124
123
  end
125
124
 
126
- def add_payment_source(params, source, options={})
125
+ def add_payment_source(params, source, options = {})
127
126
  add_creditcard(params, source, options)
128
127
  end
129
128