activemerchant 1.110.0 → 1.116.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (200) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG +82 -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.rb +1 -1
  7. data/lib/active_merchant/billing/credit_card_methods.rb +6 -6
  8. data/lib/active_merchant/billing/gateway.rb +1 -1
  9. data/lib/active_merchant/billing/gateways/adyen.rb +30 -15
  10. data/lib/active_merchant/billing/gateways/allied_wallet.rb +7 -7
  11. data/lib/active_merchant/billing/gateways/authorize_net.rb +19 -17
  12. data/lib/active_merchant/billing/gateways/authorize_net_arb.rb +3 -4
  13. data/lib/active_merchant/billing/gateways/authorize_net_cim.rb +2 -2
  14. data/lib/active_merchant/billing/gateways/axcessms.rb +8 -9
  15. data/lib/active_merchant/billing/gateways/balanced.rb +5 -4
  16. data/lib/active_merchant/billing/gateways/bambora_apac.rb +8 -8
  17. data/lib/active_merchant/billing/gateways/bank_frick.rb +8 -8
  18. data/lib/active_merchant/billing/gateways/banwire.rb +1 -1
  19. data/lib/active_merchant/billing/gateways/barclaycard_smartpay.rb +6 -4
  20. data/lib/active_merchant/billing/gateways/beanstream.rb +3 -3
  21. data/lib/active_merchant/billing/gateways/beanstream/beanstream_core.rb +4 -5
  22. data/lib/active_merchant/billing/gateways/blue_pay.rb +2 -3
  23. data/lib/active_merchant/billing/gateways/blue_snap.rb +83 -23
  24. data/lib/active_merchant/billing/gateways/bogus.rb +19 -19
  25. data/lib/active_merchant/billing/gateways/borgun.rb +12 -12
  26. data/lib/active_merchant/billing/gateways/bpoint.rb +8 -8
  27. data/lib/active_merchant/billing/gateways/braintree.rb +1 -1
  28. data/lib/active_merchant/billing/gateways/braintree_blue.rb +14 -17
  29. data/lib/active_merchant/billing/gateways/bridge_pay.rb +7 -7
  30. data/lib/active_merchant/billing/gateways/cams.rb +8 -8
  31. data/lib/active_merchant/billing/gateways/card_connect.rb +1 -1
  32. data/lib/active_merchant/billing/gateways/card_save.rb +1 -1
  33. data/lib/active_merchant/billing/gateways/card_stream.rb +2 -2
  34. data/lib/active_merchant/billing/gateways/cardknox.rb +8 -8
  35. data/lib/active_merchant/billing/gateways/cardprocess.rb +1 -1
  36. data/lib/active_merchant/billing/gateways/cecabank.rb +5 -5
  37. data/lib/active_merchant/billing/gateways/cenpos.rb +11 -11
  38. data/lib/active_merchant/billing/gateways/checkout.rb +2 -2
  39. data/lib/active_merchant/billing/gateways/checkout_v2.rb +17 -20
  40. data/lib/active_merchant/billing/gateways/clearhaus.rb +7 -7
  41. data/lib/active_merchant/billing/gateways/commercegate.rb +1 -1
  42. data/lib/active_merchant/billing/gateways/conekta.rb +2 -2
  43. data/lib/active_merchant/billing/gateways/creditcall.rb +10 -10
  44. data/lib/active_merchant/billing/gateways/credorax.rb +15 -9
  45. data/lib/active_merchant/billing/gateways/ct_payment.rb +10 -10
  46. data/lib/active_merchant/billing/gateways/culqi.rb +10 -10
  47. data/lib/active_merchant/billing/gateways/cyber_source.rb +58 -37
  48. data/lib/active_merchant/billing/gateways/d_local.rb +11 -11
  49. data/lib/active_merchant/billing/gateways/data_cash.rb +2 -3
  50. data/lib/active_merchant/billing/gateways/decidir.rb +10 -9
  51. data/lib/active_merchant/billing/gateways/dibs.rb +8 -8
  52. data/lib/active_merchant/billing/gateways/digitzs.rb +6 -6
  53. data/lib/active_merchant/billing/gateways/ebanx.rb +9 -9
  54. data/lib/active_merchant/billing/gateways/efsnet.rb +3 -4
  55. data/lib/active_merchant/billing/gateways/elavon.rb +251 -232
  56. data/lib/active_merchant/billing/gateways/element.rb +12 -8
  57. data/lib/active_merchant/billing/gateways/evo_ca.rb +5 -6
  58. data/lib/active_merchant/billing/gateways/eway.rb +3 -4
  59. data/lib/active_merchant/billing/gateways/eway_managed.rb +6 -7
  60. data/lib/active_merchant/billing/gateways/eway_rapid.rb +8 -8
  61. data/lib/active_merchant/billing/gateways/exact.rb +8 -9
  62. data/lib/active_merchant/billing/gateways/ezic.rb +8 -8
  63. data/lib/active_merchant/billing/gateways/fat_zebra.rb +9 -7
  64. data/lib/active_merchant/billing/gateways/federated_canada.rb +2 -3
  65. data/lib/active_merchant/billing/gateways/first_giving.rb +1 -1
  66. data/lib/active_merchant/billing/gateways/first_pay.rb +6 -6
  67. data/lib/active_merchant/billing/gateways/firstdata_e4.rb +7 -7
  68. data/lib/active_merchant/billing/gateways/firstdata_e4_v27.rb +4 -4
  69. data/lib/active_merchant/billing/gateways/flo2cash.rb +9 -9
  70. data/lib/active_merchant/billing/gateways/flo2cash_simple.rb +1 -1
  71. data/lib/active_merchant/billing/gateways/forte.rb +14 -8
  72. data/lib/active_merchant/billing/gateways/global_collect.rb +15 -10
  73. data/lib/active_merchant/billing/gateways/global_transport.rb +7 -7
  74. data/lib/active_merchant/billing/gateways/hdfc.rb +10 -10
  75. data/lib/active_merchant/billing/gateways/hps.rb +16 -13
  76. data/lib/active_merchant/billing/gateways/iats_payments.rb +9 -4
  77. data/lib/active_merchant/billing/gateways/in_context_paypal_express.rb +1 -1
  78. data/lib/active_merchant/billing/gateways/inspire.rb +3 -4
  79. data/lib/active_merchant/billing/gateways/instapay.rb +1 -2
  80. data/lib/active_merchant/billing/gateways/ipp.rb +7 -7
  81. data/lib/active_merchant/billing/gateways/iridium.rb +16 -17
  82. data/lib/active_merchant/billing/gateways/iveri.rb +7 -7
  83. data/lib/active_merchant/billing/gateways/ixopay.rb +7 -7
  84. data/lib/active_merchant/billing/gateways/jetpay.rb +1 -2
  85. data/lib/active_merchant/billing/gateways/jetpay_v2.rb +4 -5
  86. data/lib/active_merchant/billing/gateways/kushki.rb +6 -6
  87. data/lib/active_merchant/billing/gateways/latitude19.rb +14 -14
  88. data/lib/active_merchant/billing/gateways/linkpoint.rb +5 -6
  89. data/lib/active_merchant/billing/gateways/litle.rb +12 -12
  90. data/lib/active_merchant/billing/gateways/mastercard.rb +12 -12
  91. data/lib/active_merchant/billing/gateways/mercado_pago.rb +8 -8
  92. data/lib/active_merchant/billing/gateways/merchant_e_solutions.rb +1 -2
  93. data/lib/active_merchant/billing/gateways/merchant_one.rb +1 -1
  94. data/lib/active_merchant/billing/gateways/merchant_partners.rb +10 -10
  95. data/lib/active_merchant/billing/gateways/merchant_ware.rb +5 -7
  96. data/lib/active_merchant/billing/gateways/merchant_ware_version_four.rb +4 -6
  97. data/lib/active_merchant/billing/gateways/mercury.rb +4 -4
  98. data/lib/active_merchant/billing/gateways/metrics_global.rb +4 -5
  99. data/lib/active_merchant/billing/gateways/micropayment.rb +8 -8
  100. data/lib/active_merchant/billing/gateways/migs.rb +3 -4
  101. data/lib/active_merchant/billing/gateways/modern_payments_cim.rb +2 -4
  102. data/lib/active_merchant/billing/gateways/monei.rb +7 -7
  103. data/lib/active_merchant/billing/gateways/moneris.rb +4 -3
  104. data/lib/active_merchant/billing/gateways/money_movers.rb +2 -3
  105. data/lib/active_merchant/billing/gateways/mundipagg.rb +37 -10
  106. data/lib/active_merchant/billing/gateways/nab_transact.rb +2 -4
  107. data/lib/active_merchant/billing/gateways/ncr_secure_pay.rb +7 -7
  108. data/lib/active_merchant/billing/gateways/net_registry.rb +1 -2
  109. data/lib/active_merchant/billing/gateways/netaxept.rb +6 -6
  110. data/lib/active_merchant/billing/gateways/netbanx.rb +12 -10
  111. data/lib/active_merchant/billing/gateways/netbilling.rb +4 -5
  112. data/lib/active_merchant/billing/gateways/network_merchants.rb +2 -3
  113. data/lib/active_merchant/billing/gateways/nmi.rb +21 -7
  114. data/lib/active_merchant/billing/gateways/ogone.rb +3 -3
  115. data/lib/active_merchant/billing/gateways/omise.rb +13 -13
  116. data/lib/active_merchant/billing/gateways/openpay.rb +4 -5
  117. data/lib/active_merchant/billing/gateways/opp.rb +12 -12
  118. data/lib/active_merchant/billing/gateways/optimal_payment.rb +3 -4
  119. data/lib/active_merchant/billing/gateways/orbital.rb +66 -64
  120. data/lib/active_merchant/billing/gateways/pac_net_raven.rb +3 -4
  121. data/lib/active_merchant/billing/gateways/pagarme.rb +9 -9
  122. data/lib/active_merchant/billing/gateways/pago_facil.rb +2 -2
  123. data/lib/active_merchant/billing/gateways/pay_conex.rb +8 -8
  124. data/lib/active_merchant/billing/gateways/pay_gate_xml.rb +6 -7
  125. data/lib/active_merchant/billing/gateways/pay_hub.rb +7 -8
  126. data/lib/active_merchant/billing/gateways/pay_junction.rb +4 -5
  127. data/lib/active_merchant/billing/gateways/pay_junction_v2.rb +9 -9
  128. data/lib/active_merchant/billing/gateways/pay_secure.rb +2 -3
  129. data/lib/active_merchant/billing/gateways/paybox_direct.rb +23 -1
  130. data/lib/active_merchant/billing/gateways/payeezy.rb +12 -12
  131. data/lib/active_merchant/billing/gateways/payex.rb +11 -12
  132. data/lib/active_merchant/billing/gateways/payflow.rb +4 -1
  133. data/lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb +1 -1
  134. data/lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb +1 -1
  135. data/lib/active_merchant/billing/gateways/payment_express.rb +1 -2
  136. data/lib/active_merchant/billing/gateways/paymentez.rb +5 -5
  137. data/lib/active_merchant/billing/gateways/paymill.rb +10 -10
  138. data/lib/active_merchant/billing/gateways/paypal_express.rb +1 -1
  139. data/lib/active_merchant/billing/gateways/paypal_express_common.rb +1 -1
  140. data/lib/active_merchant/billing/gateways/payscout.rb +1 -2
  141. data/lib/active_merchant/billing/gateways/paystation.rb +3 -4
  142. data/lib/active_merchant/billing/gateways/payu_in.rb +3 -3
  143. data/lib/active_merchant/billing/gateways/payu_latam.rb +21 -11
  144. data/lib/active_merchant/billing/gateways/payway.rb +8 -9
  145. data/lib/active_merchant/billing/gateways/plugnpay.rb +2 -3
  146. data/lib/active_merchant/billing/gateways/pro_pay.rb +8 -8
  147. data/lib/active_merchant/billing/gateways/psigate.rb +3 -4
  148. data/lib/active_merchant/billing/gateways/psl_card.rb +1 -2
  149. data/lib/active_merchant/billing/gateways/qbms.rb +4 -5
  150. data/lib/active_merchant/billing/gateways/quantum.rb +1 -2
  151. data/lib/active_merchant/billing/gateways/quickbooks.rb +4 -3
  152. data/lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb +3 -4
  153. data/lib/active_merchant/billing/gateways/quickpay/quickpay_v4to7.rb +1 -2
  154. data/lib/active_merchant/billing/gateways/qvalent.rb +9 -9
  155. data/lib/active_merchant/billing/gateways/realex.rb +2 -1
  156. data/lib/active_merchant/billing/gateways/redsys.rb +7 -7
  157. data/lib/active_merchant/billing/gateways/s5.rb +7 -7
  158. data/lib/active_merchant/billing/gateways/safe_charge.rb +12 -12
  159. data/lib/active_merchant/billing/gateways/sage.rb +3 -5
  160. data/lib/active_merchant/billing/gateways/sage_pay.rb +6 -7
  161. data/lib/active_merchant/billing/gateways/sallie_mae.rb +1 -2
  162. data/lib/active_merchant/billing/gateways/secure_net.rb +1 -2
  163. data/lib/active_merchant/billing/gateways/secure_pay.rb +3 -4
  164. data/lib/active_merchant/billing/gateways/secure_pay_au.rb +2 -4
  165. data/lib/active_merchant/billing/gateways/secure_pay_tech.rb +1 -2
  166. data/lib/active_merchant/billing/gateways/securion_pay.rb +5 -6
  167. data/lib/active_merchant/billing/gateways/skip_jack.rb +3 -4
  168. data/lib/active_merchant/billing/gateways/smart_ps.rb +5 -6
  169. data/lib/active_merchant/billing/gateways/so_easy_pay.rb +7 -7
  170. data/lib/active_merchant/billing/gateways/spreedly_core.rb +6 -6
  171. data/lib/active_merchant/billing/gateways/stripe.rb +11 -11
  172. data/lib/active_merchant/billing/gateways/stripe_payment_intents.rb +9 -0
  173. data/lib/active_merchant/billing/gateways/swipe_checkout.rb +3 -4
  174. data/lib/active_merchant/billing/gateways/telr.rb +9 -9
  175. data/lib/active_merchant/billing/gateways/trans_first.rb +3 -3
  176. data/lib/active_merchant/billing/gateways/trans_first_transaction_express.rb +14 -14
  177. data/lib/active_merchant/billing/gateways/transact_pro.rb +9 -9
  178. data/lib/active_merchant/billing/gateways/trust_commerce.rb +8 -9
  179. data/lib/active_merchant/billing/gateways/usa_epay.rb +1 -1
  180. data/lib/active_merchant/billing/gateways/usa_epay_advanced.rb +36 -36
  181. data/lib/active_merchant/billing/gateways/usa_epay_transaction.rb +4 -5
  182. data/lib/active_merchant/billing/gateways/vanco.rb +3 -3
  183. data/lib/active_merchant/billing/gateways/verifi.rb +1 -2
  184. data/lib/active_merchant/billing/gateways/viaklix.rb +1 -2
  185. data/lib/active_merchant/billing/gateways/visanet_peru.rb +10 -10
  186. data/lib/active_merchant/billing/gateways/webpay.rb +2 -2
  187. data/lib/active_merchant/billing/gateways/wepay.rb +3 -2
  188. data/lib/active_merchant/billing/gateways/wirecard.rb +1 -2
  189. data/lib/active_merchant/billing/gateways/worldpay.rb +12 -8
  190. data/lib/active_merchant/billing/gateways/worldpay_online_payments.rb +14 -16
  191. data/lib/active_merchant/billing/gateways/worldpay_us.rb +9 -9
  192. data/lib/active_merchant/billing/response.rb +1 -1
  193. data/lib/active_merchant/country.rb +1 -1
  194. data/lib/active_merchant/network_connection_retries.rb +2 -2
  195. data/lib/active_merchant/post_data.rb +1 -1
  196. data/lib/active_merchant/posts_data.rb +1 -1
  197. data/lib/active_merchant/version.rb +1 -1
  198. data/lib/support/ssl_verify.rb +2 -2
  199. data/lib/support/ssl_version.rb +2 -2
  200. metadata +16 -2
