activemerchant 1.108.0 → 1.109.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +28 -0
- 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 +8 -8
- data/lib/active_merchant/billing/gateways/allied_wallet.rb +2 -2
- data/lib/active_merchant/billing/gateways/authorize_net.rb +7 -7
- 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 +2 -2
- 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 +78 -28
- 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 +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 +6 -2
- 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 +13 -4
- 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/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 +1 -1
- data/lib/active_merchant/billing/gateways/element.rb +3 -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 +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 +4 -4
- 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 +3 -3
- data/lib/active_merchant/billing/gateways/flo2cash.rb +10 -10
- 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 +5 -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 +4 -4
- 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 +2 -2
- data/lib/active_merchant/billing/gateways/netbanx.rb +46 -22
- 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 +1 -1
- 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 +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 +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 +6 -7
- 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 +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 +3 -3
- 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 +1 -1
- data/lib/active_merchant/billing/gateways/redsys.rb +4 -4
- 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 +6 -6
- 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 +20 -1
- 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 +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 +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 +6 -6
- 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/version.rb +1 -1
- data/lib/support/gateway_support.rb +1 -1
- metadata +35 -35
@@ -8,9 +8,9 @@ module ActiveMerchant #:nodoc:
|
|
8
8
|
class PayflowGateway < Gateway
|
9
9
|
include PayflowCommonAPI
|
10
10
|
|
11
|
-
RECURRING_ACTIONS = Set.new([
|
11
|
+
RECURRING_ACTIONS = Set.new(%i[add modify cancel inquiry reactivate payment])
|
12
12
|
|
13
|
-
self.supported_cardtypes = [
|
13
|
+
self.supported_cardtypes = %i[visa master american_express jcb discover diners_club]
|
14
14
|
self.homepage_url = 'https://www.paypal.com/cgi-bin/webscr?cmd=_payflow-pro-overview-outside'
|
15
15
|
self.display_name = 'PayPal Payflow Pro'
|
16
16
|
|
@@ -318,7 +318,7 @@ module ActiveMerchant #:nodoc:
|
|
318
318
|
xml.tag! 'RecurringProfiles' do
|
319
319
|
xml.tag! 'RecurringProfile' do
|
320
320
|
xml.tag! action.to_s.capitalize do
|
321
|
-
unless [
|
321
|
+
unless %i[cancel inquiry].include?(action)
|
322
322
|
xml.tag! 'RPData' do
|
323
323
|
xml.tag! 'Name', options[:name] unless options[:name].nil?
|
324
324
|
xml.tag! 'TotalAmt', amount(money), 'Currency' => options[:currency] || currency(money)
|
@@ -329,7 +329,7 @@ module ActiveMerchant #:nodoc:
|
|
329
329
|
xml.tag! 'MaxFailPayments', options[:max_fail_payments] unless options[:max_fail_payments].nil?
|
330
330
|
|
331
331
|
if initial_tx = options[:initial_transaction]
|
332
|
-
requires!(initial_tx, [
|
332
|
+
requires!(initial_tx, %i[type authorization purchase])
|
333
333
|
requires!(initial_tx, :amount) if initial_tx[:type] == :purchase
|
334
334
|
|
335
335
|
xml.tag! 'OptionalTrans', TRANSACTIONS[initial_tx[:type]]
|
@@ -362,7 +362,7 @@ module ActiveMerchant #:nodoc:
|
|
362
362
|
end
|
363
363
|
|
364
364
|
def get_pay_period(options)
|
365
|
-
requires!(options, [
|
365
|
+
requires!(options, %i[periodicity bimonthly monthly biweekly weekly yearly daily semimonthly quadweekly quarterly semiyearly])
|
366
366
|
case options[:periodicity]
|
367
367
|
when :weekly then 'Weekly'
|
368
368
|
when :biweekly then 'Bi-weekly'
|
@@ -11,7 +11,7 @@ module ActiveMerchant #:nodoc:
|
|
11
11
|
@express ||= PayflowExpressUkGateway.new(@options)
|
12
12
|
end
|
13
13
|
|
14
|
-
self.supported_cardtypes = [
|
14
|
+
self.supported_cardtypes = %i[visa master american_express discover]
|
15
15
|
self.supported_countries = ['GB']
|
16
16
|
self.homepage_url = 'https://www.paypal.com/uk/webapps/mpp/pro'
|
17
17
|
self.display_name = 'PayPal Payments Pro (UK)'
|
@@ -13,7 +13,7 @@ module ActiveMerchant #:nodoc:
|
|
13
13
|
# VISA, Mastercard, Diners Club and Farmers cards are supported
|
14
14
|
#
|
15
15
|
# However, regular accounts with DPS only support VISA and Mastercard
|
16
|
-
self.supported_cardtypes = [
|
16
|
+
self.supported_cardtypes = %i[visa master american_express diners_club jcb]
|
17
17
|
|
18
18
|
self.supported_countries = %w[AU FJ GB HK IE MY NZ PG SG US]
|
19
19
|
|
@@ -9,7 +9,7 @@ module ActiveMerchant #:nodoc:
|
|
9
9
|
|
10
10
|
self.supported_countries = %w[MX EC CO BR CL PE]
|
11
11
|
self.default_currency = 'USD'
|
12
|
-
self.supported_cardtypes = %i[visa master american_express diners_club elo]
|
12
|
+
self.supported_cardtypes = %i[visa master american_express diners_club elo alia]
|
13
13
|
|
14
14
|
self.homepage_url = 'https://secure.paymentez.com/'
|
15
15
|
self.display_name = 'Paymentez'
|
@@ -5,7 +5,7 @@ module ActiveMerchant #:nodoc:
|
|
5
5
|
GI GR HR HU IE IL IM IS IT LI LT LU LV MC MT
|
6
6
|
NL NO PL PT RO SE SI SK TR VA)
|
7
7
|
|
8
|
-
self.supported_cardtypes = [
|
8
|
+
self.supported_cardtypes = %i[visa master american_express diners_club discover union_pay jcb]
|
9
9
|
self.homepage_url = 'https://paymill.com'
|
10
10
|
self.display_name = 'PAYMILL'
|
11
11
|
self.money_format = :cents
|
@@ -8,8 +8,8 @@ module ActiveMerchant #:nodoc:
|
|
8
8
|
include PaypalCommonAPI
|
9
9
|
include PaypalRecurringApi
|
10
10
|
|
11
|
-
self.
|
12
|
-
self.
|
11
|
+
self.supported_countries = %w[CA NZ GB US]
|
12
|
+
self.supported_cardtypes = %i[visa master american_express discover]
|
13
13
|
self.homepage_url = 'https://www.paypal.com/us/webapps/mpp/paypal-payments-pro'
|
14
14
|
self.display_name = 'PayPal Payments Pro (US)'
|
15
15
|
|
@@ -4,7 +4,7 @@ module ActiveMerchant #:nodoc:
|
|
4
4
|
module Billing #:nodoc:
|
5
5
|
# The PayPal gateway for PayPal Website Payments Pro Canada only supports Visa and MasterCard
|
6
6
|
class PaypalCaGateway < PaypalGateway
|
7
|
-
self.supported_cardtypes = [
|
7
|
+
self.supported_cardtypes = %i[visa master]
|
8
8
|
self.supported_countries = ['CA']
|
9
9
|
self.homepage_url = 'https://www.paypal.com/cgi-bin/webscr?cmd=_wp-pro-overview-outside'
|
10
10
|
self.display_name = 'PayPal Website Payments Pro (CA)'
|
@@ -4,7 +4,7 @@ module ActiveMerchant #:nodoc:
|
|
4
4
|
self.live_url = self.test_url = 'https://secure.payscout.com/api/transact.php'
|
5
5
|
|
6
6
|
self.supported_countries = ['US']
|
7
|
-
self.supported_cardtypes = [
|
7
|
+
self.supported_cardtypes = %i[visa master american_express discover]
|
8
8
|
self.default_currency = 'USD'
|
9
9
|
self.homepage_url = 'http://www.payscout.com/'
|
10
10
|
self.display_name = 'Payscout'
|
@@ -13,7 +13,7 @@ module ActiveMerchant #:nodoc:
|
|
13
13
|
self.supported_countries = ['NZ']
|
14
14
|
|
15
15
|
# TODO: check this with paystation (amex and diners need to be enabled)
|
16
|
-
self.supported_cardtypes = [
|
16
|
+
self.supported_cardtypes = %i[visa master american_express diners_club]
|
17
17
|
|
18
18
|
self.homepage_url = 'http://paystation.co.nz'
|
19
19
|
self.display_name = 'Paystation'
|
@@ -11,7 +11,7 @@ module ActiveMerchant #:nodoc:
|
|
11
11
|
|
12
12
|
self.supported_countries = ['IN']
|
13
13
|
self.default_currency = 'INR'
|
14
|
-
self.supported_cardtypes = [
|
14
|
+
self.supported_cardtypes = %i[visa master american_express diners_club maestro]
|
15
15
|
|
16
16
|
self.homepage_url = 'https://www.payu.in/'
|
17
17
|
self.display_name = 'PayU India'
|
@@ -9,10 +9,10 @@ module ActiveMerchant #:nodoc:
|
|
9
9
|
self.test_url = 'https://sandbox.api.payulatam.com/payments-api/4.0/service.cgi'
|
10
10
|
self.live_url = 'https://api.payulatam.com/payments-api/4.0/service.cgi'
|
11
11
|
|
12
|
-
self.supported_countries = [
|
12
|
+
self.supported_countries = %w[AR BR CL CO MX PA PE]
|
13
13
|
self.default_currency = 'USD'
|
14
14
|
self.money_format = :dollars
|
15
|
-
self.supported_cardtypes = [
|
15
|
+
self.supported_cardtypes = %i[visa master american_express diners_club naranja cabal]
|
16
16
|
|
17
17
|
BRAND_MAP = {
|
18
18
|
'visa' => 'VISA',
|
@@ -96,7 +96,7 @@ module ActiveMerchant #:nodoc:
|
|
96
96
|
post = {}
|
97
97
|
|
98
98
|
add_credentials(post, 'CREATE_TOKEN')
|
99
|
-
add_payment_method_to_be_tokenized(post, payment_method)
|
99
|
+
add_payment_method_to_be_tokenized(post, payment_method, options)
|
100
100
|
|
101
101
|
commit('store', post)
|
102
102
|
end
|
@@ -313,15 +313,14 @@ module ActiveMerchant #:nodoc:
|
|
313
313
|
post[:transaction][:reason] = 'n/a'
|
314
314
|
end
|
315
315
|
|
316
|
-
def add_payment_method_to_be_tokenized(post, payment_method)
|
316
|
+
def add_payment_method_to_be_tokenized(post, payment_method, options)
|
317
317
|
credit_card_token = {}
|
318
|
-
credit_card_token[:payerId] = generate_unique_id
|
318
|
+
credit_card_token[:payerId] = options[:payer_id] || generate_unique_id
|
319
319
|
credit_card_token[:name] = payment_method.name.strip
|
320
|
-
credit_card_token[:identificationNumber] =
|
320
|
+
credit_card_token[:identificationNumber] = options[:dni_number]
|
321
321
|
credit_card_token[:paymentMethod] = BRAND_MAP[payment_method.brand.to_s]
|
322
322
|
credit_card_token[:number] = payment_method.number
|
323
323
|
credit_card_token[:expirationDate] = format(payment_method.year, :four_digits).to_s + '/' + format(payment_method.month, :two_digits).to_s
|
324
|
-
credit_card_token[:securityCode] = payment_method.verification_value
|
325
324
|
post[:creditCardToken] = credit_card_token
|
326
325
|
end
|
327
326
|
|
@@ -4,7 +4,7 @@ module ActiveMerchant
|
|
4
4
|
self.live_url = self.test_url = 'https://ccapi.client.qvalent.com/payway/ccapi'
|
5
5
|
|
6
6
|
self.supported_countries = ['AU']
|
7
|
-
self.supported_cardtypes = [
|
7
|
+
self.supported_cardtypes = %i[visa master diners_club american_express bankcard]
|
8
8
|
self.display_name = 'Pay Way'
|
9
9
|
self.homepage_url = 'http://www.payway.com.au'
|
10
10
|
self.default_currency = 'AUD'
|
@@ -7,7 +7,7 @@ module ActiveMerchant #:nodoc:
|
|
7
7
|
self.default_currency = 'AUD'
|
8
8
|
self.money_format = :cents
|
9
9
|
self.supported_countries = ['AU']
|
10
|
-
self.supported_cardtypes = [
|
10
|
+
self.supported_cardtypes = %i[visa master american_express]
|
11
11
|
self.homepage_url = 'http://www.pinpayments.com/'
|
12
12
|
self.display_name = 'Pin Payments'
|
13
13
|
|
@@ -3,8 +3,8 @@ module ActiveMerchant
|
|
3
3
|
class PlugnpayGateway < Gateway
|
4
4
|
class PlugnpayPostData < PostData
|
5
5
|
# Fields that will be sent even if they are blank
|
6
|
-
self.required_fields = [
|
7
|
-
|
6
|
+
self.required_fields = %i[publisher_name publisher_password
|
7
|
+
card_amount card_name card_number card_exp orderID]
|
8
8
|
end
|
9
9
|
self.live_url = self.test_url = 'https://pay1.plugnpay.com/payment/pnpremote.cgi'
|
10
10
|
|
@@ -88,12 +88,12 @@ module ActiveMerchant
|
|
88
88
|
credit: 'newreturn'
|
89
89
|
}
|
90
90
|
|
91
|
-
SUCCESS_CODES = [
|
92
|
-
FAILURE_CODES = [
|
91
|
+
SUCCESS_CODES = %w[pending success]
|
92
|
+
FAILURE_CODES = %w[badcard fraud]
|
93
93
|
|
94
94
|
self.default_currency = 'USD'
|
95
95
|
self.supported_countries = ['US']
|
96
|
-
self.supported_cardtypes = [
|
96
|
+
self.supported_cardtypes = %i[visa master american_express discover]
|
97
97
|
self.homepage_url = 'http://www.plugnpay.com/'
|
98
98
|
self.display_name = "Plug'n Pay"
|
99
99
|
|
@@ -6,10 +6,10 @@ module ActiveMerchant #:nodoc:
|
|
6
6
|
self.test_url = 'https://xmltest.propay.com/API/PropayAPI.aspx'
|
7
7
|
self.live_url = 'https://epay.propay.com/api/propayapi.aspx'
|
8
8
|
|
9
|
-
self.supported_countries = [
|
9
|
+
self.supported_countries = %w[US CA]
|
10
10
|
self.default_currency = 'USD'
|
11
11
|
self.money_format = :cents
|
12
|
-
self.supported_cardtypes = [
|
12
|
+
self.supported_cardtypes = %i[visa master american_express discover]
|
13
13
|
|
14
14
|
self.homepage_url = 'https://www.propay.com/'
|
15
15
|
self.display_name = 'ProPay'
|
@@ -38,7 +38,7 @@ module ActiveMerchant #:nodoc:
|
|
38
38
|
self.test_url = 'https://realtimestaging.psigate.com/xml'
|
39
39
|
self.live_url = 'https://realtime.psigate.com/xml'
|
40
40
|
|
41
|
-
self.supported_cardtypes = [
|
41
|
+
self.supported_cardtypes = %i[visa master american_express]
|
42
42
|
self.supported_countries = ['CA']
|
43
43
|
self.homepage_url = 'http://www.psigate.com/'
|
44
44
|
self.display_name = 'Psigate'
|
@@ -21,7 +21,7 @@ module ActiveMerchant
|
|
21
21
|
# American Express, Diners Club, JCB, International Maestro,
|
22
22
|
# Style, Clydesdale Financial Services, Other
|
23
23
|
|
24
|
-
self.supported_cardtypes = [
|
24
|
+
self.supported_cardtypes = %i[visa master american_express diners_club jcb maestro]
|
25
25
|
self.homepage_url = 'http://www.paymentsolutionsltd.com/'
|
26
26
|
self.display_name = 'PSL Payment Solutions'
|
27
27
|
|
@@ -183,7 +183,7 @@ module ActiveMerchant
|
|
183
183
|
address = options[:billing_address] || options[:address]
|
184
184
|
return if address.nil?
|
185
185
|
|
186
|
-
post[:QAAddress] = [
|
186
|
+
post[:QAAddress] = %i[address1 address2 city state].collect { |a| address[a] }.reject(&:blank?).join(' ')
|
187
187
|
post[:QAPostcode] = address[:zip]
|
188
188
|
end
|
189
189
|
|
@@ -11,7 +11,7 @@ module ActiveMerchant #:nodoc:
|
|
11
11
|
self.homepage_url = 'http://payments.intuit.com/'
|
12
12
|
self.display_name = 'QuickBooks Merchant Services'
|
13
13
|
self.default_currency = 'USD'
|
14
|
-
self.supported_cardtypes = [
|
14
|
+
self.supported_cardtypes = %i[visa master discover american_express diners_club jcb]
|
15
15
|
self.supported_countries = ['US']
|
16
16
|
|
17
17
|
TYPES = {
|
@@ -13,7 +13,7 @@ module ActiveMerchant #:nodoc:
|
|
13
13
|
self.live_url = self.test_url = 'https://secure.quantumgateway.com/cgi/xml_requester.php'
|
14
14
|
|
15
15
|
# visa, master, american_express, discover
|
16
|
-
self.supported_cardtypes = [
|
16
|
+
self.supported_cardtypes = %i[visa master american_express discover]
|
17
17
|
self.supported_countries = ['US']
|
18
18
|
self.default_currency = 'USD'
|
19
19
|
self.money_format = :dollars
|
@@ -95,7 +95,7 @@ module ActiveMerchant #:nodoc:
|
|
95
95
|
def build_capture_request(money, authorization, options)
|
96
96
|
xml = Builder::XmlMarkup.new
|
97
97
|
add_common_credit_card_info(xml, 'PREVIOUS_SALE')
|
98
|
-
transaction_id,
|
98
|
+
transaction_id, = authorization_parts_from(authorization)
|
99
99
|
add_transaction_id(xml, transaction_id)
|
100
100
|
xml.target!
|
101
101
|
end
|
@@ -116,7 +116,7 @@ module ActiveMerchant #:nodoc:
|
|
116
116
|
def build_void_request(authorization, options)
|
117
117
|
xml = Builder::XmlMarkup.new
|
118
118
|
add_common_credit_card_info(xml, 'VOID')
|
119
|
-
transaction_id,
|
119
|
+
transaction_id, = authorization_parts_from(authorization)
|
120
120
|
add_transaction_id(xml, transaction_id)
|
121
121
|
xml.target!
|
122
122
|
end
|
@@ -6,7 +6,7 @@ module ActiveMerchant #:nodoc:
|
|
6
6
|
|
7
7
|
self.supported_countries = ['US']
|
8
8
|
self.default_currency = 'USD'
|
9
|
-
self.supported_cardtypes = [
|
9
|
+
self.supported_cardtypes = %i[visa master american_express discover diners]
|
10
10
|
|
11
11
|
self.homepage_url = 'http://payments.intuit.com'
|
12
12
|
self.display_name = 'QuickBooks Payments'
|
@@ -83,7 +83,7 @@ module ActiveMerchant #:nodoc:
|
|
83
83
|
|
84
84
|
def capture(money, authorization, options = {})
|
85
85
|
post = {}
|
86
|
-
authorization,
|
86
|
+
authorization, = split_authorization(authorization)
|
87
87
|
post[:amount] = localized_amount(money, currency(money))
|
88
88
|
add_context(post, options)
|
89
89
|
|
@@ -95,7 +95,7 @@ module ActiveMerchant #:nodoc:
|
|
95
95
|
post = {}
|
96
96
|
post[:amount] = localized_amount(money, currency(money))
|
97
97
|
add_context(post, options)
|
98
|
-
authorization,
|
98
|
+
authorization, = split_authorization(authorization)
|
99
99
|
|
100
100
|
response = commit(refund_uri(authorization), post)
|
101
101
|
check_token_response(response, refund_uri(authorization), post, options)
|
@@ -239,7 +239,7 @@ module ActiveMerchant #:nodoc:
|
|
239
239
|
def headers(method, uri)
|
240
240
|
return oauth_v2_headers if @options[:refresh_token]
|
241
241
|
|
242
|
-
raise ArgumentError, "Invalid HTTP method: #{method}. Valid methods are :post and :get" unless [
|
242
|
+
raise ArgumentError, "Invalid HTTP method: #{method}. Valid methods are :post and :get" unless %i[post get].include?(method)
|
243
243
|
|
244
244
|
request_uri = URI.parse(uri)
|
245
245
|
|
@@ -323,7 +323,7 @@ module ActiveMerchant #:nodoc:
|
|
323
323
|
def success?(response)
|
324
324
|
return FRAUD_WARNING_CODES.concat(['0']).include?(response['errors'].first['code']) if response['errors']
|
325
325
|
|
326
|
-
|
326
|
+
!%w[DECLINED CANCELLED].include?(response['status']) && !%w[AuthenticationFailed AuthorizationFailed].include?(response['code'])
|
327
327
|
end
|
328
328
|
|
329
329
|
def message_from(response)
|
@@ -331,7 +331,7 @@ module ActiveMerchant #:nodoc:
|
|
331
331
|
end
|
332
332
|
|
333
333
|
def errors_from(response)
|
334
|
-
if [
|
334
|
+
if %w[AuthenticationFailed AuthorizationFailed].include?(response['code'])
|
335
335
|
response['code']
|
336
336
|
else
|
337
337
|
response['errors'].present? ? STANDARD_ERROR_CODE_MAPPING[response['errors'].first['code']] : ''
|
@@ -168,9 +168,9 @@ module QuickpayCommon
|
|
168
168
|
base.default_currency = 'DKK'
|
169
169
|
base.money_format = :cents
|
170
170
|
|
171
|
-
base.
|
172
|
-
|
173
|
-
|
171
|
+
base.supported_countries = %w[DE DK ES FI FR FO GB IS NO SE]
|
172
|
+
base.supported_cardtypes = %i[dankort forbrugsforeningen visa master
|
173
|
+
american_express diners_club jcb maestro]
|
174
174
|
base.homepage_url = 'http://quickpay.net/'
|
175
175
|
base.display_name = 'QuickPay'
|
176
176
|
end
|
@@ -24,11 +24,11 @@ module ActiveMerchant
|
|
24
24
|
r.process {
|
25
25
|
post = authorization_params(money, credit_card_or_reference, options)
|
26
26
|
add_autocapture(post, false)
|
27
|
-
commit(synchronized_path("/payments/#{r.responses.last.params[
|
27
|
+
commit(synchronized_path("/payments/#{r.responses.last.params['id']}/authorize"), post)
|
28
28
|
}
|
29
29
|
r.process {
|
30
30
|
post = capture_params(money, credit_card_or_reference, options)
|
31
|
-
commit(synchronized_path("/payments/#{r.responses.last.params[
|
31
|
+
commit(synchronized_path("/payments/#{r.responses.last.params['id']}/capture"), post)
|
32
32
|
}
|
33
33
|
end
|
34
34
|
end
|
@@ -42,7 +42,7 @@ module ActiveMerchant
|
|
42
42
|
r.process { create_payment(money, options) }
|
43
43
|
r.process {
|
44
44
|
post = authorization_params(money, credit_card_or_reference, options)
|
45
|
-
commit(synchronized_path("/payments/#{r.responses.last.params[
|
45
|
+
commit(synchronized_path("/payments/#{r.responses.last.params['id']}/authorize"), post)
|
46
46
|
}
|
47
47
|
end
|
48
48
|
end
|
@@ -191,7 +191,7 @@ module ActiveMerchant
|
|
191
191
|
|
192
192
|
post[:shipping_address] = map_address(options[:shipping_address]) if options[:shipping_address]
|
193
193
|
|
194
|
-
[
|
194
|
+
%i[metadata branding_id variables].each do |field|
|
195
195
|
post[field] = options[field] if options[field]
|
196
196
|
end
|
197
197
|
end
|
@@ -10,7 +10,7 @@ module ActiveMerchant #:nodoc:
|
|
10
10
|
self.supported_countries = ['AU']
|
11
11
|
self.default_currency = 'AUD'
|
12
12
|
self.money_format = :cents
|
13
|
-
self.supported_cardtypes = [
|
13
|
+
self.supported_cardtypes = %i[visa master american_express discover jcb diners]
|
14
14
|
|
15
15
|
CVV_CODE_MAPPING = {
|
16
16
|
'S' => 'D'
|
@@ -31,7 +31,7 @@ module ActiveMerchant
|
|
31
31
|
|
32
32
|
self.money_format = :cents
|
33
33
|
self.default_currency = 'EUR'
|
34
|
-
self.supported_cardtypes = [
|
34
|
+
self.supported_cardtypes = %i[visa master american_express diners_club]
|
35
35
|
self.supported_countries = %w(IE GB FR BE NL LU IT US CA ES)
|
36
36
|
self.homepage_url = 'http://www.realexpayments.com/'
|
37
37
|
self.display_name = 'Realex'
|
@@ -44,7 +44,7 @@ module ActiveMerchant #:nodoc:
|
|
44
44
|
self.money_format = :cents
|
45
45
|
|
46
46
|
# Not all card types may be activated by the bank!
|
47
|
-
self.supported_cardtypes = [
|
47
|
+
self.supported_cardtypes = %i[visa master american_express jcb diners_club unionpay]
|
48
48
|
self.homepage_url = 'http://www.redsys.es/'
|
49
49
|
self.display_name = 'Redsys'
|
50
50
|
|
@@ -225,7 +225,7 @@ module ActiveMerchant #:nodoc:
|
|
225
225
|
data = {}
|
226
226
|
add_action(data, :capture)
|
227
227
|
add_amount(data, money, options)
|
228
|
-
order_id,
|
228
|
+
order_id, = split_authorization(authorization)
|
229
229
|
add_order(data, order_id)
|
230
230
|
data[:description] = options[:description]
|
231
231
|
|
@@ -247,7 +247,7 @@ module ActiveMerchant #:nodoc:
|
|
247
247
|
data = {}
|
248
248
|
add_action(data, :refund)
|
249
249
|
add_amount(data, money, options)
|
250
|
-
order_id,
|
250
|
+
order_id, = split_authorization(authorization)
|
251
251
|
add_order(data, order_id)
|
252
252
|
data[:description] = options[:description]
|
253
253
|
|
@@ -480,7 +480,7 @@ module ActiveMerchant #:nodoc:
|
|
480
480
|
else
|
481
481
|
message = 'Response failed validation check'
|
482
482
|
end
|
483
|
-
elsif [
|
483
|
+
elsif %w[iniciaPeticion trataPeticion].include?(action)
|
484
484
|
vxml = Nokogiri::XML(data).remove_namespaces!.xpath("//Envelope/Body/#{action}Response/#{action}Return").inner_text
|
485
485
|
xml = Nokogiri::XML(vxml)
|
486
486
|
node = (action == 'iniciaPeticion' ? 'INFOTARJETA' : 'OPERACION')
|