activemerchant 1.108.0 → 1.113.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +69 -0
- data/README.md +2 -2
- data/lib/active_merchant/billing/base.rb +0 -13
- data/lib/active_merchant/billing/check.rb +1 -1
- data/lib/active_merchant/billing/credit_card.rb +3 -1
- data/lib/active_merchant/billing/credit_card_methods.rb +10 -7
- data/lib/active_merchant/billing/gateway.rb +1 -1
- data/lib/active_merchant/billing/gateways/adyen.rb +25 -14
- data/lib/active_merchant/billing/gateways/allied_wallet.rb +2 -2
- data/lib/active_merchant/billing/gateways/authorize_net.rb +13 -13
- data/lib/active_merchant/billing/gateways/authorize_net_arb.rb +3 -3
- data/lib/active_merchant/billing/gateways/authorize_net_cim.rb +4 -4
- data/lib/active_merchant/billing/gateways/axcessms.rb +1 -1
- data/lib/active_merchant/billing/gateways/balanced.rb +2 -2
- data/lib/active_merchant/billing/gateways/bambora_apac.rb +3 -3
- data/lib/active_merchant/billing/gateways/bank_frick.rb +3 -3
- data/lib/active_merchant/billing/gateways/banwire.rb +2 -2
- data/lib/active_merchant/billing/gateways/barclaycard_smartpay.rb +2 -2
- data/lib/active_merchant/billing/gateways/barclays_epdq_extra_plus.rb +1 -1
- data/lib/active_merchant/billing/gateways/be2bill.rb +1 -1
- data/lib/active_merchant/billing/gateways/beanstream/beanstream_core.rb +4 -4
- data/lib/active_merchant/billing/gateways/blue_pay.rb +2 -2
- data/lib/active_merchant/billing/gateways/blue_snap.rb +50 -13
- data/lib/active_merchant/billing/gateways/borgun.rb +4 -4
- data/lib/active_merchant/billing/gateways/bpoint.rb +1 -1
- data/lib/active_merchant/billing/gateways/braintree/braintree_common.rb +1 -1
- data/lib/active_merchant/billing/gateways/braintree_blue.rb +85 -35
- data/lib/active_merchant/billing/gateways/bridge_pay.rb +2 -2
- data/lib/active_merchant/billing/gateways/cams.rb +2 -2
- data/lib/active_merchant/billing/gateways/card_connect.rb +1 -1
- data/lib/active_merchant/billing/gateways/card_save.rb +1 -1
- data/lib/active_merchant/billing/gateways/card_stream.rb +4 -4
- data/lib/active_merchant/billing/gateways/cardknox.rb +5 -5
- data/lib/active_merchant/billing/gateways/cardprocess.rb +1 -1
- data/lib/active_merchant/billing/gateways/cashnet.rb +1 -1
- data/lib/active_merchant/billing/gateways/cecabank.rb +1 -1
- data/lib/active_merchant/billing/gateways/cenpos.rb +13 -13
- data/lib/active_merchant/billing/gateways/checkout.rb +3 -3
- data/lib/active_merchant/billing/gateways/checkout_v2.rb +3 -3
- data/lib/active_merchant/billing/gateways/citrus_pay.rb +1 -1
- data/lib/active_merchant/billing/gateways/clearhaus.rb +3 -3
- data/lib/active_merchant/billing/gateways/commercegate.rb +1 -1
- data/lib/active_merchant/billing/gateways/conekta.rb +1 -1
- data/lib/active_merchant/billing/gateways/creditcall.rb +1 -1
- data/lib/active_merchant/billing/gateways/credorax.rb +13 -3
- data/lib/active_merchant/billing/gateways/ct_payment.rb +2 -2
- data/lib/active_merchant/billing/gateways/culqi.rb +2 -2
- data/lib/active_merchant/billing/gateways/cyber_source.rb +66 -20
- data/lib/active_merchant/billing/gateways/d_local.rb +7 -3
- data/lib/active_merchant/billing/gateways/data_cash.rb +1 -1
- data/lib/active_merchant/billing/gateways/decidir.rb +1 -1
- data/lib/active_merchant/billing/gateways/dibs.rb +2 -2
- data/lib/active_merchant/billing/gateways/digitzs.rb +3 -3
- data/lib/active_merchant/billing/gateways/ebanx.rb +4 -4
- data/lib/active_merchant/billing/gateways/efsnet.rb +3 -3
- data/lib/active_merchant/billing/gateways/elavon.rb +1 -1
- data/lib/active_merchant/billing/gateways/element.rb +7 -3
- data/lib/active_merchant/billing/gateways/epay.rb +3 -3
- data/lib/active_merchant/billing/gateways/evo_ca.rb +1 -1
- data/lib/active_merchant/billing/gateways/eway.rb +1 -1
- data/lib/active_merchant/billing/gateways/eway_managed.rb +1 -1
- data/lib/active_merchant/billing/gateways/eway_rapid.rb +4 -4
- data/lib/active_merchant/billing/gateways/exact.rb +3 -3
- data/lib/active_merchant/billing/gateways/ezic.rb +2 -2
- data/lib/active_merchant/billing/gateways/fat_zebra.rb +9 -7
- data/lib/active_merchant/billing/gateways/federated_canada.rb +1 -1
- data/lib/active_merchant/billing/gateways/finansbank.rb +2 -2
- data/lib/active_merchant/billing/gateways/first_giving.rb +1 -1
- data/lib/active_merchant/billing/gateways/first_pay.rb +1 -1
- data/lib/active_merchant/billing/gateways/firstdata_e4.rb +4 -4
- data/lib/active_merchant/billing/gateways/firstdata_e4_v27.rb +11 -3
- data/lib/active_merchant/billing/gateways/flo2cash.rb +11 -11
- data/lib/active_merchant/billing/gateways/forte.rb +2 -2
- data/lib/active_merchant/billing/gateways/garanti.rb +2 -2
- data/lib/active_merchant/billing/gateways/global_collect.rb +10 -5
- data/lib/active_merchant/billing/gateways/global_transport.rb +1 -1
- data/lib/active_merchant/billing/gateways/hdfc.rb +10 -10
- data/lib/active_merchant/billing/gateways/hps.rb +10 -7
- data/lib/active_merchant/billing/gateways/iats_payments.rb +2 -2
- data/lib/active_merchant/billing/gateways/inspire.rb +1 -1
- data/lib/active_merchant/billing/gateways/instapay.rb +1 -1
- data/lib/active_merchant/billing/gateways/ipp.rb +3 -3
- data/lib/active_merchant/billing/gateways/iridium.rb +5 -5
- data/lib/active_merchant/billing/gateways/itransact.rb +1 -1
- data/lib/active_merchant/billing/gateways/iveri.rb +2 -2
- data/lib/active_merchant/billing/gateways/ixopay.rb +1 -1
- data/lib/active_merchant/billing/gateways/jetpay.rb +2 -2
- data/lib/active_merchant/billing/gateways/jetpay_v2.rb +2 -2
- data/lib/active_merchant/billing/gateways/komoju.rb +1 -1
- data/lib/active_merchant/billing/gateways/kushki.rb +4 -4
- data/lib/active_merchant/billing/gateways/latitude19.rb +2 -2
- data/lib/active_merchant/billing/gateways/linkpoint.rb +3 -3
- data/lib/active_merchant/billing/gateways/litle.rb +5 -5
- data/lib/active_merchant/billing/gateways/mastercard.rb +2 -2
- data/lib/active_merchant/billing/gateways/maxipago.rb +2 -2
- data/lib/active_merchant/billing/gateways/mercado_pago.rb +12 -7
- data/lib/active_merchant/billing/gateways/merchant_e_solutions.rb +1 -1
- data/lib/active_merchant/billing/gateways/merchant_one.rb +2 -2
- data/lib/active_merchant/billing/gateways/merchant_partners.rb +1 -1
- data/lib/active_merchant/billing/gateways/merchant_ware.rb +1 -1
- data/lib/active_merchant/billing/gateways/merchant_ware_version_four.rb +1 -1
- data/lib/active_merchant/billing/gateways/merchant_warrior.rb +2 -2
- data/lib/active_merchant/billing/gateways/mercury.rb +4 -4
- data/lib/active_merchant/billing/gateways/metrics_global.rb +1 -1
- data/lib/active_merchant/billing/gateways/micropayment.rb +2 -2
- data/lib/active_merchant/billing/gateways/migs.rb +1 -1
- data/lib/active_merchant/billing/gateways/modern_payments_cim.rb +1 -1
- data/lib/active_merchant/billing/gateways/monei.rb +2 -2
- data/lib/active_merchant/billing/gateways/moneris.rb +17 -17
- data/lib/active_merchant/billing/gateways/money_movers.rb +1 -1
- data/lib/active_merchant/billing/gateways/mundipagg.rb +1 -1
- data/lib/active_merchant/billing/gateways/nab_transact.rb +2 -2
- data/lib/active_merchant/billing/gateways/ncr_secure_pay.rb +1 -1
- data/lib/active_merchant/billing/gateways/net_registry.rb +2 -2
- data/lib/active_merchant/billing/gateways/netaxept.rb +2 -2
- data/lib/active_merchant/billing/gateways/netbanx.rb +53 -23
- data/lib/active_merchant/billing/gateways/netbilling.rb +2 -2
- data/lib/active_merchant/billing/gateways/netpay.rb +2 -2
- data/lib/active_merchant/billing/gateways/network_merchants.rb +1 -1
- data/lib/active_merchant/billing/gateways/nmi.rb +4 -4
- data/lib/active_merchant/billing/gateways/ogone.rb +2 -2
- data/lib/active_merchant/billing/gateways/omise.rb +1 -1
- data/lib/active_merchant/billing/gateways/openpay.rb +2 -2
- data/lib/active_merchant/billing/gateways/opp.rb +4 -4
- data/lib/active_merchant/billing/gateways/optimal_payment.rb +5 -5
- data/lib/active_merchant/billing/gateways/orbital.rb +14 -7
- data/lib/active_merchant/billing/gateways/orbital/orbital_soft_descriptors.rb +1 -1
- data/lib/active_merchant/billing/gateways/pac_net_raven.rb +1 -1
- data/lib/active_merchant/billing/gateways/pagarme.rb +3 -3
- data/lib/active_merchant/billing/gateways/pago_facil.rb +1 -1
- data/lib/active_merchant/billing/gateways/pay_conex.rb +1 -1
- data/lib/active_merchant/billing/gateways/pay_gate_xml.rb +2 -2
- data/lib/active_merchant/billing/gateways/pay_hub.rb +1 -1
- data/lib/active_merchant/billing/gateways/pay_junction.rb +5 -5
- data/lib/active_merchant/billing/gateways/pay_junction_v2.rb +2 -2
- data/lib/active_merchant/billing/gateways/pay_secure.rb +1 -1
- data/lib/active_merchant/billing/gateways/paybox_direct.rb +3 -3
- data/lib/active_merchant/billing/gateways/payeezy.rb +5 -5
- data/lib/active_merchant/billing/gateways/payex.rb +18 -18
- data/lib/active_merchant/billing/gateways/payflow.rb +8 -5
- data/lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb +2 -2
- data/lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb +1 -1
- data/lib/active_merchant/billing/gateways/payflow_uk.rb +1 -1
- data/lib/active_merchant/billing/gateways/payment_express.rb +1 -1
- data/lib/active_merchant/billing/gateways/paymentez.rb +1 -1
- data/lib/active_merchant/billing/gateways/paymill.rb +4 -4
- data/lib/active_merchant/billing/gateways/paypal.rb +2 -2
- data/lib/active_merchant/billing/gateways/paypal_ca.rb +1 -1
- data/lib/active_merchant/billing/gateways/payscout.rb +1 -1
- data/lib/active_merchant/billing/gateways/paystation.rb +1 -1
- data/lib/active_merchant/billing/gateways/payu_in.rb +1 -1
- data/lib/active_merchant/billing/gateways/payu_latam.rb +10 -8
- data/lib/active_merchant/billing/gateways/payway.rb +1 -1
- data/lib/active_merchant/billing/gateways/pin.rb +1 -1
- data/lib/active_merchant/billing/gateways/plugnpay.rb +6 -6
- data/lib/active_merchant/billing/gateways/pro_pay.rb +2 -2
- data/lib/active_merchant/billing/gateways/psigate.rb +2 -2
- data/lib/active_merchant/billing/gateways/psl_card.rb +2 -2
- data/lib/active_merchant/billing/gateways/qbms.rb +4 -4
- data/lib/active_merchant/billing/gateways/quantum.rb +3 -3
- data/lib/active_merchant/billing/gateways/quickbooks.rb +9 -8
- data/lib/active_merchant/billing/gateways/quickpay/quickpay_common.rb +3 -3
- data/lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb +4 -4
- data/lib/active_merchant/billing/gateways/qvalent.rb +2 -2
- data/lib/active_merchant/billing/gateways/realex.rb +2 -1
- data/lib/active_merchant/billing/gateways/redsys.rb +7 -7
- data/lib/active_merchant/billing/gateways/s5.rb +1 -1
- data/lib/active_merchant/billing/gateways/safe_charge.rb +2 -2
- data/lib/active_merchant/billing/gateways/sage.rb +3 -3
- data/lib/active_merchant/billing/gateways/sage_pay.rb +7 -7
- data/lib/active_merchant/billing/gateways/sallie_mae.rb +1 -1
- data/lib/active_merchant/billing/gateways/secure_net.rb +1 -1
- data/lib/active_merchant/billing/gateways/secure_pay.rb +1 -1
- data/lib/active_merchant/billing/gateways/secure_pay_au.rb +2 -2
- data/lib/active_merchant/billing/gateways/secure_pay_tech.rb +2 -2
- data/lib/active_merchant/billing/gateways/securion_pay.rb +1 -1
- data/lib/active_merchant/billing/gateways/skip_jack.rb +6 -6
- data/lib/active_merchant/billing/gateways/so_easy_pay.rb +6 -6
- data/lib/active_merchant/billing/gateways/spreedly_core.rb +1 -1
- data/lib/active_merchant/billing/gateways/stripe.rb +8 -8
- data/lib/active_merchant/billing/gateways/stripe_payment_intents.rb +20 -1
- data/lib/active_merchant/billing/gateways/swipe_checkout.rb +1 -1
- data/lib/active_merchant/billing/gateways/telr.rb +5 -5
- data/lib/active_merchant/billing/gateways/tns.rb +1 -1
- data/lib/active_merchant/billing/gateways/trans_first.rb +3 -3
- data/lib/active_merchant/billing/gateways/trans_first_transaction_express.rb +3 -3
- data/lib/active_merchant/billing/gateways/transact_pro.rb +1 -1
- data/lib/active_merchant/billing/gateways/transax.rb +1 -1
- data/lib/active_merchant/billing/gateways/trexle.rb +1 -1
- data/lib/active_merchant/billing/gateways/trust_commerce.rb +12 -12
- data/lib/active_merchant/billing/gateways/usa_epay_advanced.rb +10 -10
- data/lib/active_merchant/billing/gateways/usa_epay_transaction.rb +2 -2
- data/lib/active_merchant/billing/gateways/vanco.rb +1 -1
- data/lib/active_merchant/billing/gateways/verifi.rb +3 -3
- data/lib/active_merchant/billing/gateways/viaklix.rb +1 -1
- data/lib/active_merchant/billing/gateways/visanet_peru.rb +3 -3
- data/lib/active_merchant/billing/gateways/webpay.rb +1 -1
- data/lib/active_merchant/billing/gateways/wepay.rb +2 -2
- data/lib/active_merchant/billing/gateways/wirecard.rb +1 -1
- data/lib/active_merchant/billing/gateways/world_net.rb +35 -35
- data/lib/active_merchant/billing/gateways/worldpay.rb +6 -6
- data/lib/active_merchant/billing/gateways/worldpay_online_payments.rb +1 -1
- data/lib/active_merchant/billing/gateways/worldpay_us.rb +3 -3
- data/lib/active_merchant/version.rb +1 -1
- data/lib/support/gateway_support.rb +1 -1
- metadata +45 -31
@@ -10,7 +10,7 @@ module ActiveMerchant #:nodoc:
|
|
10
10
|
|
11
11
|
self.supported_countries = ['US']
|
12
12
|
self.default_currency = 'USD'
|
13
|
-
self.supported_cardtypes = [
|
13
|
+
self.supported_cardtypes = %i[visa master american_express discover diners_club jcb]
|
14
14
|
|
15
15
|
self.homepage_url = 'http://www.vantiv.com/'
|
16
16
|
self.display_name = 'Vantiv eCommerce'
|
@@ -53,7 +53,7 @@ module ActiveMerchant #:nodoc:
|
|
53
53
|
end
|
54
54
|
|
55
55
|
def capture(money, authorization, options={})
|
56
|
-
transaction_id,
|
56
|
+
transaction_id, = split_authorization(authorization)
|
57
57
|
|
58
58
|
request = build_xml_request do |doc|
|
59
59
|
add_authentication(doc)
|
@@ -78,7 +78,7 @@ module ActiveMerchant #:nodoc:
|
|
78
78
|
add_descriptor(doc, options)
|
79
79
|
doc.send(refund_type(payment), transaction_attributes(options)) do
|
80
80
|
if payment.is_a?(String)
|
81
|
-
transaction_id,
|
81
|
+
transaction_id, = split_authorization(payment)
|
82
82
|
doc.litleTxnId(transaction_id)
|
83
83
|
doc.amount(money) if money
|
84
84
|
elsif check?(payment)
|
@@ -192,7 +192,7 @@ module ActiveMerchant #:nodoc:
|
|
192
192
|
end
|
193
193
|
|
194
194
|
def refund_type(payment)
|
195
|
-
_, kind,
|
195
|
+
_, kind, = split_authorization(payment)
|
196
196
|
if check?(payment) || kind == 'echeckSales'
|
197
197
|
:echeckCredit
|
198
198
|
else
|
@@ -274,7 +274,7 @@ module ActiveMerchant #:nodoc:
|
|
274
274
|
doc.accType(payment_method.account_type.capitalize)
|
275
275
|
doc.accNum(payment_method.account_number)
|
276
276
|
doc.routingNum(payment_method.routing_number)
|
277
|
-
doc.checkNum(payment_method.number)
|
277
|
+
doc.checkNum(payment_method.number) if payment_method.number
|
278
278
|
end
|
279
279
|
else
|
280
280
|
doc.card do
|
@@ -105,7 +105,7 @@ module ActiveMerchant
|
|
105
105
|
billing: {},
|
106
106
|
device: {},
|
107
107
|
shipping: {},
|
108
|
-
transaction: {}
|
108
|
+
transaction: {}
|
109
109
|
}
|
110
110
|
end
|
111
111
|
|
@@ -190,7 +190,7 @@ module ActiveMerchant
|
|
190
190
|
def headers
|
191
191
|
{
|
192
192
|
'Authorization' => 'Basic ' + Base64.encode64("merchant.#{@options[:userid]}:#{@options[:password]}").strip.delete("\r\n"),
|
193
|
-
'Content-Type' => 'application/json'
|
193
|
+
'Content-Type' => 'application/json'
|
194
194
|
}
|
195
195
|
end
|
196
196
|
|
@@ -11,7 +11,7 @@ module ActiveMerchant #:nodoc:
|
|
11
11
|
self.supported_countries = ['BR']
|
12
12
|
self.default_currency = 'BRL'
|
13
13
|
self.money_format = :dollars
|
14
|
-
self.supported_cardtypes = [
|
14
|
+
self.supported_cardtypes = %i[visa master discover american_express diners_club]
|
15
15
|
self.homepage_url = 'http://www.maxipago.com/'
|
16
16
|
self.display_name = 'maxiPago!'
|
17
17
|
|
@@ -212,7 +212,7 @@ module ActiveMerchant #:nodoc:
|
|
212
212
|
end
|
213
213
|
|
214
214
|
def add_order_id(xml, authorization)
|
215
|
-
order_id,
|
215
|
+
order_id, = split_authorization(authorization)
|
216
216
|
xml.orderID order_id
|
217
217
|
end
|
218
218
|
end
|
@@ -3,8 +3,8 @@ module ActiveMerchant #:nodoc:
|
|
3
3
|
class MercadoPagoGateway < Gateway
|
4
4
|
self.live_url = self.test_url = 'https://api.mercadopago.com/v1'
|
5
5
|
|
6
|
-
self.supported_countries = [
|
7
|
-
self.supported_cardtypes = [
|
6
|
+
self.supported_countries = %w[AR BR CL CO MX PE UY]
|
7
|
+
self.supported_cardtypes = %i[visa master american_express elo cabal naranja]
|
8
8
|
|
9
9
|
self.homepage_url = 'https://www.mercadopago.com/'
|
10
10
|
self.display_name = 'Mercado Pago'
|
@@ -33,7 +33,7 @@ module ActiveMerchant #:nodoc:
|
|
33
33
|
|
34
34
|
def capture(money, authorization, options={})
|
35
35
|
post = {}
|
36
|
-
authorization,
|
36
|
+
authorization, = authorization.split('|')
|
37
37
|
post[:capture] = true
|
38
38
|
post[:transaction_amount] = amount(money).to_f
|
39
39
|
commit('capture', "payments/#{authorization}", post)
|
@@ -47,7 +47,7 @@ module ActiveMerchant #:nodoc:
|
|
47
47
|
end
|
48
48
|
|
49
49
|
def void(authorization, options={})
|
50
|
-
authorization,
|
50
|
+
authorization, = authorization.split('|')
|
51
51
|
post = { status: 'cancelled' }
|
52
52
|
commit('void', "payments/#{authorization}", post)
|
53
53
|
end
|
@@ -98,6 +98,7 @@ module ActiveMerchant #:nodoc:
|
|
98
98
|
add_processing_mode(post, options)
|
99
99
|
add_net_amount(post, options)
|
100
100
|
add_taxes(post, options)
|
101
|
+
add_notification_url(post, options)
|
101
102
|
post[:binary_mode] = (options[:binary_mode].nil? ? true : options[:binary_mode])
|
102
103
|
post
|
103
104
|
end
|
@@ -203,6 +204,10 @@ module ActiveMerchant #:nodoc:
|
|
203
204
|
post[:net_amount] = Float(options[:net_amount]) if options[:net_amount]
|
204
205
|
end
|
205
206
|
|
207
|
+
def add_notification_url(post, options)
|
208
|
+
post[:notification_url] = options[:notification_url] if options[:notification_url]
|
209
|
+
end
|
210
|
+
|
206
211
|
def add_taxes(post, options)
|
207
212
|
return unless (tax_object = options[:taxes])
|
208
213
|
|
@@ -251,7 +256,7 @@ module ActiveMerchant #:nodoc:
|
|
251
256
|
end
|
252
257
|
|
253
258
|
def commit(action, path, parameters)
|
254
|
-
if [
|
259
|
+
if %w[capture void].include?(action)
|
255
260
|
response = parse(ssl_request(:put, url(path), post_data(parameters), headers))
|
256
261
|
else
|
257
262
|
response = parse(ssl_post(url(path), post_data(parameters), headers(parameters)))
|
@@ -271,7 +276,7 @@ module ActiveMerchant #:nodoc:
|
|
271
276
|
if action == 'refund'
|
272
277
|
response['status'] != 404 && response['error'].nil?
|
273
278
|
else
|
274
|
-
[
|
279
|
+
%w[active approved authorized cancelled in_process].include?(response['status'])
|
275
280
|
end
|
276
281
|
end
|
277
282
|
|
@@ -306,7 +311,7 @@ module ActiveMerchant #:nodoc:
|
|
306
311
|
headers = {
|
307
312
|
'Content-Type' => 'application/json'
|
308
313
|
}
|
309
|
-
headers['X-
|
314
|
+
headers['X-meli-session-id'] = options[:device_id] if options[:device_id]
|
310
315
|
headers
|
311
316
|
end
|
312
317
|
|
@@ -10,7 +10,7 @@ module ActiveMerchant #:nodoc:
|
|
10
10
|
self.supported_countries = ['US']
|
11
11
|
|
12
12
|
# The card types supported by the payment gateway
|
13
|
-
self.supported_cardtypes = [
|
13
|
+
self.supported_cardtypes = %i[visa master american_express discover jcb]
|
14
14
|
|
15
15
|
# The homepage URL of the gateway
|
16
16
|
self.homepage_url = 'http://www.merchante-solutions.com/'
|
@@ -13,7 +13,7 @@ module ActiveMerchant #:nodoc:
|
|
13
13
|
BASE_URL = 'https://secure.merchantonegateway.com/api/transact.php'
|
14
14
|
|
15
15
|
self.supported_countries = ['US']
|
16
|
-
self.supported_cardtypes = [
|
16
|
+
self.supported_cardtypes = %i[visa master american_express discover]
|
17
17
|
self.homepage_url = 'http://merchantone.com/'
|
18
18
|
self.display_name = 'Merchant One Gateway'
|
19
19
|
self.money_format = :dollars
|
@@ -76,7 +76,7 @@ module ActiveMerchant #:nodoc:
|
|
76
76
|
def add_creditcard(post, creditcard)
|
77
77
|
post['cvv'] = creditcard.verification_value
|
78
78
|
post['ccnumber'] = creditcard.number
|
79
|
-
post['ccexp'] = "#{sprintf(
|
79
|
+
post['ccexp'] = "#{sprintf('%02d', creditcard.month)}#{creditcard.year.to_s[-2, 2]}"
|
80
80
|
end
|
81
81
|
|
82
82
|
def commit(action, money, parameters={})
|
@@ -11,7 +11,7 @@ module ActiveMerchant #:nodoc:
|
|
11
11
|
self.supported_countries = ['US']
|
12
12
|
self.default_currency = 'USD'
|
13
13
|
self.money_format = :dollars
|
14
|
-
self.supported_cardtypes = [
|
14
|
+
self.supported_cardtypes = %i[visa master american_express discover diners_club jcb]
|
15
15
|
|
16
16
|
def initialize(options={})
|
17
17
|
requires!(options, :account_id, :merchant_pin)
|
@@ -7,7 +7,7 @@ module ActiveMerchant #:nodoc:
|
|
7
7
|
self.v4_live_url = 'https://ps1.merchantware.net/Merchantware/ws/RetailTransaction/v4/Credit.asmx'
|
8
8
|
|
9
9
|
self.supported_countries = ['US']
|
10
|
-
self.supported_cardtypes = [
|
10
|
+
self.supported_cardtypes = %i[visa master american_express discover]
|
11
11
|
self.homepage_url = 'http://merchantwarehouse.com/merchantware'
|
12
12
|
self.display_name = 'MerchantWARE'
|
13
13
|
|
@@ -5,7 +5,7 @@ module ActiveMerchant #:nodoc:
|
|
5
5
|
self.test_url = 'https://ps1.merchantware.net/Merchantware/ws/RetailTransaction/v4/Credit.asmx'
|
6
6
|
|
7
7
|
self.supported_countries = ['US']
|
8
|
-
self.supported_cardtypes = [
|
8
|
+
self.supported_cardtypes = %i[visa master american_express discover]
|
9
9
|
self.homepage_url = 'http://merchantwarehouse.com/merchantware'
|
10
10
|
self.display_name = 'MerchantWARE'
|
11
11
|
|
@@ -11,8 +11,8 @@ module ActiveMerchant #:nodoc:
|
|
11
11
|
POST_LIVE_URL = 'https://api.merchantwarrior.com/post/'
|
12
12
|
|
13
13
|
self.supported_countries = ['AU']
|
14
|
-
self.supported_cardtypes = [
|
15
|
-
|
14
|
+
self.supported_cardtypes = %i[visa master american_express
|
15
|
+
diners_club discover jcb]
|
16
16
|
self.homepage_url = 'https://www.merchantwarrior.com/'
|
17
17
|
self.display_name = 'Merchant Warrior'
|
18
18
|
|
@@ -18,8 +18,8 @@ module ActiveMerchant #:nodoc:
|
|
18
18
|
|
19
19
|
self.homepage_url = 'http://www.mercurypay.com'
|
20
20
|
self.display_name = 'Mercury'
|
21
|
-
self.supported_countries = [
|
22
|
-
self.supported_cardtypes = [
|
21
|
+
self.supported_countries = %w[US CA]
|
22
|
+
self.supported_cardtypes = %i[visa master american_express discover diners_club jcb]
|
23
23
|
self.default_currency = 'USD'
|
24
24
|
|
25
25
|
STANDARD_ERROR_CODE_MAPPING = {
|
@@ -103,7 +103,7 @@ module ActiveMerchant #:nodoc:
|
|
103
103
|
xml.tag! 'Transaction' do
|
104
104
|
xml.tag! 'TranType', 'Credit'
|
105
105
|
xml.tag! 'TranCode', action
|
106
|
-
xml.tag! 'PartialAuth', 'Allow' if options[:allow_partial_auth] && [
|
106
|
+
xml.tag! 'PartialAuth', 'Allow' if options[:allow_partial_auth] && %w[PreAuth Sale].include?(action)
|
107
107
|
add_invoice(xml, options[:order_id], nil, options)
|
108
108
|
add_reference(xml, 'RecordNumberRequested')
|
109
109
|
add_customer_data(xml, options)
|
@@ -294,7 +294,7 @@ module ActiveMerchant #:nodoc:
|
|
294
294
|
}
|
295
295
|
end
|
296
296
|
|
297
|
-
SUCCESS_CODES = [
|
297
|
+
SUCCESS_CODES = %w[Approved Success]
|
298
298
|
|
299
299
|
def commit(action, request)
|
300
300
|
response = parse(action, ssl_post(endpoint_url, build_soap_request(request), build_header))
|
@@ -31,7 +31,7 @@ module ActiveMerchant #:nodoc:
|
|
31
31
|
AVS_RESULT_CODE, TRANSACTION_ID, CARD_CODE_RESPONSE_CODE = 5, 6, 38
|
32
32
|
|
33
33
|
self.supported_countries = ['US']
|
34
|
-
self.supported_cardtypes = [
|
34
|
+
self.supported_cardtypes = %i[visa master american_express discover diners_club jcb]
|
35
35
|
self.homepage_url = 'http://www.metricsglobal.com'
|
36
36
|
self.display_name = 'Metrics Global'
|
37
37
|
|
@@ -9,7 +9,7 @@ module ActiveMerchant #:nodoc:
|
|
9
9
|
self.supported_countries = %w(DE)
|
10
10
|
self.default_currency = 'EUR'
|
11
11
|
self.money_format = :cents
|
12
|
-
self.supported_cardtypes = [
|
12
|
+
self.supported_cardtypes = %i[visa master american_express]
|
13
13
|
|
14
14
|
def initialize(options={})
|
15
15
|
requires!(options, :access_key)
|
@@ -175,7 +175,7 @@ module ActiveMerchant #:nodoc:
|
|
175
175
|
|
176
176
|
def authorization_from(response, request_params)
|
177
177
|
session_id = response['sessionId'] || request_params[:sessionId]
|
178
|
-
"#{session_id}|#{response[
|
178
|
+
"#{session_id}|#{response['transactionId']}"
|
179
179
|
end
|
180
180
|
end
|
181
181
|
end
|
@@ -20,7 +20,7 @@ module ActiveMerchant #:nodoc:
|
|
20
20
|
self.supported_countries = %w(AU AE BD BN EG HK ID JO KW LB LK MU MV MY NZ OM PH QA SA SG TT VN)
|
21
21
|
|
22
22
|
# The card types supported by the payment gateway
|
23
|
-
self.supported_cardtypes = [
|
23
|
+
self.supported_cardtypes = %i[visa master american_express diners_club jcb]
|
24
24
|
|
25
25
|
self.money_format = :cents
|
26
26
|
self.currencies_without_fractions = %w(IDR)
|
@@ -8,7 +8,7 @@ module ActiveMerchant #:nodoc:
|
|
8
8
|
TEST_XMLNS = 'https://secure.modpay.com/netservices/test/'
|
9
9
|
|
10
10
|
self.supported_countries = ['US']
|
11
|
-
self.supported_cardtypes = [
|
11
|
+
self.supported_cardtypes = %i[visa master american_express discover]
|
12
12
|
self.homepage_url = 'http://www.modpay.com'
|
13
13
|
self.display_name = 'Modern Payments'
|
14
14
|
|
@@ -14,9 +14,9 @@ module ActiveMerchant #:nodoc:
|
|
14
14
|
self.test_url = 'https://test.monei-api.net/payment/ctpe'
|
15
15
|
self.live_url = 'https://monei-api.net/payment/ctpe'
|
16
16
|
|
17
|
-
self.supported_countries = [
|
17
|
+
self.supported_countries = %w[AD AT BE BG CA CH CY CZ DE DK EE ES FI FO FR GB GI GR HU IE IL IS IT LI LT LU LV MT NL NO PL PT RO SE SI SK TR US VA]
|
18
18
|
self.default_currency = 'EUR'
|
19
|
-
self.supported_cardtypes = [
|
19
|
+
self.supported_cardtypes = %i[visa master maestro jcb american_express]
|
20
20
|
|
21
21
|
self.homepage_url = 'http://www.monei.net/'
|
22
22
|
self.display_name = 'Monei'
|
@@ -13,7 +13,7 @@ module ActiveMerchant #:nodoc:
|
|
13
13
|
self.live_url = 'https://www3.moneris.com/gateway2/servlet/MpgRequest'
|
14
14
|
|
15
15
|
self.supported_countries = ['CA']
|
16
|
-
self.supported_cardtypes = [
|
16
|
+
self.supported_cardtypes = %i[visa master american_express diners_club discover]
|
17
17
|
self.homepage_url = 'http://www.moneris.com/'
|
18
18
|
self.display_name = 'Moneris'
|
19
19
|
|
@@ -417,27 +417,27 @@ module ActiveMerchant #:nodoc:
|
|
417
417
|
|
418
418
|
def actions
|
419
419
|
{
|
420
|
-
'purchase' => [
|
421
|
-
'preauth' => [
|
420
|
+
'purchase' => %i[order_id cust_id amount pan expdate crypt_type avs_info cvd_info track2 pos_code cof_info],
|
421
|
+
'preauth' => %i[order_id cust_id amount pan expdate crypt_type avs_info cvd_info track2 pos_code cof_info],
|
422
422
|
'command' => [:order_id],
|
423
|
-
'refund' => [
|
424
|
-
'indrefund' => [
|
425
|
-
'completion' => [
|
426
|
-
'purchasecorrection' => [
|
427
|
-
'cavv_preauth' => [
|
428
|
-
'cavv_purchase' => [
|
429
|
-
'card_verification' => [
|
430
|
-
'transact' => [
|
423
|
+
'refund' => %i[order_id amount txn_number crypt_type],
|
424
|
+
'indrefund' => %i[order_id cust_id amount pan expdate crypt_type],
|
425
|
+
'completion' => %i[order_id comp_amount txn_number crypt_type],
|
426
|
+
'purchasecorrection' => %i[order_id txn_number crypt_type],
|
427
|
+
'cavv_preauth' => %i[order_id cust_id amount pan expdate cavv crypt_type wallet_indicator],
|
428
|
+
'cavv_purchase' => %i[order_id cust_id amount pan expdate cavv crypt_type wallet_indicator],
|
429
|
+
'card_verification' => %i[order_id cust_id pan expdate crypt_type avs_info cvd_info cof_info],
|
430
|
+
'transact' => %i[order_id cust_id amount pan expdate crypt_type],
|
431
431
|
'Batchcloseall' => [],
|
432
432
|
'opentotals' => [:ecr_number],
|
433
433
|
'batchclose' => [:ecr_number],
|
434
|
-
'res_add_cc' => [
|
435
|
-
'res_temp_add' => [
|
434
|
+
'res_add_cc' => %i[pan expdate crypt_type avs_info cof_info],
|
435
|
+
'res_temp_add' => %i[pan expdate crypt_type duration],
|
436
436
|
'res_delete' => [:data_key],
|
437
|
-
'res_update_cc' => [
|
438
|
-
'res_purchase_cc' => [
|
439
|
-
'res_preauth_cc' => [
|
440
|
-
'res_card_verification_cc' => [
|
437
|
+
'res_update_cc' => %i[data_key pan expdate crypt_type avs_info cof_info],
|
438
|
+
'res_purchase_cc' => %i[data_key order_id cust_id amount crypt_type cof_info],
|
439
|
+
'res_preauth_cc' => %i[data_key order_id cust_id amount crypt_type cof_info],
|
440
|
+
'res_card_verification_cc' => %i[order_id data_key expdate crypt_type cof_info]
|
441
441
|
}
|
442
442
|
end
|
443
443
|
end
|
@@ -8,7 +8,7 @@ module ActiveMerchant #:nodoc:
|
|
8
8
|
self.homepage_url = 'http://mmoa.us/'
|
9
9
|
self.display_name = 'MoneyMovers'
|
10
10
|
self.supported_countries = ['US']
|
11
|
-
self.supported_cardtypes = [
|
11
|
+
self.supported_cardtypes = %i[visa master american_express discover]
|
12
12
|
|
13
13
|
def initialize(options = {})
|
14
14
|
requires!(options, :login, :password)
|
@@ -5,7 +5,7 @@ module ActiveMerchant #:nodoc:
|
|
5
5
|
|
6
6
|
self.supported_countries = ['US']
|
7
7
|
self.default_currency = 'USD'
|
8
|
-
self.supported_cardtypes = [
|
8
|
+
self.supported_cardtypes = %i[visa master american_express discover alelo]
|
9
9
|
|
10
10
|
self.homepage_url = 'https://www.mundipagg.com/'
|
11
11
|
self.display_name = 'Mundipagg'
|
@@ -16,7 +16,7 @@ module ActiveMerchant #:nodoc:
|
|
16
16
|
self.live_periodic_url = 'https://transact.nab.com.au/xmlapi/periodic'
|
17
17
|
|
18
18
|
self.supported_countries = ['AU']
|
19
|
-
self.supported_cardtypes = [
|
19
|
+
self.supported_cardtypes = %i[visa master american_express diners_club jcb]
|
20
20
|
|
21
21
|
self.homepage_url = 'http://transact.nab.com.au'
|
22
22
|
self.display_name = 'NAB Transact'
|
@@ -39,7 +39,7 @@ module ActiveMerchant #:nodoc:
|
|
39
39
|
trigger: 8
|
40
40
|
}
|
41
41
|
|
42
|
-
SUCCESS_CODES = [
|
42
|
+
SUCCESS_CODES = %w[00 08 11 16 77]
|
43
43
|
|
44
44
|
def initialize(options = {})
|
45
45
|
requires!(options, :login, :password)
|
@@ -8,7 +8,7 @@ module ActiveMerchant #:nodoc:
|
|
8
8
|
|
9
9
|
self.supported_countries = ['US']
|
10
10
|
self.default_currency = 'USD'
|
11
|
-
self.supported_cardtypes = [
|
11
|
+
self.supported_cardtypes = %i[visa master american_express discover]
|
12
12
|
|
13
13
|
self.homepage_url = 'http://www.ncrretailonline.com'
|
14
14
|
self.display_name = 'NCR Secure Pay'
|
@@ -24,7 +24,7 @@ module ActiveMerchant
|
|
24
24
|
class NetRegistryGateway < Gateway
|
25
25
|
self.live_url = self.test_url = 'https://paygate.ssllock.net/external2.pl'
|
26
26
|
|
27
|
-
FILTERED_PARAMS = [
|
27
|
+
FILTERED_PARAMS = %w[card_no card_expiry receipt_array]
|
28
28
|
|
29
29
|
self.supported_countries = ['AU']
|
30
30
|
|
@@ -32,7 +32,7 @@ module ActiveMerchant
|
|
32
32
|
# steps in setting up your account, as detailed in
|
33
33
|
# "Programming for NetRegistry's E-commerce Gateway."
|
34
34
|
# [http://rubyurl.com/hNG]
|
35
|
-
self.supported_cardtypes = [
|
35
|
+
self.supported_cardtypes = %i[visa master diners_club american_express jcb]
|
36
36
|
self.display_name = 'NetRegistry'
|
37
37
|
self.homepage_url = 'http://www.netregistry.com.au'
|
38
38
|
|
@@ -7,10 +7,10 @@ module ActiveMerchant #:nodoc:
|
|
7
7
|
self.live_url = 'https://epayment.bbs.no/'
|
8
8
|
|
9
9
|
# The countries the gateway supports merchants from as 2 digit ISO country codes
|
10
|
-
self.supported_countries = [
|
10
|
+
self.supported_countries = %w[NO DK SE FI]
|
11
11
|
|
12
12
|
# The card types supported by the payment gateway
|
13
|
-
self.supported_cardtypes = [
|
13
|
+
self.supported_cardtypes = %i[visa master american_express]
|
14
14
|
|
15
15
|
# The homepage URL of the gateway
|
16
16
|
self.homepage_url = 'http://www.betalingsterminal.no/Netthandel-forside/'
|
@@ -7,14 +7,14 @@ module ActiveMerchant #:nodoc:
|
|
7
7
|
|
8
8
|
self.supported_countries = %w(AF AX AL DZ AS AD AO AI AQ AG AR AM AW AU AT AZ BS BH BD BB BY BE BZ BJ BM BT BO BQ BA BW BV BR IO BN BG BF BI KH CM CA CV KY CF TD CL CN CX CC CO KM CG CD CK CR CI HR CU CW CY CZ DK DJ DM DO EC EG SV GQ ER EE ET FK FO FJ FI FR GF PF TF GA GM GE DE GH GI GR GL GD GP GU GT GG GN GW GY HT HM HN HK HU IS IN ID IR IQ IE IM IL IT JM JP JE JO KZ KE KI KP KR KW KG LA LV LB LS LR LY LI LT LU MO MK MG MW MY MV ML MT MH MQ MR MU YT MX FM MD MC MN ME MS MA MZ MM NA NR NP NC NZ NI NE NG NU NF MP NO OM PK PW PS PA PG PY PE PH PN PL PT PR QA RE RO RU RW BL SH KN LC MF VC WS SM ST SA SN RS SC SL SG SX SK SI SB SO ZA GS SS ES LK PM SD SR SJ SZ SE CH SY TW TJ TZ TH NL TL TG TK TO TT TN TR TM TC TV UG UA AE GB US UM UY UZ VU VA VE VN VG VI WF EH YE ZM ZW)
|
9
9
|
self.default_currency = 'CAD'
|
10
|
-
self.supported_cardtypes = [
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
10
|
+
self.supported_cardtypes = %i[
|
11
|
+
american_express
|
12
|
+
diners_club
|
13
|
+
discover
|
14
|
+
jcb
|
15
|
+
master
|
16
|
+
maestro
|
17
|
+
visa
|
18
18
|
]
|
19
19
|
|
20
20
|
self.money_format = :cents
|
@@ -28,6 +28,10 @@ module ActiveMerchant #:nodoc:
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def purchase(money, payment, options={})
|
31
|
+
# Do a Verification with AVS prior to purchase
|
32
|
+
verification_response = verify(payment, options)
|
33
|
+
return verification_response if verification_response.message != 'OK'
|
34
|
+
|
31
35
|
post = {}
|
32
36
|
add_invoice(post, money, options)
|
33
37
|
add_settle_with_auth(post)
|
@@ -37,6 +41,10 @@ module ActiveMerchant #:nodoc:
|
|
37
41
|
end
|
38
42
|
|
39
43
|
def authorize(money, payment, options={})
|
44
|
+
# Do a Verification with AVS prior to Auth + Settle
|
45
|
+
verification_response = verify(payment, options)
|
46
|
+
return verification_response if verification_response.message != 'OK'
|
47
|
+
|
40
48
|
post = {}
|
41
49
|
add_invoice(post, money, options)
|
42
50
|
add_payment(post, payment, options)
|
@@ -52,14 +60,30 @@ module ActiveMerchant #:nodoc:
|
|
52
60
|
end
|
53
61
|
|
54
62
|
def refund(money, authorization, options={})
|
63
|
+
# If the transactions that are pending, API call needs to be Cancellation
|
64
|
+
settlement_data = get_settlement(authorization)
|
65
|
+
return settlement_data if settlement_data.message != 'OK'
|
66
|
+
|
55
67
|
post = {}
|
56
|
-
|
68
|
+
if settlement_data.params['status'] == 'PENDING' && money == settlement_data.params['amount']
|
69
|
+
post[:status] = 'CANCELLED'
|
70
|
+
commit(:put, "settlements/#{authorization}", post)
|
71
|
+
elsif settlement_data.params['status'] == 'PENDING' && (money < settlement_data.params['amount'] || money > settlement_data.params['amount'])
|
72
|
+
return Response.new(false, 'Transaction not settled. Either do a full refund or try partial refund after settlement.')
|
73
|
+
else
|
74
|
+
add_invoice(post, money, options)
|
57
75
|
|
58
|
-
|
59
|
-
|
60
|
-
|
76
|
+
# Setting merchantRefNumber to a unique id for each refund
|
77
|
+
# This is to support multiple partial refunds for the same order
|
78
|
+
post[:merchantRefNum] = SecureRandom.uuid
|
61
79
|
|
62
|
-
|
80
|
+
commit(:post, "settlements/#{authorization}/refunds", post)
|
81
|
+
end
|
82
|
+
end
|
83
|
+
|
84
|
+
def get_settlement(authorization)
|
85
|
+
post = {}
|
86
|
+
commit(:get, "settlements/#{authorization}", post)
|
63
87
|
end
|
64
88
|
|
65
89
|
def void(authorization, options={})
|
@@ -71,7 +95,7 @@ module ActiveMerchant #:nodoc:
|
|
71
95
|
|
72
96
|
def verify(credit_card, options={})
|
73
97
|
post = {}
|
74
|
-
add_payment(post, credit_card)
|
98
|
+
add_payment(post, credit_card, options)
|
75
99
|
add_order_id(post, options)
|
76
100
|
|
77
101
|
commit(:post, 'verifications', post)
|
@@ -139,14 +163,14 @@ module ActiveMerchant #:nodoc:
|
|
139
163
|
add_order_id(post, options)
|
140
164
|
end
|
141
165
|
|
142
|
-
def add_payment(post,
|
166
|
+
def add_payment(post, credit_card_reference, options = {})
|
143
167
|
post[:card] ||= {}
|
144
|
-
if
|
145
|
-
post[:card][:paymentToken] =
|
168
|
+
if credit_card_reference.is_a?(String)
|
169
|
+
post[:card][:paymentToken] = credit_card_reference
|
146
170
|
else
|
147
|
-
post[:card][:cardNum] =
|
148
|
-
post[:card][:cvv] =
|
149
|
-
post[:card][:cardExpiry] = expdate(
|
171
|
+
post[:card][:cardNum] = credit_card_reference.number
|
172
|
+
post[:card][:cvv] = credit_card_reference.verification_value
|
173
|
+
post[:card][:cardExpiry] = expdate(credit_card_reference)
|
150
174
|
end
|
151
175
|
|
152
176
|
post[:currencyCode] = options[:currency] if options[:currency]
|
@@ -174,7 +198,7 @@ module ActiveMerchant #:nodoc:
|
|
174
198
|
street: address[:address1],
|
175
199
|
city: address[:city],
|
176
200
|
zip: address[:zip],
|
177
|
-
state: address[:state]
|
201
|
+
state: address[:state]
|
178
202
|
}
|
179
203
|
mapped[:country] = country.code(:alpha2).value unless country.blank?
|
180
204
|
|
@@ -202,7 +226,11 @@ module ActiveMerchant #:nodoc:
|
|
202
226
|
params = parameters.to_json unless parameters.nil?
|
203
227
|
response =
|
204
228
|
begin
|
205
|
-
|
229
|
+
if method == :get
|
230
|
+
parse(ssl_request(method, get_url(uri), nil, headers))
|
231
|
+
else
|
232
|
+
parse(ssl_request(method, get_url(uri), params, headers))
|
233
|
+
end
|
206
234
|
rescue ResponseError => e
|
207
235
|
return Response.new(false, 'Invalid Login') if e.response.code == '401'
|
208
236
|
|
@@ -216,7 +244,9 @@ module ActiveMerchant #:nodoc:
|
|
216
244
|
response,
|
217
245
|
test: test?,
|
218
246
|
error_code: error_code_from(response),
|
219
|
-
authorization: authorization_from(success, get_url(uri), method, response)
|
247
|
+
authorization: authorization_from(success, get_url(uri), method, response),
|
248
|
+
avs_result: AVSResult.new(code: response['avsResponse']),
|
249
|
+
cvv_result: CVVResult.new(response['cvvVerification'])
|
220
250
|
)
|
221
251
|
end
|
222
252
|
|