@@ -102,7 +102,7 @@ module ActiveMerchant #:nodoc:
102
102
  response,
103
103
  authorization: response['transID'],
104
104
  test: test?,
105
- avs_result: {code: response['avsCode']},
105
+ avs_result: { code: response['avsCode'] },
106
106
  cvv_result: response['cvvCode']
107
107
  )
108
108
  end
@@ -180,7 +180,7 @@ module ActiveMerchant #:nodoc:
180
180
  'Accept-Language' => 'es',
181
181
  'Authorization' => 'Basic ' + Base64.encode64("#{@options[:key]}:"),
182
182
  'RaiseHtmlError' => 'false',
183
- 'Conekta-Client-User-Agent' => {'agent' => "Conekta ActiveMerchantBindings/#{ActiveMerchant::VERSION}"}.to_json,
183
+ 'Conekta-Client-User-Agent' => { 'agent' => "Conekta ActiveMerchantBindings/#{ActiveMerchant::VERSION}" }.to_json,
184
184
  'X-Conekta-Client-User-Agent' => conekta_client_user_agent(options),
185
185
  'X-Conekta-Client-User-Metadata' => options[:meta].to_json
186
186
  }
@@ -189,7 +189,7 @@ module ActiveMerchant #:nodoc:
189
189
  def conekta_client_user_agent(options)
