activemerchant 1.108.0 → 1.109.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +28 -0
- data/lib/active_merchant/billing/base.rb +0 -13
- data/lib/active_merchant/billing/check.rb +1 -1
- data/lib/active_merchant/billing/credit_card.rb +2 -0
- data/lib/active_merchant/billing/credit_card_methods.rb +9 -6
- data/lib/active_merchant/billing/gateways/adyen.rb +8 -8
- data/lib/active_merchant/billing/gateways/allied_wallet.rb +2 -2
- data/lib/active_merchant/billing/gateways/authorize_net.rb +7 -7
- data/lib/active_merchant/billing/gateways/authorize_net_arb.rb +3 -3
- data/lib/active_merchant/billing/gateways/authorize_net_cim.rb +3 -3
- data/lib/active_merchant/billing/gateways/axcessms.rb +1 -1
- data/lib/active_merchant/billing/gateways/balanced.rb +1 -1
- data/lib/active_merchant/billing/gateways/bambora_apac.rb +2 -2
- data/lib/active_merchant/billing/gateways/bank_frick.rb +2 -2
- data/lib/active_merchant/billing/gateways/banwire.rb +2 -2
- data/lib/active_merchant/billing/gateways/barclaycard_smartpay.rb +2 -2
- data/lib/active_merchant/billing/gateways/barclays_epdq_extra_plus.rb +1 -1
- data/lib/active_merchant/billing/gateways/be2bill.rb +1 -1
- data/lib/active_merchant/billing/gateways/beanstream/beanstream_core.rb +4 -4
- data/lib/active_merchant/billing/gateways/blue_pay.rb +2 -2
- data/lib/active_merchant/billing/gateways/blue_snap.rb +1 -1
- data/lib/active_merchant/billing/gateways/borgun.rb +3 -3
- data/lib/active_merchant/billing/gateways/bpoint.rb +1 -1
- data/lib/active_merchant/billing/gateways/braintree/braintree_common.rb +1 -1
- data/lib/active_merchant/billing/gateways/braintree_blue.rb +78 -28
- data/lib/active_merchant/billing/gateways/bridge_pay.rb +2 -2
- data/lib/active_merchant/billing/gateways/cams.rb +2 -2
- data/lib/active_merchant/billing/gateways/card_connect.rb +1 -1
- data/lib/active_merchant/billing/gateways/card_save.rb +1 -1
- data/lib/active_merchant/billing/gateways/card_stream.rb +4 -4
- data/lib/active_merchant/billing/gateways/cardknox.rb +4 -4
- data/lib/active_merchant/billing/gateways/cardprocess.rb +1 -1
- data/lib/active_merchant/billing/gateways/cashnet.rb +1 -1
- data/lib/active_merchant/billing/gateways/cecabank.rb +1 -1
- data/lib/active_merchant/billing/gateways/cenpos.rb +12 -12
- data/lib/active_merchant/billing/gateways/checkout.rb +3 -3
- data/lib/active_merchant/billing/gateways/checkout_v2.rb +2 -2
- data/lib/active_merchant/billing/gateways/citrus_pay.rb +1 -1
- data/lib/active_merchant/billing/gateways/clearhaus.rb +3 -3
- data/lib/active_merchant/billing/gateways/commercegate.rb +1 -1
- data/lib/active_merchant/billing/gateways/conekta.rb +1 -1
- data/lib/active_merchant/billing/gateways/creditcall.rb +1 -1
- data/lib/active_merchant/billing/gateways/credorax.rb +6 -2
- data/lib/active_merchant/billing/gateways/ct_payment.rb +2 -2
- data/lib/active_merchant/billing/gateways/culqi.rb +1 -1
- data/lib/active_merchant/billing/gateways/cyber_source.rb +13 -4
- data/lib/active_merchant/billing/gateways/d_local.rb +7 -3
- data/lib/active_merchant/billing/gateways/data_cash.rb +1 -1
- data/lib/active_merchant/billing/gateways/dibs.rb +2 -2
- data/lib/active_merchant/billing/gateways/digitzs.rb +2 -2
- data/lib/active_merchant/billing/gateways/ebanx.rb +4 -4
- data/lib/active_merchant/billing/gateways/efsnet.rb +2 -2
- data/lib/active_merchant/billing/gateways/elavon.rb +1 -1
- data/lib/active_merchant/billing/gateways/element.rb +3 -3
- data/lib/active_merchant/billing/gateways/epay.rb +3 -3
- data/lib/active_merchant/billing/gateways/evo_ca.rb +1 -1
- data/lib/active_merchant/billing/gateways/eway.rb +1 -1
- data/lib/active_merchant/billing/gateways/eway_managed.rb +1 -1
- data/lib/active_merchant/billing/gateways/eway_rapid.rb +2 -2
- data/lib/active_merchant/billing/gateways/exact.rb +3 -3
- data/lib/active_merchant/billing/gateways/ezic.rb +1 -1
- data/lib/active_merchant/billing/gateways/fat_zebra.rb +4 -4
- data/lib/active_merchant/billing/gateways/federated_canada.rb +1 -1
- data/lib/active_merchant/billing/gateways/finansbank.rb +2 -2
- data/lib/active_merchant/billing/gateways/first_giving.rb +1 -1
- data/lib/active_merchant/billing/gateways/first_pay.rb +1 -1
- data/lib/active_merchant/billing/gateways/firstdata_e4.rb +4 -4
- data/lib/active_merchant/billing/gateways/firstdata_e4_v27.rb +3 -3
- data/lib/active_merchant/billing/gateways/flo2cash.rb +10 -10
- data/lib/active_merchant/billing/gateways/forte.rb +2 -2
- data/lib/active_merchant/billing/gateways/garanti.rb +2 -2
- data/lib/active_merchant/billing/gateways/global_collect.rb +5 -5
- data/lib/active_merchant/billing/gateways/global_transport.rb +1 -1
- data/lib/active_merchant/billing/gateways/hdfc.rb +9 -9
- data/lib/active_merchant/billing/gateways/hps.rb +1 -1
- data/lib/active_merchant/billing/gateways/iats_payments.rb +2 -2
- data/lib/active_merchant/billing/gateways/inspire.rb +1 -1
- data/lib/active_merchant/billing/gateways/instapay.rb +1 -1
- data/lib/active_merchant/billing/gateways/ipp.rb +1 -1
- data/lib/active_merchant/billing/gateways/iridium.rb +3 -3
- data/lib/active_merchant/billing/gateways/itransact.rb +1 -1
- data/lib/active_merchant/billing/gateways/iveri.rb +2 -2
- data/lib/active_merchant/billing/gateways/ixopay.rb +1 -1
- data/lib/active_merchant/billing/gateways/jetpay.rb +2 -2
- data/lib/active_merchant/billing/gateways/jetpay_v2.rb +2 -2
- data/lib/active_merchant/billing/gateways/komoju.rb +1 -1
- data/lib/active_merchant/billing/gateways/kushki.rb +4 -4
- data/lib/active_merchant/billing/gateways/latitude19.rb +2 -2
- data/lib/active_merchant/billing/gateways/linkpoint.rb +2 -2
- data/lib/active_merchant/billing/gateways/litle.rb +4 -4
- data/lib/active_merchant/billing/gateways/maxipago.rb +2 -2
- data/lib/active_merchant/billing/gateways/mercado_pago.rb +11 -6
- data/lib/active_merchant/billing/gateways/merchant_e_solutions.rb +1 -1
- data/lib/active_merchant/billing/gateways/merchant_one.rb +2 -2
- data/lib/active_merchant/billing/gateways/merchant_partners.rb +1 -1
- data/lib/active_merchant/billing/gateways/merchant_ware.rb +1 -1
- data/lib/active_merchant/billing/gateways/merchant_ware_version_four.rb +1 -1
- data/lib/active_merchant/billing/gateways/merchant_warrior.rb +2 -2
- data/lib/active_merchant/billing/gateways/mercury.rb +4 -4
- data/lib/active_merchant/billing/gateways/metrics_global.rb +1 -1
- data/lib/active_merchant/billing/gateways/micropayment.rb +2 -2
- data/lib/active_merchant/billing/gateways/migs.rb +1 -1
- data/lib/active_merchant/billing/gateways/modern_payments_cim.rb +1 -1
- data/lib/active_merchant/billing/gateways/monei.rb +2 -2
- data/lib/active_merchant/billing/gateways/moneris.rb +17 -17
- data/lib/active_merchant/billing/gateways/money_movers.rb +1 -1
- data/lib/active_merchant/billing/gateways/mundipagg.rb +1 -1
- data/lib/active_merchant/billing/gateways/nab_transact.rb +2 -2
- data/lib/active_merchant/billing/gateways/ncr_secure_pay.rb +1 -1
- data/lib/active_merchant/billing/gateways/net_registry.rb +2 -2
- data/lib/active_merchant/billing/gateways/netaxept.rb +2 -2
- data/lib/active_merchant/billing/gateways/netbanx.rb +46 -22
- data/lib/active_merchant/billing/gateways/netbilling.rb +2 -2
- data/lib/active_merchant/billing/gateways/netpay.rb +2 -2
- data/lib/active_merchant/billing/gateways/network_merchants.rb +1 -1
- data/lib/active_merchant/billing/gateways/nmi.rb +4 -4
- data/lib/active_merchant/billing/gateways/ogone.rb +2 -2
- data/lib/active_merchant/billing/gateways/omise.rb +1 -1
- data/lib/active_merchant/billing/gateways/openpay.rb +1 -1
- data/lib/active_merchant/billing/gateways/opp.rb +1 -1
- data/lib/active_merchant/billing/gateways/optimal_payment.rb +4 -4
- data/lib/active_merchant/billing/gateways/orbital.rb +6 -6
- data/lib/active_merchant/billing/gateways/orbital/orbital_soft_descriptors.rb +1 -1
- data/lib/active_merchant/billing/gateways/pac_net_raven.rb +1 -1
- data/lib/active_merchant/billing/gateways/pagarme.rb +2 -2
- data/lib/active_merchant/billing/gateways/pago_facil.rb +1 -1
- data/lib/active_merchant/billing/gateways/pay_conex.rb +1 -1
- data/lib/active_merchant/billing/gateways/pay_gate_xml.rb +2 -2
- data/lib/active_merchant/billing/gateways/pay_hub.rb +1 -1
- data/lib/active_merchant/billing/gateways/pay_junction.rb +3 -3
- data/lib/active_merchant/billing/gateways/pay_junction_v2.rb +2 -2
- data/lib/active_merchant/billing/gateways/pay_secure.rb +1 -1
- data/lib/active_merchant/billing/gateways/paybox_direct.rb +3 -3
- data/lib/active_merchant/billing/gateways/payeezy.rb +2 -2
- data/lib/active_merchant/billing/gateways/payex.rb +13 -13
- data/lib/active_merchant/billing/gateways/payflow.rb +5 -5
- data/lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb +1 -1
- data/lib/active_merchant/billing/gateways/payflow_uk.rb +1 -1
- data/lib/active_merchant/billing/gateways/payment_express.rb +1 -1
- data/lib/active_merchant/billing/gateways/paymentez.rb +1 -1
- data/lib/active_merchant/billing/gateways/paymill.rb +1 -1
- data/lib/active_merchant/billing/gateways/paypal.rb +2 -2
- data/lib/active_merchant/billing/gateways/paypal_ca.rb +1 -1
- data/lib/active_merchant/billing/gateways/payscout.rb +1 -1
- data/lib/active_merchant/billing/gateways/paystation.rb +1 -1
- data/lib/active_merchant/billing/gateways/payu_in.rb +1 -1
- data/lib/active_merchant/billing/gateways/payu_latam.rb +6 -7
- data/lib/active_merchant/billing/gateways/payway.rb +1 -1
- data/lib/active_merchant/billing/gateways/pin.rb +1 -1
- data/lib/active_merchant/billing/gateways/plugnpay.rb +5 -5
- data/lib/active_merchant/billing/gateways/pro_pay.rb +2 -2
- data/lib/active_merchant/billing/gateways/psigate.rb +1 -1
- data/lib/active_merchant/billing/gateways/psl_card.rb +2 -2
- data/lib/active_merchant/billing/gateways/qbms.rb +1 -1
- data/lib/active_merchant/billing/gateways/quantum.rb +3 -3
- data/lib/active_merchant/billing/gateways/quickbooks.rb +6 -6
- data/lib/active_merchant/billing/gateways/quickpay/quickpay_common.rb +3 -3
- data/lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb +4 -4
- data/lib/active_merchant/billing/gateways/qvalent.rb +1 -1
- data/lib/active_merchant/billing/gateways/realex.rb +1 -1
- data/lib/active_merchant/billing/gateways/redsys.rb +4 -4
- data/lib/active_merchant/billing/gateways/s5.rb +1 -1
- data/lib/active_merchant/billing/gateways/safe_charge.rb +2 -2
- data/lib/active_merchant/billing/gateways/sage.rb +3 -3
- data/lib/active_merchant/billing/gateways/sage_pay.rb +3 -3
- data/lib/active_merchant/billing/gateways/sallie_mae.rb +1 -1
- data/lib/active_merchant/billing/gateways/secure_net.rb +1 -1
- data/lib/active_merchant/billing/gateways/secure_pay.rb +1 -1
- data/lib/active_merchant/billing/gateways/secure_pay_au.rb +2 -2
- data/lib/active_merchant/billing/gateways/secure_pay_tech.rb +2 -2
- data/lib/active_merchant/billing/gateways/securion_pay.rb +1 -1
- data/lib/active_merchant/billing/gateways/skip_jack.rb +5 -5
- data/lib/active_merchant/billing/gateways/so_easy_pay.rb +6 -6
- data/lib/active_merchant/billing/gateways/spreedly_core.rb +1 -1
- data/lib/active_merchant/billing/gateways/stripe.rb +6 -6
- data/lib/active_merchant/billing/gateways/stripe_payment_intents.rb +20 -1
- data/lib/active_merchant/billing/gateways/swipe_checkout.rb +1 -1
- data/lib/active_merchant/billing/gateways/telr.rb +4 -4
- data/lib/active_merchant/billing/gateways/tns.rb +1 -1
- data/lib/active_merchant/billing/gateways/trans_first.rb +2 -2
- data/lib/active_merchant/billing/gateways/trans_first_transaction_express.rb +1 -1
- data/lib/active_merchant/billing/gateways/transact_pro.rb +1 -1
- data/lib/active_merchant/billing/gateways/transax.rb +1 -1
- data/lib/active_merchant/billing/gateways/trexle.rb +1 -1
- data/lib/active_merchant/billing/gateways/trust_commerce.rb +5 -5
- data/lib/active_merchant/billing/gateways/usa_epay_advanced.rb +6 -6
- data/lib/active_merchant/billing/gateways/usa_epay_transaction.rb +1 -1
- data/lib/active_merchant/billing/gateways/vanco.rb +1 -1
- data/lib/active_merchant/billing/gateways/verifi.rb +3 -3
- data/lib/active_merchant/billing/gateways/viaklix.rb +1 -1
- data/lib/active_merchant/billing/gateways/visanet_peru.rb +3 -3
- data/lib/active_merchant/billing/gateways/webpay.rb +1 -1
- data/lib/active_merchant/billing/gateways/wepay.rb +2 -2
- data/lib/active_merchant/billing/gateways/wirecard.rb +1 -1
- data/lib/active_merchant/billing/gateways/world_net.rb +35 -35
- data/lib/active_merchant/billing/gateways/worldpay.rb +6 -6
- data/lib/active_merchant/billing/gateways/worldpay_online_payments.rb +1 -1
- data/lib/active_merchant/billing/gateways/worldpay_us.rb +1 -1
- data/lib/active_merchant/version.rb +1 -1
- data/lib/support/gateway_support.rb +1 -1
- metadata +35 -35
@@ -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
|
@@ -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)
|
@@ -36,8 +36,8 @@ module ActiveMerchant #:nodoc:
|
|
36
36
|
}.freeze
|
37
37
|
DEFAULT_COLLECTION_INDICATOR = 2
|
38
38
|
|
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)
|
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)
|
41
41
|
|
42
42
|
self.default_currency = 'USD'
|
43
43
|
self.currencies_without_fractions = %w(JPY)
|
@@ -604,6 +604,7 @@ module ActiveMerchant #:nodoc:
|
|
604
604
|
indicator = options[:commerce_indicator] || stored_credential_commerce_indicator(options)
|
605
605
|
xml.tag!('commerceIndicator', indicator) if indicator
|
606
606
|
end
|
607
|
+
xml.tag!('reconciliationID', options[:reconciliation_id]) if options[:reconciliation_id]
|
607
608
|
end
|
608
609
|
end
|
609
610
|
end
|
@@ -660,6 +661,7 @@ module ActiveMerchant #:nodoc:
|
|
660
661
|
xml.tag!('cavv', payment_method.payment_cryptogram)
|
661
662
|
xml.tag!('commerceIndicator', ECI_BRAND_MAPPING[brand])
|
662
663
|
xml.tag!('xid', payment_method.payment_cryptogram)
|
664
|
+
xml.tag!('reconciliationID', options[:reconciliation_id]) if options[:reconciliation_id]
|
663
665
|
end
|
664
666
|
when :master
|
665
667
|
xml.tag! 'ucaf' do
|
@@ -668,6 +670,7 @@ module ActiveMerchant #:nodoc:
|
|
668
670
|
end
|
669
671
|
xml.tag! 'ccAuthService', {'run' => 'true'} do
|
670
672
|
xml.tag!('commerceIndicator', ECI_BRAND_MAPPING[brand])
|
673
|
+
xml.tag!('reconciliationID', options[:reconciliation_id]) if options[:reconciliation_id]
|
671
674
|
end
|
672
675
|
when :american_express
|
673
676
|
cryptogram = Base64.decode64(payment_method.payment_cryptogram)
|
@@ -675,6 +678,7 @@ module ActiveMerchant #:nodoc:
|
|
675
678
|
xml.tag!('cavv', Base64.encode64(cryptogram[0...20]))
|
676
679
|
xml.tag!('commerceIndicator', ECI_BRAND_MAPPING[brand])
|
677
680
|
xml.tag!('xid', Base64.encode64(cryptogram[20...40]))
|
681
|
+
xml.tag!('reconciliationID', options[:reconciliation_id]) if options[:reconciliation_id]
|
678
682
|
end
|
679
683
|
end
|
680
684
|
end
|
@@ -689,15 +693,20 @@ module ActiveMerchant #:nodoc:
|
|
689
693
|
xml.tag! 'ccCaptureService', {'run' => 'true'} do
|
690
694
|
xml.tag! 'authRequestID', request_id
|
691
695
|
xml.tag! 'authRequestToken', request_token
|
696
|
+
xml.tag! 'reconciliationID', options[:reconciliation_id] if options[:reconciliation_id]
|
692
697
|
end
|
693
698
|
end
|
694
699
|
|
695
700
|
def add_purchase_service(xml, payment_method, options)
|
696
701
|
if options[:pinless_debit_card]
|
697
|
-
xml.tag! 'pinlessDebitService', {'run' => 'true'}
|
702
|
+
xml.tag! 'pinlessDebitService', {'run' => 'true'} do
|
703
|
+
xml.tag!('reconciliationID', options[:reconciliation_id]) if options[:reconciliation_id]
|
704
|
+
end
|
698
705
|
else
|
699
706
|
add_auth_service(xml, payment_method, options)
|
700
|
-
xml.tag! 'ccCaptureService', {'run' => 'true'}
|
707
|
+
xml.tag! 'ccCaptureService', {'run' => 'true'} do
|
708
|
+
xml.tag!('reconciliationID', options[:reconciliation_id]) if options[:reconciliation_id]
|
709
|
+
end
|
701
710
|
end
|
702
711
|
end
|
703
712
|
|
@@ -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'
|
@@ -125,11 +125,15 @@ module ActiveMerchant #:nodoc:
|
|
125
125
|
end
|
126
126
|
|
127
127
|
def parse_street(address)
|
128
|
+
return unless address[:address1]
|
129
|
+
|
128
130
|
street = address[:address1].split(/\s+/).keep_if { |x| x !~ /\d/ }.join(' ')
|
129
131
|
street.empty? ? nil : street
|
130
132
|
end
|
131
133
|
|
132
134
|
def parse_house_number(address)
|
135
|
+
return unless address[:address1]
|
136
|
+
|
133
137
|
house = address[:address1].split(/\s+/).keep_if { |x| x =~ /\d/ }.join(' ')
|
134
138
|
house.empty? ? nil : house
|
135
139
|
end
|
@@ -180,7 +184,7 @@ module ActiveMerchant #:nodoc:
|
|
180
184
|
def success_from(action, response)
|
181
185
|
return false unless response['status_code']
|
182
186
|
|
183
|
-
[
|
187
|
+
%w[100 200 400 600].include? response['status_code'].to_s
|
184
188
|
end
|
185
189
|
|
186
190
|
def message_from(action, response)
|
@@ -6,7 +6,7 @@ module ActiveMerchant
|
|
6
6
|
self.default_currency = 'GBP'
|
7
7
|
self.supported_countries = ['GB']
|
8
8
|
|
9
|
-
self.supported_cardtypes = [
|
9
|
+
self.supported_cardtypes = %i[visa master american_express discover diners_club jcb maestro]
|
10
10
|
|
11
11
|
self.homepage_url = 'http://www.datacash.com/'
|
12
12
|
self.display_name = 'DataCash'
|
@@ -6,10 +6,10 @@ module ActiveMerchant #:nodoc:
|
|
6
6
|
|
7
7
|
self.live_url = 'https://api.dibspayment.com/merchant/v1/JSON/Transaction/'
|
8
8
|
|
9
|
-
self.supported_countries = [
|
9
|
+
self.supported_countries = %w[US FI NO SE GB]
|
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 discover]
|
13
13
|
|
14
14
|
def initialize(options={})
|
15
15
|
requires!(options, :merchant_id, :secret_key)
|
@@ -8,7 +8,7 @@ module ActiveMerchant #:nodoc:
|
|
8
8
|
|
9
9
|
self.supported_countries = ['US']
|
10
10
|
self.default_currency = 'USD'
|
11
|
-
self.supported_cardtypes = [
|
11
|
+
self.supported_cardtypes = %i[visa master american_express discover]
|
12
12
|
self.money_format = :cents
|
13
13
|
|
14
14
|
self.homepage_url = 'https://digitzs.com'
|
@@ -235,7 +235,7 @@ module ActiveMerchant #:nodoc:
|
|
235
235
|
|
236
236
|
def authorization_from(response)
|
237
237
|
if customer_id = response.try(:[], 'data').try(:[], 'attributes').try(:[], 'customerId')
|
238
|
-
"#{customer_id}|#{response.try(:[],
|
238
|
+
"#{customer_id}|#{response.try(:[], 'data').try(:[], 'id')}"
|
239
239
|
else
|
240
240
|
response.try(:[], 'data').try(:[], 'id')
|
241
241
|
end
|
@@ -6,7 +6,7 @@ module ActiveMerchant #:nodoc:
|
|
6
6
|
|
7
7
|
self.supported_countries = %w(BR MX CO CL AR PE)
|
8
8
|
self.default_currency = 'USD'
|
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.ebanx.com/'
|
12
12
|
self.display_name = 'EBANX'
|
@@ -237,7 +237,7 @@ module ActiveMerchant #:nodoc:
|
|
237
237
|
end
|
238
238
|
|
239
239
|
def success_from(action, response)
|
240
|
-
if [
|
240
|
+
if %i[purchase capture refund].include?(action)
|
241
241
|
response.try(:[], 'payment').try(:[], 'status') == 'CO'
|
242
242
|
elsif action == :authorize
|
243
243
|
response.try(:[], 'payment').try(:[], 'status') == 'PE'
|
@@ -258,7 +258,7 @@ module ActiveMerchant #:nodoc:
|
|
258
258
|
|
259
259
|
def authorization_from(action, parameters, response)
|
260
260
|
if action == :store
|
261
|
-
"#{response.try(:[],
|
261
|
+
"#{response.try(:[], 'token')}|#{CARD_BRAND[parameters[:payment_type_code].to_sym]}"
|
262
262
|
else
|
263
263
|
response.try(:[], 'payment').try(:[], 'hash')
|
264
264
|
end
|
@@ -278,7 +278,7 @@ module ActiveMerchant #:nodoc:
|
|
278
278
|
end
|
279
279
|
|
280
280
|
def requires_http_get(action)
|
281
|
-
return true if [
|
281
|
+
return true if %i[capture void].include?(action)
|
282
282
|
|
283
283
|
false
|
284
284
|
end
|
@@ -4,7 +4,7 @@ module ActiveMerchant #:nodoc:
|
|
4
4
|
module Billing #:nodoc:
|
5
5
|
class EfsnetGateway < Gateway
|
6
6
|
self.supported_countries = ['US']
|
7
|
-
self.supported_cardtypes = [
|
7
|
+
self.supported_cardtypes = %i[visa master american_express discover]
|
8
8
|
self.homepage_url = 'http://www.concordefsnet.com/'
|
9
9
|
self.display_name = 'Efsnet'
|
10
10
|
|
@@ -53,7 +53,7 @@ module ActiveMerchant #:nodoc:
|
|
53
53
|
|
54
54
|
def void(identification, options = {})
|
55
55
|
requires!(options, :order_id)
|
56
|
-
original_transaction_id,
|
56
|
+
original_transaction_id, = identification.split(';')
|
57
57
|
commit(:void_transaction, {reference_number: format_reference_number(options[:order_id]), transaction_id: original_transaction_id})
|
58
58
|
end
|
59
59
|
|
@@ -12,7 +12,7 @@ module ActiveMerchant #:nodoc:
|
|
12
12
|
|
13
13
|
self.display_name = 'Elavon MyVirtualMerchant'
|
14
14
|
self.supported_countries = %w(US CA PR DE IE NO PL LU BE NL MX)
|
15
|
-
self.supported_cardtypes = [
|
15
|
+
self.supported_cardtypes = %i[visa master american_express discover]
|
16
16
|
self.homepage_url = 'http://www.elavon.com/'
|
17
17
|
|
18
18
|
self.delimiter = "\n"
|
@@ -9,7 +9,7 @@ module ActiveMerchant #:nodoc:
|
|
9
9
|
|
10
10
|
self.supported_countries = ['US']
|
11
11
|
self.default_currency = 'USD'
|
12
|
-
self.supported_cardtypes = [
|
12
|
+
self.supported_cardtypes = %i[visa master american_express discover diners_club jcb]
|
13
13
|
|
14
14
|
self.homepage_url = 'http://www.elementps.com'
|
15
15
|
self.display_name = 'Element'
|
@@ -53,7 +53,7 @@ module ActiveMerchant #:nodoc:
|
|
53
53
|
end
|
54
54
|
|
55
55
|
def capture(money, authorization, options={})
|
56
|
-
trans_id,
|
56
|
+
trans_id, = split_authorization(authorization)
|
57
57
|
options[:trans_id] = trans_id
|
58
58
|
|
59
59
|
request = build_soap_request do |xml|
|
@@ -68,7 +68,7 @@ module ActiveMerchant #:nodoc:
|
|
68
68
|
end
|
69
69
|
|
70
70
|
def refund(money, authorization, options={})
|
71
|
-
trans_id,
|
71
|
+
trans_id, = split_authorization(authorization)
|
72
72
|
options[:trans_id] = trans_id
|
73
73
|
|
74
74
|
request = build_soap_request do |xml|
|
@@ -5,9 +5,9 @@ module ActiveMerchant #:nodoc:
|
|
5
5
|
|
6
6
|
self.default_currency = 'DKK'
|
7
7
|
self.money_format = :cents
|
8
|
-
self.
|
9
|
-
|
10
|
-
|
8
|
+
self.supported_countries = %w[DK SE NO]
|
9
|
+
self.supported_cardtypes = %i[dankort forbrugsforeningen visa master
|
10
|
+
american_express diners_club jcb maestro]
|
11
11
|
self.homepage_url = 'http://epay.dk/'
|
12
12
|
self.display_name = 'ePay'
|
13
13
|
|
@@ -36,7 +36,7 @@ module ActiveMerchant #:nodoc:
|
|
36
36
|
self.live_url = 'https://secure.evoepay.com/api/transact.php'
|
37
37
|
|
38
38
|
self.supported_countries = ['CA']
|
39
|
-
self.supported_cardtypes = [
|
39
|
+
self.supported_cardtypes = %i[visa master american_express jcb discover]
|
40
40
|
self.money_format = :dollars
|
41
41
|
self.homepage_url = 'http://www.evocanada.com/'
|
42
42
|
self.display_name = 'EVO Canada'
|
@@ -9,7 +9,7 @@ module ActiveMerchant #:nodoc:
|
|
9
9
|
|
10
10
|
self.money_format = :cents
|
11
11
|
self.supported_countries = ['AU']
|
12
|
-
self.supported_cardtypes = [
|
12
|
+
self.supported_cardtypes = %i[visa master american_express diners_club]
|
13
13
|
self.homepage_url = 'http://www.eway.com.au/'
|
14
14
|
self.display_name = 'eWAY'
|
15
15
|
|
@@ -7,8 +7,8 @@ module ActiveMerchant #:nodoc:
|
|
7
7
|
self.live_url = 'https://api.ewaypayments.com/'
|
8
8
|
|
9
9
|
self.money_format = :cents
|
10
|
-
self.supported_countries = [
|
11
|
-
self.supported_cardtypes = [
|
10
|
+
self.supported_countries = %w[AU NZ GB SG MY HK]
|
11
|
+
self.supported_cardtypes = %i[visa master american_express diners_club jcb]
|
12
12
|
self.homepage_url = 'http://www.eway.com.au/'
|
13
13
|
self.display_name = 'eWAY Rapid 3.1'
|
14
14
|
self.default_currency = 'AUD'
|
@@ -28,10 +28,10 @@ module ActiveMerchant #:nodoc:
|
|
28
28
|
|
29
29
|
SUCCESS = 'true'
|
30
30
|
|
31
|
-
SENSITIVE_FIELDS = [
|
31
|
+
SENSITIVE_FIELDS = %i[verification_str2 expiry_date card_number]
|
32
32
|
|
33
|
-
self.
|
34
|
-
self.
|
33
|
+
self.supported_countries = %w[CA US]
|
34
|
+
self.supported_cardtypes = %i[visa master american_express jcb discover]
|
35
35
|
self.homepage_url = 'http://www.e-xact.com'
|
36
36
|
self.display_name = 'E-xact'
|
37
37
|
|
@@ -5,7 +5,7 @@ module ActiveMerchant
|
|
5
5
|
|
6
6
|
self.supported_countries = %w(AU CA CN FR DE GI IL MT MU MX NL NZ PA PH RU SG KR ES KN GB US)
|
7
7
|
self.default_currency = 'USD'
|
8
|
-
self.supported_cardtypes = [
|
8
|
+
self.supported_cardtypes = %i[visa master american_express discover jcb diners_club]
|
9
9
|
|
10
10
|
self.homepage_url = 'http://www.ezic.com/'
|
11
11
|
self.display_name = 'Ezic'
|
@@ -9,7 +9,7 @@ module ActiveMerchant #:nodoc:
|
|
9
9
|
self.supported_countries = ['AU']
|
10
10
|
self.default_currency = 'AUD'
|
11
11
|
self.money_format = :cents
|
12
|
-
self.supported_cardtypes = [
|
12
|
+
self.supported_cardtypes = %i[visa master american_express jcb]
|
13
13
|
|
14
14
|
self.homepage_url = 'https://www.fatzebra.com.au/'
|
15
15
|
self.display_name = 'Fat Zebra'
|
@@ -48,7 +48,7 @@ module ActiveMerchant #:nodoc:
|
|
48
48
|
end
|
49
49
|
|
50
50
|
def capture(money, authorization, options = {})
|
51
|
-
txn_id,
|
51
|
+
txn_id, = authorization.to_s.split('|')
|
52
52
|
post = {}
|
53
53
|
|
54
54
|
add_amount(post, money, options)
|
@@ -58,7 +58,7 @@ module ActiveMerchant #:nodoc:
|
|
58
58
|
end
|
59
59
|
|
60
60
|
def refund(money, authorization, options={})
|
61
|
-
txn_id,
|
61
|
+
txn_id, = authorization.to_s.split('|')
|
62
62
|
post = {}
|
63
63
|
|
64
64
|
add_extra_options(post, options)
|
@@ -110,7 +110,7 @@ module ActiveMerchant #:nodoc:
|
|
110
110
|
post[:cvv] = creditcard.verification_value if creditcard.verification_value?
|
111
111
|
post[:card_holder] = creditcard.name if creditcard.name
|
112
112
|
elsif creditcard.is_a?(String)
|
113
|
-
id,
|
113
|
+
id, = creditcard.to_s.split('|')
|
114
114
|
post[:card_token] = id
|
115
115
|
post[:cvv] = options[:cvv]
|
116
116
|
elsif creditcard.is_a?(Hash)
|
@@ -12,7 +12,7 @@ module ActiveMerchant #:nodoc:
|
|
12
12
|
self.default_currency = 'CAD'
|
13
13
|
|
14
14
|
# The card types supported by the payment gateway
|
15
|
-
self.supported_cardtypes = [
|
15
|
+
self.supported_cardtypes = %i[visa master american_express discover]
|
16
16
|
|
17
17
|
# The homepage URL of the gateway
|
18
18
|
self.homepage_url = 'http://www.federatedcanada.com/'
|
@@ -7,10 +7,10 @@ module ActiveMerchant #:nodoc:
|
|
7
7
|
self.test_url = 'https://entegrasyon.asseco-see.com.tr/fim/api'
|
8
8
|
|
9
9
|
# The countries the gateway supports merchants from as 2 digit ISO country codes
|
10
|
-
self.supported_countries = [
|
10
|
+
self.supported_countries = %w[US TR]
|
11
11
|
|
12
12
|
# The card types supported by the payment gateway
|
13
|
-
self.supported_cardtypes = [
|
13
|
+
self.supported_cardtypes = %i[visa master]
|
14
14
|
|
15
15
|
# The homepage URL of the gateway
|
16
16
|
self.homepage_url = 'https://www.fbwebpos.com/'
|
@@ -7,7 +7,7 @@ module ActiveMerchant #:nodoc:
|
|
7
7
|
self.live_url = 'https://api.firstgiving.com'
|
8
8
|
|
9
9
|
self.supported_countries = ['US']
|
10
|
-
self.supported_cardtypes = [
|
10
|
+
self.supported_cardtypes = %i[visa master american_express discover]
|
11
11
|
self.homepage_url = 'http://www.firstgiving.com/'
|
12
12
|
self.default_currency = 'USD'
|
13
13
|
self.display_name = 'FirstGiving'
|
@@ -8,7 +8,7 @@ module ActiveMerchant #:nodoc:
|
|
8
8
|
self.supported_countries = ['US']
|
9
9
|
self.default_currency = 'USD'
|
10
10
|
self.money_format = :dollars
|
11
|
-
self.supported_cardtypes = [
|
11
|
+
self.supported_cardtypes = %i[visa master american_express discover]
|
12
12
|
|
13
13
|
self.homepage_url = 'http://1stpaygateway.net/'
|
14
14
|
self.display_name = '1stPayGateway.Net'
|