activemerchant 1.107.4 → 1.112.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +63 -0
- data/README.md +3 -3
- 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 +2 -0
- data/lib/active_merchant/billing/credit_card_methods.rb +9 -6
- data/lib/active_merchant/billing/gateways/adyen.rb +23 -12
- data/lib/active_merchant/billing/gateways/allied_wallet.rb +2 -2
- data/lib/active_merchant/billing/gateways/authorize_net.rb +8 -8
- data/lib/active_merchant/billing/gateways/authorize_net_arb.rb +3 -3
- data/lib/active_merchant/billing/gateways/authorize_net_cim.rb +3 -3
- data/lib/active_merchant/billing/gateways/axcessms.rb +1 -1
- data/lib/active_merchant/billing/gateways/balanced.rb +1 -1
- data/lib/active_merchant/billing/gateways/bambora_apac.rb +2 -2
- data/lib/active_merchant/billing/gateways/bank_frick.rb +2 -2
- 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 +4 -4
- data/lib/active_merchant/billing/gateways/blue_snap.rb +1 -1
- data/lib/active_merchant/billing/gateways/borgun.rb +3 -3
- 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 +82 -34
- 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 +4 -4
- 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 +12 -12
- data/lib/active_merchant/billing/gateways/checkout.rb +3 -3
- data/lib/active_merchant/billing/gateways/checkout_v2.rb +2 -2
- data/lib/active_merchant/billing/gateways/citrus_pay.rb +1 -1
- data/lib/active_merchant/billing/gateways/clearhaus.rb +4 -4
- 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 +7 -3
- data/lib/active_merchant/billing/gateways/ct_payment.rb +2 -2
- data/lib/active_merchant/billing/gateways/culqi.rb +1 -1
- data/lib/active_merchant/billing/gateways/cyber_source.rb +67 -19
- data/lib/active_merchant/billing/gateways/d_local.rb +20 -6
- data/lib/active_merchant/billing/gateways/data_cash.rb +1 -1
- data/lib/active_merchant/billing/gateways/decidir.rb +24 -0
- data/lib/active_merchant/billing/gateways/dibs.rb +2 -2
- data/lib/active_merchant/billing/gateways/digitzs.rb +2 -2
- data/lib/active_merchant/billing/gateways/ebanx.rb +4 -4
- data/lib/active_merchant/billing/gateways/efsnet.rb +2 -2
- data/lib/active_merchant/billing/gateways/elavon.rb +5 -4
- data/lib/active_merchant/billing/gateways/element.rb +8 -4
- 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 +2 -2
- data/lib/active_merchant/billing/gateways/exact.rb +3 -3
- data/lib/active_merchant/billing/gateways/ezic.rb +1 -1
- 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 +5 -5
- data/lib/active_merchant/billing/gateways/firstdata_e4_v27.rb +12 -4
- data/lib/active_merchant/billing/gateways/flo2cash.rb +10 -10
- data/lib/active_merchant/billing/gateways/forte.rb +3 -3
- 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 +9 -9
- data/lib/active_merchant/billing/gateways/hps.rb +1 -1
- 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 +1 -1
- data/lib/active_merchant/billing/gateways/iridium.rb +3 -3
- 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 +2 -2
- data/lib/active_merchant/billing/gateways/litle.rb +5 -5
- data/lib/active_merchant/billing/gateways/maxipago.rb +2 -2
- data/lib/active_merchant/billing/gateways/mercado_pago.rb +11 -6
- 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 +3 -3
- data/lib/active_merchant/billing/gateways/netbanx.rb +51 -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 +1 -1
- data/lib/active_merchant/billing/gateways/opp.rb +2 -2
- data/lib/active_merchant/billing/gateways/optimal_payment.rb +4 -4
- data/lib/active_merchant/billing/gateways/orbital.rb +6 -6
- 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 +2 -2
- 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 +3 -3
- 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 +2 -2
- data/lib/active_merchant/billing/gateways/payex.rb +13 -13
- data/lib/active_merchant/billing/gateways/payflow.rb +5 -5
- data/lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb +2 -2
- 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 +1 -1
- 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 +11 -9
- data/lib/active_merchant/billing/gateways/payway.rb +1 -1
- data/lib/active_merchant/billing/gateways/pin.rb +2 -2
- data/lib/active_merchant/billing/gateways/plugnpay.rb +5 -5
- data/lib/active_merchant/billing/gateways/pro_pay.rb +2 -2
- data/lib/active_merchant/billing/gateways/psigate.rb +1 -1
- data/lib/active_merchant/billing/gateways/psl_card.rb +2 -2
- data/lib/active_merchant/billing/gateways/qbms.rb +1 -1
- data/lib/active_merchant/billing/gateways/quantum.rb +4 -4
- data/lib/active_merchant/billing/gateways/quickbooks.rb +6 -6
- 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 +1 -1
- data/lib/active_merchant/billing/gateways/realex.rb +3 -2
- data/lib/active_merchant/billing/gateways/redsys.rb +5 -5
- 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 +3 -3
- 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 +5 -5
- data/lib/active_merchant/billing/gateways/so_easy_pay.rb +7 -7
- data/lib/active_merchant/billing/gateways/spreedly_core.rb +1 -1
- data/lib/active_merchant/billing/gateways/stripe.rb +6 -6
- data/lib/active_merchant/billing/gateways/stripe_payment_intents.rb +21 -2
- data/lib/active_merchant/billing/gateways/swipe_checkout.rb +1 -1
- data/lib/active_merchant/billing/gateways/telr.rb +4 -4
- data/lib/active_merchant/billing/gateways/tns.rb +1 -1
- data/lib/active_merchant/billing/gateways/trans_first.rb +2 -2
- data/lib/active_merchant/billing/gateways/trans_first_transaction_express.rb +1 -1
- data/lib/active_merchant/billing/gateways/transact_pro.rb +3 -3
- data/lib/active_merchant/billing/gateways/transax.rb +1 -1
- data/lib/active_merchant/billing/gateways/trexle.rb +2 -2
- data/lib/active_merchant/billing/gateways/trust_commerce.rb +5 -5
- data/lib/active_merchant/billing/gateways/usa_epay_advanced.rb +6 -6
- data/lib/active_merchant/billing/gateways/usa_epay_transaction.rb +1 -1
- 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 +7 -7
- data/lib/active_merchant/billing/gateways/worldpay_online_payments.rb +1 -1
- data/lib/active_merchant/billing/gateways/worldpay_us.rb +1 -1
- data/lib/active_merchant/connection.rb +40 -42
- data/lib/active_merchant/network_connection_retries.rb +10 -12
- data/lib/active_merchant/version.rb +1 -1
- data/lib/support/gateway_support.rb +1 -1
- metadata +46 -32
@@ -10,7 +10,7 @@ module ActiveMerchant #:nodoc:
|
|
10
10
|
self.supported_countries = ['NZ']
|
11
11
|
self.default_currency = 'NZD'
|
12
12
|
self.money_format = :dollars
|
13
|
-
self.supported_cardtypes = [
|
13
|
+
self.supported_cardtypes = %i[visa master american_express diners_club]
|
14
14
|
|
15
15
|
BRAND_MAP = {
|
16
16
|
'visa' => 'VISA',
|
@@ -142,15 +142,15 @@ module ActiveMerchant #:nodoc:
|
|
142
142
|
end
|
143
143
|
|
144
144
|
def envelope_wrap(action, body)
|
145
|
-
|
146
|
-
<?xml version="1.0" encoding="utf-8"?>
|
147
|
-
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
|
152
|
-
|
153
|
-
</soap12:Envelope>
|
145
|
+
<<~EOS
|
146
|
+
<?xml version="1.0" encoding="utf-8"?>
|
147
|
+
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
|
148
|
+
<soap12:Body>
|
149
|
+
<#{action} xmlns="http://www.flo2cash.co.nz/webservices/paymentwebservice">
|
150
|
+
#{body}
|
151
|
+
</#{action}>
|
152
|
+
</soap12:Body>
|
153
|
+
</soap12:Envelope>
|
154
154
|
EOS
|
155
155
|
end
|
156
156
|
|
@@ -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]
|
14
14
|
|
15
15
|
self.homepage_url = 'https://www.forte.net'
|
16
16
|
self.display_name = 'Forte'
|
@@ -166,7 +166,7 @@ module ActiveMerchant #:nodoc:
|
|
166
166
|
post[:echeck][:routing_number] = payment.routing_number
|
167
167
|
post[:echeck][:account_type] = payment.account_type
|
168
168
|
post[:echeck][:check_number] = payment.number
|
169
|
-
post[:echeck][:sec_code] = options[:sec_code] ||
|
169
|
+
post[:echeck][:sec_code] = options[:sec_code] || 'PPD'
|
170
170
|
end
|
171
171
|
|
172
172
|
def add_credit_card(post, payment)
|
@@ -260,7 +260,7 @@ module ActiveMerchant #:nodoc:
|
|
260
260
|
end
|
261
261
|
|
262
262
|
def transaction_id_from(authorization)
|
263
|
-
transaction_id, _, original_auth_transaction_id,
|
263
|
+
transaction_id, _, original_auth_transaction_id, = split_authorization(authorization)
|
264
264
|
original_auth_transaction_id.present? ? original_auth_transaction_id : transaction_id
|
265
265
|
end
|
266
266
|
end
|
@@ -5,10 +5,10 @@ module ActiveMerchant #:nodoc:
|
|
5
5
|
self.test_url = 'https://sanalposprovtest.garanti.com.tr/VPServlet'
|
6
6
|
|
7
7
|
# The countries the gateway supports merchants from as 2 digit ISO country codes
|
8
|
-
self.supported_countries = [
|
8
|
+
self.supported_countries = %w[US TR]
|
9
9
|
|
10
10
|
# The card types supported by the payment gateway
|
11
|
-
self.supported_cardtypes = [
|
11
|
+
self.supported_cardtypes = %i[visa master american_express discover]
|
12
12
|
|
13
13
|
# The homepage URL of the gateway
|
14
14
|
self.homepage_url = 'https://sanalposweb.garanti.com.tr'
|
@@ -100,6 +100,7 @@ module ActiveMerchant #:nodoc:
|
|
100
100
|
'invoiceNumber' => options[:invoice]
|
101
101
|
}
|
102
102
|
add_airline_data(post, options) if options[:airline_data]
|
103
|
+
add_number_of_installments(post, options) if options[:number_of_installments]
|
103
104
|
end
|
104
105
|
|
105
106
|
def add_airline_data(post, options)
|
@@ -231,6 +232,10 @@ module ActiveMerchant #:nodoc:
|
|
231
232
|
post['fraudFields'] = fraud_fields unless fraud_fields.empty?
|
232
233
|
end
|
233
234
|
|
235
|
+
def add_number_of_installments(post, options)
|
236
|
+
post['order']['additionalInput']['numberOfInstallments'] = options[:number_of_installments] if options[:number_of_installments]
|
237
|
+
end
|
238
|
+
|
234
239
|
def parse(body)
|
235
240
|
JSON.parse(body)
|
236
241
|
end
|
@@ -291,11 +296,11 @@ module ActiveMerchant #:nodoc:
|
|
291
296
|
end
|
292
297
|
|
293
298
|
def auth_digest(action, post, authorization = nil)
|
294
|
-
data =
|
295
|
-
POST
|
296
|
-
#{content_type}
|
297
|
-
#{date}
|
298
|
-
#{uri(action, authorization)}
|
299
|
+
data = <<~EOS
|
300
|
+
POST
|
301
|
+
#{content_type}
|
302
|
+
#{date}
|
303
|
+
#{uri(action, authorization)}
|
299
304
|
EOS
|
300
305
|
digest = OpenSSL::Digest.new('sha256')
|
301
306
|
key = @options[:secret_api_key]
|
@@ -8,7 +8,7 @@ module ActiveMerchant #:nodoc:
|
|
8
8
|
|
9
9
|
self.supported_countries = %w(CA PR US)
|
10
10
|
self.default_currency = 'USD'
|
11
|
-
self.supported_cardtypes = [
|
11
|
+
self.supported_cardtypes = %i[visa master american_express discover diners_club jcb]
|
12
12
|
|
13
13
|
self.homepage_url = 'https://www.globalpaymentsinc.com'
|
14
14
|
self.display_name = 'Global Transport'
|
@@ -12,7 +12,7 @@ module ActiveMerchant #:nodoc:
|
|
12
12
|
self.supported_countries = ['IN']
|
13
13
|
self.default_currency = 'INR'
|
14
14
|
self.money_format = :dollars
|
15
|
-
self.supported_cardtypes = [
|
15
|
+
self.supported_cardtypes = %i[visa master discover diners_club]
|
16
16
|
|
17
17
|
def initialize(options={})
|
18
18
|
requires!(options, :login, :password)
|
@@ -81,14 +81,14 @@ module ActiveMerchant #:nodoc:
|
|
81
81
|
post[:udf2] = escape(options[:email]) if options[:email]
|
82
82
|
if address = (options[:billing_address] || options[:address])
|
83
83
|
post[:udf3] = escape(address[:phone]) if address[:phone]
|
84
|
-
post[:udf4] = escape(
|
85
|
-
#{address[:name]}
|
86
|
-
#{address[:company]}
|
87
|
-
#{address[:address1]}
|
88
|
-
#{address[:address2]}
|
89
|
-
#{address[:city]} #{address[:state]} #{address[:zip]}
|
90
|
-
#{address[:country]}
|
91
|
-
EOA
|
84
|
+
post[:udf4] = escape(<<~EOA)
|
85
|
+
#{address[:name]}
|
86
|
+
#{address[:company]}
|
87
|
+
#{address[:address1]}
|
88
|
+
#{address[:address2]}
|
89
|
+
#{address[:city]} #{address[:state]} #{address[:zip]}
|
90
|
+
#{address[:country]}
|
91
|
+
EOA
|
92
92
|
end
|
93
93
|
end
|
94
94
|
|
@@ -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 jbc diners_club]
|
12
12
|
|
13
13
|
self.homepage_url = 'http://developer.heartlandpaymentsystems.com/SecureSubmit/'
|
14
14
|
self.display_name = 'Heartland Payment Systems'
|
@@ -8,7 +8,7 @@ module ActiveMerchant #:nodoc:
|
|
8
8
|
|
9
9
|
self.supported_countries = %w(AU BR CA CH DE DK ES FI FR GR HK IE IT NL NO PT SE SG TR GB US TH ID PH BE)
|
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://home.iatspayments.com/'
|
14
14
|
self.display_name = 'iATS Payments'
|
@@ -260,7 +260,7 @@ module ActiveMerchant #:nodoc:
|
|
260
260
|
end
|
261
261
|
|
262
262
|
def authorization_from(action, response)
|
263
|
-
if [
|
263
|
+
if %i[store unstore].include?(action)
|
264
264
|
response[:customercode]
|
265
265
|
elsif [:purchase_check].include?(action)
|
266
266
|
response[:transaction_id] ? "#{response[:transaction_id]}|check" : nil
|
@@ -5,7 +5,7 @@ module ActiveMerchant #:nodoc:
|
|
5
5
|
self.live_url = self.test_url = 'https://secure.inspiregateway.net/api/transact.php'
|
6
6
|
|
7
7
|
self.supported_countries = ['US']
|
8
|
-
self.supported_cardtypes = [
|
8
|
+
self.supported_cardtypes = %i[visa master american_express]
|
9
9
|
self.homepage_url = 'http://www.inspiregateway.com'
|
10
10
|
self.display_name = 'Inspire Commerce'
|
11
11
|
|
@@ -8,7 +8,7 @@ module ActiveMerchant #:nodoc:
|
|
8
8
|
self.money_format = :dollars
|
9
9
|
self.default_currency = 'USD'
|
10
10
|
# The card types supported by the payment gateway
|
11
|
-
self.supported_cardtypes = [
|
11
|
+
self.supported_cardtypes = %i[visa master american_express discover]
|
12
12
|
|
13
13
|
# The homepage URL of the gateway
|
14
14
|
self.homepage_url = 'http://www.instapayllc.com'
|
@@ -7,7 +7,7 @@ module ActiveMerchant #:nodoc:
|
|
7
7
|
self.test_url = 'https://demo.ippayments.com.au/interface/api/dts.asmx'
|
8
8
|
|
9
9
|
self.supported_countries = ['AU']
|
10
|
-
self.supported_cardtypes = [
|
10
|
+
self.supported_cardtypes = %i[visa master american_express diners_club jcb]
|
11
11
|
|
12
12
|
self.homepage_url = 'http://www.ippayments.com.au/'
|
13
13
|
self.display_name = 'IPP'
|
@@ -10,12 +10,12 @@ module ActiveMerchant #:nodoc:
|
|
10
10
|
self.live_url = self.test_url = 'https://gw1.iridiumcorp.net/'
|
11
11
|
|
12
12
|
# The countries the gateway supports merchants from as 2 digit ISO country codes
|
13
|
-
self.supported_countries = [
|
13
|
+
self.supported_countries = %w[GB ES]
|
14
14
|
self.default_currency = 'EUR'
|
15
15
|
self.money_format = :cents
|
16
16
|
|
17
17
|
# The card types supported by the payment gateway
|
18
|
-
self.supported_cardtypes = [
|
18
|
+
self.supported_cardtypes = %i[visa master american_express discover maestro jcb diners_club]
|
19
19
|
|
20
20
|
# The homepage URL of the gateway
|
21
21
|
self.homepage_url = 'http://www.iridiumcorp.co.uk/'
|
@@ -288,7 +288,7 @@ module ActiveMerchant #:nodoc:
|
|
288
288
|
|
289
289
|
def build_reference_request(type, money, authorization, options)
|
290
290
|
options[:action] = 'CrossReferenceTransaction'
|
291
|
-
order_id, cross_reference,
|
291
|
+
order_id, cross_reference, = authorization.split(';')
|
292
292
|
build_request(options) do |xml|
|
293
293
|
if money
|
294
294
|
currency = options[:currency] || currency(money)
|
@@ -38,7 +38,7 @@ module ActiveMerchant #:nodoc:
|
|
38
38
|
self.supported_countries = ['US']
|
39
39
|
|
40
40
|
# The card types supported by the payment gateway
|
41
|
-
self.supported_cardtypes = [
|
41
|
+
self.supported_cardtypes = %i[visa master american_express discover]
|
42
42
|
|
43
43
|
# The homepage URL of the gateway
|
44
44
|
self.homepage_url = 'http://www.itransact.com/'
|
@@ -5,10 +5,10 @@ module ActiveMerchant #:nodoc:
|
|
5
5
|
class IveriGateway < Gateway
|
6
6
|
self.live_url = self.test_url = 'https://portal.nedsecure.co.za/iVeriWebService/Service.asmx'
|
7
7
|
|
8
|
-
self.supported_countries = [
|
8
|
+
self.supported_countries = %w[US ZA GB]
|
9
9
|
self.default_currency = 'ZAR'
|
10
10
|
self.money_format = :cents
|
11
|
-
self.supported_cardtypes = [
|
11
|
+
self.supported_cardtypes = %i[visa master american_express]
|
12
12
|
|
13
13
|
self.homepage_url = 'http://www.iveri.com'
|
14
14
|
self.display_name = 'iVeri'
|
@@ -9,7 +9,7 @@ module ActiveMerchant #:nodoc:
|
|
9
9
|
self.supported_countries = %w(AO AQ AR AS AT AU AW AX AZ BA BB BD BE BF BG BH BI BJ BL BM BN BO BQ BQ BR BS BT BV BW BY BZ CA CC CD CF CG CH CI CK CL CM CN CO CR CU CV CW CX CY CZ DE DJ DK DM DO DZ EC EE EG EH ER ES ET FI FJ FK FM FO FR GA GB GD GE GF GG GH GI GL GM GN GP GQ GR GS GT GU GW GY HK HM HN HR HT HU ID IE IL IM IN IO IQ IR IS IT JE JM JO JP KE KG KH KI KM KN KP KR KW KY KZ LA LB LC LI LK LR LS LT LU LV LY MA MC MD ME MF MG MH MK ML MM MN MO MP MQ MR MS MT MU MV MW MX MY MZ NA NC NE NF NG NI NL NO NP NR NU NZ OM PA PE PF PG PH PK PL PM PN PR PS PT PW PY QA RE RO RS RU RW SA SB SC SD SE SG SH SI SJ SK SL SM SN SO SR SS ST SV SX SY SZ TC TD TF TG TH TJ TK TL TM TN TO TR TT TV TW TZ UA UG UM US UY UZ VA VC VE VG VI VN VU WF WS YE YT ZA ZM ZW)
|
10
10
|
self.default_currency = 'EUR'
|
11
11
|
self.currencies_with_three_decimal_places = %w(BHD IQD JOD KWD LWD OMR TND)
|
12
|
-
self.supported_cardtypes = [
|
12
|
+
self.supported_cardtypes = %i[visa master american_express discover diners_club jcb maestro]
|
13
13
|
|
14
14
|
self.homepage_url = 'https://www.ixopay.com'
|
15
15
|
self.display_name = 'Ixopay'
|
@@ -8,10 +8,10 @@ module ActiveMerchant #:nodoc:
|
|
8
8
|
self.live_ca_url = 'https://gateway17.jetpay.com/canada-bb'
|
9
9
|
|
10
10
|
# The countries the gateway supports merchants from as 2 digit ISO country codes
|
11
|
-
self.supported_countries = [
|
11
|
+
self.supported_countries = %w[US CA]
|
12
12
|
|
13
13
|
# The card types supported by the payment gateway
|
14
|
-
self.supported_cardtypes = [
|
14
|
+
self.supported_cardtypes = %i[visa master american_express discover]
|
15
15
|
|
16
16
|
# The homepage URL of the gateway
|
17
17
|
self.homepage_url = 'http://www.jetpay.com/'
|
@@ -6,8 +6,8 @@ module ActiveMerchant #:nodoc:
|
|
6
6
|
|
7
7
|
self.money_format = :cents
|
8
8
|
self.default_currency = 'USD'
|
9
|
-
self.supported_countries = [
|
10
|
-
self.supported_cardtypes = [
|
9
|
+
self.supported_countries = %w[US CA]
|
10
|
+
self.supported_cardtypes = %i[visa master american_express discover]
|
11
11
|
|
12
12
|
self.homepage_url = 'http://www.jetpay.com'
|
13
13
|
self.display_name = 'JetPay'
|
@@ -10,7 +10,7 @@ module ActiveMerchant #:nodoc:
|
|
10
10
|
self.money_format = :cents
|
11
11
|
self.homepage_url = 'https://www.komoju.com/'
|
12
12
|
self.display_name = 'Komoju'
|
13
|
-
self.supported_cardtypes = [
|
13
|
+
self.supported_cardtypes = %i[visa master american_express jcb]
|
14
14
|
|
15
15
|
STANDARD_ERROR_CODE_MAPPING = {
|
16
16
|
'bad_verification_value' => 'incorrect_cvc',
|
@@ -7,10 +7,10 @@ module ActiveMerchant #:nodoc:
|
|
7
7
|
self.test_url = 'https://api-uat.kushkipagos.com/'
|
8
8
|
self.live_url = 'https://api.kushkipagos.com/'
|
9
9
|
|
10
|
-
self.supported_countries = [
|
10
|
+
self.supported_countries = %w[CL CO EC MX PE]
|
11
11
|
self.default_currency = 'USD'
|
12
12
|
self.money_format = :dollars
|
13
|
-
self.supported_cardtypes = [
|
13
|
+
self.supported_cardtypes = %i[visa master american_express discover diners_club alia]
|
14
14
|
|
15
15
|
def initialize(options={})
|
16
16
|
requires!(options, :public_merchant_id, :private_merchant_id)
|
@@ -184,7 +184,7 @@ module ActiveMerchant #:nodoc:
|
|
184
184
|
end
|
185
185
|
|
186
186
|
def ssl_invoke(action, params)
|
187
|
-
if [
|
187
|
+
if %w[void refund].include?(action)
|
188
188
|
ssl_request(:delete, url(action, params), nil, headers(action))
|
189
189
|
else
|
190
190
|
ssl_post(url(action, params), post_data(params), headers(action))
|
@@ -206,7 +206,7 @@ module ActiveMerchant #:nodoc:
|
|
206
206
|
def url(action, params)
|
207
207
|
base_url = test? ? test_url : live_url
|
208
208
|
|
209
|
-
if [
|
209
|
+
if %w[void refund].include?(action)
|
210
210
|
base_url + 'v1/' + ENDPOINT[action] + '/' + params[:ticketNumber].to_s
|
211
211
|
else
|
212
212
|
base_url + 'card/v1/' + ENDPOINT[action]
|
@@ -7,10 +7,10 @@ module ActiveMerchant #:nodoc:
|
|
7
7
|
self.live_url = 'https://gateway.l19tech.com/payments/'
|
8
8
|
self.test_url = 'https://gateway-sb.l19tech.com/payments/'
|
9
9
|
|
10
|
-
self.supported_countries = [
|
10
|
+
self.supported_countries = %w[US CA]
|
11
11
|
self.default_currency = 'USD'
|
12
12
|
self.money_format = :dollars
|
13
|
-
self.supported_cardtypes = [
|
13
|
+
self.supported_cardtypes = %i[visa master american_express discover diners_club jcb]
|
14
14
|
|
15
15
|
RESPONSE_CODE_MAPPING = {
|
16
16
|
'100' => 'Approved',
|
@@ -130,7 +130,7 @@ module ActiveMerchant #:nodoc:
|
|
130
130
|
self.live_url = 'https://secure.linkpt.net:1129/'
|
131
131
|
|
132
132
|
self.supported_countries = ['US']
|
133
|
-
self.supported_cardtypes = [
|
133
|
+
self.supported_cardtypes = %i[visa master american_express discover jcb diners_club]
|
134
134
|
self.homepage_url = 'http://www.linkpoint.com/'
|
135
135
|
self.display_name = 'LinkPoint'
|
136
136
|
|
@@ -169,7 +169,7 @@ module ActiveMerchant #:nodoc:
|
|
169
169
|
def recurring(money, creditcard, options={})
|
170
170
|
ActiveMerchant.deprecated RECURRING_DEPRECATION_MESSAGE
|
171
171
|
|
172
|
-
requires!(options, [
|
172
|
+
requires!(options, %i[periodicity bimonthly monthly biweekly weekly yearly daily], :installments, :order_id)
|
173
173
|
|
174
174
|
options.update(
|
175
175
|
ordertype: 'SALE',
|
@@ -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
|
@@ -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
|
|