190
190
  return user_agent unless options[:application]
191
191
 
192
- JSON.dump(JSON.parse(user_agent).merge!({application: options[:application]}))
192
+ JSON.dump(JSON.parse(user_agent).merge!({ application: options[:application] }))
193
193
  end
194
194
 
195
195
  def commit(method, url, parameters, options = {})
@@ -41,12 +41,12 @@ module ActiveMerchant #:nodoc:
41
41
  'partialmatched;partialmatch' => 'C'
42
42
  }
43
43
 
44
- def initialize(options={})
44
+ def initialize(options = {})
45
45
  requires!(options, :terminal_id, :transaction_key)
46
46
  super
47
47
  end
48
48
 
49
- def purchase(money, payment_method, options={})
49
+ def purchase(money, payment_method, options = {})
50
50
  multi_response = MultiResponse.run do |r|
51
51
  r.process { authorize(money, payment_method, options) }
52
52
  r.process { capture(money, r.authorization, options) }
@@ -66,7 +66,7 @@ module ActiveMerchant #:nodoc:
66
66
  )
67
67
  end
68
68
 
69
- def authorize(money, payment_method, options={})
69
+ def authorize(money, payment_method, options = {})
70
70
  request = build_xml_request do |xml|
71
71
  add_transaction_details(xml, money, nil, 'Auth', options)
72
72
  add_terminal_details(xml, options)
@@ -76,7 +76,7 @@ module ActiveMerchant #:nodoc:
76
76
  commit(request)
77
77
  end
78
78
 
79
- def capture(money, authorization, options={})
79
+ def capture(money, authorization, options = {})
80
80
  request = build_xml_request do |xml|
81
81
  add_transaction_details(xml, money, authorization, 'Conf', options)
82
82
  add_terminal_details(xml, options)
@@ -85,7 +85,7 @@ module ActiveMerchant #:nodoc:
85
85
  commit(request)
