activemerchant 1.107.4 → 1.112.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +63 -0
- data/README.md +3 -3
- data/lib/active_merchant/billing/base.rb +0 -13
- data/lib/active_merchant/billing/check.rb +1 -1
- data/lib/active_merchant/billing/credit_card.rb +2 -0
- data/lib/active_merchant/billing/credit_card_methods.rb +9 -6
- data/lib/active_merchant/billing/gateways/adyen.rb +23 -12
- data/lib/active_merchant/billing/gateways/allied_wallet.rb +2 -2
- data/lib/active_merchant/billing/gateways/authorize_net.rb +8 -8
- data/lib/active_merchant/billing/gateways/authorize_net_arb.rb +3 -3
- data/lib/active_merchant/billing/gateways/authorize_net_cim.rb +3 -3
- data/lib/active_merchant/billing/gateways/axcessms.rb +1 -1
- data/lib/active_merchant/billing/gateways/balanced.rb +1 -1
- data/lib/active_merchant/billing/gateways/bambora_apac.rb +2 -2
- data/lib/active_merchant/billing/gateways/bank_frick.rb +2 -2
- data/lib/active_merchant/billing/gateways/banwire.rb +2 -2
- data/lib/active_merchant/billing/gateways/barclaycard_smartpay.rb +2 -2
- data/lib/active_merchant/billing/gateways/barclays_epdq_extra_plus.rb +1 -1
- data/lib/active_merchant/billing/gateways/be2bill.rb +1 -1
- data/lib/active_merchant/billing/gateways/beanstream/beanstream_core.rb +4 -4
- data/lib/active_merchant/billing/gateways/blue_pay.rb +4 -4
- data/lib/active_merchant/billing/gateways/blue_snap.rb +1 -1
- data/lib/active_merchant/billing/gateways/borgun.rb +3 -3
- data/lib/active_merchant/billing/gateways/bpoint.rb +1 -1
- data/lib/active_merchant/billing/gateways/braintree/braintree_common.rb +1 -1
- data/lib/active_merchant/billing/gateways/braintree_blue.rb +82 -34
- data/lib/active_merchant/billing/gateways/bridge_pay.rb +2 -2
- data/lib/active_merchant/billing/gateways/cams.rb +2 -2
- data/lib/active_merchant/billing/gateways/card_connect.rb +1 -1
- data/lib/active_merchant/billing/gateways/card_save.rb +1 -1
- data/lib/active_merchant/billing/gateways/card_stream.rb +4 -4
- data/lib/active_merchant/billing/gateways/cardknox.rb +4 -4
- data/lib/active_merchant/billing/gateways/cardprocess.rb +1 -1
- data/lib/active_merchant/billing/gateways/cashnet.rb +1 -1
- data/lib/active_merchant/billing/gateways/cecabank.rb +1 -1
- data/lib/active_merchant/billing/gateways/cenpos.rb +12 -12
- data/lib/active_merchant/billing/gateways/checkout.rb +3 -3
- data/lib/active_merchant/billing/gateways/checkout_v2.rb +2 -2
- data/lib/active_merchant/billing/gateways/citrus_pay.rb +1 -1
- data/lib/active_merchant/billing/gateways/clearhaus.rb +4 -4
- data/lib/active_merchant/billing/gateways/commercegate.rb +1 -1
- data/lib/active_merchant/billing/gateways/conekta.rb +1 -1
- data/lib/active_merchant/billing/gateways/creditcall.rb +1 -1
- data/lib/active_merchant/billing/gateways/credorax.rb +7 -3
- data/lib/active_merchant/billing/gateways/ct_payment.rb +2 -2
- data/lib/active_merchant/billing/gateways/culqi.rb +1 -1
- data/lib/active_merchant/billing/gateways/cyber_source.rb +67 -19
- data/lib/active_merchant/billing/gateways/d_local.rb +20 -6
- data/lib/active_merchant/billing/gateways/data_cash.rb +1 -1
- data/lib/active_merchant/billing/gateways/decidir.rb +24 -0
- data/lib/active_merchant/billing/gateways/dibs.rb +2 -2
- data/lib/active_merchant/billing/gateways/digitzs.rb +2 -2
- data/lib/active_merchant/billing/gateways/ebanx.rb +4 -4
- data/lib/active_merchant/billing/gateways/efsnet.rb +2 -2
- data/lib/active_merchant/billing/gateways/elavon.rb +5 -4
- data/lib/active_merchant/billing/gateways/element.rb +8 -4
- data/lib/active_merchant/billing/gateways/epay.rb +3 -3
- data/lib/active_merchant/billing/gateways/evo_ca.rb +1 -1
- data/lib/active_merchant/billing/gateways/eway.rb +1 -1
- data/lib/active_merchant/billing/gateways/eway_managed.rb +1 -1
- data/lib/active_merchant/billing/gateways/eway_rapid.rb +2 -2
- data/lib/active_merchant/billing/gateways/exact.rb +3 -3
- data/lib/active_merchant/billing/gateways/ezic.rb +1 -1
- data/lib/active_merchant/billing/gateways/fat_zebra.rb +9 -7
- data/lib/active_merchant/billing/gateways/federated_canada.rb +1 -1
- data/lib/active_merchant/billing/gateways/finansbank.rb +2 -2
- data/lib/active_merchant/billing/gateways/first_giving.rb +1 -1
- data/lib/active_merchant/billing/gateways/first_pay.rb +1 -1
- data/lib/active_merchant/billing/gateways/firstdata_e4.rb +5 -5
- data/lib/active_merchant/billing/gateways/firstdata_e4_v27.rb +12 -4
- data/lib/active_merchant/billing/gateways/flo2cash.rb +10 -10
- data/lib/active_merchant/billing/gateways/forte.rb +3 -3
- data/lib/active_merchant/billing/gateways/garanti.rb +2 -2
- data/lib/active_merchant/billing/gateways/global_collect.rb +10 -5
- data/lib/active_merchant/billing/gateways/global_transport.rb +1 -1
- data/lib/active_merchant/billing/gateways/hdfc.rb +9 -9
- data/lib/active_merchant/billing/gateways/hps.rb +1 -1
- data/lib/active_merchant/billing/gateways/iats_payments.rb +2 -2
- data/lib/active_merchant/billing/gateways/inspire.rb +1 -1
- data/lib/active_merchant/billing/gateways/instapay.rb +1 -1
- data/lib/active_merchant/billing/gateways/ipp.rb +1 -1
- data/lib/active_merchant/billing/gateways/iridium.rb +3 -3
- data/lib/active_merchant/billing/gateways/itransact.rb +1 -1
- data/lib/active_merchant/billing/gateways/iveri.rb +2 -2
- data/lib/active_merchant/billing/gateways/ixopay.rb +1 -1
- data/lib/active_merchant/billing/gateways/jetpay.rb +2 -2
- data/lib/active_merchant/billing/gateways/jetpay_v2.rb +2 -2
- data/lib/active_merchant/billing/gateways/komoju.rb +1 -1
- data/lib/active_merchant/billing/gateways/kushki.rb +4 -4
- data/lib/active_merchant/billing/gateways/latitude19.rb +2 -2
- data/lib/active_merchant/billing/gateways/linkpoint.rb +2 -2
- data/lib/active_merchant/billing/gateways/litle.rb +5 -5
- data/lib/active_merchant/billing/gateways/maxipago.rb +2 -2
- data/lib/active_merchant/billing/gateways/mercado_pago.rb +11 -6
- data/lib/active_merchant/billing/gateways/merchant_e_solutions.rb +1 -1
- data/lib/active_merchant/billing/gateways/merchant_one.rb +2 -2
- data/lib/active_merchant/billing/gateways/merchant_partners.rb +1 -1
- data/lib/active_merchant/billing/gateways/merchant_ware.rb +1 -1
- data/lib/active_merchant/billing/gateways/merchant_ware_version_four.rb +1 -1
- data/lib/active_merchant/billing/gateways/merchant_warrior.rb +2 -2
- data/lib/active_merchant/billing/gateways/mercury.rb +4 -4
- data/lib/active_merchant/billing/gateways/metrics_global.rb +1 -1
- data/lib/active_merchant/billing/gateways/micropayment.rb +2 -2
- data/lib/active_merchant/billing/gateways/migs.rb +1 -1
- data/lib/active_merchant/billing/gateways/modern_payments_cim.rb +1 -1
- data/lib/active_merchant/billing/gateways/monei.rb +2 -2
- data/lib/active_merchant/billing/gateways/moneris.rb +17 -17
- data/lib/active_merchant/billing/gateways/money_movers.rb +1 -1
- data/lib/active_merchant/billing/gateways/mundipagg.rb +1 -1
- data/lib/active_merchant/billing/gateways/nab_transact.rb +2 -2
- data/lib/active_merchant/billing/gateways/ncr_secure_pay.rb +1 -1
- data/lib/active_merchant/billing/gateways/net_registry.rb +2 -2
- data/lib/active_merchant/billing/gateways/netaxept.rb +3 -3
- data/lib/active_merchant/billing/gateways/netbanx.rb +51 -23
- data/lib/active_merchant/billing/gateways/netbilling.rb +2 -2
- data/lib/active_merchant/billing/gateways/netpay.rb +2 -2
- data/lib/active_merchant/billing/gateways/network_merchants.rb +1 -1
- data/lib/active_merchant/billing/gateways/nmi.rb +4 -4
- data/lib/active_merchant/billing/gateways/ogone.rb +2 -2
- data/lib/active_merchant/billing/gateways/omise.rb +1 -1
- data/lib/active_merchant/billing/gateways/openpay.rb +1 -1
- data/lib/active_merchant/billing/gateways/opp.rb +2 -2
- data/lib/active_merchant/billing/gateways/optimal_payment.rb +4 -4
- data/lib/active_merchant/billing/gateways/orbital.rb +6 -6
- data/lib/active_merchant/billing/gateways/orbital/orbital_soft_descriptors.rb +1 -1
- data/lib/active_merchant/billing/gateways/pac_net_raven.rb +1 -1
- data/lib/active_merchant/billing/gateways/pagarme.rb +2 -2
- data/lib/active_merchant/billing/gateways/pago_facil.rb +1 -1
- data/lib/active_merchant/billing/gateways/pay_conex.rb +1 -1
- data/lib/active_merchant/billing/gateways/pay_gate_xml.rb +2 -2
- data/lib/active_merchant/billing/gateways/pay_hub.rb +1 -1
- data/lib/active_merchant/billing/gateways/pay_junction.rb +3 -3
- data/lib/active_merchant/billing/gateways/pay_junction_v2.rb +2 -2
- data/lib/active_merchant/billing/gateways/pay_secure.rb +1 -1
- data/lib/active_merchant/billing/gateways/paybox_direct.rb +3 -3
- data/lib/active_merchant/billing/gateways/payeezy.rb +2 -2
- data/lib/active_merchant/billing/gateways/payex.rb +13 -13
- data/lib/active_merchant/billing/gateways/payflow.rb +5 -5
- data/lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb +2 -2
- data/lib/active_merchant/billing/gateways/payflow_uk.rb +1 -1
- data/lib/active_merchant/billing/gateways/payment_express.rb +1 -1
- data/lib/active_merchant/billing/gateways/paymentez.rb +1 -1
- data/lib/active_merchant/billing/gateways/paymill.rb +1 -1
- data/lib/active_merchant/billing/gateways/paypal.rb +2 -2
- data/lib/active_merchant/billing/gateways/paypal_ca.rb +1 -1
- data/lib/active_merchant/billing/gateways/payscout.rb +1 -1
- data/lib/active_merchant/billing/gateways/paystation.rb +1 -1
- data/lib/active_merchant/billing/gateways/payu_in.rb +1 -1
- data/lib/active_merchant/billing/gateways/payu_latam.rb +11 -9
- data/lib/active_merchant/billing/gateways/payway.rb +1 -1
- data/lib/active_merchant/billing/gateways/pin.rb +2 -2
- data/lib/active_merchant/billing/gateways/plugnpay.rb +5 -5
- data/lib/active_merchant/billing/gateways/pro_pay.rb +2 -2
- data/lib/active_merchant/billing/gateways/psigate.rb +1 -1
- data/lib/active_merchant/billing/gateways/psl_card.rb +2 -2
- data/lib/active_merchant/billing/gateways/qbms.rb +1 -1
- data/lib/active_merchant/billing/gateways/quantum.rb +4 -4
- data/lib/active_merchant/billing/gateways/quickbooks.rb +6 -6
- data/lib/active_merchant/billing/gateways/quickpay/quickpay_common.rb +3 -3
- data/lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb +4 -4
- data/lib/active_merchant/billing/gateways/qvalent.rb +1 -1
- data/lib/active_merchant/billing/gateways/realex.rb +3 -2
- data/lib/active_merchant/billing/gateways/redsys.rb +5 -5
- data/lib/active_merchant/billing/gateways/s5.rb +1 -1
- data/lib/active_merchant/billing/gateways/safe_charge.rb +2 -2
- data/lib/active_merchant/billing/gateways/sage.rb +3 -3
- data/lib/active_merchant/billing/gateways/sage_pay.rb +3 -3
- data/lib/active_merchant/billing/gateways/sallie_mae.rb +1 -1
- data/lib/active_merchant/billing/gateways/secure_net.rb +1 -1
- data/lib/active_merchant/billing/gateways/secure_pay.rb +1 -1
- data/lib/active_merchant/billing/gateways/secure_pay_au.rb +2 -2
- data/lib/active_merchant/billing/gateways/secure_pay_tech.rb +2 -2
- data/lib/active_merchant/billing/gateways/securion_pay.rb +1 -1
- data/lib/active_merchant/billing/gateways/skip_jack.rb +5 -5
- data/lib/active_merchant/billing/gateways/so_easy_pay.rb +7 -7
- data/lib/active_merchant/billing/gateways/spreedly_core.rb +1 -1
- data/lib/active_merchant/billing/gateways/stripe.rb +6 -6
- data/lib/active_merchant/billing/gateways/stripe_payment_intents.rb +21 -2
- data/lib/active_merchant/billing/gateways/swipe_checkout.rb +1 -1
- data/lib/active_merchant/billing/gateways/telr.rb +4 -4
- data/lib/active_merchant/billing/gateways/tns.rb +1 -1
- data/lib/active_merchant/billing/gateways/trans_first.rb +2 -2
- data/lib/active_merchant/billing/gateways/trans_first_transaction_express.rb +1 -1
- data/lib/active_merchant/billing/gateways/transact_pro.rb +3 -3
- data/lib/active_merchant/billing/gateways/transax.rb +1 -1
- data/lib/active_merchant/billing/gateways/trexle.rb +2 -2
- data/lib/active_merchant/billing/gateways/trust_commerce.rb +5 -5
- data/lib/active_merchant/billing/gateways/usa_epay_advanced.rb +6 -6
- data/lib/active_merchant/billing/gateways/usa_epay_transaction.rb +1 -1
- data/lib/active_merchant/billing/gateways/vanco.rb +1 -1
- data/lib/active_merchant/billing/gateways/verifi.rb +3 -3
- data/lib/active_merchant/billing/gateways/viaklix.rb +1 -1
- data/lib/active_merchant/billing/gateways/visanet_peru.rb +3 -3
- data/lib/active_merchant/billing/gateways/webpay.rb +1 -1
- data/lib/active_merchant/billing/gateways/wepay.rb +2 -2
- data/lib/active_merchant/billing/gateways/wirecard.rb +1 -1
- data/lib/active_merchant/billing/gateways/world_net.rb +35 -35
- data/lib/active_merchant/billing/gateways/worldpay.rb +7 -7
- data/lib/active_merchant/billing/gateways/worldpay_online_payments.rb +1 -1
- data/lib/active_merchant/billing/gateways/worldpay_us.rb +1 -1
- data/lib/active_merchant/connection.rb +40 -42
- data/lib/active_merchant/network_connection_retries.rb +10 -12
- data/lib/active_merchant/version.rb +1 -1
- data/lib/support/gateway_support.rb +1 -1
- metadata +46 -32
@@ -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
|
|
@@ -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
|
|
@@ -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'
|
@@ -206,7 +206,7 @@ module ActiveMerchant #:nodoc:
|
|
206
206
|
|
207
207
|
def generate_signature(body)
|
208
208
|
key = OpenSSL::PKey::RSA.new(@options[:private_key])
|
209
|
-
hex = key.sign(OpenSSL::Digest.new('sha256'), body).
|
209
|
+
hex = key.sign(OpenSSL::Digest.new('sha256'), body).unpack1('H*')
|
210
210
|
|
211
211
|
"#{@options[:signing_key]} RS256-hex #{hex}"
|
212
212
|
end
|
@@ -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',
|
@@ -238,6 +238,10 @@ module ActiveMerchant #:nodoc:
|
|
238
238
|
normalized_value = normalize(value)
|
239
239
|
next if normalized_value.nil?
|
240
240
|
|
241
|
+
if key == :'3ds_homephonecountry'
|
242
|
+
next unless options[:billing_address] && options[:billing_address][:phone]
|
243
|
+
end
|
244
|
+
|
241
245
|
post[key] = normalized_value unless post[key]
|
242
246
|
end
|
243
247
|
end
|
@@ -329,7 +333,7 @@ module ActiveMerchant #:nodoc:
|
|
329
333
|
post[:'3ds_browsertz'] = browser_info[:timezone]
|
330
334
|
post[:'3ds_browserscreenwidth'] = browser_info[:width]
|
331
335
|
post[:'3ds_browserscreenheight'] = browser_info[:height]
|
332
|
-
post[:'3ds_browsercolordepth'] = browser_info[:depth]
|
336
|
+
post[:'3ds_browsercolordepth'] = browser_info[:depth].to_s == '30' ? '32' : browser_info[:depth]
|
333
337
|
post[:d6] = browser_info[:language]
|
334
338
|
post[:'3ds_browserjavaenabled'] = browser_info[:java]
|
335
339
|
post[:'3ds_browseracceptheader'] = browser_info[:accept_header]
|
@@ -413,7 +417,7 @@ module ActiveMerchant #:nodoc:
|
|
413
417
|
success_from(response),
|
414
418
|
message_from(response),
|
415
419
|
response,
|
416
|
-
authorization: "#{response[
|
420
|
+
authorization: "#{response['Z1']};#{response['Z4']};#{response['A1']};#{action}",
|
417
421
|
avs_result: AVSResult.new(code: response['Z9']),
|
418
422
|
cvv_result: CVVResult.new(response['Z14']),
|
419
423
|
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)
|
@@ -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)
|
@@ -278,10 +280,11 @@ module ActiveMerchant #:nodoc:
|
|
278
280
|
add_threeds_services(xml, options)
|
279
281
|
add_payment_network_token(xml) if network_tokenization?(creditcard_or_reference)
|
280
282
|
add_business_rules_data(xml, creditcard_or_reference, options)
|
281
|
-
|
283
|
+
add_stored_credential_subsequent_auth(xml, options)
|
282
284
|
add_issuer_additional_data(xml, options)
|
283
|
-
add_merchant_description(xml, options)
|
284
285
|
add_partner_solution_id(xml)
|
286
|
+
add_stored_credential_options(xml, options)
|
287
|
+
add_merchant_description(xml, options)
|
285
288
|
|
286
289
|
xml.target!
|
287
290
|
end
|
@@ -322,17 +325,20 @@ module ActiveMerchant #:nodoc:
|
|
322
325
|
add_mdd_fields(xml, options)
|
323
326
|
if !payment_method_or_reference.is_a?(String) && card_brand(payment_method_or_reference) == 'check'
|
324
327
|
add_check_service(xml)
|
328
|
+
add_issuer_additional_data(xml, options)
|
329
|
+
add_partner_solution_id(xml)
|
325
330
|
else
|
326
331
|
add_purchase_service(xml, payment_method_or_reference, options)
|
327
332
|
add_threeds_services(xml, options)
|
328
333
|
add_payment_network_token(xml) if network_tokenization?(payment_method_or_reference)
|
329
334
|
add_business_rules_data(xml, payment_method_or_reference, options) unless options[:pinless_debit_card]
|
335
|
+
add_stored_credential_subsequent_auth(xml, options)
|
336
|
+
add_issuer_additional_data(xml, options)
|
337
|
+
add_partner_solution_id(xml)
|
330
338
|
add_stored_credential_options(xml, options)
|
331
339
|
end
|
332
340
|
|
333
|
-
add_issuer_additional_data(xml, options)
|
334
341
|
add_merchant_description(xml, options)
|
335
|
-
add_partner_solution_id(xml)
|
336
342
|
|
337
343
|
xml.target!
|
338
344
|
end
|
@@ -604,24 +610,41 @@ module ActiveMerchant #:nodoc:
|
|
604
610
|
indicator = options[:commerce_indicator] || stored_credential_commerce_indicator(options)
|
605
611
|
xml.tag!('commerceIndicator', indicator) if indicator
|
606
612
|
end
|
613
|
+
xml.tag!('reconciliationID', options[:reconciliation_id]) if options[:reconciliation_id]
|
607
614
|
end
|
608
615
|
end
|
609
616
|
end
|
610
617
|
|
611
618
|
def add_normalized_threeds_2_data(xml, payment_method, options)
|
612
619
|
threeds_2_options = options[:three_d_secure]
|
620
|
+
cc_brand = card_brand(payment_method).to_sym
|
621
|
+
|
622
|
+
return if threeds_2_options[:cavv].blank? && infer_commerce_indicator?(options, cc_brand)
|
613
623
|
|
614
|
-
|
624
|
+
xid = threeds_2_options[:xid]
|
625
|
+
|
626
|
+
xml.tag!('cavv', threeds_2_options[:cavv]) if threeds_2_options[:cavv] && cc_brand != :master
|
615
627
|
xml.tag!('cavvAlgorithm', threeds_2_options[:cavv_algorithm]) if threeds_2_options[:cavv_algorithm]
|
616
628
|
xml.tag!('paSpecificationVersion', threeds_2_options[:version]) if threeds_2_options[:version]
|
617
629
|
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[
|
630
|
+
xml.tag!('commerceIndicator', options[:commerce_indicator] || ECI_BRAND_MAPPING[cc_brand])
|
619
631
|
xml.tag!('eciRaw', threeds_2_options[:eci]) if threeds_2_options[:eci]
|
620
|
-
|
632
|
+
|
633
|
+
if xid.present?
|
634
|
+
xml.tag!('xid', xid)
|
635
|
+
elsif threeds_2_options[:version]&.start_with?('2') && cc_brand != :master
|
636
|
+
cavv = threeds_2_options[:cavv]
|
637
|
+
xml.tag!('xid', cavv) if cavv.present?
|
638
|
+
end
|
639
|
+
|
621
640
|
xml.tag!('veresEnrolled', threeds_2_options[:enrolled]) if threeds_2_options[:enrolled]
|
622
641
|
xml.tag!('paresStatus', threeds_2_options[:authentication_response_status]) if threeds_2_options[:authentication_response_status]
|
623
642
|
end
|
624
643
|
|
644
|
+
def infer_commerce_indicator?(options, cc_brand)
|
645
|
+
options[:commerce_indicator].blank? && ECI_BRAND_MAPPING[cc_brand].present?
|
646
|
+
end
|
647
|
+
|
625
648
|
def add_threeds_2_ucaf_data(xml, payment_method, options)
|
626
649
|
return unless options[:three_d_secure] && card_brand(payment_method).to_sym == :master
|
627
650
|
|
@@ -657,6 +680,7 @@ module ActiveMerchant #:nodoc:
|
|
657
680
|
xml.tag!('cavv', payment_method.payment_cryptogram)
|
658
681
|
xml.tag!('commerceIndicator', ECI_BRAND_MAPPING[brand])
|
659
682
|
xml.tag!('xid', payment_method.payment_cryptogram)
|
683
|
+
xml.tag!('reconciliationID', options[:reconciliation_id]) if options[:reconciliation_id]
|
660
684
|
end
|
661
685
|
when :master
|
662
686
|
xml.tag! 'ucaf' do
|
@@ -665,6 +689,7 @@ module ActiveMerchant #:nodoc:
|
|
665
689
|
end
|
666
690
|
xml.tag! 'ccAuthService', {'run' => 'true'} do
|
667
691
|
xml.tag!('commerceIndicator', ECI_BRAND_MAPPING[brand])
|
692
|
+
xml.tag!('reconciliationID', options[:reconciliation_id]) if options[:reconciliation_id]
|
668
693
|
end
|
669
694
|
when :american_express
|
670
695
|
cryptogram = Base64.decode64(payment_method.payment_cryptogram)
|
@@ -672,6 +697,7 @@ module ActiveMerchant #:nodoc:
|
|
672
697
|
xml.tag!('cavv', Base64.encode64(cryptogram[0...20]))
|
673
698
|
xml.tag!('commerceIndicator', ECI_BRAND_MAPPING[brand])
|
674
699
|
xml.tag!('xid', Base64.encode64(cryptogram[20...40]))
|
700
|
+
xml.tag!('reconciliationID', options[:reconciliation_id]) if options[:reconciliation_id]
|
675
701
|
end
|
676
702
|
end
|
677
703
|
end
|
@@ -686,15 +712,20 @@ module ActiveMerchant #:nodoc:
|
|
686
712
|
xml.tag! 'ccCaptureService', {'run' => 'true'} do
|
687
713
|
xml.tag! 'authRequestID', request_id
|
688
714
|
xml.tag! 'authRequestToken', request_token
|
715
|
+
xml.tag! 'reconciliationID', options[:reconciliation_id] if options[:reconciliation_id]
|
689
716
|
end
|
690
717
|
end
|
691
718
|
|
692
719
|
def add_purchase_service(xml, payment_method, options)
|
693
720
|
if options[:pinless_debit_card]
|
694
|
-
xml.tag! 'pinlessDebitService', {'run' => 'true'}
|
721
|
+
xml.tag! 'pinlessDebitService', {'run' => 'true'} do
|
722
|
+
xml.tag!('reconciliationID', options[:reconciliation_id]) if options[:reconciliation_id]
|
723
|
+
end
|
695
724
|
else
|
696
725
|
add_auth_service(xml, payment_method, options)
|
697
|
-
xml.tag! 'ccCaptureService', {'run' => 'true'}
|
726
|
+
xml.tag! 'ccCaptureService', {'run' => 'true'} do
|
727
|
+
xml.tag!('reconciliationID', options[:reconciliation_id]) if options[:reconciliation_id]
|
728
|
+
end
|
698
729
|
end
|
699
730
|
end
|
700
731
|
|
@@ -818,12 +849,30 @@ module ActiveMerchant #:nodoc:
|
|
818
849
|
country_code&.code(:alpha2)
|
819
850
|
end
|
820
851
|
|
852
|
+
def add_stored_credential_subsequent_auth(xml, options={})
|
853
|
+
return unless options[:stored_credential] || options[:stored_credential_overrides]
|
854
|
+
|
855
|
+
stored_credential_subsequent_auth = 'true' if options.dig(:stored_credential, :initiator) == 'merchant'
|
856
|
+
|
857
|
+
override_subsequent_auth = options.dig(:stored_credential_overrides, :subsequent_auth)
|
858
|
+
|
859
|
+
xml.subsequentAuth override_subsequent_auth.nil? ? stored_credential_subsequent_auth : override_subsequent_auth
|
860
|
+
end
|
861
|
+
|
821
862
|
def add_stored_credential_options(xml, options={})
|
822
|
-
return unless options[:stored_credential]
|
823
|
-
|
824
|
-
|
825
|
-
|
826
|
-
|
863
|
+
return unless options[:stored_credential] || options[:stored_credential_overrides]
|
864
|
+
|
865
|
+
stored_credential_subsequent_auth_first = 'true' if options.dig(:stored_credential, :initial_transaction)
|
866
|
+
stored_credential_transaction_id = options.dig(:stored_credential, :network_transaction_id) if options.dig(:stored_credential, :initiator) == 'merchant'
|
867
|
+
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'
|
868
|
+
|
869
|
+
override_subsequent_auth_first = options.dig(:stored_credential_overrides, :subsequent_auth_first)
|
870
|
+
override_subsequent_auth_transaction_id = options.dig(:stored_credential_overrides, :subsequent_auth_transaction_id)
|
871
|
+
override_subsequent_auth_stored_cred = options.dig(:stored_credential_overrides, :subsequent_auth_stored_credential)
|
872
|
+
|
873
|
+
xml.subsequentAuthFirst override_subsequent_auth_first.nil? ? stored_credential_subsequent_auth_first : override_subsequent_auth_first
|
874
|
+
xml.subsequentAuthTransactionID override_subsequent_auth_transaction_id.nil? ? stored_credential_transaction_id : override_subsequent_auth_transaction_id
|
875
|
+
xml.subsequentAuthStoredCredential override_subsequent_auth_stored_cred.nil? ? stored_credential_subsequent_auth_stored_cred : override_subsequent_auth_stored_cred
|
827
876
|
end
|
828
877
|
|
829
878
|
def add_partner_solution_id(xml)
|
@@ -874,8 +923,7 @@ module ActiveMerchant #:nodoc:
|
|
874
923
|
|
875
924
|
success = success?(response)
|
876
925
|
message = message_from(response)
|
877
|
-
|
878
|
-
authorization = success ? authorization_from(response, action, amount, options) : nil
|
926
|
+
authorization = success || in_fraud_review?(response) ? authorization_from(response, action, amount, options) : nil
|
879
927
|
|
880
928
|
Response.new(success, message, response,
|
881
929
|
test: test?,
|
@@ -912,7 +960,7 @@ module ActiveMerchant #:nodoc:
|
|
912
960
|
if node.has_elements?
|
913
961
|
node.elements.each { |e| parse_element(reply, e) }
|
914
962
|
else
|
915
|
-
if node.parent.name
|
963
|
+
if /item/.match?(node.parent.name)
|
916
964
|
parent = node.parent.name
|
917
965
|
parent += '_' + node.parent.attributes['id'] if node.parent.attributes['id']
|
918
966
|
parent += '_'
|
@@ -4,9 +4,9 @@ module ActiveMerchant #:nodoc:
|
|
4
4
|
self.test_url = 'https://sandbox.dlocal.com'
|
5
5
|
self.live_url = 'https://api.dlocal.com'
|
6
6
|
|
7
|
-
self.supported_countries = [
|
7
|
+
self.supported_countries = %w[AR BR CL CO MX PE UY TR]
|
8
8
|
self.default_currency = 'USD'
|
9
|
-
self.supported_cardtypes = [
|
9
|
+
self.supported_cardtypes = %i[visa master american_express discover jcb diners_club maestro naranja cabal]
|
10
10
|
|
11
11
|
self.homepage_url = 'https://dlocal.com/'
|
12
12
|
self.display_name = 'dLocal'
|
@@ -118,12 +118,26 @@ module ActiveMerchant #:nodoc:
|
|
118
118
|
address_object = {}
|
119
119
|
address_object[:state] = address[:state] if address[:state]
|
120
120
|
address_object[:city] = address[:city] if address[:city]
|
121
|
-
address_object[:zip_code] = address[:
|
122
|
-
address_object[:street] = address[:street] if address
|
123
|
-
address_object[:number] = address[:number] if address
|
121
|
+
address_object[:zip_code] = address[:zip] if address[:zip]
|
122
|
+
address_object[:street] = address[:street] || parse_street(address) if parse_street(address)
|
123
|
+
address_object[:number] = address[:number] || parse_house_number(address) if parse_house_number(address)
|
124
124
|
address_object
|
125
125
|
end
|
126
126
|
|
127
|
+
def parse_street(address)
|
128
|
+
return unless address[:address1]
|
129
|
+
|
130
|
+
street = address[:address1].split(/\s+/).keep_if { |x| x !~ /\d/ }.join(' ')
|
131
|
+
street.empty? ? nil : street
|
132
|
+
end
|
133
|
+
|
134
|
+
def parse_house_number(address)
|
135
|
+
return unless address[:address1]
|
136
|
+
|
137
|
+
house = address[:address1].split(/\s+/).keep_if { |x| x =~ /\d/ }.join(' ')
|
138
|
+
house.empty? ? nil : house
|
139
|
+
end
|
140
|
+
|
127
141
|
def add_card(post, card, action, options={})
|
128
142
|
post[:card] = {}
|
129
143
|
post[:card][:holder_name] = card.name
|
@@ -170,7 +184,7 @@ module ActiveMerchant #:nodoc:
|
|
170
184
|
def success_from(action, response)
|
171
185
|
return false unless response['status_code']
|
172
186
|
|
173
|
-
[
|
187
|
+
%w[100 200 400 600].include? response['status_code'].to_s
|
174
188
|
end
|
175
189
|
|
176
190
|
def message_from(action, response)
|