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
|
@@ -35,8 +35,8 @@ module ActiveMerchant #:nodoc:
|
|
|
35
35
|
# :email => 'jack@yahoo.com'
|
|
36
36
|
# )
|
|
37
37
|
class PsigateGateway < Gateway
|
|
38
|
-
self.test_url = 'https://
|
|
39
|
-
self.live_url = 'https://
|
|
38
|
+
self.test_url = 'https://realtimestaging.psigate.com/xml'
|
|
39
|
+
self.live_url = 'https://realtime.psigate.com/xml'
|
|
40
40
|
|
|
41
41
|
self.supported_cardtypes = [:visa, :master, :american_express]
|
|
42
42
|
self.supported_countries = ['CA']
|
|
@@ -53,39 +53,50 @@ module ActiveMerchant #:nodoc:
|
|
|
53
53
|
|
|
54
54
|
def authorize(money, creditcard, options = {})
|
|
55
55
|
requires!(options, :order_id)
|
|
56
|
-
options[:CardAction] =
|
|
56
|
+
options[:CardAction] = '1'
|
|
57
57
|
commit(money, creditcard, options)
|
|
58
58
|
end
|
|
59
59
|
|
|
60
60
|
def purchase(money, creditcard, options = {})
|
|
61
61
|
requires!(options, :order_id)
|
|
62
|
-
options[:CardAction] =
|
|
62
|
+
options[:CardAction] = '0'
|
|
63
63
|
commit(money, creditcard, options)
|
|
64
64
|
end
|
|
65
65
|
|
|
66
66
|
def capture(money, authorization, options = {})
|
|
67
|
-
options[:CardAction] =
|
|
67
|
+
options[:CardAction] = '2'
|
|
68
68
|
options[:order_id], options[:trans_ref_number] = split_authorization(authorization)
|
|
69
69
|
commit(money, nil, options)
|
|
70
70
|
end
|
|
71
71
|
|
|
72
72
|
def credit(money, authorization, options = {})
|
|
73
|
-
deprecated CREDIT_DEPRECATION_MESSAGE
|
|
73
|
+
ActiveMerchant.deprecated CREDIT_DEPRECATION_MESSAGE
|
|
74
74
|
refund(money, authorization, options)
|
|
75
75
|
end
|
|
76
76
|
|
|
77
77
|
def refund(money, authorization, options = {})
|
|
78
|
-
options[:CardAction] =
|
|
78
|
+
options[:CardAction] = '3'
|
|
79
79
|
options[:order_id], options[:trans_ref_number] = split_authorization(authorization)
|
|
80
80
|
commit(money, nil, options)
|
|
81
81
|
end
|
|
82
82
|
|
|
83
83
|
def void(authorization, options = {})
|
|
84
|
-
options[:CardAction] =
|
|
84
|
+
options[:CardAction] = '9'
|
|
85
85
|
options[:order_id], options[:trans_ref_number] = split_authorization(authorization)
|
|
86
86
|
commit(nil, nil, options)
|
|
87
87
|
end
|
|
88
88
|
|
|
89
|
+
def supports_scrubbing?
|
|
90
|
+
true
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
def scrub(transcript)
|
|
94
|
+
transcript.
|
|
95
|
+
gsub(%r((<Passphrase>)[^<]*(</Passphrase>))i, '\1[FILTERED]\2').
|
|
96
|
+
gsub(%r((<CardNumber>)[^<]*(</CardNumber>))i, '\1[FILTERED]\2').
|
|
97
|
+
gsub(%r((<CardIDNumber>)[^<]*(</CardIDNumber>))i, '\1[FILTERED]\2')
|
|
98
|
+
end
|
|
99
|
+
|
|
89
100
|
private
|
|
90
101
|
|
|
91
102
|
def commit(money, creditcard, options = {})
|
|
@@ -93,7 +104,7 @@ module ActiveMerchant #:nodoc:
|
|
|
93
104
|
|
|
94
105
|
Response.new(successful?(response), message_from(response), response,
|
|
95
106
|
:test => test?,
|
|
96
|
-
:authorization => build_authorization(response)
|
|
107
|
+
:authorization => build_authorization(response),
|
|
97
108
|
:avs_result => { :code => response[:avsresult] },
|
|
98
109
|
:cvv_result => response[:cardidresult]
|
|
99
110
|
)
|
|
@@ -104,11 +115,11 @@ module ActiveMerchant #:nodoc:
|
|
|
104
115
|
end
|
|
105
116
|
|
|
106
117
|
def successful?(response)
|
|
107
|
-
response[:approved] ==
|
|
118
|
+
response[:approved] == 'APPROVED'
|
|
108
119
|
end
|
|
109
120
|
|
|
110
121
|
def parse(xml)
|
|
111
|
-
response = {:message =>
|
|
122
|
+
response = {:message => 'Global Error Receipt', :complete => false}
|
|
112
123
|
|
|
113
124
|
xml = REXML::Document.new(xml)
|
|
114
125
|
xml.elements.each('//Result/*') do |node|
|
|
@@ -121,7 +132,7 @@ module ActiveMerchant #:nodoc:
|
|
|
121
132
|
def post_data(money, creditcard, options)
|
|
122
133
|
xml = REXML::Document.new
|
|
123
134
|
xml << REXML::XMLDecl.new
|
|
124
|
-
root = xml.add_element(
|
|
135
|
+
root = xml.add_element('Order')
|
|
125
136
|
|
|
126
137
|
parameters(money, creditcard, options).each do |key, value|
|
|
127
138
|
root.add_element(key.to_s).text = value if value
|
|
@@ -144,7 +155,7 @@ module ActiveMerchant #:nodoc:
|
|
|
144
155
|
:TransRefNumber => options[:trans_ref_number],
|
|
145
156
|
|
|
146
157
|
# Credit Card parameters
|
|
147
|
-
:PaymentType =>
|
|
158
|
+
:PaymentType => 'CC',
|
|
148
159
|
:CardAction => options[:CardAction],
|
|
149
160
|
|
|
150
161
|
# Financial parameters
|
|
@@ -156,9 +167,9 @@ module ActiveMerchant #:nodoc:
|
|
|
156
167
|
}
|
|
157
168
|
|
|
158
169
|
if creditcard
|
|
159
|
-
exp_month = sprintf(
|
|
160
|
-
exp_year = creditcard.year.to_s[2,2] unless creditcard.year.blank?
|
|
161
|
-
card_id_code = (creditcard.verification_value.blank? ? nil :
|
|
170
|
+
exp_month = sprintf('%.2i', creditcard.month) unless creditcard.month.blank?
|
|
171
|
+
exp_year = creditcard.year.to_s[2, 2] unless creditcard.year.blank?
|
|
172
|
+
card_id_code = (creditcard.verification_value.blank? ? nil : '1')
|
|
162
173
|
|
|
163
174
|
params.update(
|
|
164
175
|
:CardNumber => creditcard.number,
|
|
@@ -195,22 +206,11 @@ module ActiveMerchant #:nodoc:
|
|
|
195
206
|
end
|
|
196
207
|
|
|
197
208
|
def message_from(response)
|
|
198
|
-
if response[:approved] ==
|
|
209
|
+
if response[:approved] == 'APPROVED'
|
|
199
210
|
return SUCCESS_MESSAGE
|
|
200
211
|
else
|
|
201
212
|
return FAILURE_MESSAGE if response[:errmsg].blank?
|
|
202
|
-
return response[:errmsg].gsub(/[^\w]/, ' ').split.join(
|
|
203
|
-
end
|
|
204
|
-
end
|
|
205
|
-
|
|
206
|
-
# Make a ruby type out of the response string
|
|
207
|
-
def normalize(field)
|
|
208
|
-
case field
|
|
209
|
-
when "true" then true
|
|
210
|
-
when "false" then false
|
|
211
|
-
when "" then nil
|
|
212
|
-
when "null" then nil
|
|
213
|
-
else field
|
|
213
|
+
return response[:errmsg].gsub(/[^\w]/, ' ').split.join(' ').capitalize
|
|
214
214
|
end
|
|
215
215
|
end
|
|
216
216
|
|
|
@@ -220,7 +220,7 @@ module ActiveMerchant #:nodoc:
|
|
|
220
220
|
end
|
|
221
221
|
|
|
222
222
|
def build_authorization(response)
|
|
223
|
-
[response[:orderid], response[:transrefnumber]].join(
|
|
223
|
+
[response[:orderid], response[:transrefnumber]].join(';')
|
|
224
224
|
end
|
|
225
225
|
end
|
|
226
226
|
end
|
|
@@ -17,11 +17,11 @@ module ActiveMerchant
|
|
|
17
17
|
self.default_currency = 'GBP'
|
|
18
18
|
|
|
19
19
|
self.supported_countries = ['GB']
|
|
20
|
-
# Visa Credit, Visa Debit, Mastercard, Maestro,
|
|
20
|
+
# Visa Credit, Visa Debit, Mastercard, Maestro, Electron,
|
|
21
21
|
# American Express, Diners Club, JCB, International Maestro,
|
|
22
22
|
# Style, Clydesdale Financial Services, Other
|
|
23
23
|
|
|
24
|
-
self.supported_cardtypes = [ :visa, :master, :american_express, :diners_club, :jcb, :
|
|
24
|
+
self.supported_cardtypes = [ :visa, :master, :american_express, :diners_club, :jcb, :maestro ]
|
|
25
25
|
self.homepage_url = 'http://www.paymentsolutionsltd.com/'
|
|
26
26
|
self.display_name = 'PSL Payment Solutions'
|
|
27
27
|
|
|
@@ -46,38 +46,38 @@ module ActiveMerchant
|
|
|
46
46
|
'USD' => 840
|
|
47
47
|
}
|
|
48
48
|
|
|
49
|
-
#The terminal used - only for swipe transactions, so hard coded to 32 for online
|
|
49
|
+
# The terminal used - only for swipe transactions, so hard coded to 32 for online
|
|
50
50
|
EMV_TERMINAL_TYPE = 32
|
|
51
51
|
|
|
52
|
-
#Different Dispatch types
|
|
52
|
+
# Different Dispatch types
|
|
53
53
|
DISPATCH_LATER = 'LATER'
|
|
54
54
|
DISPATCH_NOW = 'NOW'
|
|
55
55
|
|
|
56
56
|
# Return codes
|
|
57
57
|
APPROVED = '00'
|
|
58
58
|
|
|
59
|
-
#Nominal amount to authorize for a 'dispatch later' type
|
|
60
|
-
#The nominal amount is held straight away, when the goods are ready
|
|
61
|
-
#to be dispatched, PSL is informed and the full amount is the
|
|
62
|
-
#taken.
|
|
59
|
+
# Nominal amount to authorize for a 'dispatch later' type
|
|
60
|
+
# The nominal amount is held straight away, when the goods are ready
|
|
61
|
+
# to be dispatched, PSL is informed and the full amount is the
|
|
62
|
+
# taken.
|
|
63
63
|
NOMINAL_AMOUNT = 101
|
|
64
64
|
|
|
65
65
|
AVS_CODE = {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
66
|
+
'ALL MATCH' => 'Y',
|
|
67
|
+
'SECURITY CODE MATCH ONLY' => 'N',
|
|
68
|
+
'ADDRESS MATCH ONLY' => 'Y',
|
|
69
|
+
'NO DATA MATCHES' => 'N',
|
|
70
|
+
'DATA NOT CHECKED' => 'R',
|
|
71
|
+
'SECURITY CHECKS NOT SUPPORTED' => 'X'
|
|
72
72
|
}
|
|
73
73
|
|
|
74
74
|
CVV_CODE = {
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
75
|
+
'ALL MATCH' => 'M',
|
|
76
|
+
'SECURITY CODE MATCH ONLY' => 'M',
|
|
77
|
+
'ADDRESS MATCH ONLY' => 'N',
|
|
78
|
+
'NO DATA MATCHES' => 'N',
|
|
79
|
+
'DATA NOT CHECKED' => 'P',
|
|
80
|
+
'SECURITY CHECKS NOT SUPPORTED' => 'X'
|
|
81
81
|
}
|
|
82
82
|
|
|
83
83
|
# Create a new PslCardGateway
|
|
@@ -101,7 +101,7 @@ module ActiveMerchant
|
|
|
101
101
|
# -options:
|
|
102
102
|
#
|
|
103
103
|
# Returns:
|
|
104
|
-
# -
|
|
104
|
+
# -ActiveMerchant::Billing::Response object
|
|
105
105
|
#
|
|
106
106
|
def purchase(money, credit_card, options = {})
|
|
107
107
|
post = {}
|
|
@@ -129,7 +129,7 @@ module ActiveMerchant
|
|
|
129
129
|
# -options:
|
|
130
130
|
#
|
|
131
131
|
# Returns:
|
|
132
|
-
# -
|
|
132
|
+
# -ActiveMerchant::Billing::Response object
|
|
133
133
|
#
|
|
134
134
|
def authorize(money, credit_card, options = {})
|
|
135
135
|
post = {}
|
|
@@ -153,7 +153,7 @@ module ActiveMerchant
|
|
|
153
153
|
# -options:
|
|
154
154
|
#
|
|
155
155
|
# Returns:
|
|
156
|
-
# -
|
|
156
|
+
# -ActiveMerchant::Billing::Response object
|
|
157
157
|
#
|
|
158
158
|
def capture(money, authorization, options = {})
|
|
159
159
|
post = {}
|
|
@@ -174,12 +174,6 @@ module ActiveMerchant
|
|
|
174
174
|
post[:ExpMonth] = credit_card.month
|
|
175
175
|
post[:ExpYear] = credit_card.year
|
|
176
176
|
|
|
177
|
-
if requires_start_date_or_issue_number?(credit_card)
|
|
178
|
-
post[:IssueNumber] = credit_card.issue_number unless credit_card.issue_number.blank?
|
|
179
|
-
post[:StartMonth] = credit_card.start_month unless credit_card.start_month.blank?
|
|
180
|
-
post[:StartYear] = credit_card.start_year unless credit_card.start_year.blank?
|
|
181
|
-
end
|
|
182
|
-
|
|
183
177
|
# CV2 check
|
|
184
178
|
post[:AVSCV2Check] = credit_card.verification_value? ? 'YES' : 'NO'
|
|
185
179
|
post[:CV2] = credit_card.verification_value if credit_card.verification_value?
|
|
@@ -189,7 +183,7 @@ module ActiveMerchant
|
|
|
189
183
|
address = options[:billing_address] || options[:address]
|
|
190
184
|
return if address.nil?
|
|
191
185
|
|
|
192
|
-
post[:QAAddress] = [:address1, :address2, :city, :state].collect{|a| address[a]}.reject
|
|
186
|
+
post[:QAAddress] = [:address1, :address2, :city, :state].collect { |a| address[a] }.reject(&:blank?).join(' ')
|
|
193
187
|
post[:QAPostcode] = address[:zip]
|
|
194
188
|
end
|
|
195
189
|
|
|
@@ -246,10 +240,9 @@ module ActiveMerchant
|
|
|
246
240
|
# -a hash with all of the values returned in the PSL response
|
|
247
241
|
#
|
|
248
242
|
def parse(body)
|
|
249
|
-
|
|
250
243
|
fields = {}
|
|
251
244
|
for line in body.split('&')
|
|
252
|
-
key, value = *line.scan(
|
|
245
|
+
key, value = *line.scan(%r{^(\w+)\=(.*)$}).flatten
|
|
253
246
|
fields[key] = CGI.unescape(value)
|
|
254
247
|
end
|
|
255
248
|
fields.symbolize_keys
|
|
@@ -264,7 +257,7 @@ module ActiveMerchant
|
|
|
264
257
|
# - ActiveMerchant::Billing::Response object
|
|
265
258
|
#
|
|
266
259
|
def commit(request)
|
|
267
|
-
response = parse(
|
|
260
|
+
response = parse(ssl_post(self.live_url, post_data(request)))
|
|
268
261
|
|
|
269
262
|
Response.new(response[:ResponseCode] == APPROVED, response[:Message], response,
|
|
270
263
|
:test => test?,
|
|
@@ -296,7 +289,7 @@ module ActiveMerchant
|
|
|
296
289
|
|
|
297
290
|
post.collect { |key, value|
|
|
298
291
|
"#{key}=#{CGI.escape(value.to_s.tr('&=', ' '))}"
|
|
299
|
-
}.join(
|
|
292
|
+
}.join('&')
|
|
300
293
|
end
|
|
301
294
|
end
|
|
302
295
|
end
|
|
@@ -5,8 +5,8 @@ module ActiveMerchant #:nodoc:
|
|
|
5
5
|
|
|
6
6
|
class_attribute :test_url, :live_url
|
|
7
7
|
|
|
8
|
-
self.test_url =
|
|
9
|
-
self.live_url =
|
|
8
|
+
self.test_url = 'https://webmerchantaccount.ptc.quickbooks.com/j/AppGateway'
|
|
9
|
+
self.live_url = 'https://webmerchantaccount.quickbooks.com/j/AppGateway'
|
|
10
10
|
|
|
11
11
|
self.homepage_url = 'http://payments.intuit.com/'
|
|
12
12
|
self.display_name = 'QuickBooks Merchant Services'
|
|
@@ -100,8 +100,8 @@ module ActiveMerchant #:nodoc:
|
|
|
100
100
|
#
|
|
101
101
|
#
|
|
102
102
|
def credit(money, identification, options = {})
|
|
103
|
-
deprecated CREDIT_DEPRECATION_MESSAGE
|
|
104
|
-
refund(money, identification,
|
|
103
|
+
ActiveMerchant.deprecated CREDIT_DEPRECATION_MESSAGE
|
|
104
|
+
refund(money, identification, {})
|
|
105
105
|
end
|
|
106
106
|
|
|
107
107
|
def refund(money, identification, options = {})
|
|
@@ -113,6 +113,17 @@ module ActiveMerchant #:nodoc:
|
|
|
113
113
|
commit(:query, nil, {})
|
|
114
114
|
end
|
|
115
115
|
|
|
116
|
+
def supports_scrubbing?
|
|
117
|
+
true
|
|
118
|
+
end
|
|
119
|
+
|
|
120
|
+
def scrub(transcript)
|
|
121
|
+
transcript.
|
|
122
|
+
gsub(%r((<ConnectionTicket>)[^<]*(</ConnectionTicket>))i, '\1[FILTERED]\2').
|
|
123
|
+
gsub(%r((<CreditCardNumber>)[^<]*(</CreditCardNumber>))i, '\1[FILTERED]\2').
|
|
124
|
+
gsub(%r((<CardSecurityCode>)[^<]*(</CardSecurityCode>))i, '\1[FILTERED]\2')
|
|
125
|
+
end
|
|
126
|
+
|
|
116
127
|
private
|
|
117
128
|
|
|
118
129
|
def hosted?
|
|
@@ -127,7 +138,7 @@ module ActiveMerchant #:nodoc:
|
|
|
127
138
|
|
|
128
139
|
req = build_request(type, money, parameters)
|
|
129
140
|
|
|
130
|
-
data = ssl_post(url, req,
|
|
141
|
+
data = ssl_post(url, req, 'Content-Type' => 'application/x-qbmsxml')
|
|
131
142
|
response = parse(type, data)
|
|
132
143
|
message = (response[:status_message] || '').strip
|
|
133
144
|
|
|
@@ -152,20 +163,20 @@ module ActiveMerchant #:nodoc:
|
|
|
152
163
|
xml = REXML::Document.new(body)
|
|
153
164
|
|
|
154
165
|
signon = REXML::XPath.first(xml, "//SignonMsgsRs/#{hosted? ? 'SignonAppCertRs' : 'SignonDesktopRs'}")
|
|
155
|
-
status_code = signon.attributes[
|
|
166
|
+
status_code = signon.attributes['statusCode'].to_i
|
|
156
167
|
|
|
157
168
|
if status_code != 0
|
|
158
169
|
return {
|
|
159
170
|
:status_code => status_code,
|
|
160
|
-
:status_message => signon.attributes[
|
|
171
|
+
:status_message => signon.attributes['statusMessage'],
|
|
161
172
|
}
|
|
162
173
|
end
|
|
163
174
|
|
|
164
175
|
response = REXML::XPath.first(xml, "//QBMSXMLMsgsRs/#{type}Rs")
|
|
165
176
|
|
|
166
177
|
results = {
|
|
167
|
-
:status_code => response.attributes[
|
|
168
|
-
:status_message => response.attributes[
|
|
178
|
+
:status_code => response.attributes['statusCode'].to_i,
|
|
179
|
+
:status_message => response.attributes['statusMessage'],
|
|
169
180
|
}
|
|
170
181
|
|
|
171
182
|
response.elements.each do |e|
|
|
@@ -189,16 +200,16 @@ module ActiveMerchant #:nodoc:
|
|
|
189
200
|
xml.instruct!(:xml, :version => '1.0', :encoding => 'utf-8')
|
|
190
201
|
xml.instruct!(:qbmsxml, :version => API_VERSION)
|
|
191
202
|
|
|
192
|
-
xml.tag!(
|
|
193
|
-
xml.tag!(
|
|
194
|
-
xml.tag!(hosted? ?
|
|
195
|
-
xml.tag!(
|
|
196
|
-
xml.tag!(
|
|
197
|
-
xml.tag!(
|
|
203
|
+
xml.tag!('QBMSXML') do
|
|
204
|
+
xml.tag!('SignonMsgsRq') do
|
|
205
|
+
xml.tag!(hosted? ? 'SignonAppCertRq' : 'SignonDesktopRq') do
|
|
206
|
+
xml.tag!('ClientDateTime', Time.now.xmlschema)
|
|
207
|
+
xml.tag!('ApplicationLogin', @options[:login])
|
|
208
|
+
xml.tag!('ConnectionTicket', @options[:ticket])
|
|
198
209
|
end
|
|
199
210
|
end
|
|
200
211
|
|
|
201
|
-
xml.tag!(
|
|
212
|
+
xml.tag!('QBMSXMLMsgsRq') do
|
|
202
213
|
xml.tag!("#{type}Rq") do
|
|
203
214
|
method("build_#{type}").call(xml, money, parameters)
|
|
204
215
|
end
|
|
@@ -212,47 +223,47 @@ module ActiveMerchant #:nodoc:
|
|
|
212
223
|
cc = parameters[:credit_card]
|
|
213
224
|
name = "#{cc.first_name} #{cc.last_name}"[0...30]
|
|
214
225
|
|
|
215
|
-
xml.tag!(
|
|
216
|
-
xml.tag!(
|
|
217
|
-
xml.tag!(
|
|
218
|
-
xml.tag!(
|
|
219
|
-
xml.tag!(
|
|
220
|
-
xml.tag!(
|
|
221
|
-
xml.tag!(
|
|
226
|
+
xml.tag!('TransRequestID', parameters[:trans_request_id])
|
|
227
|
+
xml.tag!('CreditCardNumber', cc.number)
|
|
228
|
+
xml.tag!('ExpirationMonth', cc.month)
|
|
229
|
+
xml.tag!('ExpirationYear', cc.year)
|
|
230
|
+
xml.tag!('IsECommerce', 'true')
|
|
231
|
+
xml.tag!('Amount', amount(money))
|
|
232
|
+
xml.tag!('NameOnCard', name)
|
|
222
233
|
add_address(xml, parameters)
|
|
223
|
-
xml.tag!(
|
|
234
|
+
xml.tag!('CardSecurityCode', cc.verification_value) if cc.verification_value?
|
|
224
235
|
end
|
|
225
236
|
|
|
226
237
|
def build_CustomerCreditCardCapture(xml, money, parameters)
|
|
227
|
-
xml.tag!(
|
|
228
|
-
xml.tag!(
|
|
229
|
-
xml.tag!(
|
|
238
|
+
xml.tag!('TransRequestID', parameters[:trans_request_id])
|
|
239
|
+
xml.tag!('CreditCardTransID', parameters[:transaction_id])
|
|
240
|
+
xml.tag!('Amount', amount(money))
|
|
230
241
|
end
|
|
231
242
|
|
|
232
243
|
def build_CustomerCreditCardCharge(xml, money, parameters)
|
|
233
244
|
cc = parameters[:credit_card]
|
|
234
245
|
name = "#{cc.first_name} #{cc.last_name}"[0...30]
|
|
235
246
|
|
|
236
|
-
xml.tag!(
|
|
237
|
-
xml.tag!(
|
|
238
|
-
xml.tag!(
|
|
239
|
-
xml.tag!(
|
|
240
|
-
xml.tag!(
|
|
241
|
-
xml.tag!(
|
|
242
|
-
xml.tag!(
|
|
247
|
+
xml.tag!('TransRequestID', parameters[:trans_request_id])
|
|
248
|
+
xml.tag!('CreditCardNumber', cc.number)
|
|
249
|
+
xml.tag!('ExpirationMonth', cc.month)
|
|
250
|
+
xml.tag!('ExpirationYear', cc.year)
|
|
251
|
+
xml.tag!('IsECommerce', 'true')
|
|
252
|
+
xml.tag!('Amount', amount(money))
|
|
253
|
+
xml.tag!('NameOnCard', name)
|
|
243
254
|
add_address(xml, parameters)
|
|
244
|
-
xml.tag!(
|
|
255
|
+
xml.tag!('CardSecurityCode', cc.verification_value) if cc.verification_value?
|
|
245
256
|
end
|
|
246
257
|
|
|
247
258
|
def build_CustomerCreditCardTxnVoidOrRefund(xml, money, parameters)
|
|
248
|
-
xml.tag!(
|
|
249
|
-
xml.tag!(
|
|
250
|
-
xml.tag!(
|
|
259
|
+
xml.tag!('TransRequestID', parameters[:trans_request_id])
|
|
260
|
+
xml.tag!('CreditCardTransID', parameters[:transaction_id])
|
|
261
|
+
xml.tag!('Amount', amount(money))
|
|
251
262
|
end
|
|
252
263
|
|
|
253
264
|
def build_CustomerCreditCardTxnVoid(xml, money, parameters)
|
|
254
|
-
xml.tag!(
|
|
255
|
-
xml.tag!(
|
|
265
|
+
xml.tag!('TransRequestID', parameters[:trans_request_id])
|
|
266
|
+
xml.tag!('CreditCardTransID', parameters[:transaction_id])
|
|
256
267
|
end
|
|
257
268
|
|
|
258
269
|
# Called reflectively by build_request
|
|
@@ -261,30 +272,30 @@ module ActiveMerchant #:nodoc:
|
|
|
261
272
|
|
|
262
273
|
def add_address(xml, parameters)
|
|
263
274
|
if address = parameters[:billing_address] || parameters[:address]
|
|
264
|
-
xml.tag!(
|
|
265
|
-
xml.tag!(
|
|
275
|
+
xml.tag!('CreditCardAddress', (address[:address1] || '')[0...30])
|
|
276
|
+
xml.tag!('CreditCardPostalCode', (address[:zip] || '')[0...9])
|
|
266
277
|
end
|
|
267
278
|
end
|
|
268
279
|
|
|
269
280
|
def cvv_result(response)
|
|
270
281
|
case response[:card_security_code_match]
|
|
271
|
-
when
|
|
272
|
-
when
|
|
273
|
-
when
|
|
282
|
+
when 'Pass' then 'M'
|
|
283
|
+
when 'Fail' then 'N'
|
|
284
|
+
when 'NotAvailable' then 'P'
|
|
274
285
|
end
|
|
275
286
|
end
|
|
276
287
|
|
|
277
288
|
def avs_result(response)
|
|
278
289
|
case "#{response[:avs_street]}|#{response[:avs_zip]}"
|
|
279
|
-
when
|
|
280
|
-
when
|
|
281
|
-
when
|
|
282
|
-
when
|
|
283
|
-
when
|
|
284
|
-
when
|
|
285
|
-
when
|
|
286
|
-
when
|
|
287
|
-
when
|
|
290
|
+
when 'Pass|Pass' then 'D'
|
|
291
|
+
when 'Pass|Fail' then 'A'
|
|
292
|
+
when 'Pass|NotAvailable' then 'B'
|
|
293
|
+
when 'Fail|Pass' then 'Z'
|
|
294
|
+
when 'Fail|Fail' then 'C'
|
|
295
|
+
when 'Fail|NotAvailable' then 'N'
|
|
296
|
+
when 'NotAvailable|Pass' then 'P'
|
|
297
|
+
when 'NotAvailable|Fail' then 'N'
|
|
298
|
+
when 'NotAvailable|NotAvailable' then 'U'
|
|
288
299
|
end
|
|
289
300
|
end
|
|
290
301
|
end
|
|
@@ -44,7 +44,7 @@ module ActiveMerchant #:nodoc:
|
|
|
44
44
|
#
|
|
45
45
|
def authorize(money, creditcard, options = {})
|
|
46
46
|
setup_address_hash(options)
|
|
47
|
-
commit(build_auth_request(money, creditcard, options), options
|
|
47
|
+
commit(build_auth_request(money, creditcard, options), options)
|
|
48
48
|
end
|
|
49
49
|
|
|
50
50
|
# Capture an authorization that has previously been requested
|
|
@@ -69,7 +69,7 @@ module ActiveMerchant #:nodoc:
|
|
|
69
69
|
end
|
|
70
70
|
|
|
71
71
|
def credit(money, identification, options = {})
|
|
72
|
-
deprecated CREDIT_DEPRECATION_MESSAGE
|
|
72
|
+
ActiveMerchant.deprecated CREDIT_DEPRECATION_MESSAGE
|
|
73
73
|
refund(money, identification, options)
|
|
74
74
|
end
|
|
75
75
|
|
|
@@ -81,7 +81,7 @@ module ActiveMerchant #:nodoc:
|
|
|
81
81
|
|
|
82
82
|
def build_auth_request(money, creditcard, options)
|
|
83
83
|
xml = Builder::XmlMarkup.new
|
|
84
|
-
add_common_credit_card_info(xml,'AUTH_ONLY')
|
|
84
|
+
add_common_credit_card_info(xml, 'AUTH_ONLY')
|
|
85
85
|
add_purchase_data(xml, money)
|
|
86
86
|
add_creditcard(xml, creditcard)
|
|
87
87
|
add_address(xml, creditcard, options[:billing_address], options)
|
|
@@ -94,7 +94,7 @@ module ActiveMerchant #:nodoc:
|
|
|
94
94
|
|
|
95
95
|
def build_capture_request(money, authorization, options)
|
|
96
96
|
xml = Builder::XmlMarkup.new
|
|
97
|
-
add_common_credit_card_info(xml,'PREVIOUS_SALE')
|
|
97
|
+
add_common_credit_card_info(xml, 'PREVIOUS_SALE')
|
|
98
98
|
transaction_id, _ = authorization_parts_from(authorization)
|
|
99
99
|
add_transaction_id(xml, transaction_id)
|
|
100
100
|
xml.target!
|
|
@@ -115,7 +115,7 @@ module ActiveMerchant #:nodoc:
|
|
|
115
115
|
|
|
116
116
|
def build_void_request(authorization, options)
|
|
117
117
|
xml = Builder::XmlMarkup.new
|
|
118
|
-
add_common_credit_card_info(xml,'VOID')
|
|
118
|
+
add_common_credit_card_info(xml, 'VOID')
|
|
119
119
|
transaction_id, _ = authorization_parts_from(authorization)
|
|
120
120
|
add_transaction_id(xml, transaction_id)
|
|
121
121
|
xml.target!
|
|
@@ -123,7 +123,7 @@ module ActiveMerchant #:nodoc:
|
|
|
123
123
|
|
|
124
124
|
def build_credit_request(money, authorization, options)
|
|
125
125
|
xml = Builder::XmlMarkup.new
|
|
126
|
-
add_common_credit_card_info(xml,'RETURN')
|
|
126
|
+
add_common_credit_card_info(xml, 'RETURN')
|
|
127
127
|
add_purchase_data(xml, money)
|
|
128
128
|
transaction_id, cc = authorization_parts_from(authorization)
|
|
129
129
|
add_transaction_id(xml, transaction_id)
|
|
@@ -182,7 +182,7 @@ module ActiveMerchant #:nodoc:
|
|
|
182
182
|
xml.tag! 'CreditCardNumber', creditcard.number
|
|
183
183
|
xml.tag! 'ExpireMonth', format(creditcard.month, :two_digits)
|
|
184
184
|
xml.tag! 'ExpireYear', format(creditcard.year, :four_digits)
|
|
185
|
-
xml.tag!('CVV2', creditcard.verification_value) unless
|
|
185
|
+
xml.tag!('CVV2', creditcard.verification_value) unless @options[:ignore_cvv] || creditcard.verification_value.blank?
|
|
186
186
|
end
|
|
187
187
|
|
|
188
188
|
# Where we actually build the full SOAP request using builder
|
|
@@ -206,7 +206,7 @@ module ActiveMerchant #:nodoc:
|
|
|
206
206
|
headers = { 'Content-Type' => 'text/xml' }
|
|
207
207
|
response = parse(ssl_post(self.live_url, build_request(request, options), headers))
|
|
208
208
|
|
|
209
|
-
success = response[:request_status] ==
|
|
209
|
+
success = response[:request_status] == 'Success'
|
|
210
210
|
message = response[:request_message]
|
|
211
211
|
|
|
212
212
|
if success # => checking for connectivity success first
|
|
@@ -216,10 +216,10 @@ module ActiveMerchant #:nodoc:
|
|
|
216
216
|
end
|
|
217
217
|
|
|
218
218
|
Response.new(success, message, response,
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
219
|
+
:test => test?,
|
|
220
|
+
:authorization => authorization,
|
|
221
|
+
:avs_result => { :code => response[:AVSResponseCode] },
|
|
222
|
+
:cvv_result => response[:CVV2ResponseCode]
|
|
223
223
|
)
|
|
224
224
|
end
|
|
225
225
|
|
|
@@ -231,19 +231,19 @@ module ActiveMerchant #:nodoc:
|
|
|
231
231
|
begin
|
|
232
232
|
xml = REXML::Document.new(xml)
|
|
233
233
|
|
|
234
|
-
root = REXML::XPath.first(xml,
|
|
234
|
+
root = REXML::XPath.first(xml, '//QGWRequest/ResponseSummary')
|
|
235
235
|
parse_element(reply, root)
|
|
236
236
|
reply[:request_status] = reply[:Status]
|
|
237
237
|
reply[:request_message] = "#{reply[:Status]}: #{reply[:StatusDescription]}"
|
|
238
238
|
|
|
239
|
-
if root = REXML::XPath.first(xml,
|
|
239
|
+
if root = REXML::XPath.first(xml, '//QGWRequest/Result')
|
|
240
240
|
root.elements.to_a.each do |node|
|
|
241
241
|
parse_element(reply, node)
|
|
242
242
|
end
|
|
243
243
|
end
|
|
244
|
-
rescue Exception
|
|
244
|
+
rescue Exception
|
|
245
245
|
reply[:request_status] = 'Failure'
|
|
246
|
-
reply[:request_message] =
|
|
246
|
+
reply[:request_message] = 'Failure: There was a problem parsing the response XML'
|
|
247
247
|
end
|
|
248
248
|
|
|
249
249
|
return reply
|
|
@@ -251,10 +251,10 @@ module ActiveMerchant #:nodoc:
|
|
|
251
251
|
|
|
252
252
|
def parse_element(reply, node)
|
|
253
253
|
if node.has_elements?
|
|
254
|
-
node.elements.each{|e| parse_element(reply, e) }
|
|
254
|
+
node.elements.each { |e| parse_element(reply, e) }
|
|
255
255
|
else
|
|
256
256
|
if node.parent.name =~ /item/
|
|
257
|
-
parent = node.parent.name + (node.parent.attributes[
|
|
257
|
+
parent = node.parent.name + (node.parent.attributes['id'] ? '_' + node.parent.attributes['id'] : '')
|
|
258
258
|
reply[(parent + '_' + node.name).to_sym] = node.text
|
|
259
259
|
else
|
|
260
260
|
reply[node.name.to_sym] = node.text
|