86
86
  end
87
87
 
88
- def refund(money, authorization, options={})
88
+ def refund(money, authorization, options = {})
89
89
  request = build_xml_request do |xml|
90
90
  add_transaction_details(xml, money, authorization, 'Refund', options)
91
91
  add_terminal_details(xml, options)
@@ -94,7 +94,7 @@ module ActiveMerchant #:nodoc:
94
94
  commit(request)
95
95
  end
96
96
 
97
- def void(authorization, options={})
97
+ def void(authorization, options = {})
98
98
  request = build_xml_request do |xml|
99
99
  add_transaction_details(xml, nil, authorization, 'Void', options)
100
100
  add_terminal_details(xml, options)
@@ -103,7 +103,7 @@ module ActiveMerchant #:nodoc:
103
103
  commit(request)
104
104
  end
105
105
 
106
- def verify(credit_card, options={})
106
+ def verify(credit_card, options = {})
107
107
  MultiResponse.run(:use_first_response) do |r|
108
108
  r.process { authorize(100, credit_card, options) }
109
109
  r.process(:ignore_result) { void(r.authorization, options) }
@@ -144,7 +144,7 @@ module ActiveMerchant #:nodoc:
144
144
  builder.to_xml
145
145
  end
146
146
 
147
- def add_transaction_details(xml, amount, authorization, type, options={})
147
+ def add_transaction_details(xml, amount, authorization, type, options = {})
148
148
  xml.TransactionDetails do
149
149
  xml.MessageType type
150
150
  xml.Amount(unit: 'Minor') { xml.text(amount) } if amount
@@ -153,7 +153,7 @@ module ActiveMerchant #:nodoc:
153
153
  end
154
154
  end
155
155
 
156
- def add_terminal_details(xml, options={})
156
+ def add_terminal_details(xml, options = {})
157
157
  xml.TerminalDetails do
158
158
  xml.TerminalID @options[:terminal_id]
159
159
  xml.TransactionKey @options[:transaction_key]
@@ -161,7 +161,7 @@ module ActiveMerchant #:nodoc:
161
161
  end
162
162
  end
163
163
 
164
- def add_card_details(xml, payment_method, options={})
164
+ def add_card_details(xml, payment_method, options = {})
165
165
  xml.CardDetails do
166
166
  xml.Manual(type: manual_type(options)) do
167
167
  xml.PAN payment_method.number
@@ -120,12 +120,12 @@ module ActiveMerchant #:nodoc:
120
120
  'R3' => 'Revocation of all Authorisations Order'
121
121
  }
122
122
 
123
- def initialize(options={})
123
+ def initialize(options = {})
124
124
  requires!(options, :merchant_id, :cipher_key)
125
125
  super
126
126
  end
127
127
 
128
- def purchase(amount, payment_method, options={})
128
+ def purchase(amount, payment_method, options = {})
129
129
  post = {}
130
130
  add_invoice(post, amount, options)
131
131
  add_payment_method(post, payment_method)
@@ -141,7 +141,7 @@ module ActiveMerchant #:nodoc:
141
141
  commit(:purchase, post)
142
142
  end
143
143
 
144
- def authorize(amount, payment_method, options={})
144
+ def authorize(amount, payment_method, options = {})
145
145
  post = {}
146
146
  add_invoice(post, amount, options)
147
147
  add_payment_method(post, payment_method)
@@ -158,7 +158,7 @@ module ActiveMerchant #:nodoc:
158
158
  commit(:authorize, post)
159
159
  end
160
160
 
161
- def capture(amount, authorization, options={})
161
+ def capture(amount, authorization, options = {})
162
162
  post = {}
163
163
  add_invoice(post, amount, options)
164
164
  add_reference(post, authorization)
@@ -170,7 +170,7 @@ module ActiveMerchant #:nodoc:
170
170
  commit(:capture, post)
171
171
  end
172
172
 
173
- def void(authorization, options={})
173
+ def void(authorization, options = {})
174
174
  post = {}
175
175
  add_customer_data(post, options)
176
176
  reference_action = add_reference(post, authorization)
@@ -182,7 +182,7 @@ module ActiveMerchant #:nodoc:
182
182
  commit(:void, post, reference_action)
183
183
  end
184
184
 
185
- def refund(amount, authorization, options={})
185
+ def refund(amount, authorization, options = {})
186
186
  post = {}
187
187
  add_invoice(post, amount, options)
188
188
  add_reference(post, authorization)
@@ -193,13 +193,14 @@ module ActiveMerchant #:nodoc:
193
193
  add_email(post, options)
194
194
 
195
195
  if options[:referral_cft]
196
+ add_customer_name(post, options)
196
197
  commit(:referral_cft, post)
197
198
  else
198
199
  commit(:refund, post)
199
200
  end
200
201
  end
201
202
 
202
- def credit(amount, payment_method, options={})
203
+ def credit(amount, payment_method, options = {})
203
204
  post = {}
204
205
  add_invoice(post, amount, options)
205
206
  add_payment_method(post, payment_method)
@@ -213,7 +214,7 @@ module ActiveMerchant #:nodoc:
213
214
  commit(:credit, post)
214
215
  end
215
216
 
216
- def verify(credit_card, options={})
217
+ def verify(credit_card, options = {})
217
218
  MultiResponse.run(:use_first_response) do |r|
218
219
  r.process { authorize(100, credit_card, options) }
219
220
  r.process(:ignore_result) { void(r.authorization, options) }
@@ -317,6 +318,11 @@ module ActiveMerchant #:nodoc:
317
318
  post[:c3] = options[:email] || 'unspecified@example.com'
318
319
  end
319
320
 
321
+ def add_customer_name(post, options)
322
+ post[:j5] = options[:first_name] if options[:first_name]
323
+ post[:j13] = options[:last_name] if options[:last_name]
324
+ end
325
+
320
326
  def add_3d_secure(post, options)
321
327
  if options[:eci] && options[:xid]
322
328
  add_3d_secure_1_data(post, options)
@@ -366,7 +372,7 @@ module ActiveMerchant #:nodoc:
366
372
  post[:'3ds_dstrxid'] = three_d_secure_options[:ds_transaction_id]
367
373
  end
368
374
 
369
- def build_i8(eci, cavv=nil, xid=nil)
375
+ def build_i8(eci, cavv = nil, xid = nil)
370
376
  "#{eci}:#{cavv || 'none'}:#{xid || 'none'}"
371
377
  end
372
378
 
