activemerchant 1.133.0 → 1.138.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG +450 -0
- data/CONTRIBUTORS +1 -0
- data/lib/active_merchant/billing/apple_pay_payment_token.rb +2 -2
- data/lib/active_merchant/billing/base.rb +2 -2
- data/lib/active_merchant/billing/check.rb +16 -4
- data/lib/active_merchant/billing/compatibility.rb +4 -4
- data/lib/active_merchant/billing/credit_card.rb +35 -16
- data/lib/active_merchant/billing/credit_card_formatting.rb +13 -2
- data/lib/active_merchant/billing/credit_card_methods.rb +74 -19
- data/lib/active_merchant/billing/gateway.rb +22 -2
- data/lib/active_merchant/billing/gateways/adyen.rb +282 -87
- data/lib/active_merchant/billing/gateways/airwallex.rb +46 -25
- data/lib/active_merchant/billing/gateways/alelo.rb +29 -11
- data/lib/active_merchant/billing/gateways/allied_wallet.rb +2 -2
- data/lib/active_merchant/billing/gateways/authorize_net.rb +49 -41
- data/lib/active_merchant/billing/gateways/authorize_net_arb.rb +14 -10
- data/lib/active_merchant/billing/gateways/authorize_net_cim.rb +3 -5
- data/lib/active_merchant/billing/gateways/axcessms.rb +9 -5
- data/lib/active_merchant/billing/gateways/balanced.rb +2 -2
- 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 +6 -4
- data/lib/active_merchant/billing/gateways/barclaycard_smartpay.rb +8 -8
- data/lib/active_merchant/billing/gateways/barclays_epdq_extra_plus.rb +2 -2
- data/lib/active_merchant/billing/gateways/be2bill.rb +2 -2
- data/lib/active_merchant/billing/gateways/beanstream/beanstream_core.rb +12 -8
- data/lib/active_merchant/billing/gateways/beanstream.rb +2 -2
- data/lib/active_merchant/billing/gateways/beanstream_interac.rb +2 -2
- data/lib/active_merchant/billing/gateways/blue_pay.rb +15 -7
- data/lib/active_merchant/billing/gateways/blue_snap.rb +5 -5
- data/lib/active_merchant/billing/gateways/bogus.rb +2 -2
- data/lib/active_merchant/billing/gateways/borgun.rb +2 -2
- data/lib/active_merchant/billing/gateways/bpoint.rb +2 -2
- data/lib/active_merchant/billing/gateways/braintree/braintree_common.rb +3 -1
- data/lib/active_merchant/billing/gateways/braintree/token_nonce.rb +68 -23
- data/lib/active_merchant/billing/gateways/braintree.rb +2 -2
- data/lib/active_merchant/billing/gateways/braintree_blue.rb +266 -89
- data/lib/active_merchant/billing/gateways/braintree_orange.rb +3 -3
- 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 +7 -4
- data/lib/active_merchant/billing/gateways/card_save.rb +2 -2
- data/lib/active_merchant/billing/gateways/card_stream.rb +12 -13
- data/lib/active_merchant/billing/gateways/cardknox.rb +2 -2
- data/lib/active_merchant/billing/gateways/cardprocess.rb +2 -2
- data/lib/active_merchant/billing/gateways/cashnet.rb +4 -4
- data/lib/active_merchant/billing/gateways/cc5.rb +2 -2
- data/lib/active_merchant/billing/gateways/cecabank/cecabank_common.rb +36 -0
- data/lib/active_merchant/billing/gateways/cecabank/cecabank_json.rb +331 -0
- data/lib/active_merchant/billing/gateways/cecabank/cecabank_xml.rb +220 -0
- data/lib/active_merchant/billing/gateways/cecabank.rb +9 -242
- data/lib/active_merchant/billing/gateways/cenpos.rb +9 -3
- data/lib/active_merchant/billing/gateways/checkout.rb +5 -5
- data/lib/active_merchant/billing/gateways/checkout_v2.rb +362 -50
- data/lib/active_merchant/billing/gateways/clearhaus.rb +2 -2
- data/lib/active_merchant/billing/gateways/commerce_hub.rb +117 -35
- data/lib/active_merchant/billing/gateways/commercegate.rb +4 -4
- data/lib/active_merchant/billing/gateways/conekta.rb +2 -2
- data/lib/active_merchant/billing/gateways/creditcall.rb +2 -2
- data/lib/active_merchant/billing/gateways/credorax.rb +109 -20
- data/lib/active_merchant/billing/gateways/ct_payment.rb +6 -6
- data/lib/active_merchant/billing/gateways/culqi.rb +2 -2
- data/lib/active_merchant/billing/gateways/cyber_source/cyber_source_common.rb +2 -2
- data/lib/active_merchant/billing/gateways/cyber_source.rb +379 -100
- data/lib/active_merchant/billing/gateways/cyber_source_rest.rb +147 -76
- data/lib/active_merchant/billing/gateways/d_local.rb +45 -22
- data/lib/active_merchant/billing/gateways/data_cash.rb +22 -18
- data/lib/active_merchant/billing/gateways/datatrans.rb +284 -0
- data/lib/active_merchant/billing/gateways/decidir.rb +82 -46
- data/lib/active_merchant/billing/gateways/decidir_plus.rb +31 -35
- data/lib/active_merchant/billing/gateways/deepstack.rb +382 -0
- data/lib/active_merchant/billing/gateways/dibs.rb +3 -3
- data/lib/active_merchant/billing/gateways/digitzs.rb +2 -2
- data/lib/active_merchant/billing/gateways/ebanx.rb +116 -68
- data/lib/active_merchant/billing/gateways/efsnet.rb +13 -8
- data/lib/active_merchant/billing/gateways/elavon.rb +80 -47
- data/lib/active_merchant/billing/gateways/element.rb +39 -10
- data/lib/active_merchant/billing/gateways/epay.rb +8 -4
- data/lib/active_merchant/billing/gateways/evo_ca.rb +8 -4
- data/lib/active_merchant/billing/gateways/eway.rb +6 -4
- data/lib/active_merchant/billing/gateways/eway_managed.rb +8 -4
- data/lib/active_merchant/billing/gateways/eway_rapid.rb +3 -3
- data/lib/active_merchant/billing/gateways/exact.rb +8 -4
- data/lib/active_merchant/billing/gateways/fat_zebra.rb +37 -7
- data/lib/active_merchant/billing/gateways/federated_canada.rb +8 -4
- data/lib/active_merchant/billing/gateways/finansbank.rb +2 -2
- data/lib/active_merchant/billing/gateways/first_giving.rb +2 -2
- data/lib/active_merchant/billing/gateways/first_pay/first_pay_common.rb +15 -0
- data/lib/active_merchant/billing/gateways/first_pay/first_pay_json.rb +190 -0
- data/lib/active_merchant/billing/gateways/first_pay/first_pay_xml.rb +183 -0
- data/lib/active_merchant/billing/gateways/first_pay.rb +8 -174
- data/lib/active_merchant/billing/gateways/firstdata_e4.rb +8 -4
- data/lib/active_merchant/billing/gateways/firstdata_e4_v27.rb +9 -5
- data/lib/active_merchant/billing/gateways/flex_charge.rb +359 -0
- data/lib/active_merchant/billing/gateways/flo2cash.rb +4 -2
- data/lib/active_merchant/billing/gateways/flo2cash_simple.rb +2 -2
- data/lib/active_merchant/billing/gateways/forte.rb +6 -4
- data/lib/active_merchant/billing/gateways/fortis.rb +347 -0
- data/lib/active_merchant/billing/gateways/garanti.rb +6 -4
- data/lib/active_merchant/billing/gateways/global_collect.rb +69 -50
- data/lib/active_merchant/billing/gateways/global_transport.rb +2 -2
- data/lib/active_merchant/billing/gateways/hdfc.rb +2 -2
- data/lib/active_merchant/billing/gateways/hi_pay.rb +287 -0
- data/lib/active_merchant/billing/gateways/hps.rb +40 -47
- data/lib/active_merchant/billing/gateways/iats_payments.rb +9 -4
- data/lib/active_merchant/billing/gateways/in_context_paypal_express.rb +2 -2
- data/lib/active_merchant/billing/gateways/inspire.rb +8 -6
- data/lib/active_merchant/billing/gateways/instapay.rb +9 -6
- data/lib/active_merchant/billing/gateways/ipg.rb +14 -10
- data/lib/active_merchant/billing/gateways/ipp.rb +2 -2
- data/lib/active_merchant/billing/gateways/iridium.rb +18 -8
- data/lib/active_merchant/billing/gateways/itransact.rb +8 -4
- data/lib/active_merchant/billing/gateways/iveri.rb +12 -9
- data/lib/active_merchant/billing/gateways/ixopay.rb +4 -4
- data/lib/active_merchant/billing/gateways/jetpay.rb +6 -4
- data/lib/active_merchant/billing/gateways/jetpay_v2.rb +9 -6
- data/lib/active_merchant/billing/gateways/komoju.rb +2 -2
- data/lib/active_merchant/billing/gateways/kushki.rb +79 -16
- data/lib/active_merchant/billing/gateways/latitude19.rb +2 -2
- data/lib/active_merchant/billing/gateways/linkpoint.rb +8 -4
- data/lib/active_merchant/billing/gateways/litle.rb +37 -54
- data/lib/active_merchant/billing/gateways/loan_payment_pro.rb +267 -0
- data/lib/active_merchant/billing/gateways/loan_payment_pro_ach.rb +93 -0
- data/lib/active_merchant/billing/gateways/mastercard.rb +4 -4
- data/lib/active_merchant/billing/gateways/maxipago.rb +4 -4
- data/lib/active_merchant/billing/gateways/mercado_pago.rb +32 -11
- data/lib/active_merchant/billing/gateways/merchant_e_solutions.rb +10 -7
- data/lib/active_merchant/billing/gateways/merchant_one.rb +2 -2
- data/lib/active_merchant/billing/gateways/merchant_partners.rb +2 -2
- data/lib/active_merchant/billing/gateways/merchant_ware.rb +13 -6
- data/lib/active_merchant/billing/gateways/merchant_ware_version_four.rb +13 -6
- data/lib/active_merchant/billing/gateways/merchant_warrior.rb +21 -5
- data/lib/active_merchant/billing/gateways/mercury.rb +11 -5
- data/lib/active_merchant/billing/gateways/metrics_global.rb +10 -8
- data/lib/active_merchant/billing/gateways/micropayment.rb +2 -2
- data/lib/active_merchant/billing/gateways/migs/migs_codes.rb +7 -6
- data/lib/active_merchant/billing/gateways/migs.rb +8 -4
- data/lib/active_merchant/billing/gateways/mit.rb +10 -5
- data/lib/active_merchant/billing/gateways/modern_payments.rb +2 -2
- data/lib/active_merchant/billing/gateways/modern_payments_cim.rb +21 -13
- data/lib/active_merchant/billing/gateways/moka.rb +2 -2
- data/lib/active_merchant/billing/gateways/monei.rb +3 -3
- data/lib/active_merchant/billing/gateways/moneris.rb +11 -5
- data/lib/active_merchant/billing/gateways/money_movers.rb +8 -4
- data/lib/active_merchant/billing/gateways/multi_pay.rb +267 -0
- data/lib/active_merchant/billing/gateways/mundipagg.rb +5 -3
- data/lib/active_merchant/billing/gateways/nab_transact.rb +18 -10
- data/lib/active_merchant/billing/gateways/ncr_secure_pay.rb +2 -2
- data/lib/active_merchant/billing/gateways/net_registry.rb +6 -2
- data/lib/active_merchant/billing/gateways/netaxept.rb +4 -4
- data/lib/active_merchant/billing/gateways/netbanx.rb +4 -6
- data/lib/active_merchant/billing/gateways/netbilling.rb +8 -4
- data/lib/active_merchant/billing/gateways/netpay.rb +2 -2
- data/lib/active_merchant/billing/gateways/network_merchants.rb +9 -5
- data/lib/active_merchant/billing/gateways/nmi.rb +29 -8
- data/lib/active_merchant/billing/gateways/nuvei.rb +573 -0
- data/lib/active_merchant/billing/gateways/ogone.rb +8 -4
- data/lib/active_merchant/billing/gateways/omise.rb +2 -2
- data/lib/active_merchant/billing/gateways/openpay.rb +6 -4
- data/lib/active_merchant/billing/gateways/opp.rb +3 -4
- data/lib/active_merchant/billing/gateways/optimal_payment.rb +12 -6
- data/lib/active_merchant/billing/gateways/orbital/orbital_codes.rb +273 -0
- data/lib/active_merchant/billing/gateways/orbital/orbital_soft_descriptors.rb +3 -5
- data/lib/active_merchant/billing/gateways/orbital.rb +114 -94
- data/lib/active_merchant/billing/gateways/pac_net_raven.rb +9 -6
- data/lib/active_merchant/billing/gateways/pagarme.rb +2 -2
- data/lib/active_merchant/billing/gateways/pago_facil.rb +2 -2
- data/lib/active_merchant/billing/gateways/pay_arc.rb +9 -7
- data/lib/active_merchant/billing/gateways/pay_conex.rb +6 -4
- data/lib/active_merchant/billing/gateways/pay_gate_xml.rb +8 -4
- data/lib/active_merchant/billing/gateways/pay_hub.rb +7 -5
- data/lib/active_merchant/billing/gateways/pay_junction.rb +8 -4
- data/lib/active_merchant/billing/gateways/pay_junction_v2.rb +2 -2
- data/lib/active_merchant/billing/gateways/pay_secure.rb +8 -4
- data/lib/active_merchant/billing/gateways/pay_trace.rb +36 -22
- data/lib/active_merchant/billing/gateways/paybox_direct.rb +14 -14
- data/lib/active_merchant/billing/gateways/payeezy.rb +26 -13
- data/lib/active_merchant/billing/gateways/payex.rb +8 -6
- data/lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb +3 -3
- data/lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb +2 -2
- data/lib/active_merchant/billing/gateways/payflow/payflow_response.rb +2 -2
- data/lib/active_merchant/billing/gateways/payflow.rb +12 -11
- data/lib/active_merchant/billing/gateways/payflow_express.rb +2 -2
- data/lib/active_merchant/billing/gateways/payflow_express_uk.rb +2 -2
- data/lib/active_merchant/billing/gateways/payflow_uk.rb +2 -2
- data/lib/active_merchant/billing/gateways/payment_express.rb +10 -6
- data/lib/active_merchant/billing/gateways/paymentez.rb +30 -16
- data/lib/active_merchant/billing/gateways/paymill.rb +6 -4
- data/lib/active_merchant/billing/gateways/paypal/paypal_common_api.rb +17 -12
- data/lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb +2 -2
- data/lib/active_merchant/billing/gateways/paypal/paypal_recurring_api.rb +2 -2
- data/lib/active_merchant/billing/gateways/paypal.rb +4 -2
- data/lib/active_merchant/billing/gateways/paypal_ca.rb +2 -2
- data/lib/active_merchant/billing/gateways/paypal_digital_goods.rb +2 -2
- data/lib/active_merchant/billing/gateways/paypal_express.rb +4 -2
- data/lib/active_merchant/billing/gateways/paysafe.rb +48 -24
- data/lib/active_merchant/billing/gateways/payscout.rb +9 -6
- data/lib/active_merchant/billing/gateways/paystation.rb +9 -5
- data/lib/active_merchant/billing/gateways/payu_in.rb +2 -2
- data/lib/active_merchant/billing/gateways/payu_latam.rb +7 -5
- data/lib/active_merchant/billing/gateways/payway.rb +6 -2
- data/lib/active_merchant/billing/gateways/payway_dot_com.rb +6 -6
- data/lib/active_merchant/billing/gateways/pin.rb +126 -41
- data/lib/active_merchant/billing/gateways/plexo.rb +71 -20
- data/lib/active_merchant/billing/gateways/plugnpay.rb +6 -2
- data/lib/active_merchant/billing/gateways/priority.rb +29 -24
- data/lib/active_merchant/billing/gateways/pro_pay.rb +2 -2
- data/lib/active_merchant/billing/gateways/psigate.rb +8 -4
- data/lib/active_merchant/billing/gateways/psl_card.rb +6 -2
- data/lib/active_merchant/billing/gateways/qbms.rb +9 -5
- data/lib/active_merchant/billing/gateways/quantum.rb +9 -5
- data/lib/active_merchant/billing/gateways/quickbooks.rb +27 -17
- data/lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb +7 -4
- data/lib/active_merchant/billing/gateways/quickpay/quickpay_v4to7.rb +8 -4
- data/lib/active_merchant/billing/gateways/quickpay.rb +2 -2
- data/lib/active_merchant/billing/gateways/qvalent.rb +2 -2
- data/lib/active_merchant/billing/gateways/rapyd.rb +172 -53
- data/lib/active_merchant/billing/gateways/reach.rb +16 -9
- data/lib/active_merchant/billing/gateways/redsys.rb +7 -15
- data/lib/active_merchant/billing/gateways/redsys_rest.rb +545 -0
- data/lib/active_merchant/billing/gateways/s5.rb +5 -5
- data/lib/active_merchant/billing/gateways/safe_charge.rb +47 -24
- data/lib/active_merchant/billing/gateways/sage.rb +14 -6
- data/lib/active_merchant/billing/gateways/sage_pay.rb +81 -7
- data/lib/active_merchant/billing/gateways/sallie_mae.rb +8 -4
- data/lib/active_merchant/billing/gateways/secure_net.rb +9 -5
- data/lib/active_merchant/billing/gateways/secure_pay.rb +10 -8
- data/lib/active_merchant/billing/gateways/secure_pay_au.rb +25 -15
- data/lib/active_merchant/billing/gateways/secure_pay_tech.rb +8 -4
- data/lib/active_merchant/billing/gateways/securion_pay.rb +26 -12
- data/lib/active_merchant/billing/gateways/shift4.rb +34 -26
- data/lib/active_merchant/billing/gateways/shift4_v2.rb +117 -0
- data/lib/active_merchant/billing/gateways/simetrik.rb +26 -17
- data/lib/active_merchant/billing/gateways/skip_jack.rb +8 -4
- data/lib/active_merchant/billing/gateways/smart_ps.rb +10 -7
- data/lib/active_merchant/billing/gateways/so_easy_pay.rb +6 -4
- data/lib/active_merchant/billing/gateways/spreedly_core.rb +4 -6
- data/lib/active_merchant/billing/gateways/stripe.rb +88 -84
- data/lib/active_merchant/billing/gateways/stripe_payment_intents.rb +388 -77
- data/lib/active_merchant/billing/gateways/sum_up.rb +224 -0
- data/lib/active_merchant/billing/gateways/swipe_checkout.rb +6 -4
- data/lib/active_merchant/billing/gateways/telr.rb +6 -7
- data/lib/active_merchant/billing/gateways/trans_first.rb +6 -4
- data/lib/active_merchant/billing/gateways/trans_first_transaction_express.rb +10 -18
- data/lib/active_merchant/billing/gateways/transact_pro.rb +3 -3
- data/lib/active_merchant/billing/gateways/transax.rb +2 -2
- data/lib/active_merchant/billing/gateways/transnational.rb +2 -2
- data/lib/active_merchant/billing/gateways/trexle.rb +2 -2
- data/lib/active_merchant/billing/gateways/trust_commerce.rb +9 -5
- data/lib/active_merchant/billing/gateways/usa_epay.rb +2 -2
- data/lib/active_merchant/billing/gateways/usa_epay_advanced.rb +32 -31
- data/lib/active_merchant/billing/gateways/usa_epay_transaction.rb +8 -4
- data/lib/active_merchant/billing/gateways/vanco.rb +2 -4
- data/lib/active_merchant/billing/gateways/vantiv_express.rb +668 -0
- data/lib/active_merchant/billing/gateways/verifi.rb +12 -8
- data/lib/active_merchant/billing/gateways/versa_pay.rb +307 -0
- data/lib/active_merchant/billing/gateways/viaklix.rb +8 -4
- data/lib/active_merchant/billing/gateways/visanet_peru.rb +5 -5
- data/lib/active_merchant/billing/gateways/vpos.rb +25 -13
- data/lib/active_merchant/billing/gateways/webpay.rb +3 -3
- data/lib/active_merchant/billing/gateways/wepay.rb +6 -4
- data/lib/active_merchant/billing/gateways/wirecard.rb +10 -6
- data/lib/active_merchant/billing/gateways/wompi.rb +14 -7
- data/lib/active_merchant/billing/gateways/world_net.rb +2 -2
- data/lib/active_merchant/billing/gateways/worldpay.rb +297 -113
- data/lib/active_merchant/billing/gateways/worldpay_online_payments.rb +16 -13
- data/lib/active_merchant/billing/gateways/worldpay_us.rb +2 -2
- data/lib/active_merchant/billing/gateways/xpay.rb +244 -0
- data/lib/active_merchant/billing/network_tokenization_credit_card.rb +15 -3
- data/lib/active_merchant/billing/payment_token.rb +2 -2
- data/lib/active_merchant/billing/response.rb +7 -6
- data/lib/active_merchant/billing.rb +1 -0
- data/lib/active_merchant/connection.rb +8 -20
- data/lib/active_merchant/country.rb +3 -1
- data/lib/active_merchant/errors.rb +12 -2
- data/lib/active_merchant/net_http_ssl_connection.rb +35 -0
- data/lib/active_merchant/posts_data.rb +19 -4
- data/lib/active_merchant/version.rb +1 -1
- data/lib/active_merchant/versionable.rb +29 -0
- data/lib/certs/cacert.pem +1326 -1491
- data/lib/support/gateway_support.rb +3 -3
- data/lib/support/ssl_verify.rb +6 -6
- data/lib/support/ssl_version.rb +8 -8
- metadata +35 -9
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
require 'digest/md5'
|
|
2
2
|
require 'rexml/document'
|
|
3
3
|
|
|
4
|
-
module ActiveMerchant
|
|
5
|
-
module Billing
|
|
4
|
+
module ActiveMerchant # :nodoc:
|
|
5
|
+
module Billing # :nodoc:
|
|
6
6
|
class MerchantWarriorGateway < Gateway
|
|
7
7
|
TOKEN_TEST_URL = 'https://base.merchantwarrior.com/token/'
|
|
8
8
|
TOKEN_LIVE_URL = 'https://api.merchantwarrior.com/token/'
|
|
@@ -32,6 +32,8 @@ module ActiveMerchant #:nodoc:
|
|
|
32
32
|
add_payment_method(post, payment_method)
|
|
33
33
|
add_recurring_flag(post, options)
|
|
34
34
|
add_soft_descriptors(post, options)
|
|
35
|
+
add_three_ds(post, options)
|
|
36
|
+
post['storeID'] = options[:store_id] if options[:store_id]
|
|
35
37
|
commit('processAuth', post)
|
|
36
38
|
end
|
|
37
39
|
|
|
@@ -43,6 +45,8 @@ module ActiveMerchant #:nodoc:
|
|
|
43
45
|
add_payment_method(post, payment_method)
|
|
44
46
|
add_recurring_flag(post, options)
|
|
45
47
|
add_soft_descriptors(post, options)
|
|
48
|
+
add_three_ds(post, options)
|
|
49
|
+
post['storeID'] = options[:store_id] if options[:store_id]
|
|
46
50
|
commit('processCard', post)
|
|
47
51
|
end
|
|
48
52
|
|
|
@@ -111,9 +115,9 @@ module ActiveMerchant #:nodoc:
|
|
|
111
115
|
post['customerCity'] = address[:city]
|
|
112
116
|
post['customerAddress'] = address[:address1]
|
|
113
117
|
post['customerPostCode'] = address[:zip]
|
|
114
|
-
post['customerIP'] = address[:ip]
|
|
115
|
-
post['customerPhone'] = address[:phone]
|
|
116
|
-
post['customerEmail'] = address[:email]
|
|
118
|
+
post['customerIP'] = address[:ip] || options[:ip]
|
|
119
|
+
post['customerPhone'] = address[:phone] || address[:phone_number]
|
|
120
|
+
post['customerEmail'] = address[:email] || options[:email]
|
|
117
121
|
end
|
|
118
122
|
|
|
119
123
|
def add_order_id(post, options)
|
|
@@ -184,6 +188,18 @@ module ActiveMerchant #:nodoc:
|
|
|
184
188
|
)
|
|
185
189
|
end
|
|
186
190
|
|
|
191
|
+
def add_three_ds(post, options)
|
|
192
|
+
return unless three_d_secure = options[:three_d_secure]
|
|
193
|
+
|
|
194
|
+
post.merge!({
|
|
195
|
+
threeDSEci: three_d_secure[:eci],
|
|
196
|
+
threeDSXid: three_d_secure[:xid] || three_d_secure[:ds_transaction_id],
|
|
197
|
+
threeDSCavv: three_d_secure[:cavv],
|
|
198
|
+
threeDSStatus: three_d_secure[:authentication_response_status],
|
|
199
|
+
threeDSV2Version: three_d_secure[:version]
|
|
200
|
+
}.compact)
|
|
201
|
+
end
|
|
202
|
+
|
|
187
203
|
def parse(body)
|
|
188
204
|
xml = REXML::Document.new(body)
|
|
189
205
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
module ActiveMerchant
|
|
2
|
-
module Billing
|
|
1
|
+
module ActiveMerchant # :nodoc:
|
|
2
|
+
module Billing # :nodoc:
|
|
3
3
|
# The Mercury gateway integration by default requires that the Mercury
|
|
4
4
|
# account being used has tokenization turned. This enables the use of
|
|
5
5
|
# capture/refund/void without having to pass the credit card back in each
|
|
@@ -302,12 +302,16 @@ module ActiveMerchant #:nodoc:
|
|
|
302
302
|
success = SUCCESS_CODES.include?(response[:cmd_status])
|
|
303
303
|
message = success ? 'Success' : message_from(response)
|
|
304
304
|
|
|
305
|
-
Response.new(
|
|
305
|
+
Response.new(
|
|
306
|
+
success,
|
|
307
|
+
message,
|
|
308
|
+
response,
|
|
306
309
|
test: test?,
|
|
307
310
|
authorization: authorization_from(response),
|
|
308
311
|
avs_result: { code: response[:avs_result] },
|
|
309
312
|
cvv_result: response[:cvv_result],
|
|
310
|
-
error_code: success ? nil : STANDARD_ERROR_CODE_MAPPING[response[:dsix_return_code]]
|
|
313
|
+
error_code: success ? nil : STANDARD_ERROR_CODE_MAPPING[response[:dsix_return_code]]
|
|
314
|
+
)
|
|
311
315
|
end
|
|
312
316
|
|
|
313
317
|
def message_from(response)
|
|
@@ -345,7 +349,9 @@ module ActiveMerchant #:nodoc:
|
|
|
345
349
|
end
|
|
346
350
|
|
|
347
351
|
def unescape_xml(escaped_xml)
|
|
348
|
-
escaped_xml.gsub(/\>/, '>').gsub(
|
|
352
|
+
xml = escaped_xml.gsub(/\>/, '>').gsub(/\r/, '').gsub(/\n/, '').gsub(/\t/, '').gsub('<', '<')
|
|
353
|
+
xml.slice! "<?xml version=\"1.0\"?>" # rubocop:disable Style/StringLiterals
|
|
354
|
+
xml
|
|
349
355
|
end
|
|
350
356
|
end
|
|
351
357
|
end
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
module ActiveMerchant
|
|
2
|
-
module Billing
|
|
1
|
+
module ActiveMerchant # :nodoc:
|
|
2
|
+
module Billing # :nodoc:
|
|
3
3
|
# For more information on the Metrics Global Payment Gateway, visit the {Metrics Global website}[www.metricsglobal.com].
|
|
4
4
|
# Further documentation on AVS and CVV response codes are available under the support section of the Metrics Global
|
|
5
5
|
# control panel.
|
|
@@ -175,12 +175,16 @@ module ActiveMerchant #:nodoc:
|
|
|
175
175
|
# (TESTMODE) Successful Sale
|
|
176
176
|
test_mode = test? || message =~ /TESTMODE/
|
|
177
177
|
|
|
178
|
-
Response.new(
|
|
178
|
+
Response.new(
|
|
179
|
+
success?(response),
|
|
180
|
+
message,
|
|
181
|
+
response,
|
|
179
182
|
test: test_mode,
|
|
180
183
|
authorization: response[:transaction_id],
|
|
181
184
|
fraud_review: fraud_review?(response),
|
|
182
185
|
avs_result: { code: response[:avs_result_code] },
|
|
183
|
-
cvv_result: response[:card_code]
|
|
186
|
+
cvv_result: response[:card_code]
|
|
187
|
+
)
|
|
184
188
|
end
|
|
185
189
|
|
|
186
190
|
def success?(response)
|
|
@@ -194,7 +198,7 @@ module ActiveMerchant #:nodoc:
|
|
|
194
198
|
def parse(body)
|
|
195
199
|
fields = split(body)
|
|
196
200
|
|
|
197
|
-
|
|
201
|
+
{
|
|
198
202
|
response_code: fields[RESPONSE_CODE].to_i,
|
|
199
203
|
response_reason_code: fields[RESPONSE_REASON_CODE],
|
|
200
204
|
response_reason_text: fields[RESPONSE_REASON_TEXT],
|
|
@@ -202,7 +206,6 @@ module ActiveMerchant #:nodoc:
|
|
|
202
206
|
transaction_id: fields[TRANSACTION_ID],
|
|
203
207
|
card_code: fields[CARD_CODE_RESPONSE_CODE]
|
|
204
208
|
}
|
|
205
|
-
results
|
|
206
209
|
end
|
|
207
210
|
|
|
208
211
|
def post_data(action, parameters = {})
|
|
@@ -218,8 +221,7 @@ module ActiveMerchant #:nodoc:
|
|
|
218
221
|
post[:encap_char] = '$'
|
|
219
222
|
post[:solution_ID] = application_id if application_id
|
|
220
223
|
|
|
221
|
-
|
|
222
|
-
request
|
|
224
|
+
post.merge(parameters).collect { |key, value| "x_#{key}=#{CGI.escape(value.to_s)}" }.join('&')
|
|
223
225
|
end
|
|
224
226
|
|
|
225
227
|
def add_invoice(post, options)
|
|
@@ -71,6 +71,7 @@ module ActiveMerchant
|
|
|
71
71
|
|
|
72
72
|
class CreditCardType
|
|
73
73
|
attr_accessor :am_code, :migs_code, :migs_long_code, :name
|
|
74
|
+
|
|
74
75
|
def initialize(am_code, migs_code, migs_long_code, name)
|
|
75
76
|
@am_code = am_code
|
|
76
77
|
@migs_code = migs_code
|
|
@@ -85,13 +86,13 @@ module ActiveMerchant
|
|
|
85
86
|
# migs_code: Used in response for purchase/authorize/status
|
|
86
87
|
# migs_long_code: Used to pre-select card for server_purchase_url
|
|
87
88
|
# name: The nice display name
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
89
|
+
['american_express', 'AE', 'Amex', 'American Express'],
|
|
90
|
+
['diners_club', 'DC', 'Dinersclub', 'Diners Club'],
|
|
91
|
+
['jcb', 'JC', 'JCB', 'JCB Card'],
|
|
92
|
+
['maestro', 'MS', 'Maestro', 'Maestro Card'],
|
|
92
93
|
%w(master MC Mastercard MasterCard),
|
|
93
|
-
|
|
94
|
-
|
|
94
|
+
['na', 'PL', 'PrivateLabelCard', 'Private Label Card'],
|
|
95
|
+
['visa', 'VC', 'Visa', 'Visa Card']
|
|
95
96
|
].map do |am_code, migs_code, migs_long_code, name|
|
|
96
97
|
CreditCardType.new(am_code, migs_code, migs_long_code, name)
|
|
97
98
|
end
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'active_merchant/billing/gateways/migs/migs_codes'
|
|
2
2
|
|
|
3
|
-
module ActiveMerchant
|
|
4
|
-
module Billing
|
|
3
|
+
module ActiveMerchant # :nodoc:
|
|
4
|
+
module Billing # :nodoc:
|
|
5
5
|
class MigsGateway < Gateway
|
|
6
6
|
include MigsCodes
|
|
7
7
|
|
|
@@ -281,12 +281,16 @@ module ActiveMerchant #:nodoc:
|
|
|
281
281
|
cvv_result_code = response[:CSCResultCode]
|
|
282
282
|
cvv_result_code = 'P' if cvv_result_code == 'Unsupported'
|
|
283
283
|
|
|
284
|
-
Response.new(
|
|
284
|
+
Response.new(
|
|
285
|
+
success?(response),
|
|
286
|
+
response[:Message],
|
|
287
|
+
response,
|
|
285
288
|
test: test?,
|
|
286
289
|
authorization: response[:TransactionNo],
|
|
287
290
|
fraud_review: fraud_review?(response),
|
|
288
291
|
avs_result: { code: avs_response_code },
|
|
289
|
-
cvv_result: cvv_result_code
|
|
292
|
+
cvv_result: cvv_result_code
|
|
293
|
+
)
|
|
290
294
|
end
|
|
291
295
|
|
|
292
296
|
def success?(response)
|
|
@@ -3,10 +3,11 @@ require 'openssl'
|
|
|
3
3
|
require 'digest'
|
|
4
4
|
require 'base64'
|
|
5
5
|
|
|
6
|
-
module ActiveMerchant
|
|
7
|
-
module Billing
|
|
6
|
+
module ActiveMerchant # :nodoc:
|
|
7
|
+
module Billing # :nodoc:
|
|
8
8
|
class MitGateway < Gateway
|
|
9
9
|
self.live_url = 'https://wpy.mitec.com.mx/ModuloUtilWS/activeCDP.htm'
|
|
10
|
+
self.test_url = 'https://shoppingrc.mitec.com.mx/ModuloUtilWS/activeCDP.htm'
|
|
10
11
|
|
|
11
12
|
self.supported_countries = ['MX']
|
|
12
13
|
self.default_currency = 'MXN'
|
|
@@ -41,7 +42,7 @@ module ActiveMerchant #:nodoc:
|
|
|
41
42
|
# original message
|
|
42
43
|
full_data = unpacked[0].bytes.slice(16, unpacked[0].bytes.length)
|
|
43
44
|
# Creates the engine
|
|
44
|
-
engine = OpenSSL::Cipher
|
|
45
|
+
engine = OpenSSL::Cipher.new('aes-128-cbc')
|
|
45
46
|
# Set engine as decrypt mode
|
|
46
47
|
engine.decrypt
|
|
47
48
|
# Converts the key from hex to bytes
|
|
@@ -54,7 +55,7 @@ module ActiveMerchant #:nodoc:
|
|
|
54
55
|
|
|
55
56
|
def encrypt(val, keyinhex)
|
|
56
57
|
# Creates the engine motor
|
|
57
|
-
engine = OpenSSL::Cipher
|
|
58
|
+
engine = OpenSSL::Cipher.new('aes-128-cbc')
|
|
58
59
|
# Set engine as encrypt mode
|
|
59
60
|
engine.encrypt
|
|
60
61
|
# Converts the key from hex to bytes
|
|
@@ -220,8 +221,12 @@ module ActiveMerchant #:nodoc:
|
|
|
220
221
|
post[:name_client] = [payment.first_name, payment.last_name].join(' ')
|
|
221
222
|
end
|
|
222
223
|
|
|
224
|
+
def url
|
|
225
|
+
test? ? test_url : live_url
|
|
226
|
+
end
|
|
227
|
+
|
|
223
228
|
def commit(action, parameters)
|
|
224
|
-
raw_response = ssl_post(
|
|
229
|
+
raw_response = ssl_post(url, parameters, { 'Content-type' => 'text/plain' })
|
|
225
230
|
response = JSON.parse(decrypt(raw_response, @options[:key_session]))
|
|
226
231
|
|
|
227
232
|
Response.new(
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'active_merchant/billing/gateways/modern_payments_cim'
|
|
2
2
|
|
|
3
|
-
module ActiveMerchant
|
|
4
|
-
module Billing
|
|
3
|
+
module ActiveMerchant # :nodoc:
|
|
4
|
+
module Billing # :nodoc:
|
|
5
5
|
class ModernPaymentsGateway < Gateway
|
|
6
6
|
self.supported_countries = ModernPaymentsCimGateway.supported_countries
|
|
7
7
|
self.supported_cardtypes = ModernPaymentsCimGateway.supported_cardtypes
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
module ActiveMerchant
|
|
2
|
-
module Billing
|
|
3
|
-
class ModernPaymentsCimGateway < Gateway
|
|
1
|
+
module ActiveMerchant # :nodoc:
|
|
2
|
+
module Billing # :nodoc:
|
|
3
|
+
class ModernPaymentsCimGateway < Gateway # :nodoc:
|
|
4
4
|
self.test_url = 'https://secure.modpay.com/netservices/test/ModpayTest.asmx'
|
|
5
5
|
self.live_url = 'https://secure.modpay.com/ws/modpay.asmx'
|
|
6
6
|
|
|
@@ -111,13 +111,12 @@ module ActiveMerchant #:nodoc:
|
|
|
111
111
|
end
|
|
112
112
|
|
|
113
113
|
def build_request(action, params)
|
|
114
|
+
envelope_obj = { 'xmlns:xsd' => 'http://www.w3.org/2001/XMLSchema',
|
|
115
|
+
'xmlns:env' => 'http://schemas.xmlsoap.org/soap/envelope/',
|
|
116
|
+
'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance' }
|
|
114
117
|
xml = Builder::XmlMarkup.new indent: 2
|
|
115
118
|
xml.instruct!
|
|
116
|
-
xml.tag! 'env:Envelope',
|
|
117
|
-
{ 'xmlns:xsd' => 'http://www.w3.org/2001/XMLSchema',
|
|
118
|
-
'xmlns:env' => 'http://schemas.xmlsoap.org/soap/envelope/',
|
|
119
|
-
'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance' } do
|
|
120
|
-
|
|
119
|
+
xml.tag! 'env:Envelope', envelope_obj do
|
|
121
120
|
xml.tag! 'env:Body' do
|
|
122
121
|
xml.tag! action, { 'xmlns' => xmlns(action) } do
|
|
123
122
|
xml.tag! 'clientId', @options[:login]
|
|
@@ -146,15 +145,24 @@ module ActiveMerchant #:nodoc:
|
|
|
146
145
|
end
|
|
147
146
|
|
|
148
147
|
def commit(action, params)
|
|
149
|
-
data = ssl_post(
|
|
150
|
-
|
|
151
|
-
|
|
148
|
+
data = ssl_post(
|
|
149
|
+
url(action),
|
|
150
|
+
build_request(action, params),
|
|
151
|
+
{
|
|
152
|
+
'Content-Type' => 'text/xml; charset=utf-8',
|
|
153
|
+
'SOAPAction' => "#{xmlns(action)}#{action}"
|
|
154
|
+
}
|
|
155
|
+
)
|
|
152
156
|
|
|
153
157
|
response = parse(action, data)
|
|
154
|
-
Response.new(
|
|
158
|
+
Response.new(
|
|
159
|
+
successful?(action, response),
|
|
160
|
+
message_from(action, response),
|
|
161
|
+
response,
|
|
155
162
|
test: test?,
|
|
156
163
|
authorization: authorization_from(action, response),
|
|
157
|
-
avs_result: { code: response[:avs_code] }
|
|
164
|
+
avs_result: { code: response[:avs_code] }
|
|
165
|
+
)
|
|
158
166
|
end
|
|
159
167
|
|
|
160
168
|
def authorization_from(action, response)
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'nokogiri'
|
|
2
2
|
|
|
3
|
-
module ActiveMerchant
|
|
4
|
-
module Billing
|
|
3
|
+
module ActiveMerchant # :nodoc:
|
|
4
|
+
module Billing # :nodoc:
|
|
5
5
|
#
|
|
6
6
|
# == Monei gateway
|
|
7
7
|
# This class implements Monei gateway for Active Merchant. For more information about Monei
|
|
@@ -337,7 +337,7 @@ module ActiveMerchant #:nodoc:
|
|
|
337
337
|
endpoint = translate_action_endpoint(action, options)
|
|
338
338
|
headers = {
|
|
339
339
|
'Content-Type': 'application/json;charset=UTF-8',
|
|
340
|
-
|
|
340
|
+
Authorization: @options[:api_key],
|
|
341
341
|
'User-Agent': 'MONEI/Shopify/0.1.0'
|
|
342
342
|
}
|
|
343
343
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'rexml/document'
|
|
2
2
|
|
|
3
|
-
module ActiveMerchant
|
|
4
|
-
module Billing
|
|
3
|
+
module ActiveMerchant # :nodoc:
|
|
4
|
+
module Billing # :nodoc:
|
|
5
5
|
# To learn more about the Moneris gateway, please contact
|
|
6
6
|
# eselectplus@moneris.com for a copy of their integration guide. For
|
|
7
7
|
# information on remote testing, please see "Test Environment Penny Value
|
|
@@ -54,6 +54,7 @@ module ActiveMerchant #:nodoc:
|
|
|
54
54
|
post[:crypt_type] = options[:crypt_type] || @options[:crypt_type]
|
|
55
55
|
add_external_mpi_fields(post, options)
|
|
56
56
|
add_stored_credential(post, options)
|
|
57
|
+
add_cust_id(post, options)
|
|
57
58
|
action = if post[:cavv] || options[:three_d_secure]
|
|
58
59
|
'cavv_preauth'
|
|
59
60
|
elsif post[:data_key].blank?
|
|
@@ -78,6 +79,7 @@ module ActiveMerchant #:nodoc:
|
|
|
78
79
|
post[:crypt_type] = options[:crypt_type] || @options[:crypt_type]
|
|
79
80
|
add_external_mpi_fields(post, options)
|
|
80
81
|
add_stored_credential(post, options)
|
|
82
|
+
add_cust_id(post, options)
|
|
81
83
|
action = if post[:cavv] || options[:three_d_secure]
|
|
82
84
|
'cavv_purchase'
|
|
83
85
|
elsif post[:data_key].blank?
|
|
@@ -216,7 +218,7 @@ module ActiveMerchant #:nodoc:
|
|
|
216
218
|
three_d_secure_options = options[:three_d_secure]
|
|
217
219
|
|
|
218
220
|
post[:threeds_version] = three_d_secure_options[:version]
|
|
219
|
-
post[:crypt_type] = three_d_secure_options
|
|
221
|
+
post[:crypt_type] = three_d_secure_options.dig(:eci)&.to_s&.sub!(/^0/, '')
|
|
220
222
|
post[:cavv] = three_d_secure_options[:cavv]
|
|
221
223
|
post[:threeds_server_trans_id] = three_d_secure_options[:three_ds_server_trans_id]
|
|
222
224
|
post[:ds_trans_id] = three_d_secure_options[:ds_transaction_id]
|
|
@@ -248,6 +250,10 @@ module ActiveMerchant #:nodoc:
|
|
|
248
250
|
post[:payment_information] = options[:payment_information] if options[:payment_information]
|
|
249
251
|
end
|
|
250
252
|
|
|
253
|
+
def add_cust_id(post, options)
|
|
254
|
+
post[:cust_id] = options[:cust_id] if options[:cust_id]
|
|
255
|
+
end
|
|
256
|
+
|
|
251
257
|
def add_stored_credential(post, options)
|
|
252
258
|
add_cof(post, options)
|
|
253
259
|
# if any of :issuer_id, :payment_information, or :payment_indicator is not passed,
|
|
@@ -467,8 +473,8 @@ module ActiveMerchant #:nodoc:
|
|
|
467
473
|
'indrefund' => %i[order_id cust_id amount pan expdate crypt_type],
|
|
468
474
|
'completion' => %i[order_id comp_amount txn_number crypt_type],
|
|
469
475
|
'purchasecorrection' => %i[order_id txn_number crypt_type],
|
|
470
|
-
'cavv_preauth' => %i[order_id cust_id amount pan expdate cavv crypt_type wallet_indicator],
|
|
471
|
-
'cavv_purchase' => %i[order_id cust_id amount pan expdate cavv crypt_type wallet_indicator],
|
|
476
|
+
'cavv_preauth' => %i[order_id cust_id amount pan expdate cavv crypt_type wallet_indicator threeds_version threeds_server_trans_id ds_trans_id],
|
|
477
|
+
'cavv_purchase' => %i[order_id cust_id amount pan expdate cavv crypt_type wallet_indicator threeds_version threeds_server_trans_id ds_trans_id],
|
|
472
478
|
'card_verification' => %i[order_id cust_id pan expdate crypt_type avs_info cvd_info cof_info],
|
|
473
479
|
'transact' => %i[order_id cust_id amount pan expdate crypt_type],
|
|
474
480
|
'Batchcloseall' => [],
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
module ActiveMerchant
|
|
2
|
-
module Billing
|
|
1
|
+
module ActiveMerchant # :nodoc:
|
|
2
|
+
module Billing # :nodoc:
|
|
3
3
|
class MoneyMoversGateway < Gateway
|
|
4
4
|
self.live_url = self.test_url = 'https://secure.mmoagateway.com/api/transact.php'
|
|
5
5
|
|
|
@@ -113,11 +113,15 @@ module ActiveMerchant #:nodoc:
|
|
|
113
113
|
response = parse(data)
|
|
114
114
|
message = message_from(response)
|
|
115
115
|
|
|
116
|
-
Response.new(
|
|
116
|
+
Response.new(
|
|
117
|
+
success?(response),
|
|
118
|
+
message,
|
|
119
|
+
response,
|
|
117
120
|
test: test?,
|
|
118
121
|
authorization: response['transactionid'],
|
|
119
122
|
avs_result: { code: response['avsresponse'] },
|
|
120
|
-
cvv_result: response['cvvresponse']
|
|
123
|
+
cvv_result: response['cvvresponse']
|
|
124
|
+
)
|
|
121
125
|
end
|
|
122
126
|
|
|
123
127
|
def success?(response)
|