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
|
@@ -3,80 +3,80 @@ module ActiveMerchant
|
|
|
3
3
|
class PlugnpayGateway < Gateway
|
|
4
4
|
class PlugnpayPostData < PostData
|
|
5
5
|
# Fields that will be sent even if they are blank
|
|
6
|
-
self.required_fields = [
|
|
7
|
-
|
|
6
|
+
self.required_fields = [:publisher_name, :publisher_password,
|
|
7
|
+
:card_amount, :card_name, :card_number, :card_exp, :orderID]
|
|
8
8
|
end
|
|
9
9
|
self.live_url = self.test_url = 'https://pay1.plugnpay.com/payment/pnpremote.cgi'
|
|
10
10
|
|
|
11
11
|
CARD_CODE_MESSAGES = {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
'M' => 'Card verification number matched',
|
|
13
|
+
'N' => "Card verification number didn't match",
|
|
14
|
+
'P' => 'Card verification number was not processed',
|
|
15
|
+
'S' => 'Card verification number should be on card but was not indicated',
|
|
16
|
+
'U' => 'Issuer was not certified for card verification'
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
CARD_CODE_ERRORS = %w( N S )
|
|
20
20
|
|
|
21
21
|
AVS_MESSAGES = {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
22
|
+
'A' => 'Street address matches billing information, zip/postal code does not',
|
|
23
|
+
'B' => 'Address information not provided for address verification check',
|
|
24
|
+
'E' => 'Address verification service error',
|
|
25
|
+
'G' => 'Non-U.S. card-issuing bank',
|
|
26
|
+
'N' => 'Neither street address nor zip/postal match billing information',
|
|
27
|
+
'P' => 'Address verification not applicable for this transaction',
|
|
28
|
+
'R' => 'Payment gateway was unavailable or timed out',
|
|
29
|
+
'S' => 'Address verification service not supported by issuer',
|
|
30
|
+
'U' => 'Address information is unavailable',
|
|
31
|
+
'W' => '9-digit zip/postal code matches billing information, street address does not',
|
|
32
|
+
'X' => 'Street address and 9-digit zip/postal code matches billing information',
|
|
33
|
+
'Y' => 'Street address and 5-digit zip/postal code matches billing information',
|
|
34
|
+
'Z' => '5-digit zip/postal code matches billing information, street address does not',
|
|
35
35
|
}
|
|
36
36
|
|
|
37
37
|
AVS_ERRORS = %w( A E N R W Z )
|
|
38
38
|
|
|
39
39
|
PAYMENT_GATEWAY_RESPONSES = {
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
40
|
+
'P01' => 'AVS Mismatch Failure',
|
|
41
|
+
'P02' => 'CVV2 Mismatch Failure',
|
|
42
|
+
'P21' => 'Transaction may not be marked',
|
|
43
|
+
'P30' => 'Test Tran. Bad Card',
|
|
44
|
+
'P35' => 'Test Tran. Problem',
|
|
45
|
+
'P40' => 'Username already exists',
|
|
46
|
+
'P41' => 'Username is blank',
|
|
47
|
+
'P50' => 'Fraud Screen Failure',
|
|
48
|
+
'P51' => 'Missing PIN Code',
|
|
49
|
+
'P52' => 'Invalid Bank Acct. No.',
|
|
50
|
+
'P53' => 'Invalid Bank Routing No.',
|
|
51
|
+
'P54' => 'Invalid/Missing Check No.',
|
|
52
|
+
'P55' => 'Invalid Credit Card No.',
|
|
53
|
+
'P56' => 'Invalid CVV2/CVC2 No.',
|
|
54
|
+
'P57' => 'Expired. CC Exp. Date',
|
|
55
|
+
'P58' => 'Missing Data',
|
|
56
|
+
'P59' => 'Missing Email Address',
|
|
57
|
+
'P60' => 'Zip Code does not match Billing State.',
|
|
58
|
+
'P61' => 'Invalid Billing Zip Code',
|
|
59
|
+
'P62' => 'Zip Code does not match Shipping State.',
|
|
60
|
+
'P63' => 'Invalid Shipping Zip Code',
|
|
61
|
+
'P64' => 'Invalid Credit Card CVV2/CVC2 Format.',
|
|
62
|
+
'P65' => 'Maximum number of attempts has been exceeded.',
|
|
63
|
+
'P66' => 'Credit Card number has been flagged and can not be used to access this service.',
|
|
64
|
+
'P67' => 'IP Address is on Blocked List.',
|
|
65
|
+
'P68' => 'Billing country does not match ipaddress country.',
|
|
66
|
+
'P69' => 'US based ipaddresses are currently blocked.',
|
|
67
|
+
'P70' => 'Credit Cards issued from this bank are currently not being accepted.',
|
|
68
|
+
'P71' => 'Credit Cards issued from this bank are currently not being accepted.',
|
|
69
|
+
'P72' => 'Daily volume exceeded.',
|
|
70
|
+
'P73' => 'Too many transactions within allotted time.',
|
|
71
|
+
'P91' => 'Missing/incorrect password',
|
|
72
|
+
'P92' => 'Account not configured for mobil administration',
|
|
73
|
+
'P93' => 'IP Not registered to username.',
|
|
74
|
+
'P94' => 'Mode not permitted for this account.',
|
|
75
|
+
'P95' => 'Currently Blank',
|
|
76
|
+
'P96' => 'Currently Blank',
|
|
77
|
+
'P97' => 'Processor not responding',
|
|
78
|
+
'P98' => 'Missing merchant/publisher name',
|
|
79
|
+
'P99' => 'Currently Blank'
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
TRANSACTIONS = {
|
|
@@ -153,7 +153,7 @@ module ActiveMerchant
|
|
|
153
153
|
add_amount(post, money, options)
|
|
154
154
|
|
|
155
155
|
if identification_or_creditcard.is_a?(String)
|
|
156
|
-
deprecated CREDIT_DEPRECATION_MESSAGE
|
|
156
|
+
ActiveMerchant.deprecated CREDIT_DEPRECATION_MESSAGE
|
|
157
157
|
refund(money, identification_or_creditcard, options)
|
|
158
158
|
else
|
|
159
159
|
add_creditcard(post, identification_or_creditcard)
|
|
@@ -172,8 +172,9 @@ module ActiveMerchant
|
|
|
172
172
|
end
|
|
173
173
|
|
|
174
174
|
private
|
|
175
|
+
|
|
175
176
|
def commit(action, post)
|
|
176
|
-
response = parse(
|
|
177
|
+
response = parse(ssl_post(self.live_url, post_data(action, post)))
|
|
177
178
|
success = SUCCESS_CODES.include?(response[:finalstatus])
|
|
178
179
|
message = success ? 'Success' : message_from(response)
|
|
179
180
|
|
|
@@ -188,7 +189,7 @@ module ActiveMerchant
|
|
|
188
189
|
def parse(body)
|
|
189
190
|
body = CGI.unescape(body)
|
|
190
191
|
results = {}
|
|
191
|
-
body.split('&').collect { |e| e.split('=') }.each do |key,value|
|
|
192
|
+
body.split('&').collect { |e| e.split('=') }.each do |key, value|
|
|
192
193
|
results[key.downcase.to_sym] = normalize(value.to_s.strip)
|
|
193
194
|
end
|
|
194
195
|
|
|
@@ -268,24 +269,13 @@ module ActiveMerchant
|
|
|
268
269
|
post[:currency] = options[:currency] || currency(money)
|
|
269
270
|
end
|
|
270
271
|
|
|
271
|
-
# Make a ruby type out of the response string
|
|
272
|
-
def normalize(field)
|
|
273
|
-
case field
|
|
274
|
-
when "true" then true
|
|
275
|
-
when "false" then false
|
|
276
|
-
when "" then nil
|
|
277
|
-
when "null" then nil
|
|
278
|
-
else field
|
|
279
|
-
end
|
|
280
|
-
end
|
|
281
|
-
|
|
282
272
|
def message_from(results)
|
|
283
273
|
PAYMENT_GATEWAY_RESPONSES[results[:resp_code]]
|
|
284
274
|
end
|
|
285
275
|
|
|
286
276
|
def expdate(creditcard)
|
|
287
|
-
year = sprintf(
|
|
288
|
-
month = sprintf(
|
|
277
|
+
year = sprintf('%.4i', creditcard.year)
|
|
278
|
+
month = sprintf('%.2i', creditcard.month)
|
|
289
279
|
|
|
290
280
|
"#{month}/#{year[-2..-1]}"
|
|
291
281
|
end
|
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
require 'nokogiri'
|
|
2
|
+
|
|
3
|
+
module ActiveMerchant #:nodoc:
|
|
4
|
+
module Billing #:nodoc:
|
|
5
|
+
class ProPayGateway < Gateway
|
|
6
|
+
self.test_url = 'https://xmltest.propay.com/API/PropayAPI.aspx'
|
|
7
|
+
self.live_url = 'https://epay.propay.com/api/propayapi.aspx'
|
|
8
|
+
|
|
9
|
+
self.supported_countries = ['US', 'CA']
|
|
10
|
+
self.default_currency = 'USD'
|
|
11
|
+
self.money_format = :cents
|
|
12
|
+
self.supported_cardtypes = [:visa, :master, :american_express, :discover]
|
|
13
|
+
|
|
14
|
+
self.homepage_url = 'https://www.propay.com/'
|
|
15
|
+
self.display_name = 'ProPay'
|
|
16
|
+
|
|
17
|
+
STATUS_RESPONSE_CODES = {
|
|
18
|
+
'00' => 'Success',
|
|
19
|
+
'20' => 'Invalid username',
|
|
20
|
+
'21' => 'Invalid transType',
|
|
21
|
+
'22' => 'Invalid Currency Code',
|
|
22
|
+
'23' => 'Invalid accountType',
|
|
23
|
+
'24' => 'Invalid sourceEmail',
|
|
24
|
+
'25' => 'Invalid firstName',
|
|
25
|
+
'26' => 'Invalid mInitial',
|
|
26
|
+
'27' => 'Invalid lastName',
|
|
27
|
+
'28' => 'Invalid billAddr',
|
|
28
|
+
'29' => 'Invalid aptNum',
|
|
29
|
+
'30' => 'Invalid city',
|
|
30
|
+
'31' => 'Invalid state',
|
|
31
|
+
'32' => 'Invalid billZip',
|
|
32
|
+
'33' => 'Invalid mailAddr',
|
|
33
|
+
'34' => 'Invalid mailApt',
|
|
34
|
+
'35' => 'Invalid mailCity',
|
|
35
|
+
'36' => 'Invalid mailState',
|
|
36
|
+
'37' => 'Invalid mailZip',
|
|
37
|
+
'38' => 'Invalid dayPhone',
|
|
38
|
+
'39' => 'Invalid evenPhone',
|
|
39
|
+
'40' => 'Invalid ssn',
|
|
40
|
+
'41' => 'Invalid dob',
|
|
41
|
+
'42' => 'Invalid recEmail',
|
|
42
|
+
'43' => 'Invalid knownAccount',
|
|
43
|
+
'44' => 'Invalid amount',
|
|
44
|
+
'45' => 'Invalid invNum',
|
|
45
|
+
'46' => 'Invalid rtNum',
|
|
46
|
+
'47' => 'Invalid accntNum',
|
|
47
|
+
'48' => 'Invalid ccNum',
|
|
48
|
+
'49' => 'Invalid expDate',
|
|
49
|
+
'50' => 'Invalid cvv2',
|
|
50
|
+
'51' => 'Invalid transNum and/or Unable to act perform actions on transNum due to funding',
|
|
51
|
+
'52' => 'Invalid splitNum',
|
|
52
|
+
'53' => 'A ProPay account with this email address already exists AND/OR User has no account number',
|
|
53
|
+
'54' => 'A ProPay account with this social security number already exists',
|
|
54
|
+
'55' => 'The email address provided does not correspond to a ProPay account.',
|
|
55
|
+
'56' => 'Recipient’s email address shouldn’t have a ProPay account and does',
|
|
56
|
+
'57' => 'Cannot settle transaction because it already expired',
|
|
57
|
+
'58' => 'Credit card declined',
|
|
58
|
+
'59' => 'Invalid Credential or IP address not allowed',
|
|
59
|
+
'60' => 'Credit card authorization timed out; retry at a later time',
|
|
60
|
+
'61' => 'Amount exceeds single transaction limit',
|
|
61
|
+
'62' => 'Amount exceeds monthly volume limit',
|
|
62
|
+
'63' => 'Insufficient funds in account',
|
|
63
|
+
'64' => 'Over credit card use limit',
|
|
64
|
+
'65' => 'Miscellaneous error',
|
|
65
|
+
'66' => 'Denied a ProPay account',
|
|
66
|
+
'67' => 'Unauthorized service requested',
|
|
67
|
+
'68' => 'Account not affiliated',
|
|
68
|
+
'69' => 'Duplicate invoice number (The same card was charged for the same amount with the same invoice number (including blank invoices) in a 1 minute period. Details about the original transaction are included whenever a 69 response is returned. These details include a repeat of the auth code, the original AVS response, and the original CVV response.)',
|
|
69
|
+
'70' => 'Duplicate external ID',
|
|
70
|
+
'71' => 'Account previously set up, but problem affiliating it with partner',
|
|
71
|
+
'72' => 'The ProPay Account has already been upgraded to a Premium Account',
|
|
72
|
+
'73' => 'Invalid Destination Account',
|
|
73
|
+
'74' => 'Account or Trans Error',
|
|
74
|
+
'75' => 'Money already pulled',
|
|
75
|
+
'76' => 'Not Premium (used only for push/pull transactions)',
|
|
76
|
+
'77' => 'Empty results',
|
|
77
|
+
'78' => 'Invalid Authentication',
|
|
78
|
+
'79' => 'Generic account status error',
|
|
79
|
+
'80' => 'Invalid Password',
|
|
80
|
+
'81' => 'Account Expired',
|
|
81
|
+
'82' => 'InvalidUserID',
|
|
82
|
+
'83' => 'BatchTransCountError',
|
|
83
|
+
'84' => 'InvalidBeginDate',
|
|
84
|
+
'85' => 'InvalidEndDate',
|
|
85
|
+
'86' => 'InvalidExternalID',
|
|
86
|
+
'87' => 'DuplicateUserID',
|
|
87
|
+
'88' => 'Invalid track 1',
|
|
88
|
+
'89' => 'Invalid track 2',
|
|
89
|
+
'90' => 'Transaction already refunded',
|
|
90
|
+
'91' => 'Duplicate Batch ID'
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
TRANSACTION_RESPONSE_CODES = {
|
|
94
|
+
'00' => 'Success',
|
|
95
|
+
'1' => 'Transaction blocked by issuer',
|
|
96
|
+
'4' => 'Pick up card and deny transaction',
|
|
97
|
+
'5' => 'Problem with the account',
|
|
98
|
+
'6' => 'Customer requested stop to recurring payment',
|
|
99
|
+
'7' => 'Customer requested stop to all recurring payments',
|
|
100
|
+
'8' => 'Honor with ID only',
|
|
101
|
+
'9' => 'Unpaid items on customer account',
|
|
102
|
+
'12' => 'Invalid transaction',
|
|
103
|
+
'13' => 'Amount Error',
|
|
104
|
+
'14' => 'Invalid card number',
|
|
105
|
+
'15' => 'No such issuer. Could not route transaction',
|
|
106
|
+
'16' => 'Refund error',
|
|
107
|
+
'17' => 'Over limit',
|
|
108
|
+
'19' => 'Reenter transaction or the merchant account may be boarded incorrectly',
|
|
109
|
+
'25' => 'Invalid terminal 41 Lost card',
|
|
110
|
+
'43' => 'Stolen card',
|
|
111
|
+
'51' => 'Insufficient funds',
|
|
112
|
+
'52' => 'No such account',
|
|
113
|
+
'54' => 'Expired card',
|
|
114
|
+
'55' => 'Incorrect PIN',
|
|
115
|
+
'57' => 'Bank does not allow this type of purchase',
|
|
116
|
+
'58' => 'Credit card network does not allow this type of purchase for your merchant account.',
|
|
117
|
+
'61' => 'Exceeds issuer withdrawal limit',
|
|
118
|
+
'62' => 'Issuer does not allow this card to be charged for your business.',
|
|
119
|
+
'63' => 'Security Violation',
|
|
120
|
+
'65' => 'Activity limit exceeded',
|
|
121
|
+
'75' => 'PIN tries exceeded',
|
|
122
|
+
'76' => 'Unable to locate account',
|
|
123
|
+
'78' => 'Account not recognized',
|
|
124
|
+
'80' => 'Invalid Date',
|
|
125
|
+
'82' => 'Invalid CVV2',
|
|
126
|
+
'83' => 'Cannot verify the PIN',
|
|
127
|
+
'85' => 'Service not supported for this card',
|
|
128
|
+
'93' => 'Cannot complete transaction. Customer should call 800 number.',
|
|
129
|
+
'95' => 'Misc Error Transaction failure',
|
|
130
|
+
'96' => 'Issuer system malfunction or timeout.',
|
|
131
|
+
'97' => 'Approved for a lesser amount. ProPay will not settle and consider this a decline.',
|
|
132
|
+
'98' => 'Failure HV',
|
|
133
|
+
'99' => 'Generic decline or unable to parse issuer response code'
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
def initialize(options={})
|
|
137
|
+
requires!(options, :cert_str)
|
|
138
|
+
super
|
|
139
|
+
end
|
|
140
|
+
|
|
141
|
+
def purchase(money, payment, options={})
|
|
142
|
+
request = build_xml_request do |xml|
|
|
143
|
+
add_invoice(xml, money, options)
|
|
144
|
+
add_payment(xml, payment, options)
|
|
145
|
+
add_address(xml, options)
|
|
146
|
+
add_account(xml, options)
|
|
147
|
+
add_recurring(xml, options)
|
|
148
|
+
xml.transType '04'
|
|
149
|
+
end
|
|
150
|
+
|
|
151
|
+
commit(request)
|
|
152
|
+
end
|
|
153
|
+
|
|
154
|
+
def authorize(money, payment, options={})
|
|
155
|
+
request = build_xml_request do |xml|
|
|
156
|
+
add_invoice(xml, money, options)
|
|
157
|
+
add_payment(xml, payment, options)
|
|
158
|
+
add_address(xml, options)
|
|
159
|
+
add_account(xml, options)
|
|
160
|
+
add_recurring(xml, options)
|
|
161
|
+
xml.transType '05'
|
|
162
|
+
end
|
|
163
|
+
|
|
164
|
+
commit(request)
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
def capture(money, authorization, options={})
|
|
168
|
+
request = build_xml_request do |xml|
|
|
169
|
+
add_invoice(xml, money, options)
|
|
170
|
+
add_account(xml, options)
|
|
171
|
+
xml.transNum authorization
|
|
172
|
+
xml.transType '06'
|
|
173
|
+
end
|
|
174
|
+
|
|
175
|
+
commit(request)
|
|
176
|
+
end
|
|
177
|
+
|
|
178
|
+
def refund(money, authorization, options={})
|
|
179
|
+
request = build_xml_request do |xml|
|
|
180
|
+
add_invoice(xml, money, options)
|
|
181
|
+
add_account(xml, options)
|
|
182
|
+
xml.transNum authorization
|
|
183
|
+
xml.transType '07'
|
|
184
|
+
end
|
|
185
|
+
|
|
186
|
+
commit(request)
|
|
187
|
+
end
|
|
188
|
+
|
|
189
|
+
def void(authorization, options={})
|
|
190
|
+
refund(nil, authorization, options)
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
def credit(money, payment, options={})
|
|
194
|
+
request = build_xml_request do |xml|
|
|
195
|
+
add_invoice(xml, money, options)
|
|
196
|
+
add_payment(xml, payment, options)
|
|
197
|
+
add_account(xml, options)
|
|
198
|
+
xml.transType '35'
|
|
199
|
+
end
|
|
200
|
+
|
|
201
|
+
commit(request)
|
|
202
|
+
end
|
|
203
|
+
|
|
204
|
+
def verify(credit_card, options={})
|
|
205
|
+
MultiResponse.run(:use_first_response) do |r|
|
|
206
|
+
r.process { authorize(100, credit_card, options) }
|
|
207
|
+
r.process(:ignore_result) { void(r.authorization, options) }
|
|
208
|
+
end
|
|
209
|
+
end
|
|
210
|
+
|
|
211
|
+
def supports_scrubbing?
|
|
212
|
+
true
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
def scrub(transcript)
|
|
216
|
+
transcript.
|
|
217
|
+
gsub(%r((<certStr>).+(</certStr>)), '\1[FILTERED]\2').
|
|
218
|
+
gsub(%r((<ccNum>).+(</ccNum>)), '\1[FILTERED]\2').
|
|
219
|
+
gsub(%r((<CVV2>).+(</CVV2>)), '\1[FILTERED]\2')
|
|
220
|
+
end
|
|
221
|
+
|
|
222
|
+
private
|
|
223
|
+
|
|
224
|
+
def add_payment(xml, payment, options)
|
|
225
|
+
xml.ccNum payment.number
|
|
226
|
+
xml.expDate "#{format(payment.month, :two_digits)}#{format(payment.year, :two_digits)}"
|
|
227
|
+
xml.CVV2 payment.verification_value
|
|
228
|
+
xml.cardholderName payment.name
|
|
229
|
+
end
|
|
230
|
+
|
|
231
|
+
def add_address(xml, options)
|
|
232
|
+
if address = options[:billing_address] || options[:address]
|
|
233
|
+
xml.addr address[:address1]
|
|
234
|
+
xml.aptNum address[:address2]
|
|
235
|
+
xml.city address[:city]
|
|
236
|
+
xml.state address[:state]
|
|
237
|
+
xml.zip address[:zip]
|
|
238
|
+
end
|
|
239
|
+
end
|
|
240
|
+
|
|
241
|
+
def add_account(xml, options)
|
|
242
|
+
xml.accountNum options[:account_num]
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
def add_invoice(xml, money, options)
|
|
246
|
+
xml.amount amount(money)
|
|
247
|
+
xml.currencyCode options[:currency] || currency(money)
|
|
248
|
+
xml.invNum options[:order_id] || SecureRandom.hex(25)
|
|
249
|
+
end
|
|
250
|
+
|
|
251
|
+
def add_recurring(xml, options)
|
|
252
|
+
xml.recurringPayment options[:recurring_payment]
|
|
253
|
+
end
|
|
254
|
+
|
|
255
|
+
def parse(body)
|
|
256
|
+
results = {}
|
|
257
|
+
xml = Nokogiri::XML(body)
|
|
258
|
+
resp = xml.xpath('//XMLResponse/XMLTrans')
|
|
259
|
+
resp.children.each do |element|
|
|
260
|
+
results[element.name.underscore.downcase.to_sym] = element.text
|
|
261
|
+
end
|
|
262
|
+
results
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
def commit(parameters)
|
|
266
|
+
url = (test? ? test_url : live_url)
|
|
267
|
+
response = parse(ssl_post(url, parameters))
|
|
268
|
+
|
|
269
|
+
Response.new(
|
|
270
|
+
success_from(response),
|
|
271
|
+
message_from(response),
|
|
272
|
+
response,
|
|
273
|
+
authorization: authorization_from(response),
|
|
274
|
+
avs_result: AVSResult.new(code: response[:avs]),
|
|
275
|
+
cvv_result: CVVResult.new(response[:cvv2_resp]),
|
|
276
|
+
test: test?,
|
|
277
|
+
error_code: error_code_from(response)
|
|
278
|
+
)
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
def success_from(response)
|
|
282
|
+
response[:status] == '00'
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
def message_from(response)
|
|
286
|
+
return 'Success' if success_from(response)
|
|
287
|
+
message = STATUS_RESPONSE_CODES[response[:status]]
|
|
288
|
+
message += " - #{TRANSACTION_RESPONSE_CODES[response[:response_code]]}" if response[:response_code]
|
|
289
|
+
|
|
290
|
+
message
|
|
291
|
+
end
|
|
292
|
+
|
|
293
|
+
def authorization_from(response)
|
|
294
|
+
response[:trans_num]
|
|
295
|
+
end
|
|
296
|
+
|
|
297
|
+
def error_code_from(response)
|
|
298
|
+
unless success_from(response)
|
|
299
|
+
response[:status]
|
|
300
|
+
end
|
|
301
|
+
end
|
|
302
|
+
|
|
303
|
+
def build_xml_request
|
|
304
|
+
builder = Nokogiri::XML::Builder.new do |xml|
|
|
305
|
+
xml.XMLRequest do
|
|
306
|
+
xml.certStr @options[:cert_str]
|
|
307
|
+
xml.class_ 'partner'
|
|
308
|
+
xml.XMLTrans do
|
|
309
|
+
yield(xml)
|
|
310
|
+
end
|
|
311
|
+
end
|
|
312
|
+
end
|
|
313
|
+
|
|
314
|
+
builder.to_xml
|
|
315
|
+
end
|
|
316
|
+
end
|
|
317
|
+
|
|
318
|
+
def underscore(camel_cased_word)
|
|
319
|
+
camel_cased_word.to_s.gsub(/::/, '/').
|
|
320
|
+
gsub(/([A-Z]+)([A-Z][a-z])/, '\1_\2').
|
|
321
|
+
gsub(/([a-z\d])([A-Z])/, '\1_\2').
|
|
322
|
+
tr('-', '_').
|
|
323
|
+
downcase
|
|
324
|
+
end
|
|
325
|
+
end
|
|
326
|
+
end
|