@@ -26,12 +26,12 @@ module ActiveMerchant #:nodoc:
26
26
  'discover' => 'O'
27
27
  }
28
28
 
29
- def initialize(options={})
29
+ def initialize(options = {})
30
30
  requires!(options, :api_key, :company_number, :merchant_number)
31
31
  super
32
32
  end
33
33
 
34
- def purchase(money, payment, options={})
34
+ def purchase(money, payment, options = {})
35
35
  requires!(options, :order_id)
36
36
  post = {}
37
37
  add_terminal_number(post, options)
@@ -45,7 +45,7 @@ module ActiveMerchant #:nodoc:
45
45
  payment.is_a?(String) ? commit('purchaseWithToken', post) : commit('purchase', post)
46
46
  end
47
47
 
48
- def authorize(money, payment, options={})
48
+ def authorize(money, payment, options = {})
49
49
  requires!(options, :order_id)
50
50
  post = {}
51
51
  add_money(post, money)
@@ -59,7 +59,7 @@ module ActiveMerchant #:nodoc:
59
59
  payment.is_a?(String) ? commit('preAuthorizationWithToken', post) : commit('preAuthorization', post)
60
60
  end
61
61
 
62
- def capture(money, authorization, options={})
62
+ def capture(money, authorization, options = {})
63
63
  requires!(options, :order_id)
64
64
  post = {}
65
65
  add_invoice(post, money, options)
@@ -73,7 +73,7 @@ module ActiveMerchant #:nodoc:
73
73
  commit('completion', post)
74
74
  end
75
75
 
76
- def refund(money, authorization, options={})
76
+ def refund(money, authorization, options = {})
77
77
  requires!(options, :order_id)
78
78
  post = {}
79
79
  add_invoice(post, money, options)
@@ -86,7 +86,7 @@ module ActiveMerchant #:nodoc:
86
86
  commit('refundWithoutCard', post)
87
87
  end
88
88
 
89
- def credit(money, payment, options={})
89
+ def credit(money, payment, options = {})
90
90
  requires!(options, :order_id)
91
91
  post = {}
92
92
  add_terminal_number(post, options)
@@ -100,7 +100,7 @@ module ActiveMerchant #:nodoc:
100
100
  payment.is_a?(String) ? commit('refundWithToken', post) : commit('refund', post)
101
101
  end
102
102
 
103
- def void(authorization, options={})
103
+ def void(authorization, options = {})
104
104
  post = {}
105
105
  post[:InputType] = 'I'
106
106
  post[:LanguageCode] = 'E'
@@ -113,7 +113,7 @@ module ActiveMerchant #:nodoc:
113
113
  commit('void', post)
114
114
  end
115
115
 
116
- def verify(credit_card, options={})
116
+ def verify(credit_card, options = {})
117
117
  requires!(options, :order_id)
118
118
  post = {}
119
119
  add_terminal_number(post, options)
@@ -126,7 +126,7 @@ module ActiveMerchant #:nodoc:
126
126
  commit('verifyAccount', post)
127
127
  end
128
128
 
129
- def store(credit_card, options={})
129
+ def store(credit_card, options = {})
130
130
  requires!(options, :email)
131
131
  post = {
132
132
  LanguageCode: 'E',
@@ -228,7 +228,7 @@ module ActiveMerchant #:nodoc:
228
228
  r.process {
229
229
  split_auth = split_authorization(r.authorization)
230
230
  auth = (action.include?('recur') ? split_auth[4] : split_auth[0])
231
- action.include?('recur') ? commit_raw('recur/ack', {ID: auth}) : commit_raw('ack', {TransactionNumber: auth})
231
+ action.include?('recur') ? commit_raw('recur/ack', { ID: auth }) : commit_raw('ack', { TransactionNumber: auth })
232
232
  }
233
233
  end
234
234
  end
@@ -20,16 +20,16 @@ module ActiveMerchant #:nodoc:
20
20
  self.money_format = :dollars
21
21
  self.supported_cardtypes = %i[visa master diners_club american_express]
22
22
 
23
- def initialize(options={})
23
+ def initialize(options = {})
24
24
  requires!(options, :merchant_id, :terminal_id, :secret_key)
25
25
  super
26
26
  end
27
27
 
28
- def purchase(amount, payment_method, options={})
28
+ def purchase(amount, payment_method, options = {})
29
29
  authorize(amount, payment_method, options)
30
30
  end
31
31
 
32
- def authorize(amount, payment_method, options={})
32
+ def authorize(amount, payment_method, options = {})
33
33
  if payment_method.is_a?(String)
34
34
  action = :tokenpay
35
35
  else
@@ -45,7 +45,7 @@ module ActiveMerchant #:nodoc:
45
45
  commit(action, post)
46
46
  end
47
47
 
48
- def capture(amount, authorization, options={})
48
+ def capture(amount, authorization, options = {})
49
49
  action = :capture
50
50
  post = {}
51
51
  add_credentials(post)
@@ -56,7 +56,7 @@ module ActiveMerchant #:nodoc:
56
56
  commit(action, post)
57
57
  end
58
58
 
59
- def void(authorization, options={})
59
+ def void(authorization, options = {})
60
60
  action = :void
61
61
  post = {}
62
62
  add_credentials(post)
@@ -67,7 +67,7 @@ module ActiveMerchant #:nodoc:
67
67
  commit(action, post)
68
68
  end
69
69
 
70
- def refund(amount, authorization, options={})
70
+ def refund(amount, authorization, options = {})
71
71
  action = :refund
72
72
  post = {}
73
73
  add_credentials(post)
@@ -78,7 +78,7 @@ module ActiveMerchant #:nodoc:
78
78
  commit(action, post)
79
79
  end
80
80
 
81
- def verify(credit_card, options={})
81
+ def verify(credit_card, options = {})
82
82
  MultiResponse.run(:use_first_response) do |r|
83
83
  r.process { authorize(1000, credit_card, options) }
84
84
  r.process(:ignore_result) { void(r.authorization, options) }
@@ -90,7 +90,7 @@ module ActiveMerchant #:nodoc:
90
90
  response.message.include? 'Transaction not found'
91
91
  end
92
92
 
93
- def store(credit_card, options={})
93
+ def store(credit_card, options = {})
94
94
  action = :tokenize
95
95
  post = {}
96
96
  post[:partnerid] = options[:partner_id] if options[:partner_id]
@@ -103,7 +103,7 @@ module ActiveMerchant #:nodoc:
103
103
  commit(action, post)
104
104
  end
105
105
 
106
- def invalidate(authorization, options={})
106
+ def invalidate(authorization, options = {})
107
107
  action = :invalidate
108
108
  post = {}
109
109
  post[:partnerid] = options[:partner_id] if options[:partner_id]
@@ -205,7 +205,7 @@ module ActiveMerchant #:nodoc:
205
205
  refund: 'SingleCallGenericReverse',
206
206
  tokenize: 'SingleCallTokenServlet',
207
207
  invalidate: 'SingleCallInvalidateToken',
208
- tokenpay: 'SingleCallTokenTransaction',
208
+ tokenpay: 'SingleCallTokenTransaction'
209
209
  }
