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
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
require
|
|
1
|
+
require 'digest/sha2'
|
|
2
2
|
|
|
3
3
|
module ActiveMerchant #:nodoc:
|
|
4
4
|
module Billing #:nodoc:
|
|
@@ -72,7 +72,7 @@ module ActiveMerchant #:nodoc:
|
|
|
72
72
|
def add_creditcard(post, creditcard)
|
|
73
73
|
post[:CARDFULLNAME] = creditcard ? creditcard.name : ''
|
|
74
74
|
post[:CARDCODE] = creditcard ? creditcard.number : ''
|
|
75
|
-
post[:CARDVALIDITYDATE] = creditcard ?
|
|
75
|
+
post[:CARDVALIDITYDATE] = creditcard ? '%02d-%02s' % [creditcard.month, creditcard.year.to_s[-2..-1]] : ''
|
|
76
76
|
post[:CARDCVV] = creditcard ? creditcard.verification_value : ''
|
|
77
77
|
end
|
|
78
78
|
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
module ActiveMerchant #:nodoc:
|
|
2
2
|
module Billing #:nodoc:
|
|
3
3
|
module BeanstreamCore
|
|
4
|
+
include Empty
|
|
5
|
+
|
|
4
6
|
RECURRING_URL = 'https://www.beanstream.com/scripts/recurring_billing.asp'
|
|
5
7
|
SECURE_PROFILE_URL = 'https://www.beanstream.com/scripts/payment_profile.asp'
|
|
6
8
|
|
|
@@ -59,6 +61,72 @@ module ActiveMerchant #:nodoc:
|
|
|
59
61
|
:cancel => 'C'
|
|
60
62
|
}
|
|
61
63
|
|
|
64
|
+
STATES = {
|
|
65
|
+
'ALBERTA' => 'AB',
|
|
66
|
+
'BRITISH COLUMBIA' => 'BC',
|
|
67
|
+
'MANITOBA' => 'MB',
|
|
68
|
+
'NEW BRUNSWICK' => 'NB',
|
|
69
|
+
'NEWFOUNDLAND AND LABRADOR' => 'NL',
|
|
70
|
+
'NOVA SCOTIA' => 'NS',
|
|
71
|
+
'ONTARIO' => 'ON',
|
|
72
|
+
'PRINCE EDWARD ISLAND' => 'PE',
|
|
73
|
+
'QUEBEC' => 'QC',
|
|
74
|
+
'SASKATCHEWAN' => 'SK',
|
|
75
|
+
'NORTHWEST TERRITORIES' => 'NT',
|
|
76
|
+
'NUNAVUT' => 'NU',
|
|
77
|
+
'YUKON' => 'YT',
|
|
78
|
+
'ALABAMA' => 'AL',
|
|
79
|
+
'ALASKA' => 'AK',
|
|
80
|
+
'ARIZONA' => 'AZ',
|
|
81
|
+
'ARKANSAS' => 'AR',
|
|
82
|
+
'CALIFORNIA' => 'CA',
|
|
83
|
+
'COLORADO' => 'CO',
|
|
84
|
+
'CONNECTICUT' => 'CT',
|
|
85
|
+
'DELAWARE' => 'DE',
|
|
86
|
+
'FLORIDA' => 'FL',
|
|
87
|
+
'GEORGIA' => 'GA',
|
|
88
|
+
'HAWAII' => 'HI',
|
|
89
|
+
'IDAHO' => 'ID',
|
|
90
|
+
'ILLINOIS' => 'IL',
|
|
91
|
+
'INDIANA' => 'IN',
|
|
92
|
+
'IOWA' => 'IA',
|
|
93
|
+
'KANSAS' => 'KS',
|
|
94
|
+
'KENTUCKY' => 'KY',
|
|
95
|
+
'LOUISIANA' => 'LA',
|
|
96
|
+
'MAINE' => 'ME',
|
|
97
|
+
'MARYLAND' => 'MD',
|
|
98
|
+
'MASSACHUSETTS' => 'MA',
|
|
99
|
+
'MICHIGAN' => 'MI',
|
|
100
|
+
'MINNESOTA' => 'MN',
|
|
101
|
+
'MISSISSIPPI' => 'MS',
|
|
102
|
+
'MISSOURI' => 'MO',
|
|
103
|
+
'MONTANA' => 'MT',
|
|
104
|
+
'NEBRASKA' => 'NE',
|
|
105
|
+
'NEVADA' => 'NV',
|
|
106
|
+
'NEW HAMPSHIRE' => 'NH',
|
|
107
|
+
'NEW JERSEY' => 'NJ',
|
|
108
|
+
'NEW MEXICO' => 'NM',
|
|
109
|
+
'NEW YORK' => 'NY',
|
|
110
|
+
'NORTH CAROLINA' => 'NC',
|
|
111
|
+
'NORTH DAKOTA' => 'ND',
|
|
112
|
+
'OHIO' => 'OH',
|
|
113
|
+
'OKLAHOMA' => 'OK',
|
|
114
|
+
'OREGON' => 'OR',
|
|
115
|
+
'PENNSYLVANIA' => 'PA',
|
|
116
|
+
'RHODE ISLAND' => 'RI',
|
|
117
|
+
'SOUTH CAROLINA' => 'SC',
|
|
118
|
+
'SOUTH DAKOTA' => 'SD',
|
|
119
|
+
'TENNESSEE' => 'TN',
|
|
120
|
+
'TEXAS' => 'TX',
|
|
121
|
+
'UTAH' => 'UT',
|
|
122
|
+
'VERMONT' => 'VT',
|
|
123
|
+
'VIRGINIA' => 'VA',
|
|
124
|
+
'WASHINGTON' => 'WA',
|
|
125
|
+
'WEST VIRGINIA' => 'WV',
|
|
126
|
+
'WISCONSIN' => 'WI',
|
|
127
|
+
'WYOMING' => 'WY'
|
|
128
|
+
}
|
|
129
|
+
|
|
62
130
|
def self.included(base)
|
|
63
131
|
base.default_currency = 'CAD'
|
|
64
132
|
|
|
@@ -70,7 +138,7 @@ module ActiveMerchant #:nodoc:
|
|
|
70
138
|
|
|
71
139
|
# The homepage URL of the gateway
|
|
72
140
|
base.homepage_url = 'http://www.beanstream.com/'
|
|
73
|
-
base.live_url = 'https://
|
|
141
|
+
base.live_url = 'https://api.na.bambora.com/scripts/process_transaction.asp'
|
|
74
142
|
|
|
75
143
|
# The name of the gateway
|
|
76
144
|
base.display_name = 'Beanstream.com'
|
|
@@ -87,18 +155,18 @@ module ActiveMerchant #:nodoc:
|
|
|
87
155
|
end
|
|
88
156
|
|
|
89
157
|
def capture(money, authorization, options = {})
|
|
90
|
-
reference,
|
|
91
|
-
|
|
158
|
+
reference, _, _ = split_auth(authorization)
|
|
92
159
|
post = {}
|
|
93
160
|
add_amount(post, money)
|
|
94
161
|
add_reference(post, reference)
|
|
95
162
|
add_transaction_type(post, :capture)
|
|
163
|
+
add_recurring_payment(post, options)
|
|
96
164
|
commit(post)
|
|
97
165
|
end
|
|
98
166
|
|
|
99
167
|
def refund(money, source, options = {})
|
|
100
168
|
post = {}
|
|
101
|
-
reference,
|
|
169
|
+
reference, _, type = split_auth(source)
|
|
102
170
|
add_reference(post, reference)
|
|
103
171
|
add_transaction_type(post, refund_action(type))
|
|
104
172
|
add_amount(post, money)
|
|
@@ -106,11 +174,12 @@ module ActiveMerchant #:nodoc:
|
|
|
106
174
|
end
|
|
107
175
|
|
|
108
176
|
def credit(money, source, options = {})
|
|
109
|
-
deprecated Gateway::CREDIT_DEPRECATION_MESSAGE
|
|
177
|
+
ActiveMerchant.deprecated Gateway::CREDIT_DEPRECATION_MESSAGE
|
|
110
178
|
refund(money, source, options)
|
|
111
179
|
end
|
|
112
180
|
|
|
113
181
|
private
|
|
182
|
+
|
|
114
183
|
def purchase_action(source)
|
|
115
184
|
if source.is_a?(Check)
|
|
116
185
|
:check_purchase
|
|
@@ -120,15 +189,15 @@ module ActiveMerchant #:nodoc:
|
|
|
120
189
|
end
|
|
121
190
|
|
|
122
191
|
def add_customer_ip(post, options)
|
|
123
|
-
post[:
|
|
192
|
+
post[:customerIp] = options[:ip] if options[:ip]
|
|
124
193
|
end
|
|
125
194
|
|
|
126
195
|
def void_action(original_transaction_type)
|
|
127
|
-
|
|
196
|
+
original_transaction_type == TRANSACTIONS[:refund] ? :void_refund : :void_purchase
|
|
128
197
|
end
|
|
129
198
|
|
|
130
199
|
def refund_action(type)
|
|
131
|
-
|
|
200
|
+
type == TRANSACTIONS[:check_purchase] ? :check_refund : :refund
|
|
132
201
|
end
|
|
133
202
|
|
|
134
203
|
def secure_profile_action(type)
|
|
@@ -136,7 +205,7 @@ module ActiveMerchant #:nodoc:
|
|
|
136
205
|
end
|
|
137
206
|
|
|
138
207
|
def split_auth(string)
|
|
139
|
-
string.split(
|
|
208
|
+
string.split(';')
|
|
140
209
|
end
|
|
141
210
|
|
|
142
211
|
def add_amount(post, money)
|
|
@@ -152,27 +221,29 @@ module ActiveMerchant #:nodoc:
|
|
|
152
221
|
end
|
|
153
222
|
|
|
154
223
|
def add_address(post, options)
|
|
224
|
+
post[:ordEmailAddress] = options[:email] if options[:email]
|
|
225
|
+
post[:shipEmailAddress] = options[:shipping_email] || options[:email] if options[:email]
|
|
226
|
+
|
|
155
227
|
prepare_address_for_non_american_countries(options)
|
|
156
228
|
|
|
157
229
|
if billing_address = options[:billing_address] || options[:address]
|
|
158
230
|
post[:ordName] = billing_address[:name]
|
|
159
|
-
post[:ordEmailAddress] = options[:email]
|
|
160
231
|
post[:ordPhoneNumber] = billing_address[:phone]
|
|
161
232
|
post[:ordAddress1] = billing_address[:address1]
|
|
162
233
|
post[:ordAddress2] = billing_address[:address2]
|
|
163
234
|
post[:ordCity] = billing_address[:city]
|
|
164
|
-
post[:ordProvince] = billing_address
|
|
235
|
+
post[:ordProvince] = state_for(billing_address)
|
|
165
236
|
post[:ordPostalCode] = billing_address[:zip]
|
|
166
237
|
post[:ordCountry] = billing_address[:country]
|
|
167
238
|
end
|
|
239
|
+
|
|
168
240
|
if shipping_address = options[:shipping_address]
|
|
169
241
|
post[:shipName] = shipping_address[:name]
|
|
170
|
-
post[:shipEmailAddress] = options[:email]
|
|
171
242
|
post[:shipPhoneNumber] = shipping_address[:phone]
|
|
172
243
|
post[:shipAddress1] = shipping_address[:address1]
|
|
173
244
|
post[:shipAddress2] = shipping_address[:address2]
|
|
174
245
|
post[:shipCity] = shipping_address[:city]
|
|
175
|
-
post[:shipProvince] = shipping_address
|
|
246
|
+
post[:shipProvince] = state_for(shipping_address)
|
|
176
247
|
post[:shipPostalCode] = shipping_address[:zip]
|
|
177
248
|
post[:shipCountry] = shipping_address[:country]
|
|
178
249
|
post[:shippingMethod] = shipping_address[:shipping_method]
|
|
@@ -180,8 +251,13 @@ module ActiveMerchant #:nodoc:
|
|
|
180
251
|
end
|
|
181
252
|
end
|
|
182
253
|
|
|
254
|
+
def state_for(address)
|
|
255
|
+
STATES[address[:state].upcase] || address[:state] if address[:state]
|
|
256
|
+
end
|
|
257
|
+
|
|
183
258
|
def prepare_address_for_non_american_countries(options)
|
|
184
259
|
[ options[:billing_address], options[:shipping_address] ].compact.each do |address|
|
|
260
|
+
next if empty?(address[:country])
|
|
185
261
|
unless ['US', 'CA'].include?(address[:country])
|
|
186
262
|
address[:state] = '--'
|
|
187
263
|
address[:zip] = '000000' unless address[:zip]
|
|
@@ -189,6 +265,10 @@ module ActiveMerchant #:nodoc:
|
|
|
189
265
|
end
|
|
190
266
|
end
|
|
191
267
|
|
|
268
|
+
def add_recurring_payment(post, options)
|
|
269
|
+
post[:recurringPayment] = 1 if options[:recurring].to_s == 'true'
|
|
270
|
+
end
|
|
271
|
+
|
|
192
272
|
def add_invoice(post, options)
|
|
193
273
|
post[:trnOrderNumber] = options[:order_id]
|
|
194
274
|
post[:trnComments] = options[:description]
|
|
@@ -206,6 +286,11 @@ module ActiveMerchant #:nodoc:
|
|
|
206
286
|
post[:trnExpMonth] = format(credit_card.month, :two_digits)
|
|
207
287
|
post[:trnExpYear] = format(credit_card.year, :two_digits)
|
|
208
288
|
post[:trnCardCvd] = credit_card.verification_value
|
|
289
|
+
if credit_card.is_a?(NetworkTokenizationCreditCard)
|
|
290
|
+
post[:"3DSecureXID"] = credit_card.transaction_id
|
|
291
|
+
post[:"3DSecureECI"] = credit_card.eci
|
|
292
|
+
post[:"3DSecureCAVV"] = credit_card.payment_cryptogram
|
|
293
|
+
end
|
|
209
294
|
end
|
|
210
295
|
end
|
|
211
296
|
|
|
@@ -227,7 +312,6 @@ module ActiveMerchant #:nodoc:
|
|
|
227
312
|
post[:serviceVersion] = SP_SERVICE_VERSION
|
|
228
313
|
post[:responseFormat] = 'QS'
|
|
229
314
|
post[:cardValidation] = (options[:cardValidation].to_i == 1) || '0'
|
|
230
|
-
|
|
231
315
|
post[:operationType] = options[:operationType] || options[:operation] || secure_profile_action(:new)
|
|
232
316
|
post[:customerCode] = options[:billing_id] || options[:vault_id] || false
|
|
233
317
|
post[:status] = options[:status]
|
|
@@ -291,17 +375,15 @@ module ActiveMerchant #:nodoc:
|
|
|
291
375
|
|
|
292
376
|
def parse(body)
|
|
293
377
|
results = {}
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
results[key.to_sym] = val.nil? ? nil : CGI.unescape(val)
|
|
298
|
-
end
|
|
378
|
+
body&.split(/&/)&.each do |pair|
|
|
379
|
+
key, val = pair.split(/\=/)
|
|
380
|
+
results[key.to_sym] = val.nil? ? nil : CGI.unescape(val)
|
|
299
381
|
end
|
|
300
382
|
|
|
301
383
|
# Clean up the message text if there is any
|
|
302
384
|
if results[:messageText]
|
|
303
|
-
results[:messageText].gsub!(/<LI>/,
|
|
304
|
-
results[:messageText].gsub!(/(\.)?<br>/,
|
|
385
|
+
results[:messageText].gsub!(/<LI>/, '')
|
|
386
|
+
results[:messageText].gsub!(/(\.)?<br>/, '. ')
|
|
305
387
|
results[:messageText].strip!
|
|
306
388
|
end
|
|
307
389
|
|
|
@@ -316,7 +398,7 @@ module ActiveMerchant #:nodoc:
|
|
|
316
398
|
end
|
|
317
399
|
|
|
318
400
|
def commit(params, use_profile_api = false)
|
|
319
|
-
post(post_data(params,use_profile_api),use_profile_api)
|
|
401
|
+
post(post_data(params, use_profile_api), use_profile_api)
|
|
320
402
|
end
|
|
321
403
|
|
|
322
404
|
def recurring_commit(params)
|
|
@@ -327,10 +409,10 @@ module ActiveMerchant #:nodoc:
|
|
|
327
409
|
response = parse(ssl_post((use_profile_api ? SECURE_PROFILE_URL : self.live_url), data))
|
|
328
410
|
response[:customer_vault_id] = response[:customerCode] if response[:customerCode]
|
|
329
411
|
build_response(success?(response), message_from(response), response,
|
|
330
|
-
:test => test? || response[:authCode] ==
|
|
412
|
+
:test => test? || response[:authCode] == 'TEST',
|
|
331
413
|
:authorization => authorization_from(response),
|
|
332
414
|
:cvv_result => CVD_CODES[response[:cvdId]],
|
|
333
|
-
:avs_result => { :code =>
|
|
415
|
+
:avs_result => { :code => AVS_CODES.include?(response[:avsId]) ? AVS_CODES[response[:avsId]] : response[:avsId] }
|
|
334
416
|
)
|
|
335
417
|
end
|
|
336
418
|
|
|
@@ -351,10 +433,6 @@ module ActiveMerchant #:nodoc:
|
|
|
351
433
|
response[:message]
|
|
352
434
|
end
|
|
353
435
|
|
|
354
|
-
def success?(response)
|
|
355
|
-
response[:responseType] == 'R' || response[:trnApproved] == '1' || response[:responseCode] == '1'
|
|
356
|
-
end
|
|
357
|
-
|
|
358
436
|
def recurring_success?(response)
|
|
359
437
|
response[:code] == '1'
|
|
360
438
|
end
|
|
@@ -363,7 +441,7 @@ module ActiveMerchant #:nodoc:
|
|
|
363
441
|
if source.is_a?(String) or source.is_a?(Integer)
|
|
364
442
|
post[:customerCode] = source
|
|
365
443
|
else
|
|
366
|
-
card_brand(source) ==
|
|
444
|
+
card_brand(source) == 'check' ? add_check(post, source) : add_credit_card(post, source)
|
|
367
445
|
end
|
|
368
446
|
end
|
|
369
447
|
|
|
@@ -380,14 +458,13 @@ module ActiveMerchant #:nodoc:
|
|
|
380
458
|
params[:username] = @options[:user] if @options[:user]
|
|
381
459
|
params[:password] = @options[:password] if @options[:password]
|
|
382
460
|
params[:merchant_id] = @options[:login]
|
|
461
|
+
params[:passcode] = @options[:api_key]
|
|
383
462
|
end
|
|
384
463
|
params[:vbvEnabled] = '0'
|
|
385
464
|
params[:scEnabled] = '0'
|
|
386
465
|
|
|
387
|
-
params.reject{|k, v| v.blank?}.collect { |key, value| "#{key}=#{CGI.escape(value.to_s)}" }.join(
|
|
466
|
+
params.reject { |k, v| v.blank? }.collect { |key, value| "#{key}=#{CGI.escape(value.to_s)}" }.join('&')
|
|
388
467
|
end
|
|
389
|
-
|
|
390
468
|
end
|
|
391
469
|
end
|
|
392
470
|
end
|
|
393
|
-
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
require
|
|
1
|
+
require 'active_merchant/billing/gateways/beanstream/beanstream_core'
|
|
2
2
|
|
|
3
3
|
module ActiveMerchant #:nodoc:
|
|
4
4
|
module Billing #:nodoc:
|
|
@@ -16,7 +16,10 @@ module ActiveMerchant #:nodoc:
|
|
|
16
16
|
# BeanStream supports payment profiles (vaults). This allows you to store cc information with BeanStream and process subsequent transactions with a customer id.
|
|
17
17
|
# Secure Payment Profiles must be enabled on your account (must be done over the phone).
|
|
18
18
|
# Your API Access Passcode must be set in Administration => account settings => order settings.
|
|
19
|
-
# To learn more about storing credit cards with the Beanstream gateway,
|
|
19
|
+
# To learn more about storing credit cards with the Beanstream gateway, documentation can be found at http://developer.beanstream.com/documentation/classic-apis
|
|
20
|
+
#
|
|
21
|
+
# To store a credit card using Beanstream's Legato Javascript Library (http://developer.beanstream.com/documentation/legato) you must pass the singleUseToken in
|
|
22
|
+
# the store method's option parameter. Example: @gateway.store("gt6-0c78c25b-3637-4ba0-90e2-26105287f198")
|
|
20
23
|
#
|
|
21
24
|
# == Notes
|
|
22
25
|
# * Adding of order products information is not implemented.
|
|
@@ -72,6 +75,7 @@ module ActiveMerchant #:nodoc:
|
|
|
72
75
|
add_address(post, options)
|
|
73
76
|
add_transaction_type(post, :authorization)
|
|
74
77
|
add_customer_ip(post, options)
|
|
78
|
+
add_recurring_payment(post, options)
|
|
75
79
|
commit(post)
|
|
76
80
|
end
|
|
77
81
|
|
|
@@ -83,6 +87,7 @@ module ActiveMerchant #:nodoc:
|
|
|
83
87
|
add_address(post, options)
|
|
84
88
|
add_transaction_type(post, purchase_action(source))
|
|
85
89
|
add_customer_ip(post, options)
|
|
90
|
+
add_recurring_payment(post, options)
|
|
86
91
|
commit(post)
|
|
87
92
|
end
|
|
88
93
|
|
|
@@ -96,7 +101,20 @@ module ActiveMerchant #:nodoc:
|
|
|
96
101
|
commit(post)
|
|
97
102
|
end
|
|
98
103
|
|
|
104
|
+
def verify(source, options={})
|
|
105
|
+
MultiResponse.run(:use_first_response) do |r|
|
|
106
|
+
r.process { authorize(100, source, options) }
|
|
107
|
+
r.process(:ignore_result) { void(r.authorization, options) }
|
|
108
|
+
end
|
|
109
|
+
end
|
|
110
|
+
|
|
111
|
+
def success?(response)
|
|
112
|
+
response[:trnApproved] == '1' || response[:responseCode] == '1'
|
|
113
|
+
end
|
|
114
|
+
|
|
99
115
|
def recurring(money, source, options = {})
|
|
116
|
+
ActiveMerchant.deprecated RECURRING_DEPRECATION_MESSAGE
|
|
117
|
+
|
|
100
118
|
post = {}
|
|
101
119
|
add_amount(post, money)
|
|
102
120
|
add_invoice(post, options)
|
|
@@ -108,6 +126,8 @@ module ActiveMerchant #:nodoc:
|
|
|
108
126
|
end
|
|
109
127
|
|
|
110
128
|
def update_recurring(amount, source, options = {})
|
|
129
|
+
ActiveMerchant.deprecated RECURRING_DEPRECATION_MESSAGE
|
|
130
|
+
|
|
111
131
|
post = {}
|
|
112
132
|
add_recurring_amount(post, amount)
|
|
113
133
|
add_recurring_invoice(post, options)
|
|
@@ -119,6 +139,8 @@ module ActiveMerchant #:nodoc:
|
|
|
119
139
|
end
|
|
120
140
|
|
|
121
141
|
def cancel_recurring(options = {})
|
|
142
|
+
ActiveMerchant.deprecated RECURRING_DEPRECATION_MESSAGE
|
|
143
|
+
|
|
122
144
|
post = {}
|
|
123
145
|
add_recurring_operation_type(post, :cancel)
|
|
124
146
|
add_recurring_service(post, options)
|
|
@@ -131,18 +153,24 @@ module ActiveMerchant #:nodoc:
|
|
|
131
153
|
|
|
132
154
|
# To match the other stored-value gateways, like TrustCommerce,
|
|
133
155
|
# store and unstore need to be defined
|
|
134
|
-
def store(
|
|
156
|
+
def store(payment_method, options = {})
|
|
135
157
|
post = {}
|
|
136
158
|
add_address(post, options)
|
|
137
|
-
|
|
138
|
-
|
|
159
|
+
|
|
160
|
+
if payment_method.respond_to?(:number)
|
|
161
|
+
add_credit_card(post, payment_method)
|
|
162
|
+
else
|
|
163
|
+
post[:singleUseToken] = payment_method
|
|
164
|
+
end
|
|
165
|
+
add_secure_profile_variables(post, options)
|
|
166
|
+
|
|
139
167
|
commit(post, true)
|
|
140
168
|
end
|
|
141
169
|
|
|
142
|
-
#can't actually delete a secure profile with the supplicated API. This function sets the status of the profile to closed (C).
|
|
143
|
-
#Closed profiles will have to removed manually.
|
|
170
|
+
# can't actually delete a secure profile with the supplicated API. This function sets the status of the profile to closed (C).
|
|
171
|
+
# Closed profiles will have to removed manually.
|
|
144
172
|
def delete(vault_id)
|
|
145
|
-
update(vault_id, false, {:status =>
|
|
173
|
+
update(vault_id, false, {:status => 'C'})
|
|
146
174
|
end
|
|
147
175
|
|
|
148
176
|
alias_method :unstore, :delete
|
|
@@ -150,20 +178,38 @@ module ActiveMerchant #:nodoc:
|
|
|
150
178
|
# Update the values (such as CC expiration) stored at
|
|
151
179
|
# the gateway. The CC number must be supplied in the
|
|
152
180
|
# CreditCard object.
|
|
153
|
-
def update(vault_id,
|
|
181
|
+
def update(vault_id, payment_method, options = {})
|
|
154
182
|
post = {}
|
|
155
183
|
add_address(post, options)
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
184
|
+
if payment_method.respond_to?(:number)
|
|
185
|
+
add_credit_card(post, payment_method)
|
|
186
|
+
else
|
|
187
|
+
post[:singleUseToken] = payment_method
|
|
188
|
+
end
|
|
189
|
+
options[:vault_id] = vault_id
|
|
190
|
+
options[:operation] = secure_profile_action(:modify)
|
|
191
|
+
add_secure_profile_variables(post, options)
|
|
159
192
|
commit(post, true)
|
|
160
193
|
end
|
|
161
194
|
|
|
195
|
+
def supports_scrubbing?
|
|
196
|
+
true
|
|
197
|
+
end
|
|
198
|
+
|
|
199
|
+
def scrub(transcript)
|
|
200
|
+
transcript.
|
|
201
|
+
gsub(%r((Authorization: Basic )\w+), '\1[FILTERED]').
|
|
202
|
+
gsub(/(&?password=)[^&\s]*(&?)/, '\1[FILTERED]\2').
|
|
203
|
+
gsub(/(&?passcode=)[^&\s]*(&?)/, '\1[FILTERED]\2').
|
|
204
|
+
gsub(/(&?trnCardCvd=)\d*(&?)/, '\1[FILTERED]\2').
|
|
205
|
+
gsub(/(&?trnCardNumber=)\d*(&?)/, '\1[FILTERED]\2')
|
|
206
|
+
end
|
|
207
|
+
|
|
162
208
|
private
|
|
209
|
+
|
|
163
210
|
def build_response(*args)
|
|
164
211
|
Response.new(*args)
|
|
165
212
|
end
|
|
166
213
|
end
|
|
167
214
|
end
|
|
168
215
|
end
|
|
169
|
-
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
require
|
|
1
|
+
require 'active_merchant/billing/gateways/beanstream/beanstream_core'
|
|
2
2
|
|
|
3
3
|
module ActiveMerchant #:nodoc:
|
|
4
4
|
module Billing #:nodoc:
|
|
@@ -7,21 +7,21 @@ module ActiveMerchant #:nodoc:
|
|
|
7
7
|
params['pageContents']
|
|
8
8
|
end
|
|
9
9
|
end
|
|
10
|
-
|
|
10
|
+
|
|
11
11
|
class BeanstreamInteracGateway < Gateway
|
|
12
12
|
include BeanstreamCore
|
|
13
13
|
|
|
14
14
|
# Confirm a transaction posted back from the bank to Beanstream.
|
|
15
15
|
# Confirming a transaction does not require any credentials,
|
|
16
16
|
# and in an application with many merchants sharing a funded
|
|
17
|
-
# URL the application may not yet know which merchant the
|
|
17
|
+
# URL the application may not yet know which merchant the
|
|
18
18
|
# post back is for until the response of the confirmation is
|
|
19
19
|
# received, which contains the order number.
|
|
20
20
|
def self.confirm(transaction)
|
|
21
21
|
gateway = new(:login => '')
|
|
22
22
|
gateway.confirm(transaction)
|
|
23
23
|
end
|
|
24
|
-
|
|
24
|
+
|
|
25
25
|
def purchase(money, options = {})
|
|
26
26
|
post = {}
|
|
27
27
|
add_amount(post, money)
|
|
@@ -31,24 +31,27 @@ module ActiveMerchant #:nodoc:
|
|
|
31
31
|
add_transaction_type(post, :purchase)
|
|
32
32
|
commit(post)
|
|
33
33
|
end
|
|
34
|
-
|
|
34
|
+
|
|
35
|
+
def success?(response)
|
|
36
|
+
response[:responseType] == 'R' || response[:trnApproved] == '1' || response[:responseCode] == '1'
|
|
37
|
+
end
|
|
38
|
+
|
|
35
39
|
# Confirm a transaction posted back from the bank to Beanstream.
|
|
36
40
|
def confirm(transaction)
|
|
37
41
|
post(transaction)
|
|
38
42
|
end
|
|
39
|
-
|
|
43
|
+
|
|
40
44
|
private
|
|
41
|
-
|
|
45
|
+
|
|
42
46
|
def add_interac_details(post, options)
|
|
43
47
|
address = options[:billing_address] || options[:address] || {}
|
|
44
48
|
post[:trnCardOwner] = address[:name]
|
|
45
49
|
post[:paymentMethod] = 'IO'
|
|
46
50
|
end
|
|
47
|
-
|
|
51
|
+
|
|
48
52
|
def build_response(*args)
|
|
49
53
|
BeanstreamInteracResponse.new(*args)
|
|
50
54
|
end
|
|
51
55
|
end
|
|
52
56
|
end
|
|
53
57
|
end
|
|
54
|
-
|