activemerchant 1.42.6 → 1.90.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 +5 -13
- data/CHANGELOG +1420 -2
- data/CONTRIBUTORS +106 -0
- data/README.md +107 -103
- data/lib/active_merchant/billing/apple_pay_payment_token.rb +22 -0
- data/lib/active_merchant/billing/avs_result.rb +12 -13
- data/lib/active_merchant/billing/base.rb +13 -16
- data/lib/active_merchant/billing/check.rb +35 -24
- data/lib/active_merchant/billing/compatibility.rb +117 -0
- data/lib/active_merchant/billing/credit_card.rb +196 -81
- data/lib/active_merchant/billing/credit_card_formatting.rb +6 -4
- data/lib/active_merchant/billing/credit_card_methods.rb +199 -75
- data/lib/active_merchant/billing/cvv_result.rb +15 -15
- data/lib/active_merchant/billing/gateway.rb +171 -39
- data/lib/active_merchant/billing/gateways/adyen.rb +380 -0
- data/lib/active_merchant/billing/gateways/allied_wallet.rb +205 -0
- data/lib/active_merchant/billing/gateways/authorize_net.rb +933 -604
- data/lib/active_merchant/billing/gateways/authorize_net_arb.rb +417 -0
- data/lib/active_merchant/billing/gateways/authorize_net_cim.rb +74 -54
- data/lib/active_merchant/billing/gateways/axcessms.rb +181 -0
- data/lib/active_merchant/billing/gateways/balanced.rb +130 -370
- data/lib/active_merchant/billing/gateways/bank_frick.rb +225 -0
- data/lib/active_merchant/billing/gateways/banwire.rb +23 -12
- data/lib/active_merchant/billing/gateways/barclaycard_smartpay.rb +351 -0
- data/lib/active_merchant/billing/gateways/barclays_epdq_extra_plus.rb +6 -6
- data/lib/active_merchant/billing/gateways/be2bill.rb +2 -2
- data/lib/active_merchant/billing/gateways/beanstream/beanstream_core.rb +109 -32
- data/lib/active_merchant/billing/gateways/beanstream.rb +59 -13
- data/lib/active_merchant/billing/gateways/beanstream_interac.rb +12 -9
- data/lib/active_merchant/billing/gateways/blue_pay.rb +520 -498
- data/lib/active_merchant/billing/gateways/blue_snap.rb +347 -0
- data/lib/active_merchant/billing/gateways/bogus.rb +80 -46
- data/lib/active_merchant/billing/gateways/borgun.rb +220 -0
- data/lib/active_merchant/billing/gateways/bpoint.rb +277 -0
- data/lib/active_merchant/billing/gateways/braintree/braintree_common.rb +15 -2
- data/lib/active_merchant/billing/gateways/braintree.rb +2 -2
- data/lib/active_merchant/billing/gateways/braintree_blue.rb +311 -121
- data/lib/active_merchant/billing/gateways/braintree_orange.rb +4 -4
- data/lib/active_merchant/billing/gateways/bridge_pay.rb +244 -0
- data/lib/active_merchant/billing/gateways/cams.rb +230 -0
- data/lib/active_merchant/billing/gateways/card_connect.rb +311 -0
- data/lib/active_merchant/billing/gateways/card_save.rb +6 -7
- data/lib/active_merchant/billing/gateways/card_stream.rb +235 -89
- data/lib/active_merchant/billing/gateways/cardknox.rb +327 -0
- data/lib/active_merchant/billing/gateways/cardprocess.rb +254 -0
- data/lib/active_merchant/billing/gateways/cashnet.rb +219 -0
- data/lib/active_merchant/billing/gateways/cc5.rb +50 -8
- data/lib/active_merchant/billing/gateways/cecabank.rb +27 -14
- data/lib/active_merchant/billing/gateways/cenpos.rb +327 -0
- data/lib/active_merchant/billing/gateways/checkout.rb +214 -0
- data/lib/active_merchant/billing/gateways/checkout_v2.rb +233 -0
- data/lib/active_merchant/billing/gateways/citrus_pay.rb +22 -0
- data/lib/active_merchant/billing/gateways/clearhaus.rb +220 -0
- data/lib/active_merchant/billing/gateways/commercegate.rb +142 -0
- data/lib/active_merchant/billing/gateways/conekta.rb +91 -97
- data/lib/active_merchant/billing/gateways/creditcall.rb +271 -0
- data/lib/active_merchant/billing/gateways/credorax.rb +356 -0
- data/lib/active_merchant/billing/gateways/ct_payment.rb +268 -0
- data/lib/active_merchant/billing/gateways/culqi.rb +277 -0
- data/lib/active_merchant/billing/gateways/cyber_source.rb +294 -158
- data/lib/active_merchant/billing/gateways/d_local.rb +226 -0
- data/lib/active_merchant/billing/gateways/data_cash.rb +59 -347
- data/lib/active_merchant/billing/gateways/dibs.rb +199 -0
- data/lib/active_merchant/billing/gateways/digitzs.rb +292 -0
- data/lib/active_merchant/billing/gateways/ebanx.rb +296 -0
- data/lib/active_merchant/billing/gateways/efsnet.rb +24 -39
- data/lib/active_merchant/billing/gateways/elavon.rb +146 -147
- data/lib/active_merchant/billing/gateways/element.rb +356 -0
- data/lib/active_merchant/billing/gateways/epay.rb +41 -31
- data/lib/active_merchant/billing/gateways/evo_ca.rb +1 -1
- data/lib/active_merchant/billing/gateways/eway.rb +79 -78
- data/lib/active_merchant/billing/gateways/eway_managed.rb +35 -36
- data/lib/active_merchant/billing/gateways/eway_rapid.rb +369 -228
- data/lib/active_merchant/billing/gateways/exact.rb +32 -26
- data/lib/active_merchant/billing/gateways/ezic.rb +195 -0
- data/lib/active_merchant/billing/gateways/fat_zebra.rb +90 -64
- data/lib/active_merchant/billing/gateways/federated_canada.rb +6 -14
- data/lib/active_merchant/billing/gateways/finansbank.rb +3 -3
- data/lib/active_merchant/billing/gateways/first_giving.rb +142 -0
- data/lib/active_merchant/billing/gateways/first_pay.rb +128 -122
- data/lib/active_merchant/billing/gateways/firstdata_e4.rb +190 -64
- data/lib/active_merchant/billing/gateways/firstdata_e4_v27.rb +446 -0
- data/lib/active_merchant/billing/gateways/flo2cash.rb +215 -0
- data/lib/active_merchant/billing/gateways/flo2cash_simple.rb +20 -0
- data/lib/active_merchant/billing/gateways/forte.rb +270 -0
- data/lib/active_merchant/billing/gateways/garanti.rb +29 -27
- data/lib/active_merchant/billing/gateways/global_collect.rb +340 -0
- data/lib/active_merchant/billing/gateways/global_transport.rb +194 -0
- data/lib/active_merchant/billing/gateways/hdfc.rb +35 -36
- data/lib/active_merchant/billing/gateways/hps.rb +305 -0
- data/lib/active_merchant/billing/gateways/iats_payments.rb +271 -16
- data/lib/active_merchant/billing/gateways/in_context_paypal_express.rb +15 -0
- data/lib/active_merchant/billing/gateways/inspire.rb +29 -32
- data/lib/active_merchant/billing/gateways/instapay.rb +5 -6
- data/lib/active_merchant/billing/gateways/ipp.rb +175 -0
- data/lib/active_merchant/billing/gateways/iridium.rb +247 -41
- data/lib/active_merchant/billing/gateways/itransact.rb +4 -5
- data/lib/active_merchant/billing/gateways/iveri.rb +251 -0
- data/lib/active_merchant/billing/gateways/jetpay.rb +198 -71
- data/lib/active_merchant/billing/gateways/jetpay_v2.rb +437 -0
- data/lib/active_merchant/billing/gateways/komoju.rb +115 -0
- data/lib/active_merchant/billing/gateways/kushki.rb +219 -0
- data/lib/active_merchant/billing/gateways/latitude19.rb +411 -0
- data/lib/active_merchant/billing/gateways/linkpoint.rb +45 -43
- data/lib/active_merchant/billing/gateways/litle.rb +328 -444
- data/lib/active_merchant/billing/gateways/mastercard.rb +267 -0
- data/lib/active_merchant/billing/gateways/maxipago.rb +145 -115
- data/lib/active_merchant/billing/gateways/mercado_pago.rb +277 -0
- data/lib/active_merchant/billing/gateways/merchant_e_solutions.rb +37 -19
- data/lib/active_merchant/billing/gateways/merchant_one.rb +13 -15
- data/lib/active_merchant/billing/gateways/merchant_partners.rb +245 -0
- data/lib/active_merchant/billing/gateways/merchant_ware.rb +57 -60
- data/lib/active_merchant/billing/gateways/merchant_ware_version_four.rb +59 -48
- data/lib/active_merchant/billing/gateways/merchant_warrior.rb +38 -19
- data/lib/active_merchant/billing/gateways/mercury.rb +77 -54
- data/lib/active_merchant/billing/gateways/metrics_global.rb +11 -30
- data/lib/active_merchant/billing/gateways/micropayment.rb +183 -0
- data/lib/active_merchant/billing/gateways/migs.rb +81 -22
- data/lib/active_merchant/billing/gateways/modern_payments.rb +3 -3
- data/lib/active_merchant/billing/gateways/modern_payments_cim.rb +23 -25
- data/lib/active_merchant/billing/gateways/monei.rb +307 -0
- data/lib/active_merchant/billing/gateways/moneris.rb +146 -64
- data/lib/active_merchant/billing/gateways/moneris_us.rb +197 -53
- data/lib/active_merchant/billing/gateways/money_movers.rb +6 -15
- data/lib/active_merchant/billing/gateways/mundipagg.rb +292 -0
- data/lib/active_merchant/billing/gateways/nab_transact.rb +86 -64
- data/lib/active_merchant/billing/gateways/ncr_secure_pay.rb +165 -0
- data/lib/active_merchant/billing/gateways/net_registry.rb +11 -5
- data/lib/active_merchant/billing/gateways/netaxept.rb +21 -22
- data/lib/active_merchant/billing/gateways/netbanx.rb +290 -0
- data/lib/active_merchant/billing/gateways/netbilling.rb +70 -35
- data/lib/active_merchant/billing/gateways/netpay.rb +5 -6
- data/lib/active_merchant/billing/gateways/network_merchants.rb +241 -0
- data/lib/active_merchant/billing/gateways/nmi.rb +274 -10
- data/lib/active_merchant/billing/gateways/ogone.rb +90 -47
- data/lib/active_merchant/billing/gateways/omise.rb +324 -0
- data/lib/active_merchant/billing/gateways/openpay.rb +48 -20
- data/lib/active_merchant/billing/gateways/opp.rb +369 -0
- data/lib/active_merchant/billing/gateways/optimal_payment.rb +79 -44
- data/lib/active_merchant/billing/gateways/orbital/orbital_soft_descriptors.rb +22 -21
- data/lib/active_merchant/billing/gateways/orbital.rb +346 -102
- data/lib/active_merchant/billing/gateways/pac_net_raven.rb +48 -29
- data/lib/active_merchant/billing/gateways/pagarme.rb +246 -0
- data/lib/active_merchant/billing/gateways/pago_facil.rb +122 -0
- data/lib/active_merchant/billing/gateways/pay_conex.rb +245 -0
- data/lib/active_merchant/billing/gateways/pay_gate_xml.rb +67 -48
- data/lib/active_merchant/billing/gateways/pay_hub.rb +213 -0
- data/lib/active_merchant/billing/gateways/pay_junction.rb +20 -26
- data/lib/active_merchant/billing/gateways/pay_junction_v2.rb +188 -0
- data/lib/active_merchant/billing/gateways/pay_secure.rb +7 -15
- data/lib/active_merchant/billing/gateways/paybox_direct.rb +40 -36
- data/lib/active_merchant/billing/gateways/payeezy.rb +410 -0
- data/lib/active_merchant/billing/gateways/payex.rb +38 -30
- data/lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb +62 -36
- data/lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb +11 -7
- data/lib/active_merchant/billing/gateways/payflow/payflow_response.rb +3 -3
- data/lib/active_merchant/billing/gateways/payflow.rb +74 -27
- data/lib/active_merchant/billing/gateways/payflow_express.rb +77 -81
- data/lib/active_merchant/billing/gateways/payflow_express_uk.rb +2 -3
- data/lib/active_merchant/billing/gateways/payflow_uk.rb +5 -6
- data/lib/active_merchant/billing/gateways/payment_express.rb +54 -45
- data/lib/active_merchant/billing/gateways/paymentez.rb +304 -0
- data/lib/active_merchant/billing/gateways/paymill.rb +160 -66
- data/lib/active_merchant/billing/gateways/paypal/paypal_common_api.rb +54 -7
- data/lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb +4 -0
- data/lib/active_merchant/billing/gateways/paypal/paypal_recurring_api.rb +17 -3
- data/lib/active_merchant/billing/gateways/paypal.rb +36 -27
- data/lib/active_merchant/billing/gateways/paypal_ca.rb +1 -1
- data/lib/active_merchant/billing/gateways/paypal_digital_goods.rb +7 -6
- data/lib/active_merchant/billing/gateways/paypal_express.rb +32 -4
- data/lib/active_merchant/billing/gateways/paypal_express_common.rb +3 -3
- data/lib/active_merchant/billing/gateways/payscout.rb +2 -13
- data/lib/active_merchant/billing/gateways/paystation.rb +96 -88
- data/lib/active_merchant/billing/gateways/payu_in.rb +248 -0
- data/lib/active_merchant/billing/gateways/payu_latam.rb +445 -0
- data/lib/active_merchant/billing/gateways/payway.rb +8 -8
- data/lib/active_merchant/billing/gateways/pin.rb +74 -18
- data/lib/active_merchant/billing/gateways/plugnpay.rb +66 -76
- data/lib/active_merchant/billing/gateways/pro_pay.rb +326 -0
- data/lib/active_merchant/billing/gateways/psigate.rb +30 -30
- data/lib/active_merchant/billing/gateways/psl_card.rb +27 -34
- data/lib/active_merchant/billing/gateways/qbms.rb +65 -54
- data/lib/active_merchant/billing/gateways/quantum.rb +18 -18
- data/lib/active_merchant/billing/gateways/quickbooks.rb +290 -0
- data/lib/active_merchant/billing/gateways/quickpay/quickpay_common.rb +184 -0
- data/lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb +295 -0
- data/lib/active_merchant/billing/gateways/quickpay/quickpay_v4to7.rb +226 -0
- data/lib/active_merchant/billing/gateways/quickpay.rb +10 -350
- data/lib/active_merchant/billing/gateways/qvalent.rb +236 -0
- data/lib/active_merchant/billing/gateways/realex.rb +78 -48
- data/lib/active_merchant/billing/gateways/redsys.rb +310 -170
- data/lib/active_merchant/billing/gateways/s5.rb +246 -0
- data/lib/active_merchant/billing/gateways/safe_charge.rb +262 -0
- data/lib/active_merchant/billing/gateways/sage.rb +415 -119
- data/lib/active_merchant/billing/gateways/sage_pay.rb +195 -90
- data/lib/active_merchant/billing/gateways/sallie_mae.rb +11 -12
- data/lib/active_merchant/billing/gateways/secure_net.rb +51 -43
- data/lib/active_merchant/billing/gateways/secure_pay.rb +182 -10
- data/lib/active_merchant/billing/gateways/secure_pay_au.rb +25 -14
- data/lib/active_merchant/billing/gateways/secure_pay_tech.rb +10 -18
- data/lib/active_merchant/billing/gateways/securion_pay.rb +264 -0
- data/lib/active_merchant/billing/gateways/skip_jack.rb +35 -38
- data/lib/active_merchant/billing/gateways/smart_ps.rb +50 -42
- data/lib/active_merchant/billing/gateways/so_easy_pay.rb +9 -9
- data/lib/active_merchant/billing/gateways/spreedly_core.rb +62 -12
- data/lib/active_merchant/billing/gateways/stripe.rb +536 -103
- data/lib/active_merchant/billing/gateways/swipe_checkout.rb +12 -18
- data/lib/active_merchant/billing/gateways/telr.rb +274 -0
- data/lib/active_merchant/billing/gateways/tns.rb +22 -0
- data/lib/active_merchant/billing/gateways/trans_first.rb +143 -30
- data/lib/active_merchant/billing/gateways/trans_first_transaction_express.rb +608 -0
- data/lib/active_merchant/billing/gateways/transact_pro.rb +224 -0
- data/lib/active_merchant/billing/gateways/transax.rb +5 -6
- data/lib/active_merchant/billing/gateways/transnational.rb +2 -232
- data/lib/active_merchant/billing/gateways/trexle.rb +218 -0
- data/lib/active_merchant/billing/gateways/trust_commerce.rb +86 -57
- data/lib/active_merchant/billing/gateways/usa_epay.rb +4 -4
- data/lib/active_merchant/billing/gateways/usa_epay_advanced.rb +196 -89
- data/lib/active_merchant/billing/gateways/usa_epay_transaction.rb +157 -32
- data/lib/active_merchant/billing/gateways/vanco.rb +294 -0
- data/lib/active_merchant/billing/gateways/verifi.rb +42 -49
- data/lib/active_merchant/billing/gateways/viaklix.rb +11 -24
- data/lib/active_merchant/billing/gateways/visanet_peru.rb +233 -0
- data/lib/active_merchant/billing/gateways/webpay.rb +26 -28
- data/lib/active_merchant/billing/gateways/wepay.rb +237 -0
- data/lib/active_merchant/billing/gateways/wirecard.rb +153 -31
- data/lib/active_merchant/billing/gateways/world_net.rb +344 -0
- data/lib/active_merchant/billing/gateways/worldpay.rb +207 -63
- data/lib/active_merchant/billing/gateways/worldpay_online_payments.rb +215 -0
- data/lib/active_merchant/billing/gateways/worldpay_us.rb +221 -0
- data/lib/active_merchant/billing/gateways.rb +8 -11
- data/lib/active_merchant/billing/model.rb +30 -0
- data/lib/active_merchant/billing/network_tokenization_credit_card.rb +39 -0
- data/lib/active_merchant/billing/payment_token.rb +21 -0
- data/lib/active_merchant/billing/rails.rb +3 -0
- data/lib/active_merchant/billing/response.rb +31 -24
- data/lib/active_merchant/billing.rb +7 -1
- data/lib/active_merchant/connection.rb +195 -0
- data/lib/active_merchant/country.rb +335 -0
- data/lib/active_merchant/empty.rb +20 -0
- data/lib/active_merchant/errors.rb +35 -0
- data/lib/active_merchant/net_http_ssl_connection.rb +10 -0
- data/lib/active_merchant/network_connection_retries.rb +80 -0
- data/lib/active_merchant/post_data.rb +25 -0
- data/lib/active_merchant/posts_data.rb +92 -0
- data/lib/active_merchant/version.rb +1 -1
- data/lib/active_merchant.rb +23 -27
- data/lib/activemerchant.rb +1 -1
- data/lib/certs/cacert.pem +3988 -0
- data/lib/support/gateway_support.rb +7 -9
- data/lib/support/outbound_hosts.rb +13 -10
- data/lib/support/ssl_verify.rb +6 -7
- data/lib/support/ssl_version.rb +87 -0
- metadata +148 -323
- checksums.yaml.gz.sig +0 -0
- data/gem-public_cert.pem +0 -21
- data/lib/active_merchant/billing/expiry_date.rb +0 -34
- data/lib/active_merchant/billing/gateways/app55.rb +0 -185
- data/lib/active_merchant/billing/gateways/barclays_epdq.rb +0 -314
- data/lib/active_merchant/billing/gateways/certo_direct.rb +0 -277
- data/lib/active_merchant/billing/gateways/ideal/ideal_base.rb +0 -249
- data/lib/active_merchant/billing/gateways/ideal/ideal_rabobank.pem +0 -13
- data/lib/active_merchant/billing/gateways/ideal/ideal_response.rb +0 -29
- data/lib/active_merchant/billing/gateways/ideal_rabobank.rb +0 -66
- data/lib/active_merchant/billing/gateways/orbital/avs_result.rb +0 -93
- data/lib/active_merchant/billing/gateways/orbital/cvv_result.rb +0 -34
- data/lib/active_merchant/billing/gateways/sage/sage_bankcard.rb +0 -93
- data/lib/active_merchant/billing/gateways/sage/sage_core.rb +0 -114
- data/lib/active_merchant/billing/gateways/sage/sage_virtual_check.rb +0 -102
- data/lib/active_merchant/billing/gateways/samurai.rb +0 -118
- data/lib/active_merchant/billing/gateways/vindicia.rb +0 -361
- data/lib/active_merchant/billing/integrations/a1agregator/helper.rb +0 -31
- data/lib/active_merchant/billing/integrations/a1agregator/notification.rb +0 -186
- data/lib/active_merchant/billing/integrations/a1agregator/status.rb +0 -38
- data/lib/active_merchant/billing/integrations/a1agregator.rb +0 -26
- data/lib/active_merchant/billing/integrations/action_view_helper.rb +0 -74
- data/lib/active_merchant/billing/integrations/alipay/helper.rb +0 -34
- data/lib/active_merchant/billing/integrations/alipay/notification.rb +0 -101
- data/lib/active_merchant/billing/integrations/alipay.rb +0 -18
- data/lib/active_merchant/billing/integrations/authorize_net_sim/helper.rb +0 -229
- data/lib/active_merchant/billing/integrations/authorize_net_sim/notification.rb +0 -340
- data/lib/active_merchant/billing/integrations/authorize_net_sim.rb +0 -38
- data/lib/active_merchant/billing/integrations/bit_pay/helper.rb +0 -64
- data/lib/active_merchant/billing/integrations/bit_pay/notification.rb +0 -74
- data/lib/active_merchant/billing/integrations/bit_pay/return.rb +0 -10
- data/lib/active_merchant/billing/integrations/bit_pay.rb +0 -30
- data/lib/active_merchant/billing/integrations/bogus/helper.rb +0 -17
- data/lib/active_merchant/billing/integrations/bogus/notification.rb +0 -11
- data/lib/active_merchant/billing/integrations/bogus/return.rb +0 -10
- data/lib/active_merchant/billing/integrations/bogus.rb +0 -23
- data/lib/active_merchant/billing/integrations/chronopay/helper.rb +0 -120
- data/lib/active_merchant/billing/integrations/chronopay/notification.rb +0 -158
- data/lib/active_merchant/billing/integrations/chronopay/return.rb +0 -10
- data/lib/active_merchant/billing/integrations/chronopay.rb +0 -23
- data/lib/active_merchant/billing/integrations/citrus/helper.rb +0 -40
- data/lib/active_merchant/billing/integrations/citrus/notification.rb +0 -133
- data/lib/active_merchant/billing/integrations/citrus/return.rb +0 -40
- data/lib/active_merchant/billing/integrations/citrus.rb +0 -51
- data/lib/active_merchant/billing/integrations/direc_pay/helper.rb +0 -200
- data/lib/active_merchant/billing/integrations/direc_pay/notification.rb +0 -76
- data/lib/active_merchant/billing/integrations/direc_pay/return.rb +0 -32
- data/lib/active_merchant/billing/integrations/direc_pay/status.rb +0 -37
- data/lib/active_merchant/billing/integrations/direc_pay.rb +0 -41
- data/lib/active_merchant/billing/integrations/directebanking/helper.rb +0 -90
- data/lib/active_merchant/billing/integrations/directebanking/notification.rb +0 -120
- data/lib/active_merchant/billing/integrations/directebanking/return.rb +0 -11
- data/lib/active_merchant/billing/integrations/directebanking.rb +0 -47
- data/lib/active_merchant/billing/integrations/doku/helper.rb +0 -102
- data/lib/active_merchant/billing/integrations/doku/notification.rb +0 -69
- data/lib/active_merchant/billing/integrations/doku/return.rb +0 -10
- data/lib/active_merchant/billing/integrations/doku.rb +0 -24
- data/lib/active_merchant/billing/integrations/dotpay/helper.rb +0 -77
- data/lib/active_merchant/billing/integrations/dotpay/notification.rb +0 -86
- data/lib/active_merchant/billing/integrations/dotpay/return.rb +0 -11
- data/lib/active_merchant/billing/integrations/dotpay.rb +0 -22
- data/lib/active_merchant/billing/integrations/dwolla/common.rb +0 -23
- data/lib/active_merchant/billing/integrations/dwolla/helper.rb +0 -43
- data/lib/active_merchant/billing/integrations/dwolla/notification.rb +0 -64
- data/lib/active_merchant/billing/integrations/dwolla/return.rb +0 -49
- data/lib/active_merchant/billing/integrations/dwolla.rb +0 -23
- data/lib/active_merchant/billing/integrations/e_payment_plans/helper.rb +0 -34
- data/lib/active_merchant/billing/integrations/e_payment_plans/notification.rb +0 -84
- data/lib/active_merchant/billing/integrations/e_payment_plans.rb +0 -48
- data/lib/active_merchant/billing/integrations/easy_pay/common.rb +0 -40
- data/lib/active_merchant/billing/integrations/easy_pay/helper.rb +0 -36
- data/lib/active_merchant/billing/integrations/easy_pay/notification.rb +0 -59
- data/lib/active_merchant/billing/integrations/easy_pay.rb +0 -30
- data/lib/active_merchant/billing/integrations/epay/helper.rb +0 -55
- data/lib/active_merchant/billing/integrations/epay/notification.rb +0 -110
- data/lib/active_merchant/billing/integrations/epay.rb +0 -21
- data/lib/active_merchant/billing/integrations/first_data/helper.rb +0 -61
- data/lib/active_merchant/billing/integrations/first_data/notification.rb +0 -56
- data/lib/active_merchant/billing/integrations/first_data.rb +0 -38
- data/lib/active_merchant/billing/integrations/gestpay/common.rb +0 -42
- data/lib/active_merchant/billing/integrations/gestpay/helper.rb +0 -70
- data/lib/active_merchant/billing/integrations/gestpay/notification.rb +0 -85
- data/lib/active_merchant/billing/integrations/gestpay/return.rb +0 -10
- data/lib/active_merchant/billing/integrations/gestpay.rb +0 -25
- data/lib/active_merchant/billing/integrations/helper.rb +0 -117
- data/lib/active_merchant/billing/integrations/hi_trust/helper.rb +0 -58
- data/lib/active_merchant/billing/integrations/hi_trust/notification.rb +0 -59
- data/lib/active_merchant/billing/integrations/hi_trust/return.rb +0 -68
- data/lib/active_merchant/billing/integrations/hi_trust.rb +0 -27
- data/lib/active_merchant/billing/integrations/ipay88/helper.rb +0 -118
- data/lib/active_merchant/billing/integrations/ipay88/notification.rb +0 -103
- data/lib/active_merchant/billing/integrations/ipay88/return.rb +0 -29
- data/lib/active_merchant/billing/integrations/ipay88.rb +0 -23
- data/lib/active_merchant/billing/integrations/liqpay/helper.rb +0 -43
- data/lib/active_merchant/billing/integrations/liqpay/notification.rb +0 -89
- data/lib/active_merchant/billing/integrations/liqpay/return.rb +0 -83
- data/lib/active_merchant/billing/integrations/liqpay.rb +0 -30
- data/lib/active_merchant/billing/integrations/maksuturva/helper.rb +0 -119
- data/lib/active_merchant/billing/integrations/maksuturva/notification.rb +0 -48
- data/lib/active_merchant/billing/integrations/maksuturva.rb +0 -86
- data/lib/active_merchant/billing/integrations/moneybookers/helper.rb +0 -75
- data/lib/active_merchant/billing/integrations/moneybookers/notification.rb +0 -123
- data/lib/active_merchant/billing/integrations/moneybookers.rb +0 -26
- data/lib/active_merchant/billing/integrations/nochex/helper.rb +0 -68
- data/lib/active_merchant/billing/integrations/nochex/notification.rb +0 -94
- data/lib/active_merchant/billing/integrations/nochex/return.rb +0 -10
- data/lib/active_merchant/billing/integrations/nochex.rb +0 -88
- data/lib/active_merchant/billing/integrations/notification.rb +0 -71
- data/lib/active_merchant/billing/integrations/paxum/common.rb +0 -24
- data/lib/active_merchant/billing/integrations/paxum/helper.rb +0 -42
- data/lib/active_merchant/billing/integrations/paxum/notification.rb +0 -33
- data/lib/active_merchant/billing/integrations/paxum.rb +0 -44
- data/lib/active_merchant/billing/integrations/pay_fast/common.rb +0 -42
- data/lib/active_merchant/billing/integrations/pay_fast/helper.rb +0 -50
- data/lib/active_merchant/billing/integrations/pay_fast/notification.rb +0 -134
- data/lib/active_merchant/billing/integrations/pay_fast/return.rb +0 -10
- data/lib/active_merchant/billing/integrations/pay_fast.rb +0 -70
- data/lib/active_merchant/billing/integrations/paydollar/helper.rb +0 -41
- data/lib/active_merchant/billing/integrations/paydollar/notification.rb +0 -60
- data/lib/active_merchant/billing/integrations/paydollar/return.rb +0 -15
- data/lib/active_merchant/billing/integrations/paydollar.rb +0 -59
- data/lib/active_merchant/billing/integrations/payflow_link/helper.rb +0 -116
- data/lib/active_merchant/billing/integrations/payflow_link/notification.rb +0 -78
- data/lib/active_merchant/billing/integrations/payflow_link.rb +0 -21
- data/lib/active_merchant/billing/integrations/paypal/helper.rb +0 -119
- data/lib/active_merchant/billing/integrations/paypal/notification.rb +0 -227
- data/lib/active_merchant/billing/integrations/paypal/return.rb +0 -10
- data/lib/active_merchant/billing/integrations/paypal.rb +0 -39
- data/lib/active_merchant/billing/integrations/paypal_payments_advanced/helper.rb +0 -15
- data/lib/active_merchant/billing/integrations/paypal_payments_advanced.rb +0 -20
- data/lib/active_merchant/billing/integrations/paysbuy/helper.rb +0 -15
- data/lib/active_merchant/billing/integrations/paysbuy/notification.rb +0 -39
- data/lib/active_merchant/billing/integrations/paysbuy.rb +0 -36
- data/lib/active_merchant/billing/integrations/payu_in/helper.rb +0 -76
- data/lib/active_merchant/billing/integrations/payu_in/notification.rb +0 -154
- data/lib/active_merchant/billing/integrations/payu_in/return.rb +0 -36
- data/lib/active_merchant/billing/integrations/payu_in.rb +0 -36
- data/lib/active_merchant/billing/integrations/payu_in_paisa/helper.rb +0 -19
- data/lib/active_merchant/billing/integrations/payu_in_paisa/notification.rb +0 -13
- data/lib/active_merchant/billing/integrations/payu_in_paisa/return.rb +0 -16
- data/lib/active_merchant/billing/integrations/payu_in_paisa.rb +0 -30
- data/lib/active_merchant/billing/integrations/platron/helper.rb +0 -32
- data/lib/active_merchant/billing/integrations/platron/notification.rb +0 -113
- data/lib/active_merchant/billing/integrations/platron.rb +0 -28
- data/lib/active_merchant/billing/integrations/pxpay/helper.rb +0 -112
- data/lib/active_merchant/billing/integrations/pxpay/notification.rb +0 -157
- data/lib/active_merchant/billing/integrations/pxpay/return.rb +0 -25
- data/lib/active_merchant/billing/integrations/pxpay.rb +0 -31
- data/lib/active_merchant/billing/integrations/quickpay/helper.rb +0 -96
- data/lib/active_merchant/billing/integrations/quickpay/notification.rb +0 -137
- data/lib/active_merchant/billing/integrations/quickpay.rb +0 -21
- data/lib/active_merchant/billing/integrations/rbkmoney/helper.rb +0 -23
- data/lib/active_merchant/billing/integrations/rbkmoney/notification.rb +0 -91
- data/lib/active_merchant/billing/integrations/rbkmoney.rb +0 -17
- data/lib/active_merchant/billing/integrations/return.rb +0 -42
- data/lib/active_merchant/billing/integrations/robokassa/common.rb +0 -19
- data/lib/active_merchant/billing/integrations/robokassa/helper.rb +0 -50
- data/lib/active_merchant/billing/integrations/robokassa/notification.rb +0 -55
- data/lib/active_merchant/billing/integrations/robokassa/return.rb +0 -17
- data/lib/active_merchant/billing/integrations/robokassa.rb +0 -49
- data/lib/active_merchant/billing/integrations/sage_pay_form/encryption.rb +0 -33
- data/lib/active_merchant/billing/integrations/sage_pay_form/helper.rb +0 -136
- data/lib/active_merchant/billing/integrations/sage_pay_form/notification.rb +0 -210
- data/lib/active_merchant/billing/integrations/sage_pay_form/return.rb +0 -31
- data/lib/active_merchant/billing/integrations/sage_pay_form.rb +0 -37
- data/lib/active_merchant/billing/integrations/two_checkout/helper.rb +0 -107
- data/lib/active_merchant/billing/integrations/two_checkout/notification.rb +0 -171
- data/lib/active_merchant/billing/integrations/two_checkout/return.rb +0 -58
- data/lib/active_merchant/billing/integrations/two_checkout.rb +0 -44
- data/lib/active_merchant/billing/integrations/valitor/helper.rb +0 -86
- data/lib/active_merchant/billing/integrations/valitor/notification.rb +0 -13
- data/lib/active_merchant/billing/integrations/valitor/response_fields.rb +0 -97
- data/lib/active_merchant/billing/integrations/valitor/return.rb +0 -13
- data/lib/active_merchant/billing/integrations/valitor.rb +0 -33
- data/lib/active_merchant/billing/integrations/verkkomaksut/helper.rb +0 -88
- data/lib/active_merchant/billing/integrations/verkkomaksut/notification.rb +0 -59
- data/lib/active_merchant/billing/integrations/verkkomaksut.rb +0 -20
- data/lib/active_merchant/billing/integrations/web_pay/common.rb +0 -50
- data/lib/active_merchant/billing/integrations/web_pay/helper.rb +0 -68
- data/lib/active_merchant/billing/integrations/web_pay/notification.rb +0 -51
- data/lib/active_merchant/billing/integrations/web_pay.rb +0 -45
- data/lib/active_merchant/billing/integrations/webmoney/common.rb +0 -17
- data/lib/active_merchant/billing/integrations/webmoney/helper.rb +0 -40
- data/lib/active_merchant/billing/integrations/webmoney/notification.rb +0 -47
- data/lib/active_merchant/billing/integrations/webmoney.rb +0 -43
- data/lib/active_merchant/billing/integrations/wirecard_checkout_page/common.rb +0 -104
- data/lib/active_merchant/billing/integrations/wirecard_checkout_page/helper.rb +0 -145
- data/lib/active_merchant/billing/integrations/wirecard_checkout_page/notification.rb +0 -101
- data/lib/active_merchant/billing/integrations/wirecard_checkout_page/return.rb +0 -35
- data/lib/active_merchant/billing/integrations/wirecard_checkout_page.rb +0 -39
- data/lib/active_merchant/billing/integrations/world_pay/helper.rb +0 -101
- data/lib/active_merchant/billing/integrations/world_pay/notification.rb +0 -160
- data/lib/active_merchant/billing/integrations/world_pay.rb +0 -34
- data/lib/active_merchant/billing/integrations.rb +0 -17
- data.tar.gz.sig +0 -0
- metadata.gz.sig +0 -1
data/CONTRIBUTORS
CHANGED
|
@@ -122,6 +122,7 @@ MerchantWARE (July 7, 2009)
|
|
|
122
122
|
FirstPay (July 24, 2009)
|
|
123
123
|
|
|
124
124
|
* Phil R
|
|
125
|
+
* Ryan Daigle (rwdaigle)
|
|
125
126
|
|
|
126
127
|
Ogone (July 20, 2009)
|
|
127
128
|
|
|
@@ -460,3 +461,108 @@ Openpay (February 2014)
|
|
|
460
461
|
maxiPago (February 2014)
|
|
461
462
|
|
|
462
463
|
* (alexandremcosta)
|
|
464
|
+
|
|
465
|
+
WePay (March 2014)
|
|
466
|
+
|
|
467
|
+
* Faizal Zakaria (faizalzakaria)
|
|
468
|
+
|
|
469
|
+
FirstGiving (March 2014)
|
|
470
|
+
|
|
471
|
+
* Faizal Zakaria (faizalzakaria)
|
|
472
|
+
|
|
473
|
+
BridgePay (April 2014)
|
|
474
|
+
|
|
475
|
+
* Mark Bennett (markabe)
|
|
476
|
+
|
|
477
|
+
PagoFacil (May 2014)
|
|
478
|
+
|
|
479
|
+
* Benito Serna (bhserna)
|
|
480
|
+
|
|
481
|
+
Cashnet (May 2014)
|
|
482
|
+
|
|
483
|
+
* Tom Hoen (hoenth)
|
|
484
|
+
|
|
485
|
+
Heartland Payment Systems (May 2014)
|
|
486
|
+
|
|
487
|
+
* Mark Hagan (SecureSubmit)
|
|
488
|
+
|
|
489
|
+
Borgun (June 2014)
|
|
490
|
+
|
|
491
|
+
* Mark Bennett (markabe)
|
|
492
|
+
|
|
493
|
+
Commercegate (June 2014)
|
|
494
|
+
|
|
495
|
+
* Vitaliy (vitaliyvasin)
|
|
496
|
+
|
|
497
|
+
Worldpay US (August 2014)
|
|
498
|
+
|
|
499
|
+
* Mark Bennett (markabe)
|
|
500
|
+
|
|
501
|
+
Checkout.com (September 2014)
|
|
502
|
+
|
|
503
|
+
* (ravish-ramrakha-cko)
|
|
504
|
+
|
|
505
|
+
Bank Frick (September 2014)
|
|
506
|
+
|
|
507
|
+
* Piers Chambers (varyonic)
|
|
508
|
+
|
|
509
|
+
Global Transport (September 2014)
|
|
510
|
+
|
|
511
|
+
* Duff O'Melia (duff)
|
|
512
|
+
|
|
513
|
+
IPP (December 2014)
|
|
514
|
+
|
|
515
|
+
* (InfraRuby)
|
|
516
|
+
|
|
517
|
+
QuickBooks Payments (January 2015)
|
|
518
|
+
|
|
519
|
+
* Arbab Ahmed (bizla)
|
|
520
|
+
* Ivan Sanchez (ivanfer)
|
|
521
|
+
|
|
522
|
+
Axcess MS (February 2015)
|
|
523
|
+
|
|
524
|
+
* Tim Tait (timtait)
|
|
525
|
+
|
|
526
|
+
PayHub (February 2015)
|
|
527
|
+
|
|
528
|
+
* Grep Ruby (grepruby)
|
|
529
|
+
|
|
530
|
+
Qvalent (March 2015)
|
|
531
|
+
|
|
532
|
+
* Mark Bennett (markabe)
|
|
533
|
+
|
|
534
|
+
Worldpay Online Payments (April 2015)
|
|
535
|
+
|
|
536
|
+
* (ao)
|
|
537
|
+
|
|
538
|
+
PayU India (May 2015)
|
|
539
|
+
|
|
540
|
+
* Nathaniel Talbott (ntalbott)
|
|
541
|
+
|
|
542
|
+
SecurionPay (October 2015)
|
|
543
|
+
|
|
544
|
+
* Michał Szajbe (szajbus)
|
|
545
|
+
|
|
546
|
+
Komoju (October 2015)
|
|
547
|
+
|
|
548
|
+
* Kazunori Kajihiro (k2nr)
|
|
549
|
+
|
|
550
|
+
CAMS: Central Account Management System (October 2015)
|
|
551
|
+
|
|
552
|
+
* Trevor Grayson (trevorgrayson)
|
|
553
|
+
|
|
554
|
+
Transact Pro (October 2015)
|
|
555
|
+
|
|
556
|
+
* Piers C (varyonic)
|
|
557
|
+
|
|
558
|
+
Payeezy (October 2015)
|
|
559
|
+
|
|
560
|
+
* Washington L Braga Jr (huoxito)
|
|
561
|
+
|
|
562
|
+
Clearhaus (October 2015)
|
|
563
|
+
|
|
564
|
+
* Dinesh Yadav (dinesh)
|
|
565
|
+
|
|
566
|
+
Cardknox (November 2015)
|
|
567
|
+
|
|
568
|
+
* (dlehren)
|
data/README.md
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
# Active Merchant
|
|
2
|
-
[](https://travis-ci.org/activemerchant/active_merchant)
|
|
3
|
+
[](https://codeclimate.com/github/activemerchant/active_merchant)
|
|
4
4
|
|
|
5
|
-
Active Merchant is an extraction from the
|
|
5
|
+
Active Merchant is an extraction from the ecommerce system [Shopify](http://www.shopify.com).
|
|
6
6
|
Shopify's requirements for a simple and unified API to access dozens of different payment
|
|
7
7
|
gateways with very different internal APIs was the chief principle in designing the library.
|
|
8
8
|
|
|
@@ -17,108 +17,131 @@ from an ever-growing set of contributors.
|
|
|
17
17
|
See [GettingStarted.md](GettingStarted.md) if you want to learn more about using Active Merchant in your
|
|
18
18
|
applications.
|
|
19
19
|
|
|
20
|
+
If you'd like to contribute to Active Merchant, please start with our [contribution guide](CONTRIBUTING.md).
|
|
21
|
+
|
|
20
22
|
## Installation
|
|
21
23
|
|
|
22
24
|
### From Git
|
|
23
25
|
|
|
24
26
|
You can check out the latest source from git:
|
|
25
27
|
|
|
26
|
-
git clone git://github.com/
|
|
28
|
+
git clone git://github.com/activemerchant/active_merchant.git
|
|
27
29
|
|
|
28
30
|
### From RubyGems
|
|
29
31
|
|
|
30
32
|
Installation from RubyGems:
|
|
31
33
|
|
|
32
|
-
|
|
34
|
+
```console
|
|
35
|
+
gem install activemerchant
|
|
36
|
+
```
|
|
33
37
|
|
|
34
38
|
Or, if you're using Bundler, just add the following to your Gemfile:
|
|
35
39
|
|
|
36
|
-
|
|
40
|
+
```ruby
|
|
41
|
+
gem 'activemerchant'
|
|
42
|
+
```
|
|
37
43
|
|
|
38
44
|
## Usage
|
|
39
45
|
|
|
40
46
|
This simple example demonstrates how a purchase can be made using a person's
|
|
41
47
|
credit card details.
|
|
42
48
|
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
49
|
+
```ruby
|
|
50
|
+
require 'active_merchant'
|
|
51
|
+
|
|
52
|
+
# Use the TrustCommerce test servers
|
|
53
|
+
ActiveMerchant::Billing::Base.mode = :test
|
|
54
|
+
|
|
55
|
+
gateway = ActiveMerchant::Billing::TrustCommerceGateway.new(
|
|
56
|
+
:login => 'TestMerchant',
|
|
57
|
+
:password => 'password')
|
|
58
|
+
|
|
59
|
+
# ActiveMerchant accepts all amounts as Integer values in cents
|
|
60
|
+
amount = 1000 # $10.00
|
|
61
|
+
|
|
62
|
+
# The card verification value is also known as CVV2, CVC2, or CID
|
|
63
|
+
credit_card = ActiveMerchant::Billing::CreditCard.new(
|
|
64
|
+
:first_name => 'Bob',
|
|
65
|
+
:last_name => 'Bobsen',
|
|
66
|
+
:number => '4242424242424242',
|
|
67
|
+
:month => '8',
|
|
68
|
+
:year => Time.now.year+1,
|
|
69
|
+
:verification_value => '000')
|
|
70
|
+
|
|
71
|
+
# Validating the card automatically detects the card type
|
|
72
|
+
if credit_card.validate.empty?
|
|
73
|
+
# Capture $10 from the credit card
|
|
74
|
+
response = gateway.purchase(amount, credit_card)
|
|
75
|
+
|
|
76
|
+
if response.success?
|
|
77
|
+
puts "Successfully charged $#{sprintf("%.2f", amount / 100)} to the credit card #{credit_card.display_number}"
|
|
78
|
+
else
|
|
79
|
+
raise StandardError, response.message
|
|
80
|
+
end
|
|
81
|
+
end
|
|
82
|
+
```
|
|
76
83
|
|
|
77
84
|
For more in-depth documentation and tutorials, see [GettingStarted.md](GettingStarted.md) and the
|
|
78
|
-
[API documentation](http://rubydoc.info/github/
|
|
85
|
+
[API documentation](http://www.rubydoc.info/github/activemerchant/active_merchant/).
|
|
79
86
|
|
|
80
|
-
## Supported
|
|
87
|
+
## Supported Payment Gateways
|
|
81
88
|
|
|
82
|
-
The [ActiveMerchant Wiki](http://github.com/
|
|
89
|
+
The [ActiveMerchant Wiki](http://github.com/activemerchant/active_merchant/wikis) contains a [table of features supported by each gateway](http://github.com/activemerchant/active_merchant/wikis/gatewayfeaturematrix).
|
|
83
90
|
|
|
84
|
-
* [App55](https://www.app55.com/) - AU, BR, CA, CH, CL, CN, CO, CZ, DK, EU, GB, HK, HU, ID, IS, JP, KE, KR, MX, MY, NO, NZ, PH, PL, TH, TW, US, VN, ZA
|
|
85
91
|
* [Authorize.Net CIM](http://www.authorize.net/) - US
|
|
86
|
-
* [Authorize.Net](http://www.authorize.net/) -
|
|
92
|
+
* [Authorize.Net](http://www.authorize.net/) - AD, AT, AU, BE, BG, CA, CH, CY, CZ, DE, DK, ES, FI, FR, GB, GB, GI, GR, HU, IE, IT, LI, LU, MC, MT, NL, NO, PL, PT, RO, SE, SI, SK, SM, TR, US, VA
|
|
93
|
+
* [Axcess MS](http://www.axcessms.com/) - AD, AT, BE, BG, BR, CA, CH, CY, CZ, DE, DK, EE, ES, FI, FO, FR, GB, GI, GR, HR, HU, IE, IL, IM, IS, IT, LI, LT, LU, LV, MC, MT, MX, NL, NO, PL, PT, RO, RU, SE, SI, SK, TR, US, VA
|
|
87
94
|
* [Balanced](https://www.balancedpayments.com/) - US
|
|
95
|
+
* [Bank Frick](http://www.bankfrickacquiring.com/) - LI, US
|
|
88
96
|
* [Banwire](http://www.banwire.com/) - MX
|
|
89
97
|
* [Barclays ePDQ Extra Plus](http://www.barclaycard.co.uk/business/accepting-payments/epdq-ecomm/) - GB
|
|
90
|
-
* [Barclays ePDQ MPI](http://www.barclaycard.co.uk/business/accepting-payments/epdq-mpi/) - GB
|
|
91
98
|
* [Be2Bill](http://www.be2bill.com/) - FR
|
|
92
99
|
* [Beanstream.com](http://www.beanstream.com/) - CA, US
|
|
93
100
|
* [BluePay](http://www.bluepay.com/) - US
|
|
94
|
-
* [
|
|
101
|
+
* [Borgun](https://www.borgun.is/) - IS
|
|
102
|
+
* [Braintree](https://www.braintreepayments.com) - US, CA, AU, AD, AT, BE, BG, CY, CZ, DK, EE, FI, FR, GI, DE, GR, HU, IS, IM, IE, IT, LV, LI, LT, LU, MT, MC, NL, NO, PL, PT, RO, SM, SK, SI, ES, SE, CH, TR, GB
|
|
103
|
+
* [BridgePay](http://www.bridgepaynetwork.com/) - CA, US
|
|
104
|
+
* [Cardknox](https://www.cardknox.com/) - US, CA, GB
|
|
95
105
|
* [CardSave](http://www.cardsave.net/) - GB
|
|
96
106
|
* [CardStream](http://www.cardstream.com/) - GB
|
|
107
|
+
* [Cashnet](http://www.higherone.com/) - US
|
|
97
108
|
* [Cecabank](http://www.ceca.es/es/) - ES
|
|
98
|
-
* [
|
|
109
|
+
* [Cenpos](https://www.cenpos.com/) - 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, IN, 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
|
|
110
|
+
* [CAMS: Central Account Management System](https://www.centralams.com/) - US
|
|
111
|
+
* [Checkout.com](https://www.checkout.com/) - AT, BE, BG, CY, CZ, DE, DK, EE, ES, FI, FR, GR, HR, HU, IE, IS, IT, LI, LT, LU, LV, MT, MU, NL, NO, PL, PT, RO, SE, SI, SK, US
|
|
112
|
+
* [Clearhaus](https://www.clearhaus.com) - AD, AT, BE, BG, CH, CY, CZ, DE, DK, EE, ES, FI, FO, FR, GB, GL, GR, HR, HU, IE, IS, IT, LI, LT, LU, LV, MT, NL, NO, PL, PT, RO, SE, SI, SK
|
|
113
|
+
* [Commercegate](http://www.commercegate.com/) - AD, AT, AX, BE, BG, CH, CY, CZ, DE, DK, ES, FI, FR, GB, GG, GI, GR, HR, HU, IE, IM, IS, IT, JE, LI, LT, LU, LV, MC, MT, NL, NO, PL, PT, RO, SE, SI, SK, VA
|
|
99
114
|
* [Conekta](https://conekta.io) - MX
|
|
100
115
|
* [CyberSource](http://www.cybersource.com) - US, BR, CA, CN, DK, FI, FR, DE, JP, MX, NO, SE, GB, SG
|
|
116
|
+
* [DIBS](http://www.dibspayment.com/) - US, FI, NO, SE, GB
|
|
101
117
|
* [DataCash](http://www.datacash.com/) - GB
|
|
102
118
|
* [Efsnet](http://www.concordefsnet.com/) - US
|
|
103
119
|
* [Elavon MyVirtualMerchant](http://www.elavon.com/) - US, CA
|
|
104
120
|
* [ePay](http://epay.dk/) - DK, SE, NO
|
|
105
121
|
* [EVO Canada](http://www.evocanada.com/) - CA
|
|
106
122
|
* [eWAY](http://www.eway.com.au/) - AU, NZ, GB
|
|
107
|
-
* [eWAY Rapid
|
|
123
|
+
* [eWAY Rapid](http://www.eway.com.au/) - AU, NZ, GB, SG
|
|
108
124
|
* [E-xact](http://www.e-xact.com) - CA, US
|
|
125
|
+
* [Ezic](http://www.ezic.com/) - AU, CA, CN, FR, DE, GI, IL, MT, MU, MX, NL, NZ, PA, PH, RU, SG, KR, ES, KN, GB
|
|
109
126
|
* [Fat Zebra](https://www.fatzebra.com.au/) - AU
|
|
110
127
|
* [Federated Canada](http://www.federatedcanada.com/) - CA
|
|
111
128
|
* [Finansbank WebPOS](https://www.fbwebpos.com/) - US, TR
|
|
112
|
-
* [
|
|
129
|
+
* [Flo2Cash](http://www.flo2cash.co.nz/) - NZ
|
|
130
|
+
* [1stPayGateway.Net](http://1stpaygateway.net/) - US
|
|
113
131
|
* [FirstData Global Gateway e4](http://www.firstdata.com) - CA, US
|
|
132
|
+
* [FirstGiving](http://www.firstgiving.com/) - US
|
|
114
133
|
* [Garanti Sanal POS](https://sanalposweb.garanti.com.tr) - US, TR
|
|
134
|
+
* [Global Transport](https://www.globalpaymentsinc.com) - CA, PR, US
|
|
115
135
|
* [HDFC](http://www.hdfcbank.com/sme/sme-details/merchant-services/guzh6m0i) - IN
|
|
116
|
-
* [
|
|
136
|
+
* [Heartland Payment Systems](http://developer.heartlandpaymentsystems.com/SecureSubmit/) - US
|
|
137
|
+
* [iATS Payments](http://home.iatspayments.com/) - AU, BR, CA, CH, DE, DK, ES, FI, FR, GR, HK, IE, IT, NL, NO, PT, SE, SG, TR, UK, US
|
|
117
138
|
* [Inspire Commerce](http://www.inspiregateway.com) - US
|
|
118
139
|
* [InstaPay](http://www.instapayllc.com) - US
|
|
140
|
+
* [IPP](http://www.ippayments.com.au/) - AU
|
|
119
141
|
* [Iridium](http://www.iridiumcorp.co.uk/) - GB, ES
|
|
120
142
|
* [iTransact](http://www.itransact.com/) - US
|
|
121
143
|
* [JetPay](http://www.jetpay.com/) - US
|
|
144
|
+
* [Komoju](http://www.komoju.com/) - JP
|
|
122
145
|
* [LinkPoint](http://www.linkpoint.com/) - US
|
|
123
146
|
* [Litle & Co.](http://www.litle.com/) - US
|
|
124
147
|
* [maxiPago!](http://www.maxipago.com/) - BR
|
|
@@ -126,28 +149,36 @@ The [ActiveMerchant Wiki](http://github.com/Shopify/active_merchant/wikis) conta
|
|
|
126
149
|
* [Merchant One Gateway](http://merchantone.com/) - US
|
|
127
150
|
* [MerchantWARE](http://merchantwarehouse.com/merchantware) - US
|
|
128
151
|
* [MerchantWarrior](http://www.merchantwarrior.com/) - AU
|
|
129
|
-
* [Mercury](http://www.mercurypay.com) - US
|
|
152
|
+
* [Mercury](http://www.mercurypay.com) - US, CA
|
|
130
153
|
* [Metrics Global](http://www.metricsglobal.com) - US
|
|
131
154
|
* [MasterCard Internet Gateway Service (MiGS)](http://mastercard.com/mastercardsps) - AU, AE, BD, BN, EG, HK, ID, IN, JO, KW, LB, LK, MU, MV, MY, NZ, OM, PH, QA, SA, SG, TT, VN
|
|
132
155
|
* [Modern Payments](http://www.modpay.com) - US
|
|
156
|
+
* [MONEI](http://www.monei.net/) - AD, AT, BE, BG, CA, CH, CY, CZ, DE, DK, EE, ES, FI, FO, FR, GB, GI, GR, HU, IE, IL, IS, IT, LI, LT, LU, LV, MT, NL, NO, PL, PT, RO, SE, SI, SK, TR, US, VA
|
|
133
157
|
* [Moneris](http://www.moneris.com/) - CA
|
|
134
158
|
* [Moneris (US)](http://www.monerisusa.com/) - US
|
|
135
159
|
* [MoneyMovers](http://mmoa.us/) - US
|
|
136
160
|
* [NAB Transact](http://transact.nab.com.au) - AU
|
|
161
|
+
* [NELiX TransaX](https://www.nelixtransax.com/) - US
|
|
137
162
|
* [NetRegistry](http://www.netregistry.com.au) - AU
|
|
138
163
|
* [BBS Netaxept](http://www.betalingsterminal.no/Netthandel-forside/) - NO, DK, SE, FI
|
|
139
164
|
* [NETbilling](http://www.netbilling.com) - US
|
|
140
165
|
* [NETPAY Gateway](http://www.netpay.com.mx) - MX
|
|
141
166
|
* [NMI](http://nmi.com/) - US
|
|
142
167
|
* [Ogone](http://www.ogone.com/) - BE, DE, FR, NL, AT, CH
|
|
168
|
+
* [Omise](https://www.omise.co/) - TH, JP
|
|
143
169
|
* [Openpay](Openpay) - MX
|
|
144
170
|
* [Optimal Payments](http://www.optimalpayments.com/) - CA, US, GB
|
|
145
171
|
* [Orbital Paymentech](http://chasepaymentech.com/) - US, CA
|
|
172
|
+
* [Pagar.me](https://pagar.me/) - BR
|
|
173
|
+
* [PagoFacil](http://www.pagofacil.net/) - MX
|
|
174
|
+
* [PayConex](http://www.bluefincommerce.com/) - US, CA
|
|
146
175
|
* [PayGate PayXML](http://paygate.co.za/) - US, ZA
|
|
176
|
+
* [PayHub](http://www.payhub.com/) - US
|
|
147
177
|
* [PayJunction](http://www.payjunction.com/) - US
|
|
148
178
|
* [PaySecure](http://www.commsecure.com.au/paysecure.shtml) - AU
|
|
149
179
|
* [Paybox Direct](http://www.paybox.com/) - FR
|
|
150
|
-
* [
|
|
180
|
+
* [Payeezy](https://developer.payeezy.com/) - CA, US
|
|
181
|
+
* [Payex](http://payex.com/) - DK, FI, NO, SE
|
|
151
182
|
* [PaymentExpress](http://www.paymentexpress.com/) - AU, CA, DE, ES, FR, GB, HK, IE, MY, NL, NZ, SG, US, ZA
|
|
152
183
|
* [PAYMILL](https://paymill.com) - AD, AT, BE, BG, CH, CY, CZ, DE, DK, EE, ES, FI, FO, FR, GB, GI, GR, HU, IE, IL, IS, IT, LI, LT, LU, LV, MT, NL, NO, PL, PT, RO, SE, SI, SK, TR, VA
|
|
153
184
|
* [PayPal Express Checkout](https://www.paypal.com/webapps/mpp/express-checkout) - US, CA, SG, AU
|
|
@@ -160,79 +191,52 @@ The [ActiveMerchant Wiki](http://github.com/Shopify/active_merchant/wikis) conta
|
|
|
160
191
|
* [Payscout](http://www.payscout.com/) - US
|
|
161
192
|
* [Paystation](http://paystation.co.nz) - NZ
|
|
162
193
|
* [Pay Way](http://www.payway.com.au) - AU
|
|
163
|
-
* [
|
|
194
|
+
* [PayU India](https://www.payu.in/) - IN
|
|
195
|
+
* [Pin Payments](http://www.pin.net.au/) - AU
|
|
164
196
|
* [Plug'n Pay](http://www.plugnpay.com/) - US
|
|
165
197
|
* [Psigate](http://www.psigate.com/) - CA
|
|
166
198
|
* [PSL Payment Solutions](http://www.paymentsolutionsltd.com/) - GB
|
|
167
199
|
* [QuickBooks Merchant Services](http://payments.intuit.com/) - US
|
|
200
|
+
* [QuickBooks Payments](http://payments.intuit.com/) - US
|
|
168
201
|
* [Quantum Gateway](http://www.quantumgateway.com) - US
|
|
169
|
-
* [
|
|
170
|
-
* [
|
|
202
|
+
* [QuickPay](http://quickpay.net/) - AT, BE, BG, CY, CZ, DE, DK, EE, ES, FI, FR, GB, GR, HR, HU, IE, IS, IT, LI, LT, LU, LV, MT, NL, NO, PL, PT, RO, SE SI, SK
|
|
203
|
+
* [Qvalent](https://www.qvalent.com/) - AU
|
|
204
|
+
* [Raven](http://www.deepcovelabs.com/raven) - AI, AN, AT, AU, BE, BG, BS, BZ, CA, CH, CR, CY, CZ, DE, DK, DM, DO, EE, EL, ES, FI, FR, GB, GG, GI, HK, HR, HU, IE, IL, IM, IN, IT, JE, KN, LI, LT, LU, LV, MH, MT, MY, NL, NO, NZ, PA, PE, PH, PL, PT, RO, RS, SC, SE, SG, SI, SK, UK, US, VG, ZA
|
|
171
205
|
* [Realex](http://www.realexpayments.com/) - IE, GB, FR, BE, NL, LU, IT
|
|
172
206
|
* [Redsys](http://www.redsys.es/) - ES
|
|
207
|
+
* [S5](http://www.s5.dk/) - DK
|
|
173
208
|
* [SagePay](http://www.sagepay.com) - GB, IE
|
|
174
209
|
* [Sage Payment Solutions](http://www.sagepayments.com) - US, CA
|
|
175
210
|
* [Sallie Mae](http://www.salliemae.com/) - US
|
|
176
|
-
* [Samurai](https://samurai.feefighters.com) - US
|
|
177
211
|
* [SecureNet](http://www.securenet.com/) - US
|
|
178
212
|
* [SecurePay](http://www.securepay.com/) - US, CA, GB, AU
|
|
179
213
|
* [SecurePayTech](http://www.securepaytech.com/) - NZ
|
|
214
|
+
* [SecurionPay](https://securionpay.com/) - AD, AE, AF, AG, AI, AL, AM, AO, AR, AS, AT, AU, AW, AX, AZ, BA, BB, BD, BE, BF, BG, BH, BI, BJ, BL, BM, BN, BO, BR, BS, BT, BV, BW, BY, BZ, CA, CC, CD, CF, CG, CH, CI, CK, CL, CM, CN, CO, CR, CU, CV, CW, CX, CY, CZ, DE, DJ, DK, DM, DO, DZ, EC, EE, EG, EH, ER, ES, ET, FI, FJ, FK, FM, FO, FR, GA, GB, GD, GE, GF, GG, GH, GI, GL, GM, GN, GP, GQ, GR, GS, GT, GU, GW, GY, HK, HM, HN, HR, HT, HU, ID, IE, IL, IM, IN, IO, IQ, IR, IS, IT, JE, JM, JO, JP, KE, KG, KH, KI, KM, KN, KP, KR, KW, KY, KZ, LA, LB, LC, LI, LK, LR, LS, LT, LU, LV, LY, MA, MC, MD, ME, MF, MG, MH, MK, ML, MM, MN, MO, MP, MQ, MR, MS, MT, MU, MV, MW, MX, MY, MZ, NA, NC, NE, NF, NG, NI, NL, NO, NP, NR, NU, NZ, OM, PA, PE, PF, PG, PH, PK, PL, PM, PN, PR, PS, PT, PW, PY, QA, RE, RO, RS, RU, RW, SA, SB, SC, SD, SE, SG, SH, SI, SJ, SK, SL, SM, SN, SO, SR, ST, SV, SY, SZ, TC, TD, TF, TG, TH, TJ, TK, TL, TM, TN, TO, TR, TT, TV, TW, TZ, UA, UG, UM, US, UY, UZ, VA, VC, VE, VG, VI, VN, VU, WF, WS, YE, YT, ZA, ZM, ZW
|
|
180
215
|
* [SkipJack](http://www.skipjack.com/) - US, CA
|
|
181
216
|
* [SoEasyPay](http://www.soeasypay.com/) - US, CA, AT, BE, BG, HR, CY, CZ, DK, EE, FI, FR, DE, GR, HU, IE, IT, LV, LT, LU, MT, NL, PL, PT, RO, SK, SI, ES, SE, GB, IS, NO, CH
|
|
182
217
|
* [Spreedly](https://spreedly.com) - AD, AE, AT, AU, BD, BE, BG, BN, CA, CH, CY, CZ, DE, DK, EE, EG, ES, FI, FR, GB, GI, GR, HK, HU, ID, IE, IL, IM, IN, IS, IT, JO, KW, LB, LI, LK, LT, LU, LV, MC, MT, MU, MV, MX, MY, NL, NO, NZ, OM, PH, PL, PT, QA, RO, SA, SE, SG, SI, SK, SM, TR, TT, UM, US, VA, VN, ZA
|
|
183
|
-
* [Stripe](https://stripe.com/) -
|
|
218
|
+
* [Stripe](https://stripe.com/) - AT, AU, BE, CA, CH, DE, DK, ES, FI, FR, GB, IE, IT, LU, NL, NO, SE, SG, US
|
|
184
219
|
* [Swipe](https://www.swipehq.com/checkout) - CA, NZ
|
|
220
|
+
* [TNS](http://www.tnsi.com/) - AR, AU, BR, FR, DE, HK, MX, NZ, SG, GB, US
|
|
221
|
+
* [Transact Pro](https://www.transactpro.lv/business/online-payments-acceptance) - US
|
|
185
222
|
* [TransFirst](http://www.transfirst.com/) - US
|
|
186
|
-
* [NELiX TransaX](https://www.nelixtransax.com/) - US
|
|
187
223
|
* [Transnational](http://www.tnbci.com/) - US
|
|
188
224
|
* [TrustCommerce](http://www.trustcommerce.com/) - US
|
|
189
225
|
* [USA ePay](http://www.usaepay.com/) - US
|
|
226
|
+
* [Vanco Payment Solutions](http://vancopayments.com/) - US
|
|
190
227
|
* [Verifi](http://www.verifi.com/) - US
|
|
191
228
|
* [ViaKLIX](http://viaklix.com) - US
|
|
192
|
-
* [Vindicia](http://www.vindicia.com/) - US, CA, GB, AU, MX, BR, DE, KR, CN, HK
|
|
193
229
|
* [WebPay](https://webpay.jp/) - JP
|
|
230
|
+
* [WePay](https://www.wepay.com/) - US
|
|
194
231
|
* [Wirecard](http://www.wirecard.com) - AD, CY, GI, IM, MT, RO, CH, AT, DK, GR, IT, MC, SM, TR, BE, EE, HU, LV, NL, SK, GB, BG, FI, IS, LI, NO, SI, VA, FR, IL, LT, PL, ES, CZ, DE, IE, LU, PT, SE
|
|
195
|
-
* [
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
* [Dotpay](http://dotpay.pl)
|
|
207
|
-
* [Doku](http://doku.com)
|
|
208
|
-
* [Dwolla](https://www.dwolla.com/default.aspx)
|
|
209
|
-
* [ePay](http://www.epay.dk/epay-payment-solutions/)
|
|
210
|
-
* [First Data](https://firstdata.zendesk.com/entries/407522-first-data-global-gateway-e4sm-payment-pages-integration-manual)
|
|
211
|
-
* [HiTRUST](http://www.hitrust.com.hk/)
|
|
212
|
-
* [Moneybookers](http://www.moneybookers.com)
|
|
213
|
-
* [Nochex](http://www.nochex.com)
|
|
214
|
-
* [Paxum](https://www.paxum.com/)
|
|
215
|
-
* [PayPal Website Payments Standard](https://www.paypal.com/cgi-bin/webscr?cmd#_wp-standard-overview-outside)
|
|
216
|
-
* [Paysbuy](https://www.paysbuy.com/) - TH
|
|
217
|
-
* [Platron](https://www.platron.ru/) - RU
|
|
218
|
-
* [RBK Money](https://rbkmoney.ru/) - RU
|
|
219
|
-
* [Robokassa](http://robokassa.ru/) - RU
|
|
220
|
-
* [SagePay Form](http://www.sagepay.com/products_services/sage_pay_go/integration/form)
|
|
221
|
-
* [Suomen Maksuturva](https://www.maksuturva.fi/services/vendor_services/integration_guidelines.html)
|
|
222
|
-
* [Valitor](http://www.valitor.is/) - IS
|
|
223
|
-
* [Verkkomaksut](http://www.verkkomaksut.fi) - FI
|
|
224
|
-
* [WebMoney](http://www.webmoney.ru) - RU
|
|
225
|
-
* [WebPay](http://webpay.by/)
|
|
226
|
-
* [WorldPay](http://www.worldpay.com)
|
|
227
|
-
|
|
228
|
-
## Contributing
|
|
229
|
-
|
|
230
|
-
The source code is hosted at [GitHub](http://github.com/Shopify/active_merchant), and can be fetched using:
|
|
231
|
-
|
|
232
|
-
git clone git://github.com/Shopify/active_merchant.git
|
|
233
|
-
|
|
234
|
-
Please see the [ActiveMerchant Guide to Contributing](http://github.com/Shopify/active_merchant/wikis/contributing) for
|
|
235
|
-
information on adding a new gateway to ActiveMerchant.
|
|
236
|
-
|
|
237
|
-
Please don't touch the CHANGELOG in your pull requests, we'll add the appropriate CHANGELOG entries
|
|
238
|
-
at release time.
|
|
232
|
+
* [Worldpay Global](http://www.worldpay.com/) - HK, GB, AU, AD, BE, CH, CY, CZ, DE, DK, ES, FI, FR, GI, GR, HU, IE, IL, IT, LI, LU, MC, MT, NL, NO, NZ, PL, PT, SE, SG, SI, SM, TR, UM, VA
|
|
233
|
+
* [Worldpay Online](https://online.worldpay.com/) - HK, US, GB, AU, AD, BE, CH, CY, CZ, DE, DK, ES, FI, FR, GI, GR, HU, IE, IL, IT, LI, LU, MC, MT, NL, NO, NZ, PL, PT, SE, SG, SI, SM, TR, UM, VA
|
|
234
|
+
* [Worldpay US](http://www.worldpay.com/us) - US
|
|
235
|
+
|
|
236
|
+
## API stability policy
|
|
237
|
+
|
|
238
|
+
Functionality or APIs that are deprecated will be marked as such. Deprecated functionality is removed on major version changes - for example, deprecations from 2.x are removed in 3.x.
|
|
239
|
+
|
|
240
|
+
## Ruby and Rails compatibility policies
|
|
241
|
+
|
|
242
|
+
Because Active Merchant is a payment library, it needs to take security seriously. For this reason, Active Merchant guarantees compatibility only with actively supported versions of Ruby and Rails. At the time of this writing, that means that Ruby 2.3+ and Rails 4.2+ are supported.
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
module ActiveMerchant #:nodoc:
|
|
2
|
+
module Billing #:nodoc:
|
|
3
|
+
class ApplePayPaymentToken < PaymentToken
|
|
4
|
+
# This is a representation of the token object specified here:
|
|
5
|
+
# https://developer.apple.com/library/ios/documentation/PassKit/Reference/PKPaymentToken_Ref/
|
|
6
|
+
# https://developer.apple.com/library/IOs//documentation/PassKit/Reference/PaymentTokenJSON/PaymentTokenJSON.html
|
|
7
|
+
|
|
8
|
+
attr_reader :payment_instrument_name, :payment_network
|
|
9
|
+
attr_accessor :transaction_identifier
|
|
10
|
+
|
|
11
|
+
def initialize(payment_data, options = {})
|
|
12
|
+
super
|
|
13
|
+
@payment_instrument_name = @metadata[:payment_instrument_name]
|
|
14
|
+
@payment_network = @metadata[:payment_network]
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def type
|
|
18
|
+
'apple_pay'
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
22
|
+
end
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
#!ruby19
|
|
2
1
|
# encoding: utf-8
|
|
3
2
|
|
|
4
3
|
module ActiveMerchant
|
|
5
|
-
module Billing
|
|
4
|
+
module Billing
|
|
6
5
|
# Implements the Address Verification System
|
|
7
6
|
# https://www.wellsfargo.com/downloads/pdf/biz/merchant/visa_avs.pdf
|
|
8
7
|
# http://en.wikipedia.org/wiki/Address_Verification_System
|
|
@@ -38,7 +37,7 @@ module ActiveMerchant
|
|
|
38
37
|
'Y' => 'Street address and 5-digit postal code match.',
|
|
39
38
|
'Z' => 'Street address does not match, but 5-digit postal code matches.'
|
|
40
39
|
}
|
|
41
|
-
|
|
40
|
+
|
|
42
41
|
# Map vendor's AVS result code to a postal match code
|
|
43
42
|
POSTAL_MATCH_CODE = {
|
|
44
43
|
'Y' => %w( D H F H J L M P Q V W X Y Z ),
|
|
@@ -49,7 +48,7 @@ module ActiveMerchant
|
|
|
49
48
|
codes.each { |code| map[code] = type }
|
|
50
49
|
map
|
|
51
50
|
end
|
|
52
|
-
|
|
51
|
+
|
|
53
52
|
# Map vendor's AVS result code to a street match code
|
|
54
53
|
STREET_MATCH_CODE = {
|
|
55
54
|
'Y' => %w( A B D H J M O Q T V X Y ),
|
|
@@ -60,32 +59,32 @@ module ActiveMerchant
|
|
|
60
59
|
codes.each { |code| map[code] = type }
|
|
61
60
|
map
|
|
62
61
|
end
|
|
63
|
-
|
|
62
|
+
|
|
64
63
|
attr_reader :code, :message, :street_match, :postal_match
|
|
65
|
-
|
|
64
|
+
|
|
66
65
|
def self.messages
|
|
67
66
|
MESSAGES
|
|
68
67
|
end
|
|
69
|
-
|
|
68
|
+
|
|
70
69
|
def initialize(attrs)
|
|
71
70
|
attrs ||= {}
|
|
72
|
-
|
|
71
|
+
|
|
73
72
|
@code = attrs[:code].upcase unless attrs[:code].blank?
|
|
74
73
|
@message = self.class.messages[code]
|
|
75
|
-
|
|
74
|
+
|
|
76
75
|
if attrs[:street_match].blank?
|
|
77
76
|
@street_match = STREET_MATCH_CODE[code]
|
|
78
|
-
else
|
|
77
|
+
else
|
|
79
78
|
@street_match = attrs[:street_match].upcase
|
|
80
79
|
end
|
|
81
|
-
|
|
80
|
+
|
|
82
81
|
if attrs[:postal_match].blank?
|
|
83
82
|
@postal_match = POSTAL_MATCH_CODE[code]
|
|
84
|
-
else
|
|
83
|
+
else
|
|
85
84
|
@postal_match = attrs[:postal_match].upcase
|
|
86
85
|
end
|
|
87
86
|
end
|
|
88
|
-
|
|
87
|
+
|
|
89
88
|
def to_hash
|
|
90
89
|
{ 'code' => code,
|
|
91
90
|
'message' => message,
|
|
@@ -1,24 +1,21 @@
|
|
|
1
1
|
module ActiveMerchant #:nodoc:
|
|
2
2
|
module Billing #:nodoc:
|
|
3
3
|
module Base
|
|
4
|
-
#
|
|
5
|
-
#
|
|
6
|
-
# ActiveMerchant::Billing::Base.gateway_mode = :test
|
|
7
|
-
mattr_accessor :gateway_mode
|
|
4
|
+
GATEWAY_MODE_DEPRECATION_MESSAGE = 'Base#gateway_mode is deprecated in favor of Base#mode and will be removed in a future version'
|
|
8
5
|
|
|
9
|
-
# Set ActiveMerchant
|
|
6
|
+
# Set ActiveMerchant gateways in test mode.
|
|
10
7
|
#
|
|
11
|
-
# ActiveMerchant::Billing::Base.
|
|
12
|
-
mattr_accessor :
|
|
8
|
+
# ActiveMerchant::Billing::Base.mode = :test
|
|
9
|
+
mattr_accessor :mode
|
|
13
10
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
mattr_reader :mode
|
|
17
|
-
|
|
18
|
-
def self.mode=(mode)
|
|
11
|
+
def self.gateway_mode=(mode)
|
|
12
|
+
ActiveMerchant.deprecated(GATEWAY_MODE_DEPRECATION_MESSAGE)
|
|
19
13
|
@@mode = mode
|
|
20
|
-
|
|
21
|
-
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def self.gateway_mode
|
|
17
|
+
ActiveMerchant.deprecated(GATEWAY_MODE_DEPRECATION_MESSAGE)
|
|
18
|
+
@@mode
|
|
22
19
|
end
|
|
23
20
|
|
|
24
21
|
self.mode = :production
|
|
@@ -52,12 +49,12 @@ module ActiveMerchant #:nodoc:
|
|
|
52
49
|
# notification = chronopay.notification(raw_post)
|
|
53
50
|
#
|
|
54
51
|
def self.integration(name)
|
|
55
|
-
Billing::Integrations.const_get(
|
|
52
|
+
Billing::Integrations.const_get(name.to_s.downcase.camelize)
|
|
56
53
|
end
|
|
57
54
|
|
|
58
55
|
# A check to see if we're in test mode
|
|
59
56
|
def self.test?
|
|
60
|
-
|
|
57
|
+
mode == :test
|
|
61
58
|
end
|
|
62
59
|
end
|
|
63
60
|
end
|