210
210
 
211
211
  def commit(action, params)
@@ -30,9 +30,11 @@ module ActiveMerchant #:nodoc:
30
30
  ECI_BRAND_MAPPING = {
31
31
  visa: 'vbv',
32
32
  master: 'spa',
33
+ maestro: 'spa',
33
34
  american_express: 'aesk',
34
35
  jcb: 'js',
35
36
  discover: 'pb',
37
+ diners_club: 'pb'
36
38
  }.freeze
37
39
  DEFAULT_COLLECTION_INDICATOR = 2
38
40
 
@@ -264,7 +266,9 @@ module ActiveMerchant #:nodoc:
264
266
  zip: '00000',
265
267
  country: 'US'
266
268
  }
267
- options[:billing_address] = options[:billing_address] || options[:address] || default_address
269
+
270
+ submitted_address = options[:billing_address] || options[:address] || default_address
271
+ options[:billing_address] = default_address.merge(submitted_address.symbolize_keys) { |_k, default, submitted| submitted.blank? ? default : submitted }
268
272
  options[:shipping_address] = options[:shipping_address] || {}
269
273
  end
270
274
 
@@ -278,10 +282,11 @@ module ActiveMerchant #:nodoc:
278
282
  add_threeds_services(xml, options)
279
283
  add_payment_network_token(xml) if network_tokenization?(creditcard_or_reference)
280
284
  add_business_rules_data(xml, creditcard_or_reference, options)
281
- add_stored_credential_options(xml, options)
285
+ add_stored_credential_subsequent_auth(xml, options)
282
286
  add_issuer_additional_data(xml, options)
283
- add_merchant_description(xml, options)
284
287
  add_partner_solution_id(xml)
288
+ add_stored_credential_options(xml, options)
289
+ add_merchant_description(xml, options)
285
290
 
286
291
  xml.target!
287
292
  end
@@ -322,17 +327,20 @@ module ActiveMerchant #:nodoc:
322
327
  add_mdd_fields(xml, options)
323
328
  if !payment_method_or_reference.is_a?(String) && card_brand(payment_method_or_reference) == 'check'
324
329
  add_check_service(xml)
330
+ add_issuer_additional_data(xml, options)
331
+ add_partner_solution_id(xml)
325
332
  else
326
333
  add_purchase_service(xml, payment_method_or_reference, options)
327
334
  add_threeds_services(xml, options)
328
335
  add_payment_network_token(xml) if network_tokenization?(payment_method_or_reference)
329
336
  add_business_rules_data(xml, payment_method_or_reference, options) unless options[:pinless_debit_card]
337
+ add_stored_credential_subsequent_auth(xml, options)
338
+ add_issuer_additional_data(xml, options)
339
+ add_partner_solution_id(xml)
330
340
  add_stored_credential_options(xml, options)
331
341
  end
332
342
 
333
- add_issuer_additional_data(xml, options)
334
343
  add_merchant_description(xml, options)
335
- add_partner_solution_id(xml)
336
344
 
337
345
  xml.target!
338
346
  end
@@ -382,7 +390,7 @@ module ActiveMerchant #:nodoc:
382
390
  end
383
391
 
384
392
  def build_create_subscription_request(payment_method, options)
385
- default_subscription_params = {frequency: 'on-demand', amount: 0, automatic_renew: false}
393
+ default_subscription_params = { frequency: 'on-demand', amount: 0, automatic_renew: false }
386
394
  options[:subscription] = default_subscription_params.update(
387
395
  options[:subscription] || {}
388
396
  )
@@ -464,7 +472,7 @@ module ActiveMerchant #:nodoc:
464
472
 
465
473
  def add_line_item_data(xml, options)
466
474
  options[:line_items].each_with_index do |value, index|
467
- xml.tag! 'item', {'id' => index} do
475
+ xml.tag! 'item', { 'id' => index } do
468
476
  xml.tag! 'unitPrice', localized_amount(value[:declared_value].to_i, options[:currency] || default_currency)
469
477
  xml.tag! 'quantity', value[:quantity]
470
478
  xml.tag! 'productCode', value[:code] || 'shipping_only'
@@ -504,7 +512,7 @@ module ActiveMerchant #:nodoc:
504
512
  end
505
513
  end
506
514
 
507
- def add_purchase_data(xml, money = 0, include_grand_total = false, options={})
515
+ def add_purchase_data(xml, money = 0, include_grand_total = false, options = {})
508
516
  xml.tag! 'purchaseTotals' do
509
517
  xml.tag! 'currency', options[:currency] || currency(money)
510
518
  xml.tag!('grandTotalAmount', localized_amount(money.to_i, options[:currency] || default_currency)) if include_grand_total
@@ -568,7 +576,7 @@ module ActiveMerchant #:nodoc:
568
576
  end
569
577
 
570
578
  def add_mdd_fields(xml, options)
571
- return unless options.keys.any? { |key| key.to_s.start_with?('mdd_field') }
579
+ return unless options.keys.any? { |key| key.to_s.start_with?('mdd_field') && options[key] }
572
580
 
573
581
  xml.tag! 'merchantDefinedData' do
574
582
  (1..100).each do |each|
@@ -587,7 +595,7 @@ module ActiveMerchant #:nodoc:
587
595
  end
588
596
 
589
597
  def add_tax_service(xml)
590
- xml.tag! 'taxService', {'run' => 'true'} do
598
+ xml.tag! 'taxService', { 'run' => 'true' } do
591
599
  xml.tag!('nexus', @options[:nexus]) unless @options[:nexus].blank?
592
600
  xml.tag!('sellerRegistration', @options[:vat_reg_number]) unless @options[:vat_reg_number].blank?
593
601
  end
@@ -597,7 +605,7 @@ module ActiveMerchant #:nodoc:
597
605
  if network_tokenization?(payment_method)
598
606
  add_auth_network_tokenization(xml, payment_method, options)
599
607
  else
600
- xml.tag! 'ccAuthService', {'run' => 'true'} do
608
+ xml.tag! 'ccAuthService', { 'run' => 'true' } do
601
609
  if options[:three_d_secure]
