activemerchant 1.107.2 → 1.110.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +73 -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 +18 -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 +84 -35
- data/lib/active_merchant/billing/gateways/bridge_pay.rb +2 -2
- data/lib/active_merchant/billing/gateways/cams.rb +2 -2
- data/lib/active_merchant/billing/gateways/card_connect.rb +1 -1
- data/lib/active_merchant/billing/gateways/card_save.rb +1 -1
- data/lib/active_merchant/billing/gateways/card_stream.rb +4 -4
- data/lib/active_merchant/billing/gateways/cardknox.rb +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 +72 -23
- data/lib/active_merchant/billing/gateways/d_local.rb +24 -8
- 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 +6 -4
- data/lib/active_merchant/billing/gateways/efsnet.rb +2 -2
- data/lib/active_merchant/billing/gateways/elavon.rb +56 -9
- data/lib/active_merchant/billing/gateways/element.rb +16 -8
- 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 +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 +9 -8
- 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 +3 -3
- 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 +10 -5
- data/lib/active_merchant/billing/gateways/maxipago.rb +2 -2
- data/lib/active_merchant/billing/gateways/mercado_pago.rb +12 -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 +49 -7
- data/lib/active_merchant/billing/gateways/orbital/orbital_soft_descriptors.rb +1 -1
- data/lib/active_merchant/billing/gateways/pac_net_raven.rb +1 -1
- data/lib/active_merchant/billing/gateways/pagarme.rb +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 +7 -8
- 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 +11 -4
- 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 +13 -8
- data/lib/active_merchant/billing/gateways/stripe_payment_intents.rb +46 -3
- 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 +8 -8
- 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 +36 -36
@@ -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
|
@@ -263,6 +263,7 @@ module ActiveMerchant #:nodoc:
|
|
263
263
|
if payment_method.is_a?(String)
|
264
264
|
doc.token do
|
265
265
|
doc.litleToken(payment_method)
|
266
|
+
doc.expDate(format_exp_date(options[:basis_expiration_month], options[:basis_expiration_year])) if options[:basis_expiration_month] && options[:basis_expiration_year]
|
266
267
|
end
|
267
268
|
elsif payment_method.respond_to?(:track_data) && payment_method.track_data.present?
|
268
269
|
doc.card do
|
@@ -416,7 +417,11 @@ module ActiveMerchant #:nodoc:
|
|
416
417
|
end
|
417
418
|
|
418
419
|
def exp_date(payment_method)
|
419
|
-
|
420
|
+
format_exp_date(payment_method.month, payment_method.year)
|
421
|
+
end
|
422
|
+
|
423
|
+
def format_exp_date(month, year)
|
424
|
+
"#{format(month, :two_digits)}#{format(year, :two_digits)}"
|
420
425
|
end
|
421
426
|
|
422
427
|
def parse(kind, xml)
|
@@ -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
|
@@ -113,6 +114,7 @@ module ActiveMerchant #:nodoc:
|
|
113
114
|
|
114
115
|
post[:processing_mode] = options[:processing_mode]
|
115
116
|
post[:merchant_account_id] = options[:merchant_account_id] if options[:merchant_account_id]
|
117
|
+
post[:payment_method_option_id] = options[:payment_method_option_id] if options[:payment_method_option_id]
|
116
118
|
add_merchant_services(post, options)
|
117
119
|
end
|
118
120
|
|
@@ -202,6 +204,10 @@ module ActiveMerchant #:nodoc:
|
|
202
204
|
post[:net_amount] = Float(options[:net_amount]) if options[:net_amount]
|
203
205
|
end
|
204
206
|
|
207
|
+
def add_notification_url(post, options)
|
208
|
+
post[:notification_url] = options[:notification_url] if options[:notification_url]
|
209
|
+
end
|
210
|
+
|
205
211
|
def add_taxes(post, options)
|
206
212
|
return unless (tax_object = options[:taxes])
|
207
213
|
|
@@ -250,7 +256,7 @@ module ActiveMerchant #:nodoc:
|
|
250
256
|
end
|
251
257
|
|
252
258
|
def commit(action, path, parameters)
|
253
|
-
if [
|
259
|
+
if %w[capture void].include?(action)
|
254
260
|
response = parse(ssl_request(:put, url(path), post_data(parameters), headers))
|
255
261
|
else
|
256
262
|
response = parse(ssl_post(url(path), post_data(parameters), headers(parameters)))
|
@@ -270,7 +276,7 @@ module ActiveMerchant #:nodoc:
|
|
270
276
|
if action == 'refund'
|
271
277
|
response['status'] != 404 && response['error'].nil?
|
272
278
|
else
|
273
|
-
[
|
279
|
+
%w[active approved authorized cancelled in_process].include?(response['status'])
|
274
280
|
end
|
275
281
|
end
|
276
282
|
|
@@ -10,7 +10,7 @@ module ActiveMerchant #:nodoc:
|
|
10
10
|
self.supported_countries = ['US']
|
11
11
|
|
12
12
|
# The card types supported by the payment gateway
|
13
|
-
self.supported_cardtypes = [
|
13
|
+
self.supported_cardtypes = %i[visa master american_express discover jcb]
|
14
14
|
|
15
15
|
# The homepage URL of the gateway
|
16
16
|
self.homepage_url = 'http://www.merchante-solutions.com/'
|
@@ -13,7 +13,7 @@ module ActiveMerchant #:nodoc:
|
|
13
13
|
BASE_URL = 'https://secure.merchantonegateway.com/api/transact.php'
|
14
14
|
|
15
15
|
self.supported_countries = ['US']
|
16
|
-
self.supported_cardtypes = [
|
16
|
+
self.supported_cardtypes = %i[visa master american_express discover]
|
17
17
|
self.homepage_url = 'http://merchantone.com/'
|
18
18
|
self.display_name = 'Merchant One Gateway'
|
19
19
|
self.money_format = :dollars
|
@@ -76,7 +76,7 @@ module ActiveMerchant #:nodoc:
|
|
76
76
|
def add_creditcard(post, creditcard)
|
77
77
|
post['cvv'] = creditcard.verification_value
|
78
78
|
post['ccnumber'] = creditcard.number
|
79
|
-
post['ccexp'] = "#{sprintf(
|
79
|
+
post['ccexp'] = "#{sprintf('%02d', creditcard.month)}#{creditcard.year.to_s[-2, 2]}"
|
80
80
|
end
|
81
81
|
|
82
82
|
def commit(action, money, parameters={})
|
@@ -11,7 +11,7 @@ module ActiveMerchant #:nodoc:
|
|
11
11
|
self.supported_countries = ['US']
|
12
12
|
self.default_currency = 'USD'
|
13
13
|
self.money_format = :dollars
|
14
|
-
self.supported_cardtypes = [
|
14
|
+
self.supported_cardtypes = %i[visa master american_express discover diners_club jcb]
|
15
15
|
|
16
16
|
def initialize(options={})
|
17
17
|
requires!(options, :account_id, :merchant_pin)
|
@@ -7,7 +7,7 @@ module ActiveMerchant #:nodoc:
|
|
7
7
|
self.v4_live_url = 'https://ps1.merchantware.net/Merchantware/ws/RetailTransaction/v4/Credit.asmx'
|
8
8
|
|
9
9
|
self.supported_countries = ['US']
|
10
|
-
self.supported_cardtypes = [
|
10
|
+
self.supported_cardtypes = %i[visa master american_express discover]
|
11
11
|
self.homepage_url = 'http://merchantwarehouse.com/merchantware'
|
12
12
|
self.display_name = 'MerchantWARE'
|
13
13
|
|
@@ -5,7 +5,7 @@ module ActiveMerchant #:nodoc:
|
|
5
5
|
self.test_url = 'https://ps1.merchantware.net/Merchantware/ws/RetailTransaction/v4/Credit.asmx'
|
6
6
|
|
7
7
|
self.supported_countries = ['US']
|
8
|
-
self.supported_cardtypes = [
|
8
|
+
self.supported_cardtypes = %i[visa master american_express discover]
|
9
9
|
self.homepage_url = 'http://merchantwarehouse.com/merchantware'
|
10
10
|
self.display_name = 'MerchantWARE'
|
11
11
|
|
@@ -11,8 +11,8 @@ module ActiveMerchant #:nodoc:
|
|
11
11
|
POST_LIVE_URL = 'https://api.merchantwarrior.com/post/'
|
12
12
|
|
13
13
|
self.supported_countries = ['AU']
|
14
|
-
self.supported_cardtypes = [
|
15
|
-
|
14
|
+
self.supported_cardtypes = %i[visa master american_express
|
15
|
+
diners_club discover jcb]
|
16
16
|
self.homepage_url = 'https://www.merchantwarrior.com/'
|
17
17
|
self.display_name = 'Merchant Warrior'
|
18
18
|
|
@@ -18,8 +18,8 @@ module ActiveMerchant #:nodoc:
|
|
18
18
|
|
19
19
|
self.homepage_url = 'http://www.mercurypay.com'
|
20
20
|
self.display_name = 'Mercury'
|
21
|
-
self.supported_countries = [
|
22
|
-
self.supported_cardtypes = [
|
21
|
+
self.supported_countries = %w[US CA]
|
22
|
+
self.supported_cardtypes = %i[visa master american_express discover diners_club jcb]
|
23
23
|
self.default_currency = 'USD'
|
24
24
|
|
25
25
|
STANDARD_ERROR_CODE_MAPPING = {
|
@@ -103,7 +103,7 @@ module ActiveMerchant #:nodoc:
|
|
103
103
|
xml.tag! 'Transaction' do
|
104
104
|
xml.tag! 'TranType', 'Credit'
|
105
105
|
xml.tag! 'TranCode', action
|
106
|
-
xml.tag! 'PartialAuth', 'Allow' if options[:allow_partial_auth] && [
|
106
|
+
xml.tag! 'PartialAuth', 'Allow' if options[:allow_partial_auth] && %w[PreAuth Sale].include?(action)
|
107
107
|
add_invoice(xml, options[:order_id], nil, options)
|
108
108
|
add_reference(xml, 'RecordNumberRequested')
|
109
109
|
add_customer_data(xml, options)
|
@@ -294,7 +294,7 @@ module ActiveMerchant #:nodoc:
|
|
294
294
|
}
|
295
295
|
end
|
296
296
|
|
297
|
-
SUCCESS_CODES = [
|
297
|
+
SUCCESS_CODES = %w[Approved Success]
|
298
298
|
|
299
299
|
def commit(action, request)
|
300
300
|
response = parse(action, ssl_post(endpoint_url, build_soap_request(request), build_header))
|
@@ -31,7 +31,7 @@ module ActiveMerchant #:nodoc:
|
|
31
31
|
AVS_RESULT_CODE, TRANSACTION_ID, CARD_CODE_RESPONSE_CODE = 5, 6, 38
|
32
32
|
|
33
33
|
self.supported_countries = ['US']
|
34
|
-
self.supported_cardtypes = [
|
34
|
+
self.supported_cardtypes = %i[visa master american_express discover diners_club jcb]
|
35
35
|
self.homepage_url = 'http://www.metricsglobal.com'
|
36
36
|
self.display_name = 'Metrics Global'
|
37
37
|
|
@@ -9,7 +9,7 @@ module ActiveMerchant #:nodoc:
|
|
9
9
|
self.supported_countries = %w(DE)
|
10
10
|
self.default_currency = 'EUR'
|
11
11
|
self.money_format = :cents
|
12
|
-
self.supported_cardtypes = [
|
12
|
+
self.supported_cardtypes = %i[visa master american_express]
|
13
13
|
|
14
14
|
def initialize(options={})
|
15
15
|
requires!(options, :access_key)
|
@@ -175,7 +175,7 @@ module ActiveMerchant #:nodoc:
|
|
175
175
|
|
176
176
|
def authorization_from(response, request_params)
|
177
177
|
session_id = response['sessionId'] || request_params[:sessionId]
|
178
|
-
"#{session_id}|#{response[
|
178
|
+
"#{session_id}|#{response['transactionId']}"
|
179
179
|
end
|
180
180
|
end
|
181
181
|
end
|
@@ -20,7 +20,7 @@ module ActiveMerchant #:nodoc:
|
|
20
20
|
self.supported_countries = %w(AU AE BD BN EG HK ID JO KW LB LK MU MV MY NZ OM PH QA SA SG TT VN)
|
21
21
|
|
22
22
|
# The card types supported by the payment gateway
|
23
|
-
self.supported_cardtypes = [
|
23
|
+
self.supported_cardtypes = %i[visa master american_express diners_club jcb]
|
24
24
|
|
25
25
|
self.money_format = :cents
|
26
26
|
self.currencies_without_fractions = %w(IDR)
|
@@ -8,7 +8,7 @@ module ActiveMerchant #:nodoc:
|
|
8
8
|
TEST_XMLNS = 'https://secure.modpay.com/netservices/test/'
|
9
9
|
|
10
10
|
self.supported_countries = ['US']
|
11
|
-
self.supported_cardtypes = [
|
11
|
+
self.supported_cardtypes = %i[visa master american_express discover]
|
12
12
|
self.homepage_url = 'http://www.modpay.com'
|
13
13
|
self.display_name = 'Modern Payments'
|
14
14
|
|
@@ -14,9 +14,9 @@ module ActiveMerchant #:nodoc:
|
|
14
14
|
self.test_url = 'https://test.monei-api.net/payment/ctpe'
|
15
15
|
self.live_url = 'https://monei-api.net/payment/ctpe'
|
16
16
|
|
17
|
-
self.supported_countries = [
|
17
|
+
self.supported_countries = %w[AD AT BE BG CA CH CY CZ DE DK EE ES FI FO FR GB GI GR HU IE IL IS IT LI LT LU LV MT NL NO PL PT RO SE SI SK TR US VA]
|
18
18
|
self.default_currency = 'EUR'
|
19
|
-
self.supported_cardtypes = [
|
19
|
+
self.supported_cardtypes = %i[visa master maestro jcb american_express]
|
20
20
|
|
21
21
|
self.homepage_url = 'http://www.monei.net/'
|
22
22
|
self.display_name = 'Monei'
|
@@ -13,7 +13,7 @@ module ActiveMerchant #:nodoc:
|
|
13
13
|
self.live_url = 'https://www3.moneris.com/gateway2/servlet/MpgRequest'
|
14
14
|
|
15
15
|
self.supported_countries = ['CA']
|
16
|
-
self.supported_cardtypes = [
|
16
|
+
self.supported_cardtypes = %i[visa master american_express diners_club discover]
|
17
17
|
self.homepage_url = 'http://www.moneris.com/'
|
18
18
|
self.display_name = 'Moneris'
|
19
19
|
|
@@ -417,27 +417,27 @@ module ActiveMerchant #:nodoc:
|
|
417
417
|
|
418
418
|
def actions
|
419
419
|
{
|
420
|
-
'purchase' => [
|
421
|
-
'preauth' => [
|
420
|
+
'purchase' => %i[order_id cust_id amount pan expdate crypt_type avs_info cvd_info track2 pos_code cof_info],
|
421
|
+
'preauth' => %i[order_id cust_id amount pan expdate crypt_type avs_info cvd_info track2 pos_code cof_info],
|
422
422
|
'command' => [:order_id],
|
423
|
-
'refund' => [
|
424
|
-
'indrefund' => [
|
425
|
-
'completion' => [
|
426
|
-
'purchasecorrection' => [
|
427
|
-
'cavv_preauth' => [
|
428
|
-
'cavv_purchase' => [
|
429
|
-
'card_verification' => [
|
430
|
-
'transact' => [
|
423
|
+
'refund' => %i[order_id amount txn_number crypt_type],
|
424
|
+
'indrefund' => %i[order_id cust_id amount pan expdate crypt_type],
|
425
|
+
'completion' => %i[order_id comp_amount txn_number crypt_type],
|
426
|
+
'purchasecorrection' => %i[order_id txn_number crypt_type],
|
427
|
+
'cavv_preauth' => %i[order_id cust_id amount pan expdate cavv crypt_type wallet_indicator],
|
428
|
+
'cavv_purchase' => %i[order_id cust_id amount pan expdate cavv crypt_type wallet_indicator],
|
429
|
+
'card_verification' => %i[order_id cust_id pan expdate crypt_type avs_info cvd_info cof_info],
|
430
|
+
'transact' => %i[order_id cust_id amount pan expdate crypt_type],
|
431
431
|
'Batchcloseall' => [],
|
432
432
|
'opentotals' => [:ecr_number],
|
433
433
|
'batchclose' => [:ecr_number],
|
434
|
-
'res_add_cc' => [
|
435
|
-
'res_temp_add' => [
|
434
|
+
'res_add_cc' => %i[pan expdate crypt_type avs_info cof_info],
|
435
|
+
'res_temp_add' => %i[pan expdate crypt_type duration],
|
436
436
|
'res_delete' => [:data_key],
|
437
|
-
'res_update_cc' => [
|
438
|
-
'res_purchase_cc' => [
|
439
|
-
'res_preauth_cc' => [
|
440
|
-
'res_card_verification_cc' => [
|
437
|
+
'res_update_cc' => %i[data_key pan expdate crypt_type avs_info cof_info],
|
438
|
+
'res_purchase_cc' => %i[data_key order_id cust_id amount crypt_type cof_info],
|
439
|
+
'res_preauth_cc' => %i[data_key order_id cust_id amount crypt_type cof_info],
|
440
|
+
'res_card_verification_cc' => %i[order_id data_key expdate crypt_type cof_info]
|
441
441
|
}
|
442
442
|
end
|
443
443
|
end
|