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
@@ -23,7 +23,7 @@ module ActiveMerchant #:nodoc:
|
|
23
23
|
quasi: 'Q'
|
24
24
|
}
|
25
25
|
|
26
|
-
SUCCESS_CODES = [
|
26
|
+
SUCCESS_CODES = %w[1 T]
|
27
27
|
SUCCESS_MESSAGE = 'The transaction was approved'
|
28
28
|
FAILURE_MESSAGE = 'The transaction failed'
|
29
29
|
TEST_LOGIN = '104901072025'
|
@@ -31,7 +31,7 @@ module ActiveMerchant #:nodoc:
|
|
31
31
|
self.display_name = 'NETbilling'
|
32
32
|
self.homepage_url = 'http://www.netbilling.com'
|
33
33
|
self.supported_countries = ['US']
|
34
|
-
self.supported_cardtypes = [
|
34
|
+
self.supported_cardtypes = %i[visa master american_express discover jcb diners_club]
|
35
35
|
|
36
36
|
def initialize(options = {})
|
37
37
|
requires!(options, :login)
|
@@ -42,7 +42,7 @@ module ActiveMerchant #:nodoc:
|
|
42
42
|
self.default_currency = 'MXN'
|
43
43
|
|
44
44
|
# The card types supported by the payment gateway
|
45
|
-
self.supported_cardtypes = [
|
45
|
+
self.supported_cardtypes = %i[visa master american_express diners_club]
|
46
46
|
|
47
47
|
# The homepage URL of the gateway
|
48
48
|
self.homepage_url = 'http://www.netpay.com.mx'
|
@@ -55,7 +55,7 @@ module ActiveMerchant #:nodoc:
|
|
55
55
|
}
|
56
56
|
|
57
57
|
# The header keys that we will provide in the response params hash
|
58
|
-
RESPONSE_KEYS = [
|
58
|
+
RESPONSE_KEYS = %w[ResponseMsg ResponseText ResponseCode TimeIn TimeOut AuthCode OrderId CardTypeName MerchantId IssuerAuthDate]
|
59
59
|
|
60
60
|
def initialize(options = {})
|
61
61
|
requires!(options, :store_id, :login, :password)
|
@@ -4,7 +4,7 @@ module ActiveMerchant #:nodoc:
|
|
4
4
|
self.live_url = self.test_url = 'https://secure.networkmerchants.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
|
|
9
9
|
self.homepage_url = 'http://www.nmi.com/'
|
10
10
|
self.display_name = 'Network Merchants (NMI)'
|
@@ -9,7 +9,7 @@ module ActiveMerchant #:nodoc:
|
|
9
9
|
self.default_currency = 'USD'
|
10
10
|
self.money_format = :dollars
|
11
11
|
self.supported_countries = ['US']
|
12
|
-
self.supported_cardtypes = [
|
12
|
+
self.supported_cardtypes = %i[visa master american_express discover]
|
13
13
|
self.homepage_url = 'http://nmi.com/'
|
14
14
|
self.display_name = 'NMI'
|
15
15
|
|
@@ -138,7 +138,7 @@ module ActiveMerchant #:nodoc:
|
|
138
138
|
private
|
139
139
|
|
140
140
|
def add_level3_fields(post, options)
|
141
|
-
add_fields_to_post_if_present(post, options, [
|
141
|
+
add_fields_to_post_if_present(post, options, %i[tax shipping ponumber])
|
142
142
|
end
|
143
143
|
|
144
144
|
def add_invoice(post, money, options)
|
@@ -154,7 +154,7 @@ module ActiveMerchant #:nodoc:
|
|
154
154
|
|
155
155
|
def add_payment_method(post, payment_method, options)
|
156
156
|
if payment_method.is_a?(String)
|
157
|
-
customer_vault_id,
|
157
|
+
customer_vault_id, = split_authorization(payment_method)
|
158
158
|
post[:customer_vault_id] = customer_vault_id
|
159
159
|
elsif payment_method.is_a?(NetworkTokenizationCreditCard)
|
160
160
|
post[:ccnumber] = payment_method.number
|
@@ -249,7 +249,7 @@ module ActiveMerchant #:nodoc:
|
|
249
249
|
end
|
250
250
|
|
251
251
|
def add_reference(post, authorization)
|
252
|
-
transaction_id,
|
252
|
+
transaction_id, = split_authorization(authorization)
|
253
253
|
post[:transactionid] = transaction_id
|
254
254
|
end
|
255
255
|
|
@@ -133,9 +133,9 @@ module ActiveMerchant #:nodoc:
|
|
133
133
|
self.test_url = 'https://secure.ogone.com/ncol/test/'
|
134
134
|
self.live_url = 'https://secure.ogone.com/ncol/prod/'
|
135
135
|
|
136
|
-
self.supported_countries = [
|
136
|
+
self.supported_countries = %w[BE DE FR NL AT CH]
|
137
137
|
# also supports Airplus and UATP
|
138
|
-
self.supported_cardtypes = [
|
138
|
+
self.supported_cardtypes = %i[visa master american_express diners_club discover jcb maestro]
|
139
139
|
self.homepage_url = 'http://www.ogone.com/'
|
140
140
|
self.display_name = 'Ogone'
|
141
141
|
self.default_currency = 'EUR'
|
@@ -5,7 +5,7 @@ module ActiveMerchant #:nodoc:
|
|
5
5
|
self.test_url = 'https://sandbox-api.openpay.mx/v1/'
|
6
6
|
|
7
7
|
self.supported_countries = ['MX']
|
8
|
-
self.supported_cardtypes = [
|
8
|
+
self.supported_cardtypes = %i[visa master american_express carnet]
|
9
9
|
self.homepage_url = 'http://www.openpay.mx/'
|
10
10
|
self.display_name = 'Openpay'
|
11
11
|
self.default_currency = 'MXN'
|
@@ -112,7 +112,7 @@ module ActiveMerchant #:nodoc:
|
|
112
112
|
|
113
113
|
self.supported_countries = %w(AD AI AG AR AU AT BS BB BE BZ BM BR BN BG CA HR CY CZ DK DM EE FI FR DE GR GD GY HK HU IS IN IL IT JP LV LI LT LU MY MT MX MC MS NL PA PL PT KN LC MF VC SM SG SK SI ZA ES SR SE CH TR GB US UY)
|
114
114
|
self.default_currency = 'EUR'
|
115
|
-
self.supported_cardtypes = [
|
115
|
+
self.supported_cardtypes = %i[visa master american_express diners_club discover jcb maestro dankort]
|
116
116
|
|
117
117
|
self.homepage_url = 'https://docs.oppwa.com'
|
118
118
|
self.display_name = 'Open Payment Platform'
|
@@ -5,12 +5,12 @@ module ActiveMerchant #:nodoc:
|
|
5
5
|
self.live_url = 'https://webservices.optimalpayments.com/creditcardWS/CreditCardServlet/v1'
|
6
6
|
|
7
7
|
# The countries the gateway supports merchants from as 2 digit ISO country codes
|
8
|
-
self.supported_countries = [
|
9
|
-
|
10
|
-
|
8
|
+
self.supported_countries = %w[CA US GB AU AT BE BG HR CY CZ DK
|
9
|
+
EE FI DE GR HU IE IT LV LT LU MT
|
10
|
+
NL NO PL PT RO SK SI ES SE CH]
|
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 diners_club]
|
14
14
|
|
15
15
|
# The homepage URL of the gateway
|
16
16
|
self.homepage_url = 'http://www.optimalpayments.com/'
|
@@ -71,16 +71,16 @@ module ActiveMerchant #:nodoc:
|
|
71
71
|
self.live_url = 'https://orbital1.chasepaymentech.com/authorize'
|
72
72
|
self.secondary_live_url = 'https://orbital2.chasepaymentech.com/authorize'
|
73
73
|
|
74
|
-
self.supported_countries = [
|
74
|
+
self.supported_countries = %w[US CA]
|
75
75
|
self.default_currency = 'CAD'
|
76
|
-
self.supported_cardtypes = [
|
76
|
+
self.supported_cardtypes = %i[visa master american_express discover diners_club jcb]
|
77
77
|
|
78
78
|
self.display_name = 'Orbital Paymentech'
|
79
79
|
self.homepage_url = 'http://chasepaymentech.com/'
|
80
80
|
|
81
81
|
self.money_format = :cents
|
82
82
|
|
83
|
-
AVS_SUPPORTED_COUNTRIES = [
|
83
|
+
AVS_SUPPORTED_COUNTRIES = %w[US CA UK GB]
|
84
84
|
|
85
85
|
CURRENCY_CODES = {
|
86
86
|
'AUD' => '036',
|
@@ -181,7 +181,7 @@ module ActiveMerchant #:nodoc:
|
|
181
181
|
USE_ORDER_ID = 'O' # Use OrderID field
|
182
182
|
USE_COMMENTS = 'D' # Use Comments field
|
183
183
|
|
184
|
-
SENSITIVE_FIELDS = [
|
184
|
+
SENSITIVE_FIELDS = %i[account_num cc_account_num]
|
185
185
|
|
186
186
|
def initialize(options = {})
|
187
187
|
requires!(options, :merchant_id)
|
@@ -678,7 +678,7 @@ module ActiveMerchant #:nodoc:
|
|
678
678
|
end
|
679
679
|
|
680
680
|
def success?(response, message_type)
|
681
|
-
if [
|
681
|
+
if %i[refund void].include?(message_type)
|
682
682
|
response[:proc_status] == SUCCESS
|
683
683
|
elsif response[:customer_profile_action]
|
684
684
|
response[:profile_proc_status] == SUCCESS
|
@@ -749,7 +749,7 @@ module ActiveMerchant #:nodoc:
|
|
749
749
|
|
750
750
|
# Append Transaction Reference Number at the end for Refund transactions
|
751
751
|
if action == REFUND
|
752
|
-
tx_ref_num,
|
752
|
+
tx_ref_num, = split_authorization(parameters[:authorization])
|
753
753
|
xml.tag! :TxRefNum, tx_ref_num
|
754
754
|
end
|
755
755
|
|
@@ -32,7 +32,7 @@ module ActiveMerchant #:nodoc:
|
|
32
32
|
|
33
33
|
errors << [:merchant_phone, 'is required to follow "NNN-NNN-NNNN" or "NNN-AAAAAAA" format'] if !empty?(self.merchant_phone) && !self.merchant_phone.match(PHONE_FORMAT_1) && !self.merchant_phone.match(PHONE_FORMAT_2)
|
34
34
|
|
35
|
-
[
|
35
|
+
%i[merchant_email merchant_url].each do |attr|
|
36
36
|
unless self.send(attr).blank?
|
37
37
|
errors << [attr, 'is required to be 13 bytes or less'] if self.send(attr).bytesize > 13
|
38
38
|
end
|
@@ -28,7 +28,7 @@ module ActiveMerchant #:nodoc:
|
|
28
28
|
self.test_url = self.live_url
|
29
29
|
|
30
30
|
self.supported_countries = ['US']
|
31
|
-
self.supported_cardtypes = [
|
31
|
+
self.supported_cardtypes = %i[visa master]
|
32
32
|
self.money_format = :cents
|
33
33
|
self.default_currency = 'USD'
|
34
34
|
self.homepage_url = 'https://www.deepcovelabs.com/raven'
|
@@ -6,7 +6,7 @@ module ActiveMerchant #:nodoc:
|
|
6
6
|
self.supported_countries = ['BR']
|
7
7
|
self.default_currency = 'BRL'
|
8
8
|
self.money_format = :cents
|
9
|
-
self.supported_cardtypes = [
|
9
|
+
self.supported_cardtypes = %i[visa master american_express discover diners_club]
|
10
10
|
|
11
11
|
self.homepage_url = 'https://pagar.me/'
|
12
12
|
self.display_name = 'Pagar.me'
|
@@ -207,7 +207,7 @@ module ActiveMerchant #:nodoc:
|
|
207
207
|
when 'refunded'
|
208
208
|
'Transação estornada'
|
209
209
|
else
|
210
|
-
"Transação com status '#{response[
|
210
|
+
"Transação com status '#{response['status']}'"
|
211
211
|
end
|
212
212
|
elsif failure_from(response)
|
213
213
|
'Transação recusada'
|
@@ -6,7 +6,7 @@ module ActiveMerchant #:nodoc:
|
|
6
6
|
|
7
7
|
self.supported_countries = ['MX']
|
8
8
|
self.default_currency = 'MXN'
|
9
|
-
self.supported_cardtypes = [
|
9
|
+
self.supported_cardtypes = %i[visa master american_express jcb]
|
10
10
|
|
11
11
|
self.homepage_url = 'http://www.pagofacil.net/'
|
12
12
|
self.display_name = 'PagoFacil'
|
@@ -8,7 +8,7 @@ module ActiveMerchant #:nodoc:
|
|
8
8
|
|
9
9
|
self.supported_countries = %w(US CA)
|
10
10
|
self.default_currency = 'USD'
|
11
|
-
self.supported_cardtypes = [
|
11
|
+
self.supported_cardtypes = %i[visa master american_express discover jcb diners_club]
|
12
12
|
|
13
13
|
self.homepage_url = 'http://www.bluefincommerce.com/'
|
14
14
|
self.display_name = 'PayConex'
|
@@ -76,10 +76,10 @@ module ActiveMerchant #:nodoc:
|
|
76
76
|
self.live_url = 'https://www.paygate.co.za/payxml/process.trans'
|
77
77
|
|
78
78
|
# The countries the gateway supports merchants from as 2 digit ISO country codes
|
79
|
-
self.supported_countries = [
|
79
|
+
self.supported_countries = %w[US ZA]
|
80
80
|
|
81
81
|
# The card types supported by the payment gateway
|
82
|
-
self.supported_cardtypes = [
|
82
|
+
self.supported_cardtypes = %i[visa master american_express diners_club]
|
83
83
|
|
84
84
|
# The homepage URL of the gateway
|
85
85
|
self.homepage_url = 'http://paygate.co.za/'
|
@@ -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]
|
9
9
|
|
10
10
|
self.homepage_url = 'http://www.payhub.com/'
|
11
11
|
self.display_name = 'PayHub'
|
@@ -107,7 +107,7 @@ module ActiveMerchant #:nodoc:
|
|
107
107
|
TEST_LOGIN = 'pj-ql-01'
|
108
108
|
TEST_PASSWORD = 'pj-ql-01p'
|
109
109
|
|
110
|
-
SUCCESS_CODES = [
|
110
|
+
SUCCESS_CODES = %w[00 85]
|
111
111
|
SUCCESS_MESSAGE = 'The transaction was approved.'
|
112
112
|
|
113
113
|
FAILURE_MESSAGE = 'The transaction was declined.'
|
@@ -150,7 +150,7 @@ module ActiveMerchant #:nodoc:
|
|
150
150
|
'AB' => 'Aborted because of an upstream system error, please try again later.'
|
151
151
|
}
|
152
152
|
|
153
|
-
self.supported_cardtypes = [
|
153
|
+
self.supported_cardtypes = %i[visa master american_express discover]
|
154
154
|
self.supported_countries = ['US']
|
155
155
|
self.homepage_url = 'http://www.payjunction.com/'
|
156
156
|
self.display_name = 'PayJunction'
|
@@ -241,7 +241,7 @@ module ActiveMerchant #:nodoc:
|
|
241
241
|
def recurring(money, payment_source, options = {})
|
242
242
|
ActiveMerchant.deprecated RECURRING_DEPRECATION_MESSAGE
|
243
243
|
|
244
|
-
requires!(options, [
|
244
|
+
requires!(options, %i[periodicity monthly weekly daily], :payments)
|
245
245
|
|
246
246
|
periodic_type =
|
247
247
|
case options[:periodicity]
|
@@ -10,7 +10,7 @@ module ActiveMerchant #:nodoc:
|
|
10
10
|
self.supported_countries = ['US']
|
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]
|
14
14
|
|
15
15
|
def initialize(options={})
|
16
16
|
requires!(options, :api_login, :api_password, :api_key)
|
@@ -146,7 +146,7 @@ module ActiveMerchant #:nodoc:
|
|
146
146
|
end
|
147
147
|
|
148
148
|
def ssl_invoke(action, params)
|
149
|
-
if [
|
149
|
+
if %w[purchase authorize refund credit].include?(action)
|
150
150
|
ssl_post(url(), post_data(params), headers)
|
151
151
|
else
|
152
152
|
ssl_request(:put, url(params), post_data(params), headers)
|
@@ -20,7 +20,7 @@ module ActiveMerchant #:nodoc:
|
|
20
20
|
self.supported_countries = ['AU']
|
21
21
|
self.homepage_url = 'http://www.commsecure.com.au/paysecure.shtml'
|
22
22
|
self.display_name = 'PaySecure'
|
23
|
-
self.supported_cardtypes = [
|
23
|
+
self.supported_cardtypes = %i[visa master american_express diners_club]
|
24
24
|
|
25
25
|
def initialize(options = {})
|
26
26
|
requires!(options, :login, :password)
|
@@ -39,7 +39,7 @@ module ActiveMerchant #:nodoc:
|
|
39
39
|
}
|
40
40
|
|
41
41
|
SUCCESS_CODES = ['00000']
|
42
|
-
UNAVAILABILITY_CODES = [
|
42
|
+
UNAVAILABILITY_CODES = %w[00001 00097 00098]
|
43
43
|
SUCCESS_MESSAGE = 'The transaction was approved'
|
44
44
|
FAILURE_MESSAGE = 'The transaction failed'
|
45
45
|
|
@@ -51,7 +51,7 @@ module ActiveMerchant #:nodoc:
|
|
51
51
|
self.supported_countries = ['FR']
|
52
52
|
|
53
53
|
# The card types supported by the payment gateway
|
54
|
-
self.supported_cardtypes = [
|
54
|
+
self.supported_cardtypes = %i[visa master american_express diners_club jcb]
|
55
55
|
|
56
56
|
# The homepage URL of the gateway
|
57
57
|
self.homepage_url = 'http://www.paybox.com/'
|
@@ -160,7 +160,7 @@ module ActiveMerchant #:nodoc:
|
|
160
160
|
test: test?,
|
161
161
|
authorization: response[:numappel].to_s + response[:numtrans].to_s,
|
162
162
|
fraud_review: false,
|
163
|
-
sent_params: parameters.delete_if { |key, value| [
|
163
|
+
sent_params: parameters.delete_if { |key, value| %w[porteur dateval cvv].include?(key.to_s) }
|
164
164
|
)
|
165
165
|
end
|
166
166
|
|
@@ -11,7 +11,7 @@ module ActiveMerchant
|
|
11
11
|
self.money_format = :cents
|
12
12
|
self.supported_countries = %w(US CA)
|
13
13
|
|
14
|
-
self.supported_cardtypes = [
|
14
|
+
self.supported_cardtypes = %i[visa master american_express discover jcb diners_club]
|
15
15
|
|
16
16
|
self.homepage_url = 'https://developer.payeezy.com/'
|
17
17
|
self.display_name = 'Payeezy'
|
@@ -136,7 +136,7 @@ module ActiveMerchant
|
|
136
136
|
end
|
137
137
|
|
138
138
|
def add_authorization_info(params, authorization, options = {})
|
139
|
-
transaction_id, transaction_tag, method,
|
139
|
+
transaction_id, transaction_tag, method, = authorization.split('|')
|
140
140
|
params[:method] = method == 'token' ? 'credit_card' : method
|
141
141
|
|
142
142
|
if options[:reversal_id]
|
@@ -12,8 +12,8 @@ module ActiveMerchant #:nodoc:
|
|
12
12
|
self.test_confined_url = 'https://test-confined.payex.com/'
|
13
13
|
|
14
14
|
self.money_format = :cents
|
15
|
-
self.supported_countries = [
|
16
|
-
self.supported_cardtypes = [
|
15
|
+
self.supported_countries = %w[DK FI NO SE]
|
16
|
+
self.supported_cardtypes = %i[visa master american_express discover]
|
17
17
|
self.homepage_url = 'http://payex.com/'
|
18
18
|
self.display_name = 'Payex'
|
19
19
|
self.default_currency = 'EUR'
|
@@ -193,9 +193,9 @@ module ActiveMerchant #:nodoc:
|
|
193
193
|
cancelUrl: nil,
|
194
194
|
clientLanguage: nil
|
195
195
|
}
|
196
|
-
hash_fields = [
|
197
|
-
|
198
|
-
|
196
|
+
hash_fields = %i[accountNumber purchaseOperation price priceArgList currency vat orderID
|
197
|
+
productNumber description clientIPAddress clientIdentifier additionalValues
|
198
|
+
externalID returnUrl view agreementRef cancelUrl clientLanguage]
|
199
199
|
add_request_hash(properties, hash_fields)
|
200
200
|
soap_action = SOAP_ACTIONS[:initialize]
|
201
201
|
request = build_xml_request(soap_action, properties)
|
@@ -213,8 +213,8 @@ module ActiveMerchant #:nodoc:
|
|
213
213
|
cardHolderName: payment_method.name,
|
214
214
|
cardNumberCVC: payment_method.verification_value
|
215
215
|
}
|
216
|
-
hash_fields = [
|
217
|
-
|
216
|
+
hash_fields = %i[accountNumber orderRef transactionType cardNumber cardNumberExpireMonth
|
217
|
+
cardNumberExpireYear cardNumberCVC cardHolderName]
|
218
218
|
add_request_hash(properties, hash_fields)
|
219
219
|
|
220
220
|
soap_action = SOAP_ACTIONS[:purchasecc]
|
@@ -233,7 +233,7 @@ module ActiveMerchant #:nodoc:
|
|
233
233
|
purchaseOperation: is_auth ? 'AUTHORIZATION' : 'SALE',
|
234
234
|
currency: (options[:currency] || default_currency),
|
235
235
|
}
|
236
|
-
hash_fields = [
|
236
|
+
hash_fields = %i[accountNumber agreementRef price productNumber description orderId purchaseOperation currency]
|
237
237
|
add_request_hash(properties, hash_fields)
|
238
238
|
|
239
239
|
soap_action = SOAP_ACTIONS[:autopay]
|
@@ -250,7 +250,7 @@ module ActiveMerchant #:nodoc:
|
|
250
250
|
vatAmount: options[:vat_amount] || 0,
|
251
251
|
additionalValues: ''
|
252
252
|
}
|
253
|
-
hash_fields = [
|
253
|
+
hash_fields = %i[accountNumber transactionNumber amount orderId vatAmount additionalValues]
|
254
254
|
add_request_hash(properties, hash_fields)
|
255
255
|
|
256
256
|
soap_action = SOAP_ACTIONS[:capture]
|
@@ -267,7 +267,7 @@ module ActiveMerchant #:nodoc:
|
|
267
267
|
vatAmount: options[:vat_amount] || 0,
|
268
268
|
additionalValues: ''
|
269
269
|
}
|
270
|
-
hash_fields = [
|
270
|
+
hash_fields = %i[accountNumber transactionNumber amount orderId vatAmount additionalValues]
|
271
271
|
add_request_hash(properties, hash_fields)
|
272
272
|
|
273
273
|
soap_action = SOAP_ACTIONS[:credit]
|
@@ -280,7 +280,7 @@ module ActiveMerchant #:nodoc:
|
|
280
280
|
accountNumber: @options[:account],
|
281
281
|
transactionNumber: transaction_number,
|
282
282
|
}
|
283
|
-
hash_fields = [
|
283
|
+
hash_fields = %i[accountNumber transactionNumber]
|
284
284
|
add_request_hash(properties, hash_fields)
|
285
285
|
|
286
286
|
soap_action = SOAP_ACTIONS[:cancel]
|
@@ -299,7 +299,7 @@ module ActiveMerchant #:nodoc:
|
|
299
299
|
startDate: options[:startDate] || '',
|
300
300
|
stopDate: options[:stopDate] || ''
|
301
301
|
}
|
302
|
-
hash_fields = [
|
302
|
+
hash_fields = %i[accountNumber merchantRef description purchaseOperation maxAmount notifyUrl startDate stopDate]
|
303
303
|
add_request_hash(properties, hash_fields)
|
304
304
|
|
305
305
|
soap_action = SOAP_ACTIONS[:create_agreement]
|
@@ -312,7 +312,7 @@ module ActiveMerchant #:nodoc:
|
|
312
312
|
accountNumber: @options[:account],
|
313
313
|
agreementRef: authorization,
|
314
314
|
}
|
315
|
-
hash_fields = [
|
315
|
+
hash_fields = %i[accountNumber agreementRef]
|
316
316
|
add_request_hash(properties, hash_fields)
|
317
317
|
|
318
318
|
soap_action = SOAP_ACTIONS[:delete_agreement]
|