602
610
  add_normalized_threeds_2_data(xml, payment_method, options)
603
611
  else
@@ -612,6 +620,9 @@ module ActiveMerchant #:nodoc:
612
620
  def add_normalized_threeds_2_data(xml, payment_method, options)
613
621
  threeds_2_options = options[:three_d_secure]
614
622
  cc_brand = card_brand(payment_method).to_sym
623
+
624
+ return if threeds_2_options[:cavv].blank? && infer_commerce_indicator?(options, cc_brand)
625
+
615
626
  xid = threeds_2_options[:xid]
616
627
 
617
628
  xml.tag!('cavv', threeds_2_options[:cavv]) if threeds_2_options[:cavv] && cc_brand != :master
@@ -632,6 +643,10 @@ module ActiveMerchant #:nodoc:
632
643
  xml.tag!('paresStatus', threeds_2_options[:authentication_response_status]) if threeds_2_options[:authentication_response_status]
633
644
  end
634
645
 
646
+ def infer_commerce_indicator?(options, cc_brand)
647
+ options[:commerce_indicator].blank? && ECI_BRAND_MAPPING[cc_brand].present?
648
+ end
649
+
635
650
  def add_threeds_2_ucaf_data(xml, payment_method, options)
636
651
  return unless options[:three_d_secure] && card_brand(payment_method).to_sym == :master
637
652
 
@@ -663,7 +678,7 @@ module ActiveMerchant #:nodoc:
663
678
 
664
679
  case brand
665
680
  when :visa
666
- xml.tag! 'ccAuthService', {'run' => 'true'} do
681
+ xml.tag! 'ccAuthService', { 'run' => 'true' } do
667
682
  xml.tag!('cavv', payment_method.payment_cryptogram)
668
683
  xml.tag!('commerceIndicator', ECI_BRAND_MAPPING[brand])
669
684
  xml.tag!('xid', payment_method.payment_cryptogram)
@@ -674,13 +689,13 @@ module ActiveMerchant #:nodoc:
674
689
  xml.tag!('authenticationData', payment_method.payment_cryptogram)
675
690
  xml.tag!('collectionIndicator', DEFAULT_COLLECTION_INDICATOR)
676
691
  end
677
- xml.tag! 'ccAuthService', {'run' => 'true'} do
692
+ xml.tag! 'ccAuthService', { 'run' => 'true' } do
678
693
  xml.tag!('commerceIndicator', ECI_BRAND_MAPPING[brand])
679
694
  xml.tag!('reconciliationID', options[:reconciliation_id]) if options[:reconciliation_id]
680
695
  end
681
696
  when :american_express
682
697
  cryptogram = Base64.decode64(payment_method.payment_cryptogram)
683
- xml.tag! 'ccAuthService', {'run' => 'true'} do
698
+ xml.tag! 'ccAuthService', { 'run' => 'true' } do
684
699
  xml.tag!('cavv', Base64.encode64(cryptogram[0...20]))
685
700
  xml.tag!('commerceIndicator', ECI_BRAND_MAPPING[brand])
686
701
  xml.tag!('xid', Base64.encode64(cryptogram[20...40]))
@@ -696,7 +711,7 @@ module ActiveMerchant #:nodoc:
696
711
  end
697
712
 
698
713
  def add_capture_service(xml, request_id, request_token)
699
- xml.tag! 'ccCaptureService', {'run' => 'true'} do
714
+ xml.tag! 'ccCaptureService', { 'run' => 'true' } do
700
715
  xml.tag! 'authRequestID', request_id
701
716
  xml.tag! 'authRequestToken', request_token
702
717
  xml.tag! 'reconciliationID', options[:reconciliation_id] if options[:reconciliation_id]
@@ -705,56 +720,56 @@ module ActiveMerchant #:nodoc:
705
720
 
706
721
  def add_purchase_service(xml, payment_method, options)
707
722
  if options[:pinless_debit_card]
708
- xml.tag! 'pinlessDebitService', {'run' => 'true'} do
723
+ xml.tag! 'pinlessDebitService', { 'run' => 'true' } do
709
724
  xml.tag!('reconciliationID', options[:reconciliation_id]) if options[:reconciliation_id]
710
725
  end
711
726
  else
712
727
  add_auth_service(xml, payment_method, options)
713
- xml.tag! 'ccCaptureService', {'run' => 'true'} do
728
+ xml.tag! 'ccCaptureService', { 'run' => 'true' } do
714
729
  xml.tag!('reconciliationID', options[:reconciliation_id]) if options[:reconciliation_id]
715
730
  end
716
731
  end
717
732
  end
718
733
 
719
734
  def add_void_service(xml, request_id, request_token)
720
- xml.tag! 'voidService', {'run' => 'true'} do
735
+ xml.tag! 'voidService', { 'run' => 'true' } do
721
736
  xml.tag! 'voidRequestID', request_id
722
737
  xml.tag! 'voidRequestToken', request_token
723
738
  end
724
739
  end
725
740
 
726
741
  def add_auth_reversal_service(xml, request_id, request_token)
727
- xml.tag! 'ccAuthReversalService', {'run' => 'true'} do
742
+ xml.tag! 'ccAuthReversalService', { 'run' => 'true' } do
728
743
  xml.tag! 'authRequestID', request_id
729
744
  xml.tag! 'authRequestToken', request_token
730
745
  end
731
746
  end
732
747
 
733
748
  def add_credit_service(xml, request_id = nil, request_token = nil)
734
- xml.tag! 'ccCreditService', {'run' => 'true'} do
749
+ xml.tag! 'ccCreditService', { 'run' => 'true' } do
735
750
  xml.tag! 'captureRequestID', request_id if request_id
736
751
  xml.tag! 'captureRequestToken', request_token if request_token
737
752
  end
738
753
  end
739
754
 
740
755
  def add_check_service(xml)
741
- xml.tag! 'ecDebitService', {'run' => 'true'}
756
+ xml.tag! 'ecDebitService', { 'run' => 'true' }
742
757
  end
743
758
 
744
759
  def add_subscription_create_service(xml, options)
745
- xml.tag! 'paySubscriptionCreateService', {'run' => 'true'}
760
+ xml.tag! 'paySubscriptionCreateService', { 'run' => 'true' }
746
761
  end
747
762
 
748
763
  def add_subscription_update_service(xml, options)
749
- xml.tag! 'paySubscriptionUpdateService', {'run' => 'true'}
764
+ xml.tag! 'paySubscriptionUpdateService', { 'run' => 'true' }
750
765
  end
