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
@@ -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
|
|
@@ -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)
|
@@ -34,9 +34,10 @@ module ActiveMerchant #:nodoc:
|
|
34
34
|
jcb: 'js',
|
35
35
|
discover: 'pb',
|
36
36
|
}.freeze
|
37
|
+
DEFAULT_COLLECTION_INDICATOR = 2
|
37
38
|
|
38
|
-
self.supported_cardtypes = [
|
39
|
-
self.supported_countries = %w(US BR CA CN DK FI FR DE IN JP MX NO SE GB SG LB PK)
|
39
|
+
self.supported_cardtypes = %i[visa master american_express discover diners_club jcb dankort maestro elo]
|
40
|
+
self.supported_countries = %w(US AE BR CA CN DK FI FR DE IN JP MX NO SE GB SG LB PK)
|
40
41
|
|
41
42
|
self.default_currency = 'USD'
|
42
43
|
self.currencies_without_fractions = %w(JPY)
|
@@ -280,6 +281,7 @@ module ActiveMerchant #:nodoc:
|
|
280
281
|
add_stored_credential_options(xml, options)
|
281
282
|
add_issuer_additional_data(xml, options)
|
282
283
|
add_merchant_description(xml, options)
|
284
|
+
add_partner_solution_id(xml)
|
283
285
|
|
284
286
|
xml.target!
|
285
287
|
end
|
@@ -307,6 +309,7 @@ module ActiveMerchant #:nodoc:
|
|
307
309
|
add_business_rules_data(xml, authorization, options)
|
308
310
|
add_issuer_additional_data(xml, options)
|
309
311
|
add_merchant_description(xml, options)
|
312
|
+
add_partner_solution_id(xml)
|
310
313
|
|
311
314
|
xml.target!
|
312
315
|
end
|
@@ -324,9 +327,12 @@ module ActiveMerchant #:nodoc:
|
|
324
327
|
add_threeds_services(xml, options)
|
325
328
|
add_payment_network_token(xml) if network_tokenization?(payment_method_or_reference)
|
326
329
|
add_business_rules_data(xml, payment_method_or_reference, options) unless options[:pinless_debit_card]
|
330
|
+
add_stored_credential_options(xml, options)
|
327
331
|
end
|
332
|
+
|
328
333
|
add_issuer_additional_data(xml, options)
|
329
334
|
add_merchant_description(xml, options)
|
335
|
+
add_partner_solution_id(xml)
|
330
336
|
|
331
337
|
xml.target!
|
332
338
|
end
|
@@ -346,6 +352,8 @@ module ActiveMerchant #:nodoc:
|
|
346
352
|
add_auth_reversal_service(xml, request_id, request_token)
|
347
353
|
end
|
348
354
|
add_issuer_additional_data(xml, options)
|
355
|
+
add_partner_solution_id(xml)
|
356
|
+
|
349
357
|
xml.target!
|
350
358
|
end
|
351
359
|
|
@@ -356,6 +364,7 @@ module ActiveMerchant #:nodoc:
|
|
356
364
|
xml = Builder::XmlMarkup.new indent: 2
|
357
365
|
add_purchase_data(xml, money, true, options)
|
358
366
|
add_credit_service(xml, request_id, request_token)
|
367
|
+
add_partner_solution_id(xml)
|
359
368
|
|
360
369
|
xml.target!
|
361
370
|
end
|
@@ -471,7 +480,6 @@ module ActiveMerchant #:nodoc:
|
|
471
480
|
xml.tag! 'clientLibrary', 'Ruby Active Merchant'
|
472
481
|
xml.tag! 'clientLibraryVersion', VERSION
|
473
482
|
xml.tag! 'clientEnvironment', RUBY_PLATFORM
|
474
|
-
xml.tag!('partnerSolutionID', application_id) if application_id
|
475
483
|
|
476
484
|
add_merchant_descriptor(xml, options)
|
477
485
|
end
|
@@ -596,20 +604,30 @@ module ActiveMerchant #:nodoc:
|
|
596
604
|
indicator = options[:commerce_indicator] || stored_credential_commerce_indicator(options)
|
597
605
|
xml.tag!('commerceIndicator', indicator) if indicator
|
598
606
|
end
|
607
|
+
xml.tag!('reconciliationID', options[:reconciliation_id]) if options[:reconciliation_id]
|
599
608
|
end
|
600
609
|
end
|
601
610
|
end
|
602
611
|
|
603
612
|
def add_normalized_threeds_2_data(xml, payment_method, options)
|
604
613
|
threeds_2_options = options[:three_d_secure]
|
614
|
+
cc_brand = card_brand(payment_method).to_sym
|
615
|
+
xid = threeds_2_options[:xid]
|
605
616
|
|
606
|
-
xml.tag!('cavv', threeds_2_options[:cavv]) if threeds_2_options[:cavv] &&
|
617
|
+
xml.tag!('cavv', threeds_2_options[:cavv]) if threeds_2_options[:cavv] && cc_brand != :master
|
607
618
|
xml.tag!('cavvAlgorithm', threeds_2_options[:cavv_algorithm]) if threeds_2_options[:cavv_algorithm]
|
608
619
|
xml.tag!('paSpecificationVersion', threeds_2_options[:version]) if threeds_2_options[:version]
|
609
620
|
xml.tag!('directoryServerTransactionID', threeds_2_options[:ds_transaction_id]) if threeds_2_options[:ds_transaction_id]
|
610
|
-
xml.tag!('commerceIndicator', options[:commerce_indicator] || ECI_BRAND_MAPPING[
|
621
|
+
xml.tag!('commerceIndicator', options[:commerce_indicator] || ECI_BRAND_MAPPING[cc_brand])
|
611
622
|
xml.tag!('eciRaw', threeds_2_options[:eci]) if threeds_2_options[:eci]
|
612
|
-
|
623
|
+
|
624
|
+
if xid.present?
|
625
|
+
xml.tag!('xid', xid)
|
626
|
+
elsif threeds_2_options[:version]&.start_with?('2') && cc_brand != :master
|
627
|
+
cavv = threeds_2_options[:cavv]
|
628
|
+
xml.tag!('xid', cavv) if cavv.present?
|
629
|
+
end
|
630
|
+
|
613
631
|
xml.tag!('veresEnrolled', threeds_2_options[:enrolled]) if threeds_2_options[:enrolled]
|
614
632
|
xml.tag!('paresStatus', threeds_2_options[:authentication_response_status]) if threeds_2_options[:authentication_response_status]
|
615
633
|
end
|
@@ -619,12 +637,13 @@ module ActiveMerchant #:nodoc:
|
|
619
637
|
|
620
638
|
xml.tag! 'ucaf' do
|
621
639
|
xml.tag!('authenticationData', options[:three_d_secure][:cavv])
|
622
|
-
xml.tag!('collectionIndicator', options[:collection_indicator]
|
640
|
+
xml.tag!('collectionIndicator', options[:collection_indicator] || DEFAULT_COLLECTION_INDICATOR)
|
623
641
|
end
|
624
642
|
end
|
625
643
|
|
626
644
|
def stored_credential_commerce_indicator(options)
|
627
645
|
return unless options[:stored_credential]
|
646
|
+
|
628
647
|
return if options[:stored_credential][:initial_transaction]
|
629
648
|
|
630
649
|
case options[:stored_credential][:reason_type]
|
@@ -639,6 +658,7 @@ module ActiveMerchant #:nodoc:
|
|
639
658
|
|
640
659
|
def add_auth_network_tokenization(xml, payment_method, options)
|
641
660
|
return unless network_tokenization?(payment_method)
|
661
|
+
|
642
662
|
brand = card_brand(payment_method).to_sym
|
643
663
|
|
644
664
|
case brand
|
@@ -647,14 +667,16 @@ module ActiveMerchant #:nodoc:
|
|
647
667
|
xml.tag!('cavv', payment_method.payment_cryptogram)
|
648
668
|
xml.tag!('commerceIndicator', ECI_BRAND_MAPPING[brand])
|
649
669
|
xml.tag!('xid', payment_method.payment_cryptogram)
|
670
|
+
xml.tag!('reconciliationID', options[:reconciliation_id]) if options[:reconciliation_id]
|
650
671
|
end
|
651
672
|
when :master
|
652
673
|
xml.tag! 'ucaf' do
|
653
674
|
xml.tag!('authenticationData', payment_method.payment_cryptogram)
|
654
|
-
xml.tag!('collectionIndicator',
|
675
|
+
xml.tag!('collectionIndicator', DEFAULT_COLLECTION_INDICATOR)
|
655
676
|
end
|
656
677
|
xml.tag! 'ccAuthService', {'run' => 'true'} do
|
657
678
|
xml.tag!('commerceIndicator', ECI_BRAND_MAPPING[brand])
|
679
|
+
xml.tag!('reconciliationID', options[:reconciliation_id]) if options[:reconciliation_id]
|
658
680
|
end
|
659
681
|
when :american_express
|
660
682
|
cryptogram = Base64.decode64(payment_method.payment_cryptogram)
|
@@ -662,6 +684,7 @@ module ActiveMerchant #:nodoc:
|
|
662
684
|
xml.tag!('cavv', Base64.encode64(cryptogram[0...20]))
|
663
685
|
xml.tag!('commerceIndicator', ECI_BRAND_MAPPING[brand])
|
664
686
|
xml.tag!('xid', Base64.encode64(cryptogram[20...40]))
|
687
|
+
xml.tag!('reconciliationID', options[:reconciliation_id]) if options[:reconciliation_id]
|
665
688
|
end
|
666
689
|
end
|
667
690
|
end
|
@@ -676,15 +699,20 @@ module ActiveMerchant #:nodoc:
|
|
676
699
|
xml.tag! 'ccCaptureService', {'run' => 'true'} do
|
677
700
|
xml.tag! 'authRequestID', request_id
|
678
701
|
xml.tag! 'authRequestToken', request_token
|
702
|
+
xml.tag! 'reconciliationID', options[:reconciliation_id] if options[:reconciliation_id]
|
679
703
|
end
|
680
704
|
end
|
681
705
|
|
682
706
|
def add_purchase_service(xml, payment_method, options)
|
683
707
|
if options[:pinless_debit_card]
|
684
|
-
xml.tag! 'pinlessDebitService', {'run' => 'true'}
|
708
|
+
xml.tag! 'pinlessDebitService', {'run' => 'true'} do
|
709
|
+
xml.tag!('reconciliationID', options[:reconciliation_id]) if options[:reconciliation_id]
|
710
|
+
end
|
685
711
|
else
|
686
712
|
add_auth_service(xml, payment_method, options)
|
687
|
-
xml.tag! 'ccCaptureService', {'run' => 'true'}
|
713
|
+
xml.tag! 'ccCaptureService', {'run' => 'true'} do
|
714
|
+
xml.tag!('reconciliationID', options[:reconciliation_id]) if options[:reconciliation_id]
|
715
|
+
end
|
688
716
|
end
|
689
717
|
end
|
690
718
|
|
@@ -809,16 +837,28 @@ module ActiveMerchant #:nodoc:
|
|
809
837
|
end
|
810
838
|
|
811
839
|
def add_stored_credential_options(xml, options={})
|
812
|
-
return unless options[:stored_credential]
|
840
|
+
return unless options[:stored_credential] || options[:stored_credential_overrides]
|
813
841
|
|
814
|
-
if options
|
815
|
-
|
816
|
-
|
817
|
-
|
818
|
-
|
819
|
-
|
820
|
-
|
821
|
-
|
842
|
+
stored_credential_subsequent_auth = 'true' if options.dig(:stored_credential, :initiator) == 'merchant'
|
843
|
+
stored_credential_subsequent_auth_first = 'true' if options.dig(:stored_credential, :initial_transaction)
|
844
|
+
stored_credential_transaction_id = options.dig(:stored_credential, :network_transaction_id) if options.dig(:stored_credential, :initiator) == 'merchant'
|
845
|
+
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'
|
846
|
+
|
847
|
+
override_subsequent_auth = options.dig(:stored_credential_overrides, :subsequent_auth)
|
848
|
+
override_subsequent_auth_first = options.dig(:stored_credential_overrides, :subsequent_auth_first)
|
849
|
+
override_subsequent_auth_transaction_id = options.dig(:stored_credential_overrides, :subsequent_auth_transaction_id)
|
850
|
+
override_subsequent_auth_stored_cred = options.dig(:stored_credential_overrides, :subsequent_auth_stored_credential)
|
851
|
+
|
852
|
+
xml.subsequentAuth override_subsequent_auth.nil? ? stored_credential_subsequent_auth : override_subsequent_auth
|
853
|
+
xml.subsequentAuthFirst override_subsequent_auth_first.nil? ? stored_credential_subsequent_auth_first : override_subsequent_auth_first
|
854
|
+
xml.subsequentAuthTransactionID override_subsequent_auth_transaction_id.nil? ? stored_credential_transaction_id : override_subsequent_auth_transaction_id
|
855
|
+
xml.subsequentAuthStoredCredential override_subsequent_auth_stored_cred.nil? ? stored_credential_subsequent_auth_stored_cred : override_subsequent_auth_stored_cred
|
856
|
+
end
|
857
|
+
|
858
|
+
def add_partner_solution_id(xml)
|
859
|
+
return unless application_id
|
860
|
+
|
861
|
+
xml.tag!('partnerSolutionID', application_id)
|
822
862
|
end
|
823
863
|
|
824
864
|
# Where we actually build the full SOAP request using builder
|
@@ -862,9 +902,8 @@ module ActiveMerchant #:nodoc:
|
|
862
902
|
end
|
863
903
|
|
864
904
|
success = success?(response)
|
865
|
-
message = response
|
866
|
-
|
867
|
-
authorization = success ? authorization_from(response, action, amount, options) : nil
|
905
|
+
message = message_from(response)
|
906
|
+
authorization = success || in_fraud_review?(response) ? authorization_from(response, action, amount, options) : nil
|
868
907
|
|
869
908
|
Response.new(success, message, response,
|
870
909
|
test: test?,
|
@@ -901,7 +940,7 @@ module ActiveMerchant #:nodoc:
|
|
901
940
|
if node.has_elements?
|
902
941
|
node.elements.each { |e| parse_element(reply, e) }
|
903
942
|
else
|
904
|
-
if node.parent.name
|
943
|
+
if /item/.match?(node.parent.name)
|
905
944
|
parent = node.parent.name
|
906
945
|
parent += '_' + node.parent.attributes['id'] if node.parent.attributes['id']
|
907
946
|
parent += '_'
|
@@ -929,6 +968,16 @@ module ActiveMerchant #:nodoc:
|
|
929
968
|
def success?(response)
|
930
969
|
response[:decision] == @@decision_codes[:accept]
|
931
970
|
end
|
971
|
+
|
972
|
+
def message_from(response)
|
973
|
+
if response[:reasonCode] == '101' && response[:missingField]
|
974
|
+
"#{response[:message]}: #{response[:missingField]}"
|
975
|
+
elsif response[:reasonCode] == '102' && response[:invalidField]
|
976
|
+
"#{response[:message]}: #{response[:invalidField]}"
|
977
|
+
else
|
978
|
+
response[:message]
|
979
|
+
end
|
980
|
+
end
|
932
981
|
end
|
933
982
|
end
|
934
983
|
end
|