activemerchant 1.105.0 → 1.107.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +99 -1
- data/README.md +2 -2
- data/lib/active_merchant/billing/credit_card_methods.rb +12 -3
- data/lib/active_merchant/billing/gateway.rb +22 -22
- data/lib/active_merchant/billing/gateways/adyen.rb +18 -7
- data/lib/active_merchant/billing/gateways/allied_wallet.rb +2 -2
- data/lib/active_merchant/billing/gateways/authorize_net.rb +19 -19
- data/lib/active_merchant/billing/gateways/authorize_net_arb.rb +11 -11
- data/lib/active_merchant/billing/gateways/authorize_net_cim.rb +35 -35
- data/lib/active_merchant/billing/gateways/axcessms.rb +3 -3
- data/lib/active_merchant/billing/gateways/bambora_apac.rb +1 -1
- data/lib/active_merchant/billing/gateways/bank_frick.rb +1 -1
- data/lib/active_merchant/billing/gateways/banwire.rb +2 -2
- data/lib/active_merchant/billing/gateways/barclaycard_smartpay.rb +5 -5
- data/lib/active_merchant/billing/gateways/be2bill.rb +4 -4
- data/lib/active_merchant/billing/gateways/beanstream.rb +1 -1
- data/lib/active_merchant/billing/gateways/beanstream/beanstream_core.rb +27 -27
- data/lib/active_merchant/billing/gateways/beanstream_interac.rb +1 -1
- data/lib/active_merchant/billing/gateways/blue_pay.rb +8 -8
- data/lib/active_merchant/billing/gateways/blue_snap.rb +5 -2
- data/lib/active_merchant/billing/gateways/bogus.rb +20 -20
- data/lib/active_merchant/billing/gateways/borgun.rb +17 -6
- data/lib/active_merchant/billing/gateways/bpoint.rb +1 -1
- data/lib/active_merchant/billing/gateways/braintree_blue.rb +81 -77
- data/lib/active_merchant/billing/gateways/bridge_pay.rb +3 -3
- data/lib/active_merchant/billing/gateways/card_connect.rb +1 -1
- data/lib/active_merchant/billing/gateways/card_stream.rb +19 -19
- data/lib/active_merchant/billing/gateways/cc5.rb +7 -7
- data/lib/active_merchant/billing/gateways/cecabank.rb +3 -3
- data/lib/active_merchant/billing/gateways/cenpos.rb +3 -3
- data/lib/active_merchant/billing/gateways/checkout_v2.rb +20 -9
- data/lib/active_merchant/billing/gateways/clearhaus.rb +1 -1
- data/lib/active_merchant/billing/gateways/commercegate.rb +2 -2
- data/lib/active_merchant/billing/gateways/conekta.rb +1 -1
- data/lib/active_merchant/billing/gateways/creditcall.rb +4 -4
- data/lib/active_merchant/billing/gateways/ct_payment.rb +1 -1
- data/lib/active_merchant/billing/gateways/culqi.rb +2 -2
- data/lib/active_merchant/billing/gateways/cyber_source.rb +154 -91
- data/lib/active_merchant/billing/gateways/d_local.rb +4 -2
- data/lib/active_merchant/billing/gateways/data_cash.rb +33 -33
- data/lib/active_merchant/billing/gateways/decidir.rb +7 -2
- data/lib/active_merchant/billing/gateways/ebanx.rb +14 -2
- data/lib/active_merchant/billing/gateways/efsnet.rb +23 -23
- data/lib/active_merchant/billing/gateways/elavon.rb +70 -18
- data/lib/active_merchant/billing/gateways/element.rb +12 -4
- data/lib/active_merchant/billing/gateways/epay.rb +40 -40
- data/lib/active_merchant/billing/gateways/evo_ca.rb +11 -11
- data/lib/active_merchant/billing/gateways/eway.rb +3 -3
- data/lib/active_merchant/billing/gateways/eway_managed.rb +40 -40
- data/lib/active_merchant/billing/gateways/eway_rapid.rb +7 -7
- data/lib/active_merchant/billing/gateways/exact.rb +11 -11
- data/lib/active_merchant/billing/gateways/fat_zebra.rb +3 -2
- data/lib/active_merchant/billing/gateways/federated_canada.rb +5 -5
- data/lib/active_merchant/billing/gateways/firstdata_e4.rb +21 -21
- data/lib/active_merchant/billing/gateways/firstdata_e4_v27.rb +20 -20
- data/lib/active_merchant/billing/gateways/flo2cash.rb +4 -4
- data/lib/active_merchant/billing/gateways/forte.rb +8 -7
- data/lib/active_merchant/billing/gateways/garanti.rb +8 -8
- data/lib/active_merchant/billing/gateways/global_collect.rb +30 -24
- data/lib/active_merchant/billing/gateways/hdfc.rb +3 -3
- data/lib/active_merchant/billing/gateways/hps.rb +5 -3
- data/lib/active_merchant/billing/gateways/iats_payments.rb +32 -15
- data/lib/active_merchant/billing/gateways/inspire.rb +7 -7
- data/lib/active_merchant/billing/gateways/instapay.rb +3 -3
- data/lib/active_merchant/billing/gateways/ipp.rb +1 -1
- data/lib/active_merchant/billing/gateways/iridium.rb +12 -10
- data/lib/active_merchant/billing/gateways/itransact.rb +7 -7
- data/lib/active_merchant/billing/gateways/iveri.rb +6 -3
- data/lib/active_merchant/billing/gateways/ixopay.rb +22 -0
- data/lib/active_merchant/billing/gateways/jetpay.rb +4 -4
- data/lib/active_merchant/billing/gateways/jetpay_v2.rb +5 -5
- data/lib/active_merchant/billing/gateways/kushki.rb +34 -5
- data/lib/active_merchant/billing/gateways/latitude19.rb +2 -2
- data/lib/active_merchant/billing/gateways/linkpoint.rb +62 -62
- data/lib/active_merchant/billing/gateways/litle.rb +8 -3
- data/lib/active_merchant/billing/gateways/mastercard.rb +2 -2
- data/lib/active_merchant/billing/gateways/mercado_pago.rb +1 -0
- data/lib/active_merchant/billing/gateways/merchant_e_solutions.rb +5 -5
- data/lib/active_merchant/billing/gateways/merchant_one.rb +2 -2
- data/lib/active_merchant/billing/gateways/merchant_partners.rb +4 -4
- data/lib/active_merchant/billing/gateways/merchant_ware.rb +12 -12
- data/lib/active_merchant/billing/gateways/merchant_ware_version_four.rb +11 -11
- data/lib/active_merchant/billing/gateways/merchant_warrior.rb +12 -2
- data/lib/active_merchant/billing/gateways/mercury.rb +9 -9
- data/lib/active_merchant/billing/gateways/metrics_global.rb +15 -15
- data/lib/active_merchant/billing/gateways/migs.rb +13 -13
- data/lib/active_merchant/billing/gateways/modern_payments_cim.rb +7 -7
- data/lib/active_merchant/billing/gateways/monei.rb +19 -19
- data/lib/active_merchant/billing/gateways/moneris.rb +10 -10
- data/lib/active_merchant/billing/gateways/money_movers.rb +5 -5
- data/lib/active_merchant/billing/gateways/mundipagg.rb +1 -1
- data/lib/active_merchant/billing/gateways/nab_transact.rb +15 -15
- data/lib/active_merchant/billing/gateways/ncr_secure_pay.rb +1 -1
- data/lib/active_merchant/billing/gateways/net_registry.rb +6 -6
- data/lib/active_merchant/billing/gateways/netaxept.rb +4 -4
- data/lib/active_merchant/billing/gateways/netbanx.rb +14 -14
- data/lib/active_merchant/billing/gateways/netbilling.rb +12 -12
- data/lib/active_merchant/billing/gateways/netpay.rb +2 -2
- data/lib/active_merchant/billing/gateways/network_merchants.rb +5 -5
- data/lib/active_merchant/billing/gateways/ogone.rb +7 -7
- data/lib/active_merchant/billing/gateways/openpay.rb +2 -2
- data/lib/active_merchant/billing/gateways/opp.rb +13 -7
- data/lib/active_merchant/billing/gateways/optimal_payment.rb +13 -9
- data/lib/active_merchant/billing/gateways/orbital.rb +54 -12
- data/lib/active_merchant/billing/gateways/pac_net_raven.rb +7 -7
- data/lib/active_merchant/billing/gateways/pay_conex.rb +2 -2
- data/lib/active_merchant/billing/gateways/pay_gate_xml.rb +16 -16
- data/lib/active_merchant/billing/gateways/pay_junction.rb +16 -16
- data/lib/active_merchant/billing/gateways/pay_junction_v2.rb +18 -2
- data/lib/active_merchant/billing/gateways/pay_secure.rb +6 -6
- data/lib/active_merchant/billing/gateways/paybox_direct.rb +36 -36
- data/lib/active_merchant/billing/gateways/payflow.rb +7 -7
- data/lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb +12 -12
- data/lib/active_merchant/billing/gateways/payflow_express.rb +4 -4
- data/lib/active_merchant/billing/gateways/payment_express.rb +9 -9
- data/lib/active_merchant/billing/gateways/paymill.rb +3 -3
- data/lib/active_merchant/billing/gateways/paypal.rb +1 -1
- data/lib/active_merchant/billing/gateways/paypal/paypal_common_api.rb +5 -5
- data/lib/active_merchant/billing/gateways/paypal_express_common.rb +1 -1
- data/lib/active_merchant/billing/gateways/payscout.rb +5 -5
- data/lib/active_merchant/billing/gateways/paystation.rb +2 -2
- data/lib/active_merchant/billing/gateways/payu_latam.rb +3 -3
- data/lib/active_merchant/billing/gateways/payway.rb +12 -12
- data/lib/active_merchant/billing/gateways/pin.rb +16 -16
- data/lib/active_merchant/billing/gateways/plugnpay.rb +10 -10
- data/lib/active_merchant/billing/gateways/psigate.rb +26 -26
- data/lib/active_merchant/billing/gateways/psl_card.rb +4 -4
- data/lib/active_merchant/billing/gateways/qbms.rb +23 -23
- data/lib/active_merchant/billing/gateways/quantum.rb +4 -4
- data/lib/active_merchant/billing/gateways/quickpay/quickpay_common.rb +95 -95
- data/lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb +9 -9
- data/lib/active_merchant/billing/gateways/quickpay/quickpay_v4to7.rb +2 -2
- data/lib/active_merchant/billing/gateways/qvalent.rb +1 -1
- data/lib/active_merchant/billing/gateways/realex.rb +17 -10
- data/lib/active_merchant/billing/gateways/redsys.rb +24 -16
- data/lib/active_merchant/billing/gateways/safe_charge.rb +1 -1
- data/lib/active_merchant/billing/gateways/sage.rb +10 -10
- data/lib/active_merchant/billing/gateways/sage_pay.rb +35 -35
- data/lib/active_merchant/billing/gateways/sallie_mae.rb +2 -2
- data/lib/active_merchant/billing/gateways/secure_net.rb +9 -9
- data/lib/active_merchant/billing/gateways/secure_pay.rb +13 -13
- data/lib/active_merchant/billing/gateways/secure_pay_au.rb +16 -16
- data/lib/active_merchant/billing/gateways/secure_pay_tech.rb +2 -2
- data/lib/active_merchant/billing/gateways/skip_jack.rb +8 -8
- data/lib/active_merchant/billing/gateways/smart_ps.rb +16 -16
- data/lib/active_merchant/billing/gateways/so_easy_pay.rb +6 -6
- data/lib/active_merchant/billing/gateways/spreedly_core.rb +4 -4
- data/lib/active_merchant/billing/gateways/stripe.rb +15 -10
- data/lib/active_merchant/billing/gateways/stripe_payment_intents.rb +50 -9
- data/lib/active_merchant/billing/gateways/swipe_checkout.rb +2 -2
- data/lib/active_merchant/billing/gateways/trans_first.rb +4 -4
- data/lib/active_merchant/billing/gateways/trust_commerce.rb +19 -19
- data/lib/active_merchant/billing/gateways/usa_epay_advanced.rb +110 -110
- data/lib/active_merchant/billing/gateways/usa_epay_transaction.rb +29 -29
- data/lib/active_merchant/billing/gateways/verifi.rb +10 -10
- data/lib/active_merchant/billing/gateways/viaklix.rb +6 -6
- data/lib/active_merchant/billing/gateways/visanet_peru.rb +6 -6
- data/lib/active_merchant/billing/gateways/webpay.rb +2 -2
- data/lib/active_merchant/billing/gateways/wirecard.rb +6 -6
- data/lib/active_merchant/billing/gateways/worldpay.rb +22 -20
- data/lib/active_merchant/billing/gateways/worldpay_online_payments.rb +32 -32
- data/lib/active_merchant/billing/gateways/worldpay_us.rb +2 -2
- data/lib/active_merchant/billing/network_tokenization_credit_card.rb +1 -1
- data/lib/active_merchant/connection.rb +1 -1
- data/lib/active_merchant/network_connection_retries.rb +3 -3
- data/lib/active_merchant/post_data.rb +1 -1
- data/lib/active_merchant/version.rb +1 -1
- data/lib/certs/cacert.pem +75 -0
- data/lib/support/ssl_verify.rb +2 -2
- data/lib/support/ssl_version.rb +2 -2
- metadata +4 -4
- data/lib/active_merchant/billing/gateways/moneris_us.rb +0 -352
@@ -324,7 +324,7 @@ module ActiveMerchant #:nodoc:
|
|
324
324
|
|
325
325
|
def headers
|
326
326
|
{
|
327
|
-
'Content-Type'
|
327
|
+
'Content-Type' => 'application/json'
|
328
328
|
}
|
329
329
|
end
|
330
330
|
|
@@ -398,7 +398,7 @@ module ActiveMerchant #:nodoc:
|
|
398
398
|
false,
|
399
399
|
message_from(response),
|
400
400
|
response,
|
401
|
-
:
|
401
|
+
test: test?
|
402
402
|
)
|
403
403
|
end
|
404
404
|
|
@@ -138,8 +138,8 @@ module ActiveMerchant #:nodoc:
|
|
138
138
|
requires!(options, :login)
|
139
139
|
|
140
140
|
@options = {
|
141
|
-
:
|
142
|
-
:
|
141
|
+
result: 'LIVE',
|
142
|
+
pem: LinkpointGateway.pem_file
|
143
143
|
}.update(options)
|
144
144
|
|
145
145
|
raise ArgumentError, "You need to pass in your pem file using the :pem parameter or set it globally using ActiveMerchant::Billing::LinkpointGateway.pem_file = File.read( File.dirname(__FILE__) + '/../mycert.pem' ) or similar" if @options[:pem].blank?
|
@@ -172,13 +172,13 @@ module ActiveMerchant #:nodoc:
|
|
172
172
|
requires!(options, [:periodicity, :bimonthly, :monthly, :biweekly, :weekly, :yearly, :daily], :installments, :order_id)
|
173
173
|
|
174
174
|
options.update(
|
175
|
-
:
|
176
|
-
:
|
177
|
-
:
|
178
|
-
:
|
179
|
-
:
|
180
|
-
:
|
181
|
-
:
|
175
|
+
ordertype: 'SALE',
|
176
|
+
action: options[:action] || 'SUBMIT',
|
177
|
+
installments: options[:installments] || 12,
|
178
|
+
startdate: options[:startdate] || 'immediate',
|
179
|
+
periodicity: options[:periodicity].to_s || 'monthly',
|
180
|
+
comments: options[:comments] || nil,
|
181
|
+
threshold: options[:threshold] || 3
|
182
182
|
)
|
183
183
|
commit(money, creditcard, options)
|
184
184
|
end
|
@@ -187,7 +187,7 @@ module ActiveMerchant #:nodoc:
|
|
187
187
|
def purchase(money, creditcard, options={})
|
188
188
|
requires!(options, :order_id)
|
189
189
|
options.update(
|
190
|
-
:
|
190
|
+
ordertype: 'SALE'
|
191
191
|
)
|
192
192
|
commit(money, creditcard, options)
|
193
193
|
end
|
@@ -200,7 +200,7 @@ module ActiveMerchant #:nodoc:
|
|
200
200
|
def authorize(money, creditcard, options = {})
|
201
201
|
requires!(options, :order_id)
|
202
202
|
options.update(
|
203
|
-
:
|
203
|
+
ordertype: 'PREAUTH'
|
204
204
|
)
|
205
205
|
commit(money, creditcard, options)
|
206
206
|
end
|
@@ -213,8 +213,8 @@ module ActiveMerchant #:nodoc:
|
|
213
213
|
#
|
214
214
|
def capture(money, authorization, options = {})
|
215
215
|
options.update(
|
216
|
-
:
|
217
|
-
:
|
216
|
+
order_id: authorization,
|
217
|
+
ordertype: 'POSTAUTH'
|
218
218
|
)
|
219
219
|
commit(money, nil, options)
|
220
220
|
end
|
@@ -222,8 +222,8 @@ module ActiveMerchant #:nodoc:
|
|
222
222
|
# Void a previous transaction
|
223
223
|
def void(identification, options = {})
|
224
224
|
options.update(
|
225
|
-
:
|
226
|
-
:
|
225
|
+
order_id: identification,
|
226
|
+
ordertype: 'VOID'
|
227
227
|
)
|
228
228
|
commit(nil, nil, options)
|
229
229
|
end
|
@@ -235,8 +235,8 @@ module ActiveMerchant #:nodoc:
|
|
235
235
|
#
|
236
236
|
def refund(money, identification, options = {})
|
237
237
|
options.update(
|
238
|
-
:
|
239
|
-
:
|
238
|
+
ordertype: 'CREDIT',
|
239
|
+
order_id: identification
|
240
240
|
)
|
241
241
|
commit(money, nil, options)
|
242
242
|
end
|
@@ -264,10 +264,10 @@ module ActiveMerchant #:nodoc:
|
|
264
264
|
response = parse(ssl_post(test? ? self.test_url : self.live_url, post_data(money, creditcard, options)))
|
265
265
|
|
266
266
|
Response.new(successful?(response), response[:message], response,
|
267
|
-
:
|
268
|
-
:
|
269
|
-
:
|
270
|
-
:
|
267
|
+
test: test?,
|
268
|
+
authorization: response[:ordernum],
|
269
|
+
avs_result: { code: response[:avs].to_s[2, 1] },
|
270
|
+
cvv_result: response[:avs].to_s[3, 1]
|
271
271
|
)
|
272
272
|
end
|
273
273
|
|
@@ -325,55 +325,55 @@ module ActiveMerchant #:nodoc:
|
|
325
325
|
# for every action.
|
326
326
|
def parameters(money, creditcard, options = {})
|
327
327
|
params = {
|
328
|
-
:
|
329
|
-
:
|
330
|
-
:
|
331
|
-
:
|
332
|
-
:
|
333
|
-
:
|
328
|
+
payment: {
|
329
|
+
subtotal: amount(options[:subtotal]),
|
330
|
+
tax: amount(options[:tax]),
|
331
|
+
vattax: amount(options[:vattax]),
|
332
|
+
shipping: amount(options[:shipping]),
|
333
|
+
chargetotal: amount(money)
|
334
334
|
},
|
335
|
-
:
|
336
|
-
:
|
337
|
-
:
|
338
|
-
:
|
339
|
-
:
|
340
|
-
:
|
341
|
-
:
|
342
|
-
:
|
343
|
-
:
|
344
|
-
:
|
335
|
+
transactiondetails: {
|
336
|
+
transactionorigin: options[:transactionorigin] || 'ECI',
|
337
|
+
oid: options[:order_id],
|
338
|
+
ponumber: options[:ponumber],
|
339
|
+
taxexempt: options[:taxexempt],
|
340
|
+
terminaltype: options[:terminaltype],
|
341
|
+
ip: options[:ip],
|
342
|
+
reference_number: options[:reference_number],
|
343
|
+
recurring: options[:recurring] || 'NO', # DO NOT USE if you are using the periodic billing option.
|
344
|
+
tdate: options[:tdate]
|
345
345
|
},
|
346
|
-
:
|
347
|
-
:
|
348
|
-
:
|
346
|
+
orderoptions: {
|
347
|
+
ordertype: options[:ordertype],
|
348
|
+
result: @options[:result]
|
349
349
|
},
|
350
|
-
:
|
351
|
-
:
|
352
|
-
:
|
353
|
-
:
|
354
|
-
:
|
355
|
-
:
|
356
|
-
:
|
350
|
+
periodic: {
|
351
|
+
action: options[:action],
|
352
|
+
installments: options[:installments],
|
353
|
+
threshold: options[:threshold],
|
354
|
+
startdate: options[:startdate],
|
355
|
+
periodicity: options[:periodicity],
|
356
|
+
comments: options[:comments]
|
357
357
|
},
|
358
|
-
:
|
359
|
-
:
|
360
|
-
:
|
361
|
-
:
|
362
|
-
:
|
363
|
-
:
|
364
|
-
:
|
365
|
-
:
|
366
|
-
:
|
367
|
-
:
|
358
|
+
telecheck: {
|
359
|
+
routing: options[:telecheck_routing],
|
360
|
+
account: options[:telecheck_account],
|
361
|
+
checknumber: options[:telecheck_checknumber],
|
362
|
+
bankname: options[:telecheck_bankname],
|
363
|
+
dl: options[:telecheck_dl],
|
364
|
+
dlstate: options[:telecheck_dlstate],
|
365
|
+
void: options[:telecheck_void],
|
366
|
+
accounttype: options[:telecheck_accounttype],
|
367
|
+
ssn: options[:telecheck_ssn],
|
368
368
|
}
|
369
369
|
}
|
370
370
|
|
371
371
|
if creditcard
|
372
372
|
params[:creditcard] = {
|
373
|
-
:
|
374
|
-
:
|
375
|
-
:
|
376
|
-
:
|
373
|
+
cardnumber: creditcard.number,
|
374
|
+
cardexpmonth: creditcard.month,
|
375
|
+
cardexpyear: format_creditcard_expiry_year(creditcard.year),
|
376
|
+
track: nil
|
377
377
|
}
|
378
378
|
|
379
379
|
if creditcard.verification_value?
|
@@ -431,7 +431,7 @@ module ActiveMerchant #:nodoc:
|
|
431
431
|
# <r_approved>APPROVED</r_approved>
|
432
432
|
# <r_avs></r_avs>
|
433
433
|
|
434
|
-
response = {:
|
434
|
+
response = {message: 'Global Error Receipt', complete: false}
|
435
435
|
|
436
436
|
xml = REXML::Document.new("<response>#{xml}</response>")
|
437
437
|
xml.root&.elements&.each do |node|
|
@@ -263,6 +263,7 @@ module ActiveMerchant #:nodoc:
|
|
263
263
|
if payment_method.is_a?(String)
|
264
264
|
doc.token do
|
265
265
|
doc.litleToken(payment_method)
|
266
|
+
doc.expDate(format_exp_date(options[:basis_expiration_month], options[:basis_expiration_year])) if options[:basis_expiration_month] && options[:basis_expiration_year]
|
266
267
|
end
|
267
268
|
elsif payment_method.respond_to?(:track_data) && payment_method.track_data.present?
|
268
269
|
doc.card do
|
@@ -416,7 +417,11 @@ module ActiveMerchant #:nodoc:
|
|
416
417
|
end
|
417
418
|
|
418
419
|
def exp_date(payment_method)
|
419
|
-
|
420
|
+
format_exp_date(payment_method.month, payment_method.year)
|
421
|
+
end
|
422
|
+
|
423
|
+
def format_exp_date(month, year)
|
424
|
+
"#{format(month, :two_digits)}#{format(year, :two_digits)}"
|
420
425
|
end
|
421
426
|
|
422
427
|
def parse(kind, xml)
|
@@ -449,8 +454,8 @@ module ActiveMerchant #:nodoc:
|
|
449
454
|
options = {
|
450
455
|
authorization: authorization_from(kind, parsed, money),
|
451
456
|
test: test?,
|
452
|
-
:
|
453
|
-
:
|
457
|
+
avs_result: { code: AVS_RESPONSE_CODE[parsed[:fraudResult_avsResult]] },
|
458
|
+
cvv_result: parsed[:fraudResult_cardValidationResult]
|
454
459
|
}
|
455
460
|
|
456
461
|
Response.new(success_from(kind, parsed), parsed[:message], parsed, options)
|
@@ -113,6 +113,7 @@ module ActiveMerchant #:nodoc:
|
|
113
113
|
|
114
114
|
post[:processing_mode] = options[:processing_mode]
|
115
115
|
post[:merchant_account_id] = options[:merchant_account_id] if options[:merchant_account_id]
|
116
|
+
post[:payment_method_option_id] = options[:payment_method_option_id] if options[:payment_method_option_id]
|
116
117
|
add_merchant_services(post, options)
|
117
118
|
end
|
118
119
|
|
@@ -46,7 +46,7 @@ module ActiveMerchant #:nodoc:
|
|
46
46
|
end
|
47
47
|
|
48
48
|
def capture(money, transaction_id, options = {})
|
49
|
-
post ={}
|
49
|
+
post = {}
|
50
50
|
post[:transaction_id] = transaction_id
|
51
51
|
post[:client_reference_number] = options[:customer] if options.has_key?(:customer)
|
52
52
|
add_invoice(post, options)
|
@@ -166,10 +166,10 @@ module ActiveMerchant #:nodoc:
|
|
166
166
|
end
|
167
167
|
|
168
168
|
Response.new(response['error_code'] == '000', message_from(response), response,
|
169
|
-
:
|
170
|
-
:
|
171
|
-
:
|
172
|
-
:
|
169
|
+
authorization: response['transaction_id'],
|
170
|
+
test: test?,
|
171
|
+
cvv_result: response['cvv2_result'],
|
172
|
+
avs_result: { code: response['avs_result'] }
|
173
173
|
)
|
174
174
|
end
|
175
175
|
|
@@ -101,8 +101,8 @@ module ActiveMerchant #:nodoc:
|
|
101
101
|
(responses['response'].to_i == 1),
|
102
102
|
responses['responsetext'],
|
103
103
|
responses,
|
104
|
-
:
|
105
|
-
:
|
104
|
+
test: test?,
|
105
|
+
authorization: responses['transactionid']
|
106
106
|
)
|
107
107
|
end
|
108
108
|
end
|
@@ -172,20 +172,20 @@ module ActiveMerchant #:nodoc:
|
|
172
172
|
message_from(succeeded, response_data),
|
173
173
|
response_data,
|
174
174
|
authorization: authorization_from(post, response_data),
|
175
|
-
:
|
176
|
-
:
|
175
|
+
avs_result: AVSResult.new(code: response_data['avs_response']),
|
176
|
+
cvv_result: CVVResult.new(response_data['cvv2_response']),
|
177
177
|
test: test?
|
178
178
|
)
|
179
179
|
end
|
180
180
|
|
181
181
|
def headers
|
182
182
|
{
|
183
|
-
'Content-Type'
|
183
|
+
'Content-Type' => 'application/xml'
|
184
184
|
}
|
185
185
|
end
|
186
186
|
|
187
187
|
def build_request(post)
|
188
|
-
Nokogiri::XML::Builder.new(:
|
188
|
+
Nokogiri::XML::Builder.new(encoding: 'utf-8') do |xml|
|
189
189
|
xml.interface_driver {
|
190
190
|
xml.trans_catalog {
|
191
191
|
xml.transaction(name: 'creditcard') {
|
@@ -22,12 +22,12 @@ module ActiveMerchant #:nodoc:
|
|
22
22
|
TX_NAMESPACE_V4 = 'http://schemas.merchantwarehouse.com/merchantware/40/Credit/'
|
23
23
|
|
24
24
|
ACTIONS = {
|
25
|
-
:
|
26
|
-
:
|
27
|
-
:
|
28
|
-
:
|
29
|
-
:
|
30
|
-
:
|
25
|
+
purchase: 'IssueKeyedSale',
|
26
|
+
authorize: 'IssueKeyedPreAuth',
|
27
|
+
capture: 'IssuePostAuth',
|
28
|
+
void: 'VoidPreAuthorization',
|
29
|
+
credit: 'IssueKeyedRefund',
|
30
|
+
reference_credit: 'IssueRefundByReference'
|
31
31
|
}
|
32
32
|
|
33
33
|
# Creates a new MerchantWareGateway
|
@@ -117,7 +117,7 @@ module ActiveMerchant #:nodoc:
|
|
117
117
|
private
|
118
118
|
|
119
119
|
def soap_request(action)
|
120
|
-
xml = Builder::XmlMarkup.new :
|
120
|
+
xml = Builder::XmlMarkup.new indent: 2
|
121
121
|
xml.instruct!
|
122
122
|
xml.tag! 'env:Envelope', ENV_NAMESPACES do
|
123
123
|
xml.tag! 'env:Body' do
|
@@ -131,7 +131,7 @@ module ActiveMerchant #:nodoc:
|
|
131
131
|
end
|
132
132
|
|
133
133
|
def v4_soap_request(action)
|
134
|
-
xml = Builder::XmlMarkup.new :
|
134
|
+
xml = Builder::XmlMarkup.new indent: 2
|
135
135
|
xml.instruct!
|
136
136
|
xml.tag! 'soap:Envelope', ENV_NAMESPACES_V4 do
|
137
137
|
xml.tag! 'soap:Body' do
|
@@ -300,10 +300,10 @@ module ActiveMerchant #:nodoc:
|
|
300
300
|
end
|
301
301
|
|
302
302
|
Response.new(response[:success], response[:message], response,
|
303
|
-
:
|
304
|
-
:
|
305
|
-
:
|
306
|
-
:
|
303
|
+
test: test?,
|
304
|
+
authorization: authorization_from(response),
|
305
|
+
avs_result: { code: response['AVSResponse'] },
|
306
|
+
cvv_result: response['CVResponse']
|
307
307
|
)
|
308
308
|
end
|
309
309
|
|
@@ -16,12 +16,12 @@ module ActiveMerchant #:nodoc:
|
|
16
16
|
TX_NAMESPACE = 'http://schemas.merchantwarehouse.com/merchantware/40/Credit/'
|
17
17
|
|
18
18
|
ACTIONS = {
|
19
|
-
:
|
20
|
-
:
|
21
|
-
:
|
22
|
-
:
|
23
|
-
:
|
24
|
-
:
|
19
|
+
purchase: 'SaleKeyed',
|
20
|
+
reference_purchase: 'RepeatSale',
|
21
|
+
authorize: 'PreAuthorizationKeyed',
|
22
|
+
capture: 'PostAuthorization',
|
23
|
+
void: 'Void',
|
24
|
+
refund: 'Refund'
|
25
25
|
}
|
26
26
|
|
27
27
|
# Creates a new MerchantWareVersionFourGateway
|
@@ -129,7 +129,7 @@ module ActiveMerchant #:nodoc:
|
|
129
129
|
private
|
130
130
|
|
131
131
|
def soap_request(action)
|
132
|
-
xml = Builder::XmlMarkup.new :
|
132
|
+
xml = Builder::XmlMarkup.new indent: 2
|
133
133
|
xml.instruct!
|
134
134
|
xml.tag! 'soap:Envelope', ENV_NAMESPACES do
|
135
135
|
xml.tag! 'soap:Body' do
|
@@ -271,10 +271,10 @@ module ActiveMerchant #:nodoc:
|
|
271
271
|
end
|
272
272
|
|
273
273
|
Response.new(response[:success], response[:message], response,
|
274
|
-
:
|
275
|
-
:
|
276
|
-
:
|
277
|
-
:
|
274
|
+
test: test?,
|
275
|
+
authorization: authorization_from(response),
|
276
|
+
avs_result: { code: response['AvsResponse'] },
|
277
|
+
cvv_result: response['CvResponse']
|
278
278
|
)
|
279
279
|
end
|
280
280
|
|
@@ -31,6 +31,7 @@ module ActiveMerchant #:nodoc:
|
|
31
31
|
add_address(post, options)
|
32
32
|
add_payment_method(post, payment_method)
|
33
33
|
add_recurring_flag(post, options)
|
34
|
+
add_soft_descriptors(post, options)
|
34
35
|
commit('processAuth', post)
|
35
36
|
end
|
36
37
|
|
@@ -41,6 +42,7 @@ module ActiveMerchant #:nodoc:
|
|
41
42
|
add_address(post, options)
|
42
43
|
add_payment_method(post, payment_method)
|
43
44
|
add_recurring_flag(post, options)
|
45
|
+
add_soft_descriptors(post, options)
|
44
46
|
commit('processCard', post)
|
45
47
|
end
|
46
48
|
|
@@ -48,6 +50,7 @@ module ActiveMerchant #:nodoc:
|
|
48
50
|
post = {}
|
49
51
|
add_amount(post, money, options)
|
50
52
|
add_transaction(post, identification)
|
53
|
+
add_soft_descriptors(post, options)
|
51
54
|
post['captureAmount'] = amount(money)
|
52
55
|
commit('processCapture', post)
|
53
56
|
end
|
@@ -56,6 +59,7 @@ module ActiveMerchant #:nodoc:
|
|
56
59
|
post = {}
|
57
60
|
add_amount(post, money, options)
|
58
61
|
add_transaction(post, identification)
|
62
|
+
add_soft_descriptors(post, options)
|
59
63
|
post['refundAmount'] = amount(money)
|
60
64
|
commit('refundCard', post)
|
61
65
|
end
|
@@ -153,6 +157,12 @@ module ActiveMerchant #:nodoc:
|
|
153
157
|
post['recurringFlag'] = options[:recurring_flag]
|
154
158
|
end
|
155
159
|
|
160
|
+
def add_soft_descriptors(post, options)
|
161
|
+
post['descriptorName'] = options[:descriptor_name] if options[:descriptor_name]
|
162
|
+
post['descriptorCity'] = options[:descriptor_city] if options[:descriptor_city]
|
163
|
+
post['descriptorState'] = options[:descriptor_state] if options[:descriptor_state]
|
164
|
+
end
|
165
|
+
|
156
166
|
def verification_hash(money, currency)
|
157
167
|
Digest::MD5.hexdigest(
|
158
168
|
(
|
@@ -201,8 +211,8 @@ module ActiveMerchant #:nodoc:
|
|
201
211
|
success?(response),
|
202
212
|
response[:response_message],
|
203
213
|
response,
|
204
|
-
:
|
205
|
-
:
|
214
|
+
test: test?,
|
215
|
+
authorization: (response[:card_id] || response[:transaction_id])
|
206
216
|
)
|
207
217
|
end
|
208
218
|
|