751
766
 
752
767
  def add_subscription_delete_service(xml, options)
753
- xml.tag! 'paySubscriptionDeleteService', {'run' => 'true'}
768
+ xml.tag! 'paySubscriptionDeleteService', { 'run' => 'true' }
754
769
  end
755
770
 
756
771
  def add_subscription_retrieve_service(xml, options)
757
- xml.tag! 'paySubscriptionRetrieveService', {'run' => 'true'}
772
+ xml.tag! 'paySubscriptionRetrieveService', { 'run' => 'true' }
758
773
  end
759
774
 
760
775
  def add_subscription(xml, options, reference = nil)
@@ -819,13 +834,13 @@ module ActiveMerchant #:nodoc:
819
834
  end
820
835
 
821
836
  def add_validate_pinless_debit_service(xml)
822
- xml.tag! 'pinlessDebitValidateService', {'run' => 'true'}
837
+ xml.tag! 'pinlessDebitValidateService', { 'run' => 'true' }
823
838
  end
824
839
 
825
840
  def add_threeds_services(xml, options)
826
- xml.tag! 'payerAuthEnrollService', {'run' => 'true'} if options[:payer_auth_enroll_service]
841
+ xml.tag! 'payerAuthEnrollService', { 'run' => 'true' } if options[:payer_auth_enroll_service]
827
842
  if options[:payer_auth_validate_service]
828
- xml.tag! 'payerAuthValidateService', {'run' => 'true'} do
843
+ xml.tag! 'payerAuthValidateService', { 'run' => 'true' } do
829
844
  xml.tag! 'signedPARes', options[:pares]
830
845
  end
831
846
  end
@@ -836,20 +851,27 @@ module ActiveMerchant #:nodoc:
836
851
  country_code&.code(:alpha2)
837
852
  end
838
853
 
839
- def add_stored_credential_options(xml, options={})
854
+ def add_stored_credential_subsequent_auth(xml, options = {})
840
855
  return unless options[:stored_credential] || options[:stored_credential_overrides]
841
856
 
842
857
  stored_credential_subsequent_auth = 'true' if options.dig(:stored_credential, :initiator) == 'merchant'
858
+
859
+ override_subsequent_auth = options.dig(:stored_credential_overrides, :subsequent_auth)
860
+
861
+ xml.subsequentAuth override_subsequent_auth.nil? ? stored_credential_subsequent_auth : override_subsequent_auth
862
+ end
863
+
864
+ def add_stored_credential_options(xml, options = {})
865
+ return unless options[:stored_credential] || options[:stored_credential_overrides]
866
+
843
867
  stored_credential_subsequent_auth_first = 'true' if options.dig(:stored_credential, :initial_transaction)
844
868
  stored_credential_transaction_id = options.dig(:stored_credential, :network_transaction_id) if options.dig(:stored_credential, :initiator) == 'merchant'
845
869
  stored_credential_subsequent_auth_stored_cred = 'true' if options.dig(:stored_credential, :initiator) == 'cardholder' && !options.dig(:stored_credential, :initial_transaction) || options.dig(:stored_credential, :initiator) == 'merchant' && options.dig(:stored_credential, :reason_type) == 'unscheduled'
846
870
 
847
- override_subsequent_auth = options.dig(:stored_credential_overrides, :subsequent_auth)
848
871
  override_subsequent_auth_first = options.dig(:stored_credential_overrides, :subsequent_auth_first)
849
872
  override_subsequent_auth_transaction_id = options.dig(:stored_credential_overrides, :subsequent_auth_transaction_id)
850
873
  override_subsequent_auth_stored_cred = options.dig(:stored_credential_overrides, :subsequent_auth_stored_credential)
851
874
 
852
- xml.subsequentAuth override_subsequent_auth.nil? ? stored_credential_subsequent_auth : override_subsequent_auth
853
875
  xml.subsequentAuthFirst override_subsequent_auth_first.nil? ? stored_credential_subsequent_auth_first : override_subsequent_auth_first
854
876
  xml.subsequentAuthTransactionID override_subsequent_auth_transaction_id.nil? ? stored_credential_transaction_id : override_subsequent_auth_transaction_id
855
877
  xml.subsequentAuthStoredCredential override_subsequent_auth_stored_cred.nil? ? stored_credential_subsequent_auth_stored_cred : override_subsequent_auth_stored_cred
@@ -867,17 +889,17 @@ module ActiveMerchant #:nodoc:
867
889
 
868
890
  xml = Builder::XmlMarkup.new indent: 2
869
891
  xml.instruct!
870
- xml.tag! 's:Envelope', {'xmlns:s' => 'http://schemas.xmlsoap.org/soap/envelope/'} do
892
+ xml.tag! 's:Envelope', { 'xmlns:s' => 'http://schemas.xmlsoap.org/soap/envelope/' } do
871
893
  xml.tag! 's:Header' do
872
- xml.tag! 'wsse:Security', {'s:mustUnderstand' => '1', 'xmlns:wsse' => 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd'} do
894
+ xml.tag! 'wsse:Security', { 's:mustUnderstand' => '1', 'xmlns:wsse' => 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd' } do
873
895
  xml.tag! 'wsse:UsernameToken' do
874
896
  xml.tag! 'wsse:Username', @options[:login]
875
897
  xml.tag! 'wsse:Password', @options[:password], 'Type' => 'http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText'
876
898
  end
877
899
  end
878
900
  end
879
- xml.tag! 's:Body', {'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance', 'xmlns:xsd' => 'http://www.w3.org/2001/XMLSchema'} do
880
- xml.tag! 'requestMessage', {'xmlns' => "urn:schemas-cybersource-com:transaction-data-#{xsd_version}"} do
901
+ xml.tag! 's:Body', { 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance', 'xmlns:xsd' => 'http://www.w3.org/2001/XMLSchema' } do
902
+ xml.tag! 'requestMessage', { 'xmlns' => "urn:schemas-cybersource-com:transaction-data-#{xsd_version}" } do
881
903
  add_merchant_data(xml, options)
882
904
  xml << body
883
905
  end
@@ -910,8 +932,7 @@ module ActiveMerchant #:nodoc:
910
932
  authorization: authorization,
911
933
  fraud_review: in_fraud_review?(response),
912
934
  avs_result: { code: response[:avsCode] },
913
- cvv_result: response[:cvCode]
914
- )
935
+ cvv_result: response[:cvCode])
915
936
  end
916
937
 
917
938
  # Parse the SOAP response