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
|
@@ -15,7 +15,7 @@ module ActiveMerchant #:nodoc:
|
|
|
15
15
|
self.money_format = :cents
|
|
16
16
|
|
|
17
17
|
# The card types supported by the payment gateway
|
|
18
|
-
self.supported_cardtypes = [:visa, :master, :american_express, :discover, :maestro, :jcb, :
|
|
18
|
+
self.supported_cardtypes = [:visa, :master, :american_express, :discover, :maestro, :jcb, :diners_club]
|
|
19
19
|
|
|
20
20
|
# The homepage URL of the gateway
|
|
21
21
|
self.homepage_url = 'http://www.iridiumcorp.co.uk/'
|
|
@@ -24,13 +24,202 @@ module ActiveMerchant #:nodoc:
|
|
|
24
24
|
self.display_name = 'Iridium'
|
|
25
25
|
|
|
26
26
|
CURRENCY_CODES = {
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
27
|
+
'AED' => '784',
|
|
28
|
+
'AFN' => '971',
|
|
29
|
+
'ALL' => '008',
|
|
30
|
+
'AMD' => '051',
|
|
31
|
+
'ANG' => '532',
|
|
32
|
+
'AOA' => '973',
|
|
33
|
+
'ARS' => '032',
|
|
34
|
+
'AUD' => '036',
|
|
35
|
+
'AWG' => '533',
|
|
36
|
+
'AZN' => '944',
|
|
37
|
+
'BAM' => '977',
|
|
38
|
+
'BBD' => '052',
|
|
39
|
+
'BDT' => '050',
|
|
40
|
+
'BGN' => '975',
|
|
41
|
+
'BHD' => '048',
|
|
42
|
+
'BIF' => '108',
|
|
43
|
+
'BMD' => '060',
|
|
44
|
+
'BND' => '096',
|
|
45
|
+
'BOB' => '068',
|
|
46
|
+
'BOV' => '984',
|
|
47
|
+
'BRL' => '986',
|
|
48
|
+
'BSD' => '044',
|
|
49
|
+
'BTN' => '064',
|
|
50
|
+
'BWP' => '072',
|
|
51
|
+
'BYR' => '974',
|
|
52
|
+
'BZD' => '084',
|
|
53
|
+
'CAD' => '124',
|
|
54
|
+
'CDF' => '976',
|
|
55
|
+
'CHE' => '947',
|
|
56
|
+
'CHF' => '756',
|
|
57
|
+
'CHW' => '948',
|
|
58
|
+
'CLF' => '990',
|
|
59
|
+
'CLP' => '152',
|
|
60
|
+
'CNY' => '156',
|
|
61
|
+
'COP' => '170',
|
|
62
|
+
'COU' => '970',
|
|
63
|
+
'CRC' => '188',
|
|
64
|
+
'CUP' => '192',
|
|
65
|
+
'CVE' => '132',
|
|
66
|
+
'CYP' => '196',
|
|
67
|
+
'CZK' => '203',
|
|
68
|
+
'DJF' => '262',
|
|
69
|
+
'DKK' => '208',
|
|
70
|
+
'DOP' => '214',
|
|
71
|
+
'DZD' => '012',
|
|
72
|
+
'EEK' => '233',
|
|
73
|
+
'EGP' => '818',
|
|
74
|
+
'ERN' => '232',
|
|
75
|
+
'ETB' => '230',
|
|
76
|
+
'EUR' => '978',
|
|
77
|
+
'FJD' => '242',
|
|
78
|
+
'FKP' => '238',
|
|
79
|
+
'GBP' => '826',
|
|
80
|
+
'GEL' => '981',
|
|
81
|
+
'GHS' => '288',
|
|
82
|
+
'GIP' => '292',
|
|
83
|
+
'GMD' => '270',
|
|
84
|
+
'GNF' => '324',
|
|
85
|
+
'GTQ' => '320',
|
|
86
|
+
'GYD' => '328',
|
|
87
|
+
'HKD' => '344',
|
|
88
|
+
'HNL' => '340',
|
|
89
|
+
'HRK' => '191',
|
|
90
|
+
'HTG' => '332',
|
|
91
|
+
'HUF' => '348',
|
|
92
|
+
'IDR' => '360',
|
|
93
|
+
'ILS' => '376',
|
|
94
|
+
'INR' => '356',
|
|
95
|
+
'IQD' => '368',
|
|
96
|
+
'IRR' => '364',
|
|
97
|
+
'ISK' => '352',
|
|
98
|
+
'JMD' => '388',
|
|
99
|
+
'JOD' => '400',
|
|
100
|
+
'JPY' => '392',
|
|
101
|
+
'KES' => '404',
|
|
102
|
+
'KGS' => '417',
|
|
103
|
+
'KHR' => '116',
|
|
104
|
+
'KMF' => '174',
|
|
105
|
+
'KPW' => '408',
|
|
106
|
+
'KRW' => '410',
|
|
107
|
+
'KWD' => '414',
|
|
108
|
+
'KYD' => '136',
|
|
109
|
+
'KZT' => '398',
|
|
110
|
+
'LAK' => '418',
|
|
111
|
+
'LBP' => '422',
|
|
112
|
+
'LKR' => '144',
|
|
113
|
+
'LRD' => '430',
|
|
114
|
+
'LSL' => '426',
|
|
115
|
+
'LTL' => '440',
|
|
116
|
+
'LVL' => '428',
|
|
117
|
+
'LYD' => '434',
|
|
118
|
+
'MAD' => '504',
|
|
119
|
+
'MDL' => '498',
|
|
120
|
+
'MGA' => '969',
|
|
121
|
+
'MKD' => '807',
|
|
122
|
+
'MMK' => '104',
|
|
123
|
+
'MNT' => '496',
|
|
124
|
+
'MOP' => '446',
|
|
125
|
+
'MRO' => '478',
|
|
126
|
+
'MTL' => '470',
|
|
127
|
+
'MUR' => '480',
|
|
128
|
+
'MVR' => '462',
|
|
129
|
+
'MWK' => '454',
|
|
130
|
+
'MXN' => '484',
|
|
131
|
+
'MXV' => '979',
|
|
132
|
+
'MYR' => '458',
|
|
133
|
+
'MZN' => '943',
|
|
134
|
+
'NAD' => '516',
|
|
135
|
+
'NGN' => '566',
|
|
136
|
+
'NIO' => '558',
|
|
137
|
+
'NOK' => '578',
|
|
138
|
+
'NPR' => '524',
|
|
139
|
+
'NZD' => '554',
|
|
140
|
+
'OMR' => '512',
|
|
141
|
+
'PAB' => '590',
|
|
142
|
+
'PEN' => '604',
|
|
143
|
+
'PGK' => '598',
|
|
144
|
+
'PHP' => '608',
|
|
145
|
+
'PKR' => '586',
|
|
146
|
+
'PLN' => '985',
|
|
147
|
+
'PYG' => '600',
|
|
148
|
+
'QAR' => '634',
|
|
149
|
+
'ROL' => '642',
|
|
150
|
+
'RON' => '946',
|
|
151
|
+
'RSD' => '941',
|
|
152
|
+
'RUB' => '643',
|
|
153
|
+
'RWF' => '646',
|
|
154
|
+
'SAR' => '682',
|
|
155
|
+
'SBD' => '090',
|
|
156
|
+
'SCR' => '690',
|
|
157
|
+
'SDG' => '938',
|
|
158
|
+
'SEK' => '752',
|
|
159
|
+
'SGD' => '702',
|
|
160
|
+
'SHP' => '654',
|
|
161
|
+
'SKK' => '703',
|
|
162
|
+
'SLL' => '694',
|
|
163
|
+
'SOS' => '706',
|
|
164
|
+
'SRD' => '968',
|
|
165
|
+
'STD' => '678',
|
|
166
|
+
'SYP' => '760',
|
|
167
|
+
'SZL' => '748',
|
|
168
|
+
'THB' => '764',
|
|
169
|
+
'TJS' => '972',
|
|
170
|
+
'TMM' => '795',
|
|
171
|
+
'TND' => '788',
|
|
172
|
+
'TOP' => '776',
|
|
173
|
+
'TRY' => '949',
|
|
174
|
+
'TTD' => '780',
|
|
175
|
+
'TWD' => '901',
|
|
176
|
+
'TZS' => '834',
|
|
177
|
+
'UAH' => '980',
|
|
178
|
+
'UGX' => '800',
|
|
179
|
+
'USD' => '840',
|
|
180
|
+
'USN' => '997',
|
|
181
|
+
'USS' => '998',
|
|
182
|
+
'UYU' => '858',
|
|
183
|
+
'UZS' => '860',
|
|
184
|
+
'VEB' => '862',
|
|
185
|
+
'VND' => '704',
|
|
186
|
+
'VUV' => '548',
|
|
187
|
+
'WST' => '882',
|
|
188
|
+
'XAF' => '950',
|
|
189
|
+
'XAG' => '961',
|
|
190
|
+
'XAU' => '959',
|
|
191
|
+
'XBA' => '955',
|
|
192
|
+
'XBB' => '956',
|
|
193
|
+
'XBC' => '957',
|
|
194
|
+
'XBD' => '958',
|
|
195
|
+
'XCD' => '951',
|
|
196
|
+
'XDR' => '960',
|
|
197
|
+
'XOF' => '952',
|
|
198
|
+
'XPD' => '964',
|
|
199
|
+
'XPF' => '953',
|
|
200
|
+
'XPT' => '962',
|
|
201
|
+
'XTS' => '963',
|
|
202
|
+
'XXX' => '999',
|
|
203
|
+
'YER' => '886',
|
|
204
|
+
'ZAR' => '710',
|
|
205
|
+
'ZMK' => '894',
|
|
206
|
+
'ZWD' => '716',
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
AVS_CODE = {
|
|
210
|
+
'PASSED' => 'Y',
|
|
211
|
+
'FAILED' => 'N',
|
|
212
|
+
'PARTIAL' => 'X',
|
|
213
|
+
'NOT_CHECKED' => 'X',
|
|
214
|
+
'UNKNOWN' => 'X'
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
CVV_CODE = {
|
|
218
|
+
'PASSED' => 'M',
|
|
219
|
+
'FAILED' => 'N',
|
|
220
|
+
'PARTIAL' => 'I',
|
|
221
|
+
'NOT_CHECKED' => 'P',
|
|
222
|
+
'UNKNOWN' => 'U'
|
|
34
223
|
}
|
|
35
224
|
|
|
36
225
|
def initialize(options = {})
|
|
@@ -63,7 +252,7 @@ module ActiveMerchant #:nodoc:
|
|
|
63
252
|
end
|
|
64
253
|
|
|
65
254
|
def credit(money, authorization, options={})
|
|
66
|
-
deprecated CREDIT_DEPRECATION_MESSAGE
|
|
255
|
+
ActiveMerchant.deprecated CREDIT_DEPRECATION_MESSAGE
|
|
67
256
|
refund(money, authorization, options)
|
|
68
257
|
end
|
|
69
258
|
|
|
@@ -75,10 +264,21 @@ module ActiveMerchant #:nodoc:
|
|
|
75
264
|
commit(build_reference_request('VOID', nil, authorization, options), options)
|
|
76
265
|
end
|
|
77
266
|
|
|
267
|
+
def supports_scrubbing
|
|
268
|
+
true
|
|
269
|
+
end
|
|
270
|
+
|
|
271
|
+
def scrub(transcript)
|
|
272
|
+
transcript.
|
|
273
|
+
gsub(%r((Authorization: Basic )\w+), '\1[FILTERED]').
|
|
274
|
+
gsub(%r((<CardNumber>)\d+(</CardNumber>)), '\1[FILTERED]\2').
|
|
275
|
+
gsub(%r((<CV2>)\d+(</CV2>)), '\1[FILTERED]\2')
|
|
276
|
+
end
|
|
277
|
+
|
|
78
278
|
private
|
|
79
279
|
|
|
80
280
|
def build_purchase_request(type, money, creditcard, options)
|
|
81
|
-
options
|
|
281
|
+
options[:action] = 'CardDetailsTransaction'
|
|
82
282
|
build_request(options) do |xml|
|
|
83
283
|
add_purchase_data(xml, type, money, options)
|
|
84
284
|
add_creditcard(xml, creditcard)
|
|
@@ -87,8 +287,8 @@ module ActiveMerchant #:nodoc:
|
|
|
87
287
|
end
|
|
88
288
|
|
|
89
289
|
def build_reference_request(type, money, authorization, options)
|
|
90
|
-
options
|
|
91
|
-
order_id, cross_reference,
|
|
290
|
+
options[:action] = 'CrossReferenceTransaction'
|
|
291
|
+
order_id, cross_reference, _ = authorization.split(';')
|
|
92
292
|
build_request(options) do |xml|
|
|
93
293
|
if money
|
|
94
294
|
details = {'CurrencyCode' => currency_code(options[:currency] || default_currency), 'Amount' => amount(money)}
|
|
@@ -110,7 +310,7 @@ module ActiveMerchant #:nodoc:
|
|
|
110
310
|
'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
|
|
111
311
|
'xmlns:xsd' => 'http://www.w3.org/2001/XMLSchema'} do
|
|
112
312
|
xml.tag! 'soap:Body' do
|
|
113
|
-
xml.tag! options[:action], {'xmlns' =>
|
|
313
|
+
xml.tag! options[:action], {'xmlns' => 'https://www.thepaymentgateway.net/'} do
|
|
114
314
|
xml.tag! 'PaymentMessage' do
|
|
115
315
|
add_merchant_data(xml, options)
|
|
116
316
|
yield(xml)
|
|
@@ -157,7 +357,7 @@ module ActiveMerchant #:nodoc:
|
|
|
157
357
|
end
|
|
158
358
|
|
|
159
359
|
xml.tag! 'EmailAddress', options[:email]
|
|
160
|
-
xml.tag! 'CustomerIPAddress', options[:ip] ||
|
|
360
|
+
xml.tag! 'CustomerIPAddress', options[:ip] || '127.0.0.1'
|
|
161
361
|
end
|
|
162
362
|
end
|
|
163
363
|
|
|
@@ -166,34 +366,40 @@ module ActiveMerchant #:nodoc:
|
|
|
166
366
|
xml.tag! 'CardName', creditcard.name
|
|
167
367
|
xml.tag! 'CV2', creditcard.verification_value if creditcard.verification_value
|
|
168
368
|
xml.tag! 'CardNumber', creditcard.number
|
|
169
|
-
xml.tag! 'ExpiryDate', { 'Month' => creditcard.month.to_s.rjust(2,
|
|
369
|
+
xml.tag! 'ExpiryDate', { 'Month' => creditcard.month.to_s.rjust(2, '0'), 'Year' => creditcard.year.to_s[/\d\d$/] }
|
|
170
370
|
end
|
|
171
371
|
end
|
|
172
372
|
|
|
173
373
|
def add_merchant_data(xml, options)
|
|
174
|
-
xml.tag! 'MerchantAuthentication', {
|
|
374
|
+
xml.tag! 'MerchantAuthentication', {'MerchantID' => @options[:login], 'Password' => @options[:password]}
|
|
175
375
|
end
|
|
176
376
|
|
|
177
377
|
def commit(request, options)
|
|
178
378
|
requires!(options, :action)
|
|
179
379
|
response = parse(ssl_post(test? ? self.test_url : self.live_url, request,
|
|
180
|
-
|
|
181
|
-
|
|
380
|
+
{'SOAPAction' => 'https://www.thepaymentgateway.net/' + options[:action],
|
|
381
|
+
'Content-Type' => 'text/xml; charset=utf-8' }))
|
|
182
382
|
|
|
183
|
-
success = response[:transaction_result][:status_code] ==
|
|
383
|
+
success = response[:transaction_result][:status_code] == '0'
|
|
184
384
|
message = response[:transaction_result][:message]
|
|
185
|
-
authorization = success ? [ options[:order_id], response[:transaction_output_data][:cross_reference], response[:transaction_output_data][:auth_code] ].compact.join(
|
|
385
|
+
authorization = success ? [ options[:order_id], response[:transaction_output_data][:cross_reference], response[:transaction_output_data][:auth_code] ].compact.join(';') : nil
|
|
186
386
|
|
|
187
387
|
Response.new(success, message, response,
|
|
188
388
|
:test => test?,
|
|
189
|
-
:authorization => authorization
|
|
389
|
+
:authorization => authorization,
|
|
390
|
+
:avs_result => {
|
|
391
|
+
:street_match => AVS_CODE[ response[:transaction_output_data][:address_numeric_check_result] ],
|
|
392
|
+
:postal_match => AVS_CODE[ response[:transaction_output_data][:post_code_check_result] ],
|
|
393
|
+
},
|
|
394
|
+
:cvv_result => CVV_CODE[ response[:transaction_output_data][:cv2_check_result] ]
|
|
395
|
+
)
|
|
190
396
|
end
|
|
191
397
|
|
|
192
398
|
def parse(xml)
|
|
193
399
|
reply = {}
|
|
194
400
|
xml = REXML::Document.new(xml)
|
|
195
|
-
if (root = REXML::XPath.first(xml,
|
|
196
|
-
(root = REXML::XPath.first(xml,
|
|
401
|
+
if (root = REXML::XPath.first(xml, '//CardDetailsTransactionResponse')) or
|
|
402
|
+
(root = REXML::XPath.first(xml, '//CrossReferenceTransactionResponse'))
|
|
197
403
|
root.elements.to_a.each do |node|
|
|
198
404
|
case node.name
|
|
199
405
|
when 'Message'
|
|
@@ -202,7 +408,7 @@ module ActiveMerchant #:nodoc:
|
|
|
202
408
|
parse_element(reply, node)
|
|
203
409
|
end
|
|
204
410
|
end
|
|
205
|
-
elsif root = REXML::XPath.first(xml,
|
|
411
|
+
elsif root = REXML::XPath.first(xml, '//soap:Fault')
|
|
206
412
|
parse_element(reply, root)
|
|
207
413
|
reply[:message] = "#{reply[:faultcode]}: #{reply[:faultstring]}"
|
|
208
414
|
end
|
|
@@ -211,41 +417,41 @@ module ActiveMerchant #:nodoc:
|
|
|
211
417
|
|
|
212
418
|
def parse_element(reply, node)
|
|
213
419
|
case node.name
|
|
214
|
-
when
|
|
420
|
+
when 'CrossReferenceTransactionResult'
|
|
215
421
|
reply[:transaction_result] = {}
|
|
216
|
-
node.attributes.each do |a,b|
|
|
422
|
+
node.attributes.each do |a, b|
|
|
217
423
|
reply[:transaction_result][a.underscore.to_sym] = b
|
|
218
424
|
end
|
|
219
|
-
node.elements.each{|e| parse_element(reply[:transaction_result], e) } if node.has_elements?
|
|
425
|
+
node.elements.each { |e| parse_element(reply[:transaction_result], e) } if node.has_elements?
|
|
220
426
|
|
|
221
|
-
when
|
|
427
|
+
when 'CardDetailsTransactionResult'
|
|
222
428
|
reply[:transaction_result] = {}
|
|
223
|
-
node.attributes.each do |a,b|
|
|
429
|
+
node.attributes.each do |a, b|
|
|
224
430
|
reply[:transaction_result][a.underscore.to_sym] = b
|
|
225
431
|
end
|
|
226
|
-
node.elements.each{|e| parse_element(reply[:transaction_result], e) } if node.has_elements?
|
|
432
|
+
node.elements.each { |e| parse_element(reply[:transaction_result], e) } if node.has_elements?
|
|
227
433
|
|
|
228
|
-
when
|
|
434
|
+
when 'TransactionOutputData'
|
|
229
435
|
reply[:transaction_output_data] = {}
|
|
230
|
-
node.attributes.each{|a,b| reply[:transaction_output_data][a.underscore.to_sym] = b }
|
|
231
|
-
node.elements.each{|e| parse_element(reply[:transaction_output_data], e) } if node.has_elements?
|
|
232
|
-
when
|
|
436
|
+
node.attributes.each { |a, b| reply[:transaction_output_data][a.underscore.to_sym] = b }
|
|
437
|
+
node.elements.each { |e| parse_element(reply[:transaction_output_data], e) } if node.has_elements?
|
|
438
|
+
when 'CustomVariables'
|
|
233
439
|
reply[:custom_variables] = {}
|
|
234
|
-
node.attributes.each{|a,b| reply[:custom_variables][a.underscore.to_sym] = b }
|
|
235
|
-
node.elements.each{|e| parse_element(reply[:custom_variables], e) } if node.has_elements?
|
|
236
|
-
when
|
|
440
|
+
node.attributes.each { |a, b| reply[:custom_variables][a.underscore.to_sym] = b }
|
|
441
|
+
node.elements.each { |e| parse_element(reply[:custom_variables], e) } if node.has_elements?
|
|
442
|
+
when 'GatewayEntryPoints'
|
|
237
443
|
reply[:gateway_entry_points] = {}
|
|
238
|
-
node.attributes.each{|a,b| reply[:gateway_entry_points][a.underscore.to_sym] = b }
|
|
239
|
-
node.elements.each{|e| parse_element(reply[:gateway_entry_points], e) } if node.has_elements?
|
|
444
|
+
node.attributes.each { |a, b| reply[:gateway_entry_points][a.underscore.to_sym] = b }
|
|
445
|
+
node.elements.each { |e| parse_element(reply[:gateway_entry_points], e) } if node.has_elements?
|
|
240
446
|
else
|
|
241
447
|
k = node.name.underscore.to_sym
|
|
242
448
|
if node.has_elements?
|
|
243
449
|
reply[k] = {}
|
|
244
|
-
node.elements.each{|e| parse_element(reply[k], e) }
|
|
450
|
+
node.elements.each { |e| parse_element(reply[k], e) }
|
|
245
451
|
else
|
|
246
452
|
if node.has_attributes?
|
|
247
453
|
reply[k] = {}
|
|
248
|
-
node.attributes.each{|a,b| reply[k][a.underscore.to_sym] = b }
|
|
454
|
+
node.attributes.each { |a, b| reply[k][a.underscore.to_sym] = b }
|
|
249
455
|
else
|
|
250
456
|
reply[k] = node.text
|
|
251
457
|
end
|
|
@@ -302,7 +302,7 @@ module ActiveMerchant #:nodoc:
|
|
|
302
302
|
xml.AuthCode options[:force] if options[:force]
|
|
303
303
|
if options[:order_items].blank?
|
|
304
304
|
xml.Total(amount(money)) unless(money.nil? || money < 0.01)
|
|
305
|
-
xml.Description(options[:description]) unless(
|
|
305
|
+
xml.Description(options[:description]) unless(options[:description].blank?)
|
|
306
306
|
else
|
|
307
307
|
xml.OrderItems {
|
|
308
308
|
options[:order_items].each do |item|
|
|
@@ -336,7 +336,7 @@ module ActiveMerchant #:nodoc:
|
|
|
336
336
|
xml.AccountInfo {
|
|
337
337
|
xml.CardAccount {
|
|
338
338
|
xml.AccountNumber(creditcard.number.to_s)
|
|
339
|
-
xml.ExpirationMonth(creditcard.month.to_s.rjust(2,'0'))
|
|
339
|
+
xml.ExpirationMonth(creditcard.month.to_s.rjust(2, '0'))
|
|
340
340
|
xml.ExpirationYear(creditcard.year.to_s)
|
|
341
341
|
xml.CVVNumber(creditcard.verification_value.to_s) unless creditcard.verification_value.blank?
|
|
342
342
|
}
|
|
@@ -372,7 +372,7 @@ module ActiveMerchant #:nodoc:
|
|
|
372
372
|
def add_vendor_data(xml, options)
|
|
373
373
|
return if options[:vendor_data].blank?
|
|
374
374
|
xml.VendorData {
|
|
375
|
-
options[:vendor_data].each do |k,v|
|
|
375
|
+
options[:vendor_data].each do |k, v|
|
|
376
376
|
xml.Element {
|
|
377
377
|
xml.Name(k)
|
|
378
378
|
xml.Key(v)
|
|
@@ -424,7 +424,7 @@ module ActiveMerchant #:nodoc:
|
|
|
424
424
|
|
|
425
425
|
def successful?(response)
|
|
426
426
|
# Turns out the PaymentClearing gateway is not consistent...
|
|
427
|
-
response[:status].
|
|
427
|
+
response[:status].casecmp('ok').zero?
|
|
428
428
|
end
|
|
429
429
|
|
|
430
430
|
def test_mode?(response)
|
|
@@ -445,4 +445,3 @@ module ActiveMerchant #:nodoc:
|
|
|
445
445
|
end
|
|
446
446
|
end
|
|
447
447
|
end
|
|
448
|
-
|
|
@@ -0,0 +1,251 @@
|
|
|
1
|
+
require 'nokogiri'
|
|
2
|
+
|
|
3
|
+
module ActiveMerchant #:nodoc:
|
|
4
|
+
module Billing #:nodoc:
|
|
5
|
+
class IveriGateway < Gateway
|
|
6
|
+
self.live_url = self.test_url = 'https://portal.nedsecure.co.za/iVeriWebService/Service.asmx'
|
|
7
|
+
|
|
8
|
+
self.supported_countries = ['US', 'ZA', 'GB']
|
|
9
|
+
self.default_currency = 'ZAR'
|
|
10
|
+
self.money_format = :cents
|
|
11
|
+
self.supported_cardtypes = [:visa, :master, :american_express]
|
|
12
|
+
|
|
13
|
+
self.homepage_url = 'http://www.iveri.com'
|
|
14
|
+
self.display_name = 'iVeri'
|
|
15
|
+
|
|
16
|
+
def initialize(options={})
|
|
17
|
+
requires!(options, :app_id, :cert_id)
|
|
18
|
+
super
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def purchase(money, payment_method, options={})
|
|
22
|
+
post = build_vxml_request('Debit', options) do |xml|
|
|
23
|
+
add_auth_purchase_params(xml, money, payment_method, options)
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
commit(post)
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def authorize(money, payment_method, options={})
|
|
30
|
+
post = build_vxml_request('Authorisation', options) do |xml|
|
|
31
|
+
add_auth_purchase_params(xml, money, payment_method, options)
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
commit(post)
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def capture(money, authorization, options={})
|
|
38
|
+
post = build_vxml_request('Debit', options) do |xml|
|
|
39
|
+
add_authorization(xml, authorization, options)
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
commit(post)
|
|
43
|
+
end
|
|
44
|
+
|
|
45
|
+
def refund(money, authorization, options={})
|
|
46
|
+
post = build_vxml_request('Credit', options) do |xml|
|
|
47
|
+
add_amount(xml, money, options)
|
|
48
|
+
add_authorization(xml, authorization, options)
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
commit(post)
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
def void(authorization, options={})
|
|
55
|
+
post = build_vxml_request('Void', options) do |xml|
|
|
56
|
+
add_authorization(xml, authorization, options)
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
commit(post)
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def verify(credit_card, options={})
|
|
63
|
+
authorize(0, credit_card, options)
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def verify_credentials
|
|
67
|
+
void = void('', options)
|
|
68
|
+
return true if void.message == 'Missing OriginalMerchantTrace'
|
|
69
|
+
false
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def supports_scrubbing?
|
|
73
|
+
true
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
def scrub(transcript)
|
|
77
|
+
transcript.
|
|
78
|
+
gsub(%r((CertificateID=\\\")[^\\]*), '\1[FILTERED]').
|
|
79
|
+
gsub(%r((<PAN>)[^&]*), '\1[FILTERED]').
|
|
80
|
+
gsub(%r((<CardSecurityCode>)[^&]*), '\1[FILTERED]')
|
|
81
|
+
end
|
|
82
|
+
|
|
83
|
+
private
|
|
84
|
+
|
|
85
|
+
def build_xml_envelope(vxml)
|
|
86
|
+
builder = Nokogiri::XML::Builder.new(:encoding => 'UTF-8') do |xml|
|
|
87
|
+
xml[:soap].Envelope 'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance', 'xmlns:xsd' => 'http://www.w3.org/2001/XMLSchema', 'xmlns:soap' => 'http://schemas.xmlsoap.org/soap/envelope/' do
|
|
88
|
+
xml[:soap].Body do
|
|
89
|
+
xml.Execute 'xmlns' => 'http://iveri.com/' do
|
|
90
|
+
xml.validateRequest 'true'
|
|
91
|
+
xml.protocol 'V_XML'
|
|
92
|
+
xml.protocolVersion '2.0'
|
|
93
|
+
xml.request vxml
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
builder.to_xml
|
|
100
|
+
end
|
|
101
|
+
|
|
102
|
+
def build_vxml_request(action, options)
|
|
103
|
+
builder = Nokogiri::XML::Builder.new do |xml|
|
|
104
|
+
xml.V_XML('Version' => '2.0', 'CertificateID' => @options[:cert_id], 'Direction' => 'Request') do
|
|
105
|
+
xml.Transaction('ApplicationID' => @options[:app_id], 'Command' => action, 'Mode' => mode) do
|
|
106
|
+
yield(xml)
|
|
107
|
+
end
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
builder.doc.root.to_xml
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
def add_auth_purchase_params(post, money, payment_method, options)
|
|
115
|
+
add_card_holder_authentication(post, options)
|
|
116
|
+
add_amount(post, money, options)
|
|
117
|
+
add_electronic_commerce_indicator(post, options)
|
|
118
|
+
add_payment_method(post, payment_method, options)
|
|
119
|
+
end
|
|
120
|
+
|
|
121
|
+
def add_amount(post, money, options)
|
|
122
|
+
post.Amount(amount(money))
|
|
123
|
+
post.Currency(options[:currency] || default_currency)
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
def add_electronic_commerce_indicator(post, options)
|
|
127
|
+
post.ElectronicCommerceIndicator(options[:eci]) if options[:eci]
|
|
128
|
+
end
|
|
129
|
+
|
|
130
|
+
def add_authorization(post, authorization, options)
|
|
131
|
+
post.MerchantReference(split_auth(authorization)[2])
|
|
132
|
+
post.TransactionIndex(split_auth(authorization)[1])
|
|
133
|
+
post.OriginalRequestID(split_auth(authorization)[0])
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
def add_payment_method(post, payment_method, options)
|
|
137
|
+
post.ExpiryDate("#{format(payment_method.month, :two_digits)}#{payment_method.year}")
|
|
138
|
+
add_new_reference(post, options)
|
|
139
|
+
post.CardSecurityCode(payment_method.verification_value)
|
|
140
|
+
post.PAN(payment_method.number)
|
|
141
|
+
end
|
|
142
|
+
|
|
143
|
+
def add_new_reference(post, options)
|
|
144
|
+
post.MerchantReference(options[:order_id] || generate_unique_id)
|
|
145
|
+
end
|
|
146
|
+
|
|
147
|
+
def add_card_holder_authentication(post, options)
|
|
148
|
+
post.CardHolderAuthenticationID(options[:xid]) if options[:xid]
|
|
149
|
+
post.CardHolderAuthenticationData(options[:cavv]) if options[:cavv]
|
|
150
|
+
end
|
|
151
|
+
|
|
152
|
+
def commit(post)
|
|
153
|
+
raw_response = begin
|
|
154
|
+
ssl_post(live_url, build_xml_envelope(post), headers(post))
|
|
155
|
+
rescue ActiveMerchant::ResponseError => e
|
|
156
|
+
e.response.body
|
|
157
|
+
end
|
|
158
|
+
|
|
159
|
+
parsed = parse(raw_response)
|
|
160
|
+
succeeded = success_from(parsed)
|
|
161
|
+
|
|
162
|
+
Response.new(
|
|
163
|
+
succeeded,
|
|
164
|
+
message_from(parsed, succeeded),
|
|
165
|
+
parsed,
|
|
166
|
+
authorization: authorization_from(parsed),
|
|
167
|
+
error_code: error_code_from(parsed, succeeded),
|
|
168
|
+
test: test?
|
|
169
|
+
)
|
|
170
|
+
end
|
|
171
|
+
|
|
172
|
+
def mode
|
|
173
|
+
test? ? 'Test' : 'Live'
|
|
174
|
+
end
|
|
175
|
+
|
|
176
|
+
def headers(post)
|
|
177
|
+
{
|
|
178
|
+
'Content-Type' => 'text/xml; charset=utf-8',
|
|
179
|
+
'Content-Length' => post.size.to_s,
|
|
180
|
+
'SOAPAction' => 'http://iveri.com/Execute'
|
|
181
|
+
}
|
|
182
|
+
end
|
|
183
|
+
|
|
184
|
+
def parse(body)
|
|
185
|
+
parsed = {}
|
|
186
|
+
|
|
187
|
+
vxml = Nokogiri::XML(body).remove_namespaces!.xpath('//Envelope/Body/ExecuteResponse/ExecuteResult').inner_text
|
|
188
|
+
doc = Nokogiri::XML(vxml)
|
|
189
|
+
doc.xpath('*').each do |node|
|
|
190
|
+
if node.elements.empty?
|
|
191
|
+
parsed[underscore(node.name)] = node.text
|
|
192
|
+
else
|
|
193
|
+
node.elements.each do |childnode|
|
|
194
|
+
parse_element(parsed, childnode)
|
|
195
|
+
end
|
|
196
|
+
end
|
|
197
|
+
end
|
|
198
|
+
parsed
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
def parse_element(parsed, node)
|
|
202
|
+
if !node.attributes.empty?
|
|
203
|
+
node.attributes.each do |a|
|
|
204
|
+
parsed[underscore(node.name)+ '_' + underscore(a[1].name)] = a[1].value
|
|
205
|
+
end
|
|
206
|
+
end
|
|
207
|
+
|
|
208
|
+
if !node.elements.empty?
|
|
209
|
+
node.elements.each { |e| parse_element(parsed, e) }
|
|
210
|
+
else
|
|
211
|
+
parsed[underscore(node.name)] = node.text
|
|
212
|
+
end
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
def success_from(response)
|
|
216
|
+
response['result_status'] == '0'
|
|
217
|
+
end
|
|
218
|
+
|
|
219
|
+
def message_from(response, succeeded)
|
|
220
|
+
if succeeded
|
|
221
|
+
'Succeeded'
|
|
222
|
+
else
|
|
223
|
+
response['result_description'] || response['result_acquirer_description']
|
|
224
|
+
end
|
|
225
|
+
end
|
|
226
|
+
|
|
227
|
+
def authorization_from(response)
|
|
228
|
+
"#{response['transaction_request_id']}|#{response['transaction_index']}|#{response['merchant_reference']}"
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
def split_auth(authorization)
|
|
232
|
+
request_id, transaction_index, merchant_reference = authorization.to_s.split('|')
|
|
233
|
+
[request_id, transaction_index, merchant_reference]
|
|
234
|
+
end
|
|
235
|
+
|
|
236
|
+
def error_code_from(response, succeeded)
|
|
237
|
+
unless succeeded
|
|
238
|
+
response['result_code']
|
|
239
|
+
end
|
|
240
|
+
end
|
|
241
|
+
|
|
242
|
+
def underscore(camel_cased_word)
|
|
243
|
+
camel_cased_word.to_s.gsub(/::/, '/').
|
|
244
|
+
gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2').
|
|
245
|
+
gsub(/([a-z\d])([A-Z])/, '\1_\2').
|
|
246
|
+
tr('-', '_').
|
|
247
|
+
downcase
|
|
248
|
+
end
|
|
249
|
+
end
|
|
250
|
+
end
|
|
251
|
+
end
|