activemerchant 1.108.0 → 1.113.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +69 -0
- data/README.md +2 -2
- data/lib/active_merchant/billing/base.rb +0 -13
- data/lib/active_merchant/billing/check.rb +1 -1
- data/lib/active_merchant/billing/credit_card.rb +3 -1
- data/lib/active_merchant/billing/credit_card_methods.rb +10 -7
- data/lib/active_merchant/billing/gateway.rb +1 -1
- data/lib/active_merchant/billing/gateways/adyen.rb +25 -14
- data/lib/active_merchant/billing/gateways/allied_wallet.rb +2 -2
- data/lib/active_merchant/billing/gateways/authorize_net.rb +13 -13
- data/lib/active_merchant/billing/gateways/authorize_net_arb.rb +3 -3
- data/lib/active_merchant/billing/gateways/authorize_net_cim.rb +4 -4
- data/lib/active_merchant/billing/gateways/axcessms.rb +1 -1
- data/lib/active_merchant/billing/gateways/balanced.rb +2 -2
- data/lib/active_merchant/billing/gateways/bambora_apac.rb +3 -3
- data/lib/active_merchant/billing/gateways/bank_frick.rb +3 -3
- data/lib/active_merchant/billing/gateways/banwire.rb +2 -2
- data/lib/active_merchant/billing/gateways/barclaycard_smartpay.rb +2 -2
- data/lib/active_merchant/billing/gateways/barclays_epdq_extra_plus.rb +1 -1
- data/lib/active_merchant/billing/gateways/be2bill.rb +1 -1
- data/lib/active_merchant/billing/gateways/beanstream/beanstream_core.rb +4 -4
- data/lib/active_merchant/billing/gateways/blue_pay.rb +2 -2
- data/lib/active_merchant/billing/gateways/blue_snap.rb +50 -13
- data/lib/active_merchant/billing/gateways/borgun.rb +4 -4
- data/lib/active_merchant/billing/gateways/bpoint.rb +1 -1
- data/lib/active_merchant/billing/gateways/braintree/braintree_common.rb +1 -1
- data/lib/active_merchant/billing/gateways/braintree_blue.rb +85 -35
- data/lib/active_merchant/billing/gateways/bridge_pay.rb +2 -2
- data/lib/active_merchant/billing/gateways/cams.rb +2 -2
- data/lib/active_merchant/billing/gateways/card_connect.rb +1 -1
- data/lib/active_merchant/billing/gateways/card_save.rb +1 -1
- data/lib/active_merchant/billing/gateways/card_stream.rb +4 -4
- data/lib/active_merchant/billing/gateways/cardknox.rb +5 -5
- data/lib/active_merchant/billing/gateways/cardprocess.rb +1 -1
- data/lib/active_merchant/billing/gateways/cashnet.rb +1 -1
- data/lib/active_merchant/billing/gateways/cecabank.rb +1 -1
- data/lib/active_merchant/billing/gateways/cenpos.rb +13 -13
- data/lib/active_merchant/billing/gateways/checkout.rb +3 -3
- data/lib/active_merchant/billing/gateways/checkout_v2.rb +3 -3
- data/lib/active_merchant/billing/gateways/citrus_pay.rb +1 -1
- data/lib/active_merchant/billing/gateways/clearhaus.rb +3 -3
- data/lib/active_merchant/billing/gateways/commercegate.rb +1 -1
- data/lib/active_merchant/billing/gateways/conekta.rb +1 -1
- data/lib/active_merchant/billing/gateways/creditcall.rb +1 -1
- data/lib/active_merchant/billing/gateways/credorax.rb +13 -3
- data/lib/active_merchant/billing/gateways/ct_payment.rb +2 -2
- data/lib/active_merchant/billing/gateways/culqi.rb +2 -2
- data/lib/active_merchant/billing/gateways/cyber_source.rb +66 -20
- data/lib/active_merchant/billing/gateways/d_local.rb +7 -3
- data/lib/active_merchant/billing/gateways/data_cash.rb +1 -1
- data/lib/active_merchant/billing/gateways/decidir.rb +1 -1
- data/lib/active_merchant/billing/gateways/dibs.rb +2 -2
- data/lib/active_merchant/billing/gateways/digitzs.rb +3 -3
- data/lib/active_merchant/billing/gateways/ebanx.rb +4 -4
- data/lib/active_merchant/billing/gateways/efsnet.rb +3 -3
- data/lib/active_merchant/billing/gateways/elavon.rb +1 -1
- data/lib/active_merchant/billing/gateways/element.rb +7 -3
- data/lib/active_merchant/billing/gateways/epay.rb +3 -3
- data/lib/active_merchant/billing/gateways/evo_ca.rb +1 -1
- data/lib/active_merchant/billing/gateways/eway.rb +1 -1
- data/lib/active_merchant/billing/gateways/eway_managed.rb +1 -1
- data/lib/active_merchant/billing/gateways/eway_rapid.rb +4 -4
- data/lib/active_merchant/billing/gateways/exact.rb +3 -3
- data/lib/active_merchant/billing/gateways/ezic.rb +2 -2
- data/lib/active_merchant/billing/gateways/fat_zebra.rb +9 -7
- data/lib/active_merchant/billing/gateways/federated_canada.rb +1 -1
- data/lib/active_merchant/billing/gateways/finansbank.rb +2 -2
- data/lib/active_merchant/billing/gateways/first_giving.rb +1 -1
- data/lib/active_merchant/billing/gateways/first_pay.rb +1 -1
- data/lib/active_merchant/billing/gateways/firstdata_e4.rb +4 -4
- data/lib/active_merchant/billing/gateways/firstdata_e4_v27.rb +11 -3
- data/lib/active_merchant/billing/gateways/flo2cash.rb +11 -11
- data/lib/active_merchant/billing/gateways/forte.rb +2 -2
- data/lib/active_merchant/billing/gateways/garanti.rb +2 -2
- data/lib/active_merchant/billing/gateways/global_collect.rb +10 -5
- data/lib/active_merchant/billing/gateways/global_transport.rb +1 -1
- data/lib/active_merchant/billing/gateways/hdfc.rb +10 -10
- data/lib/active_merchant/billing/gateways/hps.rb +10 -7
- data/lib/active_merchant/billing/gateways/iats_payments.rb +2 -2
- data/lib/active_merchant/billing/gateways/inspire.rb +1 -1
- data/lib/active_merchant/billing/gateways/instapay.rb +1 -1
- data/lib/active_merchant/billing/gateways/ipp.rb +3 -3
- data/lib/active_merchant/billing/gateways/iridium.rb +5 -5
- data/lib/active_merchant/billing/gateways/itransact.rb +1 -1
- data/lib/active_merchant/billing/gateways/iveri.rb +2 -2
- data/lib/active_merchant/billing/gateways/ixopay.rb +1 -1
- data/lib/active_merchant/billing/gateways/jetpay.rb +2 -2
- data/lib/active_merchant/billing/gateways/jetpay_v2.rb +2 -2
- data/lib/active_merchant/billing/gateways/komoju.rb +1 -1
- data/lib/active_merchant/billing/gateways/kushki.rb +4 -4
- data/lib/active_merchant/billing/gateways/latitude19.rb +2 -2
- data/lib/active_merchant/billing/gateways/linkpoint.rb +3 -3
- data/lib/active_merchant/billing/gateways/litle.rb +5 -5
- data/lib/active_merchant/billing/gateways/mastercard.rb +2 -2
- data/lib/active_merchant/billing/gateways/maxipago.rb +2 -2
- data/lib/active_merchant/billing/gateways/mercado_pago.rb +12 -7
- data/lib/active_merchant/billing/gateways/merchant_e_solutions.rb +1 -1
- data/lib/active_merchant/billing/gateways/merchant_one.rb +2 -2
- data/lib/active_merchant/billing/gateways/merchant_partners.rb +1 -1
- data/lib/active_merchant/billing/gateways/merchant_ware.rb +1 -1
- data/lib/active_merchant/billing/gateways/merchant_ware_version_four.rb +1 -1
- data/lib/active_merchant/billing/gateways/merchant_warrior.rb +2 -2
- data/lib/active_merchant/billing/gateways/mercury.rb +4 -4
- data/lib/active_merchant/billing/gateways/metrics_global.rb +1 -1
- data/lib/active_merchant/billing/gateways/micropayment.rb +2 -2
- data/lib/active_merchant/billing/gateways/migs.rb +1 -1
- data/lib/active_merchant/billing/gateways/modern_payments_cim.rb +1 -1
- data/lib/active_merchant/billing/gateways/monei.rb +2 -2
- data/lib/active_merchant/billing/gateways/moneris.rb +17 -17
- data/lib/active_merchant/billing/gateways/money_movers.rb +1 -1
- data/lib/active_merchant/billing/gateways/mundipagg.rb +1 -1
- data/lib/active_merchant/billing/gateways/nab_transact.rb +2 -2
- data/lib/active_merchant/billing/gateways/ncr_secure_pay.rb +1 -1
- data/lib/active_merchant/billing/gateways/net_registry.rb +2 -2
- data/lib/active_merchant/billing/gateways/netaxept.rb +2 -2
- data/lib/active_merchant/billing/gateways/netbanx.rb +53 -23
- data/lib/active_merchant/billing/gateways/netbilling.rb +2 -2
- data/lib/active_merchant/billing/gateways/netpay.rb +2 -2
- data/lib/active_merchant/billing/gateways/network_merchants.rb +1 -1
- data/lib/active_merchant/billing/gateways/nmi.rb +4 -4
- data/lib/active_merchant/billing/gateways/ogone.rb +2 -2
- data/lib/active_merchant/billing/gateways/omise.rb +1 -1
- data/lib/active_merchant/billing/gateways/openpay.rb +2 -2
- data/lib/active_merchant/billing/gateways/opp.rb +4 -4
- data/lib/active_merchant/billing/gateways/optimal_payment.rb +5 -5
- data/lib/active_merchant/billing/gateways/orbital.rb +14 -7
- data/lib/active_merchant/billing/gateways/orbital/orbital_soft_descriptors.rb +1 -1
- data/lib/active_merchant/billing/gateways/pac_net_raven.rb +1 -1
- data/lib/active_merchant/billing/gateways/pagarme.rb +3 -3
- data/lib/active_merchant/billing/gateways/pago_facil.rb +1 -1
- data/lib/active_merchant/billing/gateways/pay_conex.rb +1 -1
- data/lib/active_merchant/billing/gateways/pay_gate_xml.rb +2 -2
- data/lib/active_merchant/billing/gateways/pay_hub.rb +1 -1
- data/lib/active_merchant/billing/gateways/pay_junction.rb +5 -5
- data/lib/active_merchant/billing/gateways/pay_junction_v2.rb +2 -2
- data/lib/active_merchant/billing/gateways/pay_secure.rb +1 -1
- data/lib/active_merchant/billing/gateways/paybox_direct.rb +3 -3
- data/lib/active_merchant/billing/gateways/payeezy.rb +5 -5
- data/lib/active_merchant/billing/gateways/payex.rb +18 -18
- data/lib/active_merchant/billing/gateways/payflow.rb +8 -5
- data/lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb +2 -2
- data/lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb +1 -1
- data/lib/active_merchant/billing/gateways/payflow_uk.rb +1 -1
- data/lib/active_merchant/billing/gateways/payment_express.rb +1 -1
- data/lib/active_merchant/billing/gateways/paymentez.rb +1 -1
- data/lib/active_merchant/billing/gateways/paymill.rb +4 -4
- data/lib/active_merchant/billing/gateways/paypal.rb +2 -2
- data/lib/active_merchant/billing/gateways/paypal_ca.rb +1 -1
- data/lib/active_merchant/billing/gateways/payscout.rb +1 -1
- data/lib/active_merchant/billing/gateways/paystation.rb +1 -1
- data/lib/active_merchant/billing/gateways/payu_in.rb +1 -1
- data/lib/active_merchant/billing/gateways/payu_latam.rb +10 -8
- data/lib/active_merchant/billing/gateways/payway.rb +1 -1
- data/lib/active_merchant/billing/gateways/pin.rb +1 -1
- data/lib/active_merchant/billing/gateways/plugnpay.rb +6 -6
- data/lib/active_merchant/billing/gateways/pro_pay.rb +2 -2
- data/lib/active_merchant/billing/gateways/psigate.rb +2 -2
- data/lib/active_merchant/billing/gateways/psl_card.rb +2 -2
- data/lib/active_merchant/billing/gateways/qbms.rb +4 -4
- data/lib/active_merchant/billing/gateways/quantum.rb +3 -3
- data/lib/active_merchant/billing/gateways/quickbooks.rb +9 -8
- data/lib/active_merchant/billing/gateways/quickpay/quickpay_common.rb +3 -3
- data/lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb +4 -4
- data/lib/active_merchant/billing/gateways/qvalent.rb +2 -2
- data/lib/active_merchant/billing/gateways/realex.rb +2 -1
- data/lib/active_merchant/billing/gateways/redsys.rb +7 -7
- data/lib/active_merchant/billing/gateways/s5.rb +1 -1
- data/lib/active_merchant/billing/gateways/safe_charge.rb +2 -2
- data/lib/active_merchant/billing/gateways/sage.rb +3 -3
- data/lib/active_merchant/billing/gateways/sage_pay.rb +7 -7
- data/lib/active_merchant/billing/gateways/sallie_mae.rb +1 -1
- data/lib/active_merchant/billing/gateways/secure_net.rb +1 -1
- data/lib/active_merchant/billing/gateways/secure_pay.rb +1 -1
- data/lib/active_merchant/billing/gateways/secure_pay_au.rb +2 -2
- data/lib/active_merchant/billing/gateways/secure_pay_tech.rb +2 -2
- data/lib/active_merchant/billing/gateways/securion_pay.rb +1 -1
- data/lib/active_merchant/billing/gateways/skip_jack.rb +6 -6
- data/lib/active_merchant/billing/gateways/so_easy_pay.rb +6 -6
- data/lib/active_merchant/billing/gateways/spreedly_core.rb +1 -1
- data/lib/active_merchant/billing/gateways/stripe.rb +8 -8
- data/lib/active_merchant/billing/gateways/stripe_payment_intents.rb +20 -1
- data/lib/active_merchant/billing/gateways/swipe_checkout.rb +1 -1
- data/lib/active_merchant/billing/gateways/telr.rb +5 -5
- data/lib/active_merchant/billing/gateways/tns.rb +1 -1
- data/lib/active_merchant/billing/gateways/trans_first.rb +3 -3
- data/lib/active_merchant/billing/gateways/trans_first_transaction_express.rb +3 -3
- data/lib/active_merchant/billing/gateways/transact_pro.rb +1 -1
- data/lib/active_merchant/billing/gateways/transax.rb +1 -1
- data/lib/active_merchant/billing/gateways/trexle.rb +1 -1
- data/lib/active_merchant/billing/gateways/trust_commerce.rb +12 -12
- data/lib/active_merchant/billing/gateways/usa_epay_advanced.rb +10 -10
- data/lib/active_merchant/billing/gateways/usa_epay_transaction.rb +2 -2
- data/lib/active_merchant/billing/gateways/vanco.rb +1 -1
- data/lib/active_merchant/billing/gateways/verifi.rb +3 -3
- data/lib/active_merchant/billing/gateways/viaklix.rb +1 -1
- data/lib/active_merchant/billing/gateways/visanet_peru.rb +3 -3
- data/lib/active_merchant/billing/gateways/webpay.rb +1 -1
- data/lib/active_merchant/billing/gateways/wepay.rb +2 -2
- data/lib/active_merchant/billing/gateways/wirecard.rb +1 -1
- data/lib/active_merchant/billing/gateways/world_net.rb +35 -35
- data/lib/active_merchant/billing/gateways/worldpay.rb +6 -6
- data/lib/active_merchant/billing/gateways/worldpay_online_payments.rb +1 -1
- data/lib/active_merchant/billing/gateways/worldpay_us.rb +3 -3
- data/lib/active_merchant/version.rb +1 -1
- data/lib/support/gateway_support.rb +1 -1
- metadata +45 -31
@@ -9,9 +9,9 @@ module ActiveMerchant #:nodoc:
|
|
9
9
|
self.test_url = 'https://gatewaystage.itstgate.com/SmartPayments/transact3.asmx'
|
10
10
|
self.live_url = 'https://gateway.itstgate.com/SmartPayments/transact3.asmx'
|
11
11
|
|
12
|
-
self.supported_countries = [
|
12
|
+
self.supported_countries = %w[CA US]
|
13
13
|
self.default_currency = 'USD'
|
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, :user_name, :password)
|
@@ -5,7 +5,7 @@ module ActiveMerchant #:nodoc:
|
|
5
5
|
|
6
6
|
self.supported_countries = ['US']
|
7
7
|
self.default_currency = 'USD'
|
8
|
-
self.supported_cardtypes = [
|
8
|
+
self.supported_cardtypes = %i[visa master american_express discover]
|
9
9
|
|
10
10
|
self.homepage_url = 'https://www.centralams.com/'
|
11
11
|
self.display_name = 'CAMS: Central Account Management System'
|
@@ -167,7 +167,7 @@ module ActiveMerchant #:nodoc:
|
|
167
167
|
|
168
168
|
def add_payment(post, payment)
|
169
169
|
post[:ccnumber] = payment.number
|
170
|
-
post[:ccexp] = "#{payment.month.to_s.rjust(2,
|
170
|
+
post[:ccexp] = "#{payment.month.to_s.rjust(2, '0')}#{payment.year.to_s[-2..-1]}"
|
171
171
|
post[:cvv] = payment.verification_value
|
172
172
|
end
|
173
173
|
|
@@ -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]
|
10
10
|
|
11
11
|
self.homepage_url = 'https://cardconnect.com/'
|
12
12
|
self.display_name = 'Card Connect'
|
@@ -6,7 +6,7 @@ module ActiveMerchant #:nodoc:
|
|
6
6
|
|
7
7
|
self.money_format = :cents
|
8
8
|
self.default_currency = 'GBP'
|
9
|
-
self.supported_cardtypes = [
|
9
|
+
self.supported_cardtypes = %i[visa maestro master american_express jcb]
|
10
10
|
self.supported_countries = ['GB']
|
11
11
|
self.homepage_url = 'http://www.cardsave.net/'
|
12
12
|
self.display_name = 'CardSave'
|
@@ -7,8 +7,8 @@ module ActiveMerchant #:nodoc:
|
|
7
7
|
self.money_format = :cents
|
8
8
|
self.default_currency = 'GBP'
|
9
9
|
self.currencies_without_fractions = %w(CVE ISK JPY UGX)
|
10
|
-
self.supported_countries = [
|
11
|
-
self.supported_cardtypes = [
|
10
|
+
self.supported_countries = %w[GB US CH SE SG NO JP IS HK NL CZ CA AU]
|
11
|
+
self.supported_cardtypes = %i[visa master american_express diners_club discover jcb maestro]
|
12
12
|
self.homepage_url = 'http://www.cardstream.com/'
|
13
13
|
self.display_name = 'CardStream'
|
14
14
|
|
@@ -247,7 +247,7 @@ module ActiveMerchant #:nodoc:
|
|
247
247
|
add_pair(post, :statementNarrative1, options[:merchant_name]) if options[:merchant_name]
|
248
248
|
add_pair(post, :statementNarrative2, options[:dynamic_descriptor]) if options[:dynamic_descriptor]
|
249
249
|
if credit_card_or_reference.respond_to?(:number)
|
250
|
-
if [
|
250
|
+
if %w[american_express diners_club].include?(card_brand(credit_card_or_reference).to_s)
|
251
251
|
add_pair(post, :item1Quantity, 1)
|
252
252
|
add_pair(post, :item1Description, (options[:description] || options[:order_id]).slice(0, 15))
|
253
253
|
add_pair(post, :item1GrossValue, localized_amount(money, options[:currency] || currency(money)))
|
@@ -309,7 +309,7 @@ module ActiveMerchant #:nodoc:
|
|
309
309
|
end
|
310
310
|
|
311
311
|
def commit(action, parameters)
|
312
|
-
parameters.update(countryCode: self.supported_countries[0]) unless [
|
312
|
+
parameters.update(countryCode: self.supported_countries[0]) unless %w[CAPTURE CANCEL].include?(action)
|
313
313
|
parameters.update(
|
314
314
|
merchantID: @options[:login],
|
315
315
|
action: action
|
@@ -3,9 +3,9 @@ module ActiveMerchant #:nodoc:
|
|
3
3
|
class CardknoxGateway < Gateway
|
4
4
|
self.live_url = 'https://x1.cardknox.com/gateway'
|
5
5
|
|
6
|
-
self.supported_countries = [
|
6
|
+
self.supported_countries = %w[US CA GB]
|
7
7
|
self.default_currency = 'USD'
|
8
|
-
self.supported_cardtypes = [
|
8
|
+
self.supported_cardtypes = %i[visa master american_express discover diners_club jcb]
|
9
9
|
|
10
10
|
self.homepage_url = 'https://www.cardknox.com/'
|
11
11
|
self.display_name = 'Cardknox'
|
@@ -116,7 +116,7 @@ module ActiveMerchant #:nodoc:
|
|
116
116
|
end
|
117
117
|
|
118
118
|
def add_reference(post, reference)
|
119
|
-
reference,
|
119
|
+
reference, = split_authorization(reference)
|
120
120
|
post[:Refnum] = reference
|
121
121
|
end
|
122
122
|
|
@@ -247,7 +247,7 @@ module ActiveMerchant #:nodoc:
|
|
247
247
|
end
|
248
248
|
|
249
249
|
def add_cardknox_token(post, authorization)
|
250
|
-
_, token,
|
250
|
+
_, token, = split_authorization(authorization)
|
251
251
|
|
252
252
|
post[:Token] = token
|
253
253
|
end
|
@@ -312,7 +312,7 @@ module ActiveMerchant #:nodoc:
|
|
312
312
|
Version: '4.5.4',
|
313
313
|
SoftwareName: 'Active Merchant',
|
314
314
|
SoftwareVersion: ActiveMerchant::VERSION.to_s,
|
315
|
-
Command: command
|
315
|
+
Command: command
|
316
316
|
}
|
317
317
|
|
318
318
|
seed = SecureRandom.hex(32).upcase
|
@@ -8,7 +8,7 @@ module ActiveMerchant #:nodoc:
|
|
8
8
|
MT HU NL AT PL PT RO SI SK FI SE GB IS LI NO
|
9
9
|
CH ME MK AL RS TR BA ]
|
10
10
|
self.default_currency = 'EUR'
|
11
|
-
self.supported_cardtypes = [
|
11
|
+
self.supported_cardtypes = %i[visa master american_express diners_club jcb]
|
12
12
|
|
13
13
|
self.homepage_url = 'https://vr-pay-ecommerce.docs.oppwa.com/'
|
14
14
|
self.display_name = 'CardProcess VR-Pay'
|
@@ -7,7 +7,7 @@ module ActiveMerchant #:nodoc:
|
|
7
7
|
self.test_url = 'https://train.cashnet.com/'
|
8
8
|
|
9
9
|
self.supported_countries = ['US']
|
10
|
-
self.supported_cardtypes = [
|
10
|
+
self.supported_cardtypes = %i[visa master american_express discover diners_club jcb]
|
11
11
|
self.homepage_url = 'http://www.higherone.com/'
|
12
12
|
self.display_name = 'Cashnet'
|
13
13
|
self.money_format = :dollars
|
@@ -5,7 +5,7 @@ module ActiveMerchant #:nodoc:
|
|
5
5
|
self.live_url = 'https://pgw.ceca.es'
|
6
6
|
|
7
7
|
self.supported_countries = ['ES']
|
8
|
-
self.supported_cardtypes = [
|
8
|
+
self.supported_cardtypes = %i[visa master american_express]
|
9
9
|
self.homepage_url = 'http://www.ceca.es/es/'
|
10
10
|
self.display_name = 'Cecabank'
|
11
11
|
self.default_currency = 'EUR'
|
@@ -11,7 +11,7 @@ module ActiveMerchant #:nodoc:
|
|
11
11
|
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 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)
|
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]
|
15
15
|
|
16
16
|
def initialize(options={})
|
17
17
|
requires!(options, :merchant_id, :password, :user_id)
|
@@ -198,17 +198,17 @@ module ActiveMerchant #:nodoc:
|
|
198
198
|
end
|
199
199
|
|
200
200
|
def envelope(body)
|
201
|
-
|
202
|
-
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/" xmlns:acr="http://schemas.datacontract.org/2004/07/Acriter.ABI.CenPOS.EPayment.VirtualTerminal.Common" xmlns:acr1="http://schemas.datacontract.org/2004/07/Acriter.ABI.CenPOS.EPayment.VirtualTerminal.v6.Common" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
203
|
-
<soapenv:Header/>
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
</soapenv:Envelope>
|
201
|
+
<<~EOS
|
202
|
+
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/" xmlns:acr="http://schemas.datacontract.org/2004/07/Acriter.ABI.CenPOS.EPayment.VirtualTerminal.Common" xmlns:acr1="http://schemas.datacontract.org/2004/07/Acriter.ABI.CenPOS.EPayment.VirtualTerminal.v6.Common" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
203
|
+
<soapenv:Header/>
|
204
|
+
<soapenv:Body>
|
205
|
+
<tem:ProcessCreditCard>
|
206
|
+
<tem:request>
|
207
|
+
#{body}
|
208
|
+
</tem:request>
|
209
|
+
</tem:ProcessCreditCard>
|
210
|
+
</soapenv:Body>
|
211
|
+
</soapenv:Envelope>
|
212
212
|
EOS
|
213
213
|
end
|
214
214
|
|
@@ -250,7 +250,7 @@ module ActiveMerchant #:nodoc:
|
|
250
250
|
'257' => STANDARD_ERROR_CODE[:invalid_cvc],
|
251
251
|
'333' => STANDARD_ERROR_CODE[:expired_card],
|
252
252
|
'1' => STANDARD_ERROR_CODE[:card_declined],
|
253
|
-
'99' => STANDARD_ERROR_CODE[:processing_error]
|
253
|
+
'99' => STANDARD_ERROR_CODE[:processing_error]
|
254
254
|
}
|
255
255
|
|
256
256
|
def authorization_from(request, response)
|
@@ -7,8 +7,8 @@ module ActiveMerchant #:nodoc:
|
|
7
7
|
self.default_currency = 'USD'
|
8
8
|
self.money_format = :cents
|
9
9
|
|
10
|
-
self.supported_countries = [
|
11
|
-
self.supported_cardtypes = [
|
10
|
+
self.supported_countries = %w[AD AT BE BG CH CY CZ DE DK EE ES FO FI FR GB GI GL GR HR HU IE IS IL IT LI LT LU LV MC MT NL NO PL PT RO SE SI SM SK SJ TR VA]
|
11
|
+
self.supported_cardtypes = %i[visa master american_express diners_club]
|
12
12
|
|
13
13
|
self.homepage_url = 'https://www.checkout.com/'
|
14
14
|
self.display_name = 'Checkout.com'
|
@@ -150,7 +150,7 @@ module ActiveMerchant #:nodoc:
|
|
150
150
|
end
|
151
151
|
|
152
152
|
def add_reference(xml, authorization)
|
153
|
-
transid, trackid,
|
153
|
+
transid, trackid, = split_authorization(authorization)
|
154
154
|
xml.transid transid
|
155
155
|
add_track_id(xml, trackid)
|
156
156
|
end
|
@@ -6,10 +6,10 @@ module ActiveMerchant #:nodoc:
|
|
6
6
|
self.live_url = 'https://api.checkout.com'
|
7
7
|
self.test_url = 'https://api.sandbox.checkout.com'
|
8
8
|
|
9
|
-
self.supported_countries = [
|
9
|
+
self.supported_countries = %w[AD AE AR AT AU BE BG BH BR CH CL CN CO CY CZ DE DK EE EG ES FI FR GB GR HK HR HU IE IS IT JO JP KW LI LT LU LV MC MT MX MY NL NO NZ OM PE PL PT QA RO SA SE SG SI SK SM TR US]
|
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 diners_club maestro discover]
|
13
13
|
self.currencies_without_fractions = %w(BIF DJF GNF ISK KMF XAF CLF XPF JPY PYG RWF KRW VUV VND XOF)
|
14
14
|
self.currencies_with_three_decimal_places = %w(BHD LYD JOD KWD OMR TND)
|
15
15
|
|
@@ -194,7 +194,7 @@ module ActiveMerchant #:nodoc:
|
|
194
194
|
def headers
|
195
195
|
{
|
196
196
|
'Authorization' => @options[:secret_key],
|
197
|
-
'Content-Type' => 'application/json;charset=UTF-8'
|
197
|
+
'Content-Type' => 'application/json;charset=UTF-8'
|
198
198
|
}
|
199
199
|
end
|
200
200
|
|
@@ -15,7 +15,7 @@ module ActiveMerchant
|
|
15
15
|
self.homepage_url = 'http://www.citruspay.com/'
|
16
16
|
self.supported_countries = %w(AR AU BR FR DE HK MX NZ SG GB US)
|
17
17
|
self.default_currency = 'USD'
|
18
|
-
self.supported_cardtypes = [
|
18
|
+
self.supported_cardtypes = %i[visa master american_express discover diners_club jcb maestro]
|
19
19
|
end
|
20
20
|
end
|
21
21
|
end
|
@@ -4,12 +4,12 @@ module ActiveMerchant #:nodoc:
|
|
4
4
|
self.test_url = 'https://gateway.test.clearhaus.com'
|
5
5
|
self.live_url = 'https://gateway.clearhaus.com'
|
6
6
|
|
7
|
-
self.supported_countries = [
|
8
|
-
|
7
|
+
self.supported_countries = %w[DK NO SE FI DE CH NL AD AT BE BG HR CY CZ FO GL EE FR GR
|
8
|
+
HU IS IE IT LV LI LT LU MT PL PT RO SK SI ES GB]
|
9
9
|
|
10
10
|
self.default_currency = 'EUR'
|
11
11
|
self.currencies_without_fractions = %w(BIF CLP DJF GNF JPY KMF KRW PYG RWF UGX VND VUV XAF XOF XPF)
|
12
|
-
self.supported_cardtypes = [
|
12
|
+
self.supported_cardtypes = %i[visa master]
|
13
13
|
|
14
14
|
self.homepage_url = 'https://www.clearhaus.com'
|
15
15
|
self.display_name = 'Clearhaus'
|
@@ -11,7 +11,7 @@ module ActiveMerchant #:nodoc:
|
|
11
11
|
|
12
12
|
self.money_format = :dollars
|
13
13
|
self.default_currency = 'EUR'
|
14
|
-
self.supported_cardtypes = [
|
14
|
+
self.supported_cardtypes = %i[visa master american_express discover]
|
15
15
|
self.homepage_url = 'http://www.commercegate.com/'
|
16
16
|
self.display_name = 'CommerceGate'
|
17
17
|
|
@@ -4,7 +4,7 @@ module ActiveMerchant #:nodoc:
|
|
4
4
|
self.live_url = 'https://api.conekta.io/'
|
5
5
|
|
6
6
|
self.supported_countries = ['MX']
|
7
|
-
self.supported_cardtypes = [
|
7
|
+
self.supported_cardtypes = %i[visa master american_express carnet]
|
8
8
|
self.homepage_url = 'https://conekta.io/'
|
9
9
|
self.display_name = 'Conekta Gateway'
|
10
10
|
self.money_format = :cents
|
@@ -10,7 +10,7 @@ module ActiveMerchant #:nodoc:
|
|
10
10
|
|
11
11
|
self.supported_countries = ['US']
|
12
12
|
self.default_currency = 'USD'
|
13
|
-
self.supported_cardtypes = [
|
13
|
+
self.supported_cardtypes = %i[visa master american_express discover]
|
14
14
|
|
15
15
|
self.homepage_url = 'https://www.creditcall.com'
|
16
16
|
self.display_name = 'Creditcall'
|
@@ -25,7 +25,7 @@ module ActiveMerchant #:nodoc:
|
|
25
25
|
self.currencies_with_three_decimal_places = %w(BHD IQD JOD KWD LYD OMR TND)
|
26
26
|
|
27
27
|
self.money_format = :cents
|
28
|
-
self.supported_cardtypes = [
|
28
|
+
self.supported_cardtypes = %i[visa master maestro]
|
29
29
|
|
30
30
|
RESPONSE_MESSAGES = {
|
31
31
|
'00' => 'Approved or completed successfully',
|
@@ -193,6 +193,7 @@ module ActiveMerchant #:nodoc:
|
|
193
193
|
add_email(post, options)
|
194
194
|
|
195
195
|
if options[:referral_cft]
|
196
|
+
add_customer_name(post, options)
|
196
197
|
commit(:referral_cft, post)
|
197
198
|
else
|
198
199
|
commit(:refund, post)
|
@@ -238,6 +239,10 @@ module ActiveMerchant #:nodoc:
|
|
238
239
|
normalized_value = normalize(value)
|
239
240
|
next if normalized_value.nil?
|
240
241
|
|
242
|
+
if key == :'3ds_homephonecountry'
|
243
|
+
next unless options[:billing_address] && options[:billing_address][:phone]
|
244
|
+
end
|
245
|
+
|
241
246
|
post[key] = normalized_value unless post[key]
|
242
247
|
end
|
243
248
|
end
|
@@ -313,6 +318,11 @@ module ActiveMerchant #:nodoc:
|
|
313
318
|
post[:c3] = options[:email] || 'unspecified@example.com'
|
314
319
|
end
|
315
320
|
|
321
|
+
def add_customer_name(post, options)
|
322
|
+
post[:j5] = options[:first_name] if options[:first_name]
|
323
|
+
post[:j13] = options[:last_name] if options[:last_name]
|
324
|
+
end
|
325
|
+
|
316
326
|
def add_3d_secure(post, options)
|
317
327
|
if options[:eci] && options[:xid]
|
318
328
|
add_3d_secure_1_data(post, options)
|
@@ -329,7 +339,7 @@ module ActiveMerchant #:nodoc:
|
|
329
339
|
post[:'3ds_browsertz'] = browser_info[:timezone]
|
330
340
|
post[:'3ds_browserscreenwidth'] = browser_info[:width]
|
331
341
|
post[:'3ds_browserscreenheight'] = browser_info[:height]
|
332
|
-
post[:'3ds_browsercolordepth'] = browser_info[:depth]
|
342
|
+
post[:'3ds_browsercolordepth'] = browser_info[:depth].to_s == '30' ? '32' : browser_info[:depth]
|
333
343
|
post[:d6] = browser_info[:language]
|
334
344
|
post[:'3ds_browserjavaenabled'] = browser_info[:java]
|
335
345
|
post[:'3ds_browseracceptheader'] = browser_info[:accept_header]
|
@@ -413,7 +423,7 @@ module ActiveMerchant #:nodoc:
|
|
413
423
|
success_from(response),
|
414
424
|
message_from(response),
|
415
425
|
response,
|
416
|
-
authorization: "#{response[
|
426
|
+
authorization: "#{response['Z1']};#{response['Z4']};#{response['A1']};#{action}",
|
417
427
|
avs_result: AVSResult.new(code: response['Z9']),
|
418
428
|
cvv_result: CVVResult.new(response['Z14']),
|
419
429
|
test: test?
|
@@ -4,9 +4,9 @@ module ActiveMerchant #:nodoc:
|
|
4
4
|
self.test_url = 'https://test.ctpaiement.ca/v1/'
|
5
5
|
self.live_url = 'https://www.ctpaiement.com/v1/'
|
6
6
|
|
7
|
-
self.supported_countries = [
|
7
|
+
self.supported_countries = %w[US CA]
|
8
8
|
self.default_currency = 'CAD'
|
9
|
-
self.supported_cardtypes = [
|
9
|
+
self.supported_cardtypes = %i[visa master american_express discover diners_club]
|
10
10
|
|
11
11
|
self.homepage_url = 'http://www.ct-payment.com/'
|
12
12
|
self.display_name = 'CT Payment'
|
@@ -18,7 +18,7 @@ module ActiveMerchant #:nodoc:
|
|
18
18
|
self.supported_countries = ['PE']
|
19
19
|
self.default_currency = 'PEN'
|
20
20
|
self.money_format = :dollars
|
21
|
-
self.supported_cardtypes = [
|
21
|
+
self.supported_cardtypes = %i[visa master diners_club american_express]
|
22
22
|
|
23
23
|
def initialize(options={})
|
24
24
|
requires!(options, :merchant_id, :terminal_id, :secret_key)
|
@@ -205,7 +205,7 @@ module ActiveMerchant #:nodoc:
|
|
205
205
|
refund: 'SingleCallGenericReverse',
|
206
206
|
tokenize: 'SingleCallTokenServlet',
|
207
207
|
invalidate: 'SingleCallInvalidateToken',
|
208
|
-
tokenpay: 'SingleCallTokenTransaction'
|
208
|
+
tokenpay: 'SingleCallTokenTransaction'
|
209
209
|
}
|
210
210
|
|
211
211
|
def commit(action, params)
|
@@ -30,14 +30,16 @@ module ActiveMerchant #:nodoc:
|
|
30
30
|
ECI_BRAND_MAPPING = {
|
31
31
|
visa: 'vbv',
|
32
32
|
master: 'spa',
|
33
|
+
maestro: 'spa',
|
33
34
|
american_express: 'aesk',
|
34
35
|
jcb: 'js',
|
35
36
|
discover: 'pb',
|
37
|
+
diners_club: 'pb'
|
36
38
|
}.freeze
|
37
39
|
DEFAULT_COLLECTION_INDICATOR = 2
|
38
40
|
|
39
|
-
self.supported_cardtypes = [
|
40
|
-
self.supported_countries = %w(US BR CA CN DK FI FR DE IN JP MX NO SE GB SG LB PK)
|
41
|
+
self.supported_cardtypes = %i[visa master american_express discover diners_club jcb dankort maestro elo]
|
42
|
+
self.supported_countries = %w(US AE BR CA CN DK FI FR DE IN JP MX NO SE GB SG LB PK)
|
41
43
|
|
42
44
|
self.default_currency = 'USD'
|
43
45
|
self.currencies_without_fractions = %w(JPY)
|
@@ -264,7 +266,9 @@ module ActiveMerchant #:nodoc:
|
|
264
266
|
zip: '00000',
|
265
267
|
country: 'US'
|
266
268
|
}
|
267
|
-
|
269
|
+
|
270
|
+
submitted_address = options[:billing_address] || options[:address] || default_address
|
271
|
+
options[:billing_address] = default_address.merge(submitted_address) { |_k, default, submitted| submitted.blank? ? default : submitted }
|
268
272
|
options[:shipping_address] = options[:shipping_address] || {}
|
269
273
|
end
|
270
274
|
|
@@ -278,10 +282,11 @@ module ActiveMerchant #:nodoc:
|
|
278
282
|
add_threeds_services(xml, options)
|
279
283
|
add_payment_network_token(xml) if network_tokenization?(creditcard_or_reference)
|
280
284
|
add_business_rules_data(xml, creditcard_or_reference, options)
|
281
|
-
|
285
|
+
add_stored_credential_subsequent_auth(xml, options)
|
282
286
|
add_issuer_additional_data(xml, options)
|
283
|
-
add_merchant_description(xml, options)
|
284
287
|
add_partner_solution_id(xml)
|
288
|
+
add_stored_credential_options(xml, options)
|
289
|
+
add_merchant_description(xml, options)
|
285
290
|
|
286
291
|
xml.target!
|
287
292
|
end
|
@@ -322,17 +327,20 @@ module ActiveMerchant #:nodoc:
|
|
322
327
|
add_mdd_fields(xml, options)
|
323
328
|
if !payment_method_or_reference.is_a?(String) && card_brand(payment_method_or_reference) == 'check'
|
324
329
|
add_check_service(xml)
|
330
|
+
add_issuer_additional_data(xml, options)
|
331
|
+
add_partner_solution_id(xml)
|
325
332
|
else
|
326
333
|
add_purchase_service(xml, payment_method_or_reference, options)
|
327
334
|
add_threeds_services(xml, options)
|
328
335
|
add_payment_network_token(xml) if network_tokenization?(payment_method_or_reference)
|
329
336
|
add_business_rules_data(xml, payment_method_or_reference, options) unless options[:pinless_debit_card]
|
337
|
+
add_stored_credential_subsequent_auth(xml, options)
|
338
|
+
add_issuer_additional_data(xml, options)
|
339
|
+
add_partner_solution_id(xml)
|
330
340
|
add_stored_credential_options(xml, options)
|
331
341
|
end
|
332
342
|
|
333
|
-
add_issuer_additional_data(xml, options)
|
334
343
|
add_merchant_description(xml, options)
|
335
|
-
add_partner_solution_id(xml)
|
336
344
|
|
337
345
|
xml.target!
|
338
346
|
end
|
@@ -604,27 +612,41 @@ module ActiveMerchant #:nodoc:
|
|
604
612
|
indicator = options[:commerce_indicator] || stored_credential_commerce_indicator(options)
|
605
613
|
xml.tag!('commerceIndicator', indicator) if indicator
|
606
614
|
end
|
615
|
+
xml.tag!('reconciliationID', options[:reconciliation_id]) if options[:reconciliation_id]
|
607
616
|
end
|
608
617
|
end
|
609
618
|
end
|
610
619
|
|
611
620
|
def add_normalized_threeds_2_data(xml, payment_method, options)
|
612
621
|
threeds_2_options = options[:three_d_secure]
|
622
|
+
cc_brand = card_brand(payment_method).to_sym
|
623
|
+
|
624
|
+
return if threeds_2_options[:cavv].blank? && infer_commerce_indicator?(options, cc_brand)
|
625
|
+
|
626
|
+
xid = threeds_2_options[:xid]
|
613
627
|
|
614
|
-
xml.tag!('cavv', threeds_2_options[:cavv]) if threeds_2_options[:cavv] &&
|
628
|
+
xml.tag!('cavv', threeds_2_options[:cavv]) if threeds_2_options[:cavv] && cc_brand != :master
|
615
629
|
xml.tag!('cavvAlgorithm', threeds_2_options[:cavv_algorithm]) if threeds_2_options[:cavv_algorithm]
|
616
630
|
xml.tag!('paSpecificationVersion', threeds_2_options[:version]) if threeds_2_options[:version]
|
617
631
|
xml.tag!('directoryServerTransactionID', threeds_2_options[:ds_transaction_id]) if threeds_2_options[:ds_transaction_id]
|
618
|
-
xml.tag!('commerceIndicator', options[:commerce_indicator] || ECI_BRAND_MAPPING[
|
632
|
+
xml.tag!('commerceIndicator', options[:commerce_indicator] || ECI_BRAND_MAPPING[cc_brand])
|
619
633
|
xml.tag!('eciRaw', threeds_2_options[:eci]) if threeds_2_options[:eci]
|
620
634
|
|
621
|
-
|
622
|
-
|
635
|
+
if xid.present?
|
636
|
+
xml.tag!('xid', xid)
|
637
|
+
elsif threeds_2_options[:version]&.start_with?('2') && cc_brand != :master
|
638
|
+
cavv = threeds_2_options[:cavv]
|
639
|
+
xml.tag!('xid', cavv) if cavv.present?
|
640
|
+
end
|
623
641
|
|
624
642
|
xml.tag!('veresEnrolled', threeds_2_options[:enrolled]) if threeds_2_options[:enrolled]
|
625
643
|
xml.tag!('paresStatus', threeds_2_options[:authentication_response_status]) if threeds_2_options[:authentication_response_status]
|
626
644
|
end
|
627
645
|
|
646
|
+
def infer_commerce_indicator?(options, cc_brand)
|
647
|
+
options[:commerce_indicator].blank? && ECI_BRAND_MAPPING[cc_brand].present?
|
648
|
+
end
|
649
|
+
|
628
650
|
def add_threeds_2_ucaf_data(xml, payment_method, options)
|
629
651
|
return unless options[:three_d_secure] && card_brand(payment_method).to_sym == :master
|
630
652
|
|
@@ -660,6 +682,7 @@ module ActiveMerchant #:nodoc:
|
|
660
682
|
xml.tag!('cavv', payment_method.payment_cryptogram)
|
661
683
|
xml.tag!('commerceIndicator', ECI_BRAND_MAPPING[brand])
|
662
684
|
xml.tag!('xid', payment_method.payment_cryptogram)
|
685
|
+
xml.tag!('reconciliationID', options[:reconciliation_id]) if options[:reconciliation_id]
|
663
686
|
end
|
664
687
|
when :master
|
665
688
|
xml.tag! 'ucaf' do
|
@@ -668,6 +691,7 @@ module ActiveMerchant #:nodoc:
|
|
668
691
|
end
|
669
692
|
xml.tag! 'ccAuthService', {'run' => 'true'} do
|
670
693
|
xml.tag!('commerceIndicator', ECI_BRAND_MAPPING[brand])
|
694
|
+
xml.tag!('reconciliationID', options[:reconciliation_id]) if options[:reconciliation_id]
|
671
695
|
end
|
672
696
|
when :american_express
|
673
697
|
cryptogram = Base64.decode64(payment_method.payment_cryptogram)
|
@@ -675,6 +699,7 @@ module ActiveMerchant #:nodoc:
|
|
675
699
|
xml.tag!('cavv', Base64.encode64(cryptogram[0...20]))
|
676
700
|
xml.tag!('commerceIndicator', ECI_BRAND_MAPPING[brand])
|
677
701
|
xml.tag!('xid', Base64.encode64(cryptogram[20...40]))
|
702
|
+
xml.tag!('reconciliationID', options[:reconciliation_id]) if options[:reconciliation_id]
|
678
703
|
end
|
679
704
|
end
|
680
705
|
end
|
@@ -689,15 +714,20 @@ module ActiveMerchant #:nodoc:
|
|
689
714
|
xml.tag! 'ccCaptureService', {'run' => 'true'} do
|
690
715
|
xml.tag! 'authRequestID', request_id
|
691
716
|
xml.tag! 'authRequestToken', request_token
|
717
|
+
xml.tag! 'reconciliationID', options[:reconciliation_id] if options[:reconciliation_id]
|
692
718
|
end
|
693
719
|
end
|
694
720
|
|
695
721
|
def add_purchase_service(xml, payment_method, options)
|
696
722
|
if options[:pinless_debit_card]
|
697
|
-
xml.tag! 'pinlessDebitService', {'run' => 'true'}
|
723
|
+
xml.tag! 'pinlessDebitService', {'run' => 'true'} do
|
724
|
+
xml.tag!('reconciliationID', options[:reconciliation_id]) if options[:reconciliation_id]
|
725
|
+
end
|
698
726
|
else
|
699
727
|
add_auth_service(xml, payment_method, options)
|
700
|
-
xml.tag! 'ccCaptureService', {'run' => 'true'}
|
728
|
+
xml.tag! 'ccCaptureService', {'run' => 'true'} do
|
729
|
+
xml.tag!('reconciliationID', options[:reconciliation_id]) if options[:reconciliation_id]
|
730
|
+
end
|
701
731
|
end
|
702
732
|
end
|
703
733
|
|
@@ -821,13 +851,30 @@ module ActiveMerchant #:nodoc:
|
|
821
851
|
country_code&.code(:alpha2)
|
822
852
|
end
|
823
853
|
|
854
|
+
def add_stored_credential_subsequent_auth(xml, options={})
|
855
|
+
return unless options[:stored_credential] || options[:stored_credential_overrides]
|
856
|
+
|
857
|
+
stored_credential_subsequent_auth = 'true' if options.dig(:stored_credential, :initiator) == 'merchant'
|
858
|
+
|
859
|
+
override_subsequent_auth = options.dig(:stored_credential_overrides, :subsequent_auth)
|
860
|
+
|
861
|
+
xml.subsequentAuth override_subsequent_auth.nil? ? stored_credential_subsequent_auth : override_subsequent_auth
|
862
|
+
end
|
863
|
+
|
824
864
|
def add_stored_credential_options(xml, options={})
|
825
|
-
return unless options[:stored_credential]
|
865
|
+
return unless options[:stored_credential] || options[:stored_credential_overrides]
|
866
|
+
|
867
|
+
stored_credential_subsequent_auth_first = 'true' if options.dig(:stored_credential, :initial_transaction)
|
868
|
+
stored_credential_transaction_id = options.dig(:stored_credential, :network_transaction_id) if options.dig(:stored_credential, :initiator) == 'merchant'
|
869
|
+
stored_credential_subsequent_auth_stored_cred = 'true' if options.dig(:stored_credential, :initiator) == 'cardholder' && !options.dig(:stored_credential, :initial_transaction) || options.dig(:stored_credential, :initiator) == 'merchant' && options.dig(:stored_credential, :reason_type) == 'unscheduled'
|
826
870
|
|
827
|
-
|
828
|
-
|
829
|
-
|
830
|
-
|
871
|
+
override_subsequent_auth_first = options.dig(:stored_credential_overrides, :subsequent_auth_first)
|
872
|
+
override_subsequent_auth_transaction_id = options.dig(:stored_credential_overrides, :subsequent_auth_transaction_id)
|
873
|
+
override_subsequent_auth_stored_cred = options.dig(:stored_credential_overrides, :subsequent_auth_stored_credential)
|
874
|
+
|
875
|
+
xml.subsequentAuthFirst override_subsequent_auth_first.nil? ? stored_credential_subsequent_auth_first : override_subsequent_auth_first
|
876
|
+
xml.subsequentAuthTransactionID override_subsequent_auth_transaction_id.nil? ? stored_credential_transaction_id : override_subsequent_auth_transaction_id
|
877
|
+
xml.subsequentAuthStoredCredential override_subsequent_auth_stored_cred.nil? ? stored_credential_subsequent_auth_stored_cred : override_subsequent_auth_stored_cred
|
831
878
|
end
|
832
879
|
|
833
880
|
def add_partner_solution_id(xml)
|
@@ -878,8 +925,7 @@ module ActiveMerchant #:nodoc:
|
|
878
925
|
|
879
926
|
success = success?(response)
|
880
927
|
message = message_from(response)
|
881
|
-
|
882
|
-
authorization = success ? authorization_from(response, action, amount, options) : nil
|
928
|
+
authorization = success || in_fraud_review?(response) ? authorization_from(response, action, amount, options) : nil
|
883
929
|
|
884
930
|
Response.new(success, message, response,
|
885
931
|
test: test?,
|