activemerchant 1.43.3 → 1.44.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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/CHANGELOG +133 -3
- data/CONTRIBUTORS +25 -0
- data/README.md +14 -39
- data/lib/active_merchant.rb +43 -2
- data/lib/active_merchant/billing.rb +3 -1
- data/lib/active_merchant/billing/base.rb +10 -2
- data/lib/active_merchant/billing/check.rb +29 -22
- data/lib/active_merchant/billing/compatibility.rb +120 -0
- data/lib/active_merchant/billing/credit_card.rb +129 -60
- data/lib/active_merchant/billing/credit_card_formatting.rb +4 -1
- data/lib/active_merchant/billing/credit_card_methods.rb +60 -43
- data/lib/active_merchant/billing/cvv_result.rb +15 -15
- data/lib/active_merchant/billing/gateway.rb +46 -11
- data/lib/active_merchant/billing/gateways/adyen.rb +205 -0
- data/lib/active_merchant/billing/gateways/app55.rb +1 -9
- data/lib/active_merchant/billing/gateways/authorize_net.rb +7 -391
- data/lib/active_merchant/billing/gateways/authorize_net_arb.rb +417 -0
- data/lib/active_merchant/billing/gateways/authorize_net_cim.rb +20 -4
- data/lib/active_merchant/billing/gateways/balanced.rb +127 -367
- data/lib/active_merchant/billing/gateways/barclays_epdq.rb +1 -1
- data/lib/active_merchant/billing/gateways/beanstream.rb +25 -6
- data/lib/active_merchant/billing/gateways/beanstream/beanstream_core.rb +3 -3
- data/lib/active_merchant/billing/gateways/blue_pay.rb +11 -3
- data/lib/active_merchant/billing/gateways/bogus.rb +1 -13
- data/lib/active_merchant/billing/gateways/borgun.rb +211 -0
- data/lib/active_merchant/billing/gateways/braintree_blue.rb +31 -13
- data/lib/active_merchant/billing/gateways/bridge_pay.rb +7 -0
- data/lib/active_merchant/billing/gateways/cashnet.rb +184 -0
- data/lib/active_merchant/billing/gateways/cc5.rb +45 -0
- data/lib/active_merchant/billing/gateways/certo_direct.rb +3 -2
- data/lib/active_merchant/billing/gateways/commercegate.rb +143 -0
- data/lib/active_merchant/billing/gateways/conekta.rb +56 -81
- data/lib/active_merchant/billing/gateways/cyber_source.rb +1 -0
- data/lib/active_merchant/billing/gateways/data_cash.rb +3 -1
- data/lib/active_merchant/billing/gateways/efsnet.rb +3 -14
- data/lib/active_merchant/billing/gateways/elavon.rb +45 -9
- data/lib/active_merchant/billing/gateways/epay.rb +2 -2
- data/lib/active_merchant/billing/gateways/eway.rb +1 -12
- data/lib/active_merchant/billing/gateways/eway_managed.rb +1 -1
- data/lib/active_merchant/billing/gateways/eway_rapid.rb +233 -202
- data/lib/active_merchant/billing/gateways/exact.rb +1 -1
- data/lib/active_merchant/billing/gateways/fat_zebra.rb +1 -1
- data/lib/active_merchant/billing/gateways/federated_canada.rb +1 -8
- data/lib/active_merchant/billing/gateways/finansbank.rb +2 -1
- data/lib/active_merchant/billing/gateways/first_pay.rb +108 -124
- data/lib/active_merchant/billing/gateways/firstdata_e4.rb +43 -13
- data/lib/active_merchant/billing/gateways/garanti.rb +2 -2
- data/lib/active_merchant/billing/gateways/hps.rb +281 -0
- data/lib/active_merchant/billing/gateways/iats_payments.rb +2 -2
- data/lib/active_merchant/billing/gateways/ideal/ideal_base.rb +1 -4
- data/lib/active_merchant/billing/gateways/inspire.rb +0 -8
- data/lib/active_merchant/billing/gateways/iridium.rb +25 -3
- data/lib/active_merchant/billing/gateways/jetpay.rb +1 -1
- data/lib/active_merchant/billing/gateways/linkpoint.rb +4 -13
- data/lib/active_merchant/billing/gateways/litle.rb +10 -4
- data/lib/active_merchant/billing/gateways/maxipago.rb +7 -0
- data/lib/active_merchant/billing/gateways/merchant_e_solutions.rb +0 -6
- data/lib/active_merchant/billing/gateways/merchant_ware.rb +4 -11
- data/lib/active_merchant/billing/gateways/merchant_ware_version_four.rb +3 -10
- data/lib/active_merchant/billing/gateways/mercury.rb +0 -7
- data/lib/active_merchant/billing/gateways/metrics_global.rb +1 -20
- data/lib/active_merchant/billing/gateways/migs.rb +1 -1
- data/lib/active_merchant/billing/gateways/moneris.rb +29 -21
- data/lib/active_merchant/billing/gateways/moneris_us.rb +1 -11
- data/lib/active_merchant/billing/gateways/money_movers.rb +1 -8
- data/lib/active_merchant/billing/gateways/nab_transact.rb +16 -15
- data/lib/active_merchant/billing/gateways/net_registry.rb +1 -1
- data/lib/active_merchant/billing/gateways/netbilling.rb +0 -7
- data/lib/active_merchant/billing/gateways/network_merchants.rb +21 -18
- data/lib/active_merchant/billing/gateways/ogone.rb +3 -3
- data/lib/active_merchant/billing/gateways/openpay.rb +1 -8
- data/lib/active_merchant/billing/gateways/optimal_payment.rb +34 -23
- data/lib/active_merchant/billing/gateways/orbital.rb +121 -4
- data/lib/active_merchant/billing/gateways/orbital/orbital_soft_descriptors.rb +22 -21
- data/lib/active_merchant/billing/gateways/pac_net_raven.rb +2 -9
- data/lib/active_merchant/billing/gateways/pago_facil.rb +122 -0
- data/lib/active_merchant/billing/gateways/pay_junction.rb +3 -13
- data/lib/active_merchant/billing/gateways/pay_secure.rb +0 -7
- data/lib/active_merchant/billing/gateways/paybox_direct.rb +1 -9
- data/lib/active_merchant/billing/gateways/payex.rb +1 -1
- data/lib/active_merchant/billing/gateways/payflow.rb +7 -1
- data/lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb +15 -15
- data/lib/active_merchant/billing/gateways/payflow_express.rb +19 -19
- data/lib/active_merchant/billing/gateways/payment_express.rb +1 -1
- data/lib/active_merchant/billing/gateways/paymill.rb +7 -2
- data/lib/active_merchant/billing/gateways/paypal.rb +25 -14
- data/lib/active_merchant/billing/gateways/paypal/paypal_common_api.rb +1 -1
- data/lib/active_merchant/billing/gateways/paypal/paypal_recurring_api.rb +16 -2
- data/lib/active_merchant/billing/gateways/paypal_digital_goods.rb +3 -2
- data/lib/active_merchant/billing/gateways/paypal_express.rb +25 -0
- data/lib/active_merchant/billing/gateways/payscout.rb +1 -8
- data/lib/active_merchant/billing/gateways/pin.rb +39 -7
- data/lib/active_merchant/billing/gateways/plugnpay.rb +1 -12
- data/lib/active_merchant/billing/gateways/psigate.rb +1 -12
- data/lib/active_merchant/billing/gateways/qbms.rb +1 -1
- data/lib/active_merchant/billing/gateways/quantum.rb +2 -2
- data/lib/active_merchant/billing/gateways/quickpay.rb +17 -15
- data/lib/active_merchant/billing/gateways/realex.rb +3 -12
- data/lib/active_merchant/billing/gateways/sage.rb +1 -1
- data/lib/active_merchant/billing/gateways/sage/sage_bankcard.rb +2 -8
- data/lib/active_merchant/billing/gateways/sage/sage_core.rb +1 -1
- data/lib/active_merchant/billing/gateways/sage/sage_virtual_check.rb +1 -1
- data/lib/active_merchant/billing/gateways/sage_pay.rb +93 -28
- data/lib/active_merchant/billing/gateways/secure_net.rb +1 -8
- data/lib/active_merchant/billing/gateways/secure_pay_au.rb +3 -3
- data/lib/active_merchant/billing/gateways/secure_pay_tech.rb +0 -7
- data/lib/active_merchant/billing/gateways/skip_jack.rb +1 -2
- data/lib/active_merchant/billing/gateways/smart_ps.rb +8 -2
- data/lib/active_merchant/billing/gateways/spreedly_core.rb +2 -1
- data/lib/active_merchant/billing/gateways/stripe.rb +14 -15
- data/lib/active_merchant/billing/gateways/swipe_checkout.rb +0 -1
- data/lib/active_merchant/billing/gateways/trust_commerce.rb +4 -9
- data/lib/active_merchant/billing/gateways/usa_epay_advanced.rb +46 -43
- data/lib/active_merchant/billing/gateways/usa_epay_transaction.rb +7 -0
- data/lib/active_merchant/billing/gateways/verifi.rb +1 -8
- data/lib/active_merchant/billing/gateways/viaklix.rb +0 -6
- data/lib/active_merchant/billing/gateways/vindicia.rb +68 -44
- data/lib/active_merchant/billing/gateways/webpay.rb +1 -9
- data/lib/active_merchant/billing/gateways/wirecard.rb +117 -11
- data/lib/active_merchant/billing/gateways/worldpay.rb +50 -22
- data/lib/active_merchant/billing/gateways/worldpay_us.rb +181 -0
- data/lib/active_merchant/billing/model.rb +30 -0
- data/lib/active_merchant/billing/rails.rb +3 -0
- data/lib/active_merchant/billing/response.rb +20 -15
- data/lib/active_merchant/country.rb +327 -0
- data/lib/active_merchant/empty.rb +20 -0
- data/lib/active_merchant/errors.rb +29 -0
- data/lib/active_merchant/offsite_payments_shim.rb +19 -0
- data/lib/active_merchant/version.rb +1 -1
- metadata +60 -243
- metadata.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/orbital/avs_result.rb +0 -93
- data/lib/active_merchant/billing/gateways/orbital/cvv_result.rb +0 -34
- data/lib/active_merchant/billing/integrations.rb +0 -17
- data/lib/active_merchant/billing/integrations/a1agregator.rb +0 -26
- 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/action_view_helper.rb +0 -78
- data/lib/active_merchant/billing/integrations/authorize_net_sim.rb +0 -38
- 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/bit_pay.rb +0 -30
- data/lib/active_merchant/billing/integrations/bit_pay/helper.rb +0 -66
- 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/bogus.rb +0 -23
- 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/chronopay.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/citrus.rb +0 -28
- data/lib/active_merchant/billing/integrations/citrus/helper.rb +0 -57
- 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/direc_pay.rb +0 -41
- 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/directebanking.rb +0 -47
- 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/doku.rb +0 -24
- 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/dotpay.rb +0 -22
- 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/dwolla.rb +0 -23
- 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/e_payment_plans.rb +0 -48
- 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/easy_pay.rb +0 -30
- 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/epay.rb +0 -21
- 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/first_data.rb +0 -38
- 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/gestpay.rb +0 -25
- 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/helper.rb +0 -123
- data/lib/active_merchant/billing/integrations/hi_trust.rb +0 -27
- 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/ipay88.rb +0 -23
- 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/klarna.rb +0 -71
- data/lib/active_merchant/billing/integrations/klarna/helper.rb +0 -123
- data/lib/active_merchant/billing/integrations/klarna/notification.rb +0 -103
- data/lib/active_merchant/billing/integrations/liqpay.rb +0 -30
- 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/maksuturva.rb +0 -86
- 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/mollie_ideal.rb +0 -98
- data/lib/active_merchant/billing/integrations/mollie_ideal/helper.rb +0 -67
- data/lib/active_merchant/billing/integrations/mollie_ideal/notification.rb +0 -69
- data/lib/active_merchant/billing/integrations/mollie_ideal/return.rb +0 -10
- data/lib/active_merchant/billing/integrations/moneybookers.rb +0 -26
- 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/nochex.rb +0 -88
- 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/notification.rb +0 -71
- data/lib/active_merchant/billing/integrations/pag_seguro.rb +0 -53
- data/lib/active_merchant/billing/integrations/pag_seguro/helper.rb +0 -121
- data/lib/active_merchant/billing/integrations/pag_seguro/notification.rb +0 -104
- data/lib/active_merchant/billing/integrations/paxum.rb +0 -44
- 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/pay_fast.rb +0 -70
- 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/paydollar.rb +0 -59
- data/lib/active_merchant/billing/integrations/paydollar/helper.rb +0 -41
- data/lib/active_merchant/billing/integrations/paydollar/notification.rb +0 -64
- data/lib/active_merchant/billing/integrations/paydollar/return.rb +0 -15
- data/lib/active_merchant/billing/integrations/payflow_link.rb +0 -21
- 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/paypal.rb +0 -39
- 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_payments_advanced.rb +0 -20
- data/lib/active_merchant/billing/integrations/paypal_payments_advanced/helper.rb +0 -15
- data/lib/active_merchant/billing/integrations/paysbuy.rb +0 -36
- 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/payu_in.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_paisa.rb +0 -30
- 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/platron.rb +0 -28
- 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/pxpay.rb +0 -31
- data/lib/active_merchant/billing/integrations/pxpay/helper.rb +0 -113
- 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/quickpay.rb +0 -21
- 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/rbkmoney.rb +0 -17
- 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/return.rb +0 -42
- data/lib/active_merchant/billing/integrations/robokassa.rb +0 -49
- 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/sage_pay_form.rb +0 -37
- 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/two_checkout.rb +0 -44
- 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/universal.rb +0 -23
- data/lib/active_merchant/billing/integrations/universal/helper.rb +0 -76
- data/lib/active_merchant/billing/integrations/universal/notification.rb +0 -52
- data/lib/active_merchant/billing/integrations/universal/return.rb +0 -18
- data/lib/active_merchant/billing/integrations/valitor.rb +0 -33
- 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/verkkomaksut.rb +0 -20
- 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/web_pay.rb +0 -45
- 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/webmoney.rb +0 -43
- 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/wirecard_checkout_page.rb +0 -39
- 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/world_pay.rb +0 -34
- data/lib/active_merchant/billing/integrations/world_pay/helper.rb +0 -101
- data/lib/active_merchant/billing/integrations/world_pay/notification.rb +0 -160
|
@@ -168,13 +168,6 @@ module ActiveMerchant #:nodoc:
|
|
|
168
168
|
success?(response) ? SUCCESS_MESSAGE : (response[:auth_msg] || FAILURE_MESSAGE)
|
|
169
169
|
end
|
|
170
170
|
|
|
171
|
-
def expdate(credit_card)
|
|
172
|
-
year = sprintf("%.4i", credit_card.year)
|
|
173
|
-
month = sprintf("%.2i", credit_card.month)
|
|
174
|
-
|
|
175
|
-
"#{month}#{year[-2..-1]}"
|
|
176
|
-
end
|
|
177
|
-
|
|
178
171
|
def post_data(action, parameters = {})
|
|
179
172
|
parameters[:account_id] = @options[:login]
|
|
180
173
|
parameters[:site_tag] = @options[:site_tag] if @options[:site_tag].present?
|
|
@@ -131,11 +131,15 @@ module ActiveMerchant #:nodoc:
|
|
|
131
131
|
post[:shipping_country] = shipping_address[:country]
|
|
132
132
|
end
|
|
133
133
|
|
|
134
|
-
def add_swipe_data(post, options)
|
|
134
|
+
def add_swipe_data(post, creditcard, options)
|
|
135
135
|
# unencrypted tracks
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
136
|
+
if creditcard.respond_to?(:track_data) && creditcard.track_data.present?
|
|
137
|
+
post[:track_1] = creditcard.track_data
|
|
138
|
+
else
|
|
139
|
+
post[:track_1] = options[:track_1]
|
|
140
|
+
post[:track_2] = options[:track_2]
|
|
141
|
+
post[:track_3] = options[:track_3]
|
|
142
|
+
end
|
|
139
143
|
|
|
140
144
|
# encrypted tracks
|
|
141
145
|
post[:magnesafe_track_1] = options[:magnesafe_track_1]
|
|
@@ -146,23 +150,14 @@ module ActiveMerchant #:nodoc:
|
|
|
146
150
|
post[:magnesafe_magneprint_status] = options[:magnesafe_magneprint_status]
|
|
147
151
|
end
|
|
148
152
|
|
|
149
|
-
def add_payment_method(post,
|
|
153
|
+
def add_payment_method(post, payment_source, options)
|
|
150
154
|
post[:processor_id] = options[:processor_id]
|
|
151
155
|
post[:customer_vault] = 'add_customer' if options[:store]
|
|
152
156
|
|
|
153
|
-
add_swipe_data(post, options)
|
|
157
|
+
add_swipe_data(post, payment_source, options)
|
|
154
158
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
creditcard = creditcard_or_check_or_vault_id
|
|
158
|
-
post[:firstname] = creditcard.first_name
|
|
159
|
-
post[:lastname] = creditcard.last_name
|
|
160
|
-
post[:ccnumber] = creditcard.number
|
|
161
|
-
post[:ccexp] = format(creditcard.month, :two_digits) + format(creditcard.year, :two_digits)
|
|
162
|
-
post[:cvv] = creditcard.verification_value
|
|
163
|
-
post[:payment] = 'creditcard'
|
|
164
|
-
elsif creditcard_or_check_or_vault_id.is_a?(Check)
|
|
165
|
-
check = creditcard_or_check_or_vault_id
|
|
159
|
+
if payment_source.is_a?(Check)
|
|
160
|
+
check = payment_source
|
|
166
161
|
post[:firstname] = check.first_name
|
|
167
162
|
post[:lastname] = check.last_name
|
|
168
163
|
post[:checkname] = check.name
|
|
@@ -171,8 +166,16 @@ module ActiveMerchant #:nodoc:
|
|
|
171
166
|
post[:account_type] = check.account_type
|
|
172
167
|
post[:account_holder_type] = check.account_holder_type
|
|
173
168
|
post[:payment] = 'check'
|
|
169
|
+
elsif payment_source.respond_to?(:number)
|
|
170
|
+
creditcard = payment_source
|
|
171
|
+
post[:firstname] = creditcard.first_name
|
|
172
|
+
post[:lastname] = creditcard.last_name
|
|
173
|
+
post[:ccnumber] = creditcard.number
|
|
174
|
+
post[:ccexp] = format(creditcard.month, :two_digits) + format(creditcard.year, :two_digits)
|
|
175
|
+
post[:cvv] = creditcard.verification_value
|
|
176
|
+
post[:payment] = 'creditcard'
|
|
174
177
|
else
|
|
175
|
-
post[:customer_vault_id] =
|
|
178
|
+
post[:customer_vault_id] = payment_source
|
|
176
179
|
end
|
|
177
180
|
end
|
|
178
181
|
|
|
@@ -192,7 +192,7 @@ module ActiveMerchant #:nodoc:
|
|
|
192
192
|
# Credit the specified account by a specific amount.
|
|
193
193
|
def credit(money, identification_or_credit_card, options = {})
|
|
194
194
|
if reference_transaction?(identification_or_credit_card)
|
|
195
|
-
deprecated CREDIT_DEPRECATION_MESSAGE
|
|
195
|
+
ActiveMerchant.deprecated CREDIT_DEPRECATION_MESSAGE
|
|
196
196
|
# Referenced credit: refund of a settled transaction
|
|
197
197
|
refund(money, identification_or_credit_card, options)
|
|
198
198
|
else # must be a credit card or card reference
|
|
@@ -251,7 +251,7 @@ module ActiveMerchant #:nodoc:
|
|
|
251
251
|
add_eci(post, options[:eci] || '9')
|
|
252
252
|
else
|
|
253
253
|
if options.has_key?(:store)
|
|
254
|
-
deprecated OGONE_STORE_OPTION_DEPRECATION_MESSAGE
|
|
254
|
+
ActiveMerchant.deprecated OGONE_STORE_OPTION_DEPRECATION_MESSAGE
|
|
255
255
|
options[:billing_id] ||= options[:store]
|
|
256
256
|
end
|
|
257
257
|
add_alias(post, options[:billing_id], options[:alias_operation])
|
|
@@ -386,7 +386,7 @@ module ActiveMerchant #:nodoc:
|
|
|
386
386
|
|
|
387
387
|
def add_signature(parameters)
|
|
388
388
|
if @options[:signature].blank?
|
|
389
|
-
deprecated(OGONE_NO_SIGNATURE_DEPRECATION_MESSAGE) unless(@options[:signature_encryptor] == "none")
|
|
389
|
+
ActiveMerchant.deprecated(OGONE_NO_SIGNATURE_DEPRECATION_MESSAGE) unless(@options[:signature_encryptor] == "none")
|
|
390
390
|
return
|
|
391
391
|
end
|
|
392
392
|
|
|
@@ -127,18 +127,11 @@ module ActiveMerchant #:nodoc:
|
|
|
127
127
|
end
|
|
128
128
|
|
|
129
129
|
def headers(options = {})
|
|
130
|
-
@@ua ||= JSON.dump(
|
|
131
|
-
:bindings_version => ActiveMerchant::VERSION,
|
|
132
|
-
:lang => 'ruby',
|
|
133
|
-
:lang_version => "#{RUBY_VERSION} p#{RUBY_PATCHLEVEL} (#{RUBY_RELEASE_DATE})",
|
|
134
|
-
:platform => RUBY_PLATFORM,
|
|
135
|
-
:publisher => 'active_merchant'
|
|
136
|
-
)
|
|
137
130
|
{
|
|
138
131
|
"Content-Type" => "application/json",
|
|
139
132
|
"Authorization" => "Basic " + Base64.encode64(@api_key.to_s + ":").strip,
|
|
140
133
|
"User-Agent" => "Openpay/v1 ActiveMerchantBindings/#{ActiveMerchant::VERSION}",
|
|
141
|
-
"X-Openpay-Client-User-Agent" =>
|
|
134
|
+
"X-Openpay-Client-User-Agent" => user_agent
|
|
142
135
|
}
|
|
143
136
|
end
|
|
144
137
|
|
|
@@ -17,7 +17,18 @@ module ActiveMerchant #:nodoc:
|
|
|
17
17
|
self.display_name = 'Optimal Payments'
|
|
18
18
|
|
|
19
19
|
def initialize(options = {})
|
|
20
|
-
|
|
20
|
+
|
|
21
|
+
if(options[:login])
|
|
22
|
+
ActiveMerchant.deprecated("The 'login' option is deprecated in favor of 'store_id' and will be removed in a future version.")
|
|
23
|
+
options[:store_id] = options[:login]
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
if(options[:account])
|
|
27
|
+
ActiveMerchant.deprecated("The 'account' option is deprecated in favor of 'account_number' and will be removed in a future version.")
|
|
28
|
+
options[:account_number] = options[:account]
|
|
29
|
+
end
|
|
30
|
+
|
|
31
|
+
requires!(options, :account_number, :store_id, :password)
|
|
21
32
|
super
|
|
22
33
|
end
|
|
23
34
|
|
|
@@ -155,18 +166,19 @@ module ActiveMerchant #:nodoc:
|
|
|
155
166
|
|
|
156
167
|
def cc_auth_request(money, opts)
|
|
157
168
|
xml_document('ccAuthRequestV1') do |xml|
|
|
158
|
-
build_merchant_account(xml
|
|
169
|
+
build_merchant_account(xml)
|
|
159
170
|
xml.merchantRefNum opts[:order_id]
|
|
160
171
|
xml.amount(money/100.0)
|
|
161
172
|
build_card(xml, opts)
|
|
162
173
|
build_billing_details(xml, opts)
|
|
163
174
|
build_shipping_details(xml, opts)
|
|
175
|
+
xml.customerIP opts[:ip] if opts[:ip]
|
|
164
176
|
end
|
|
165
177
|
end
|
|
166
178
|
|
|
167
179
|
def cc_auth_reversal_request(opts)
|
|
168
180
|
xml_document('ccAuthReversalRequestV1') do |xml|
|
|
169
|
-
build_merchant_account(xml
|
|
181
|
+
build_merchant_account(xml)
|
|
170
182
|
xml.confirmationNumber opts[:confirmationNumber]
|
|
171
183
|
xml.merchantRefNum opts[:order_id]
|
|
172
184
|
end
|
|
@@ -174,7 +186,7 @@ module ActiveMerchant #:nodoc:
|
|
|
174
186
|
|
|
175
187
|
def cc_post_auth_request(money, opts)
|
|
176
188
|
xml_document('ccPostAuthRequestV1') do |xml|
|
|
177
|
-
build_merchant_account(xml
|
|
189
|
+
build_merchant_account(xml)
|
|
178
190
|
xml.confirmationNumber opts[:confirmationNumber]
|
|
179
191
|
xml.merchantRefNum opts[:order_id]
|
|
180
192
|
xml.amount(money/100.0)
|
|
@@ -183,7 +195,7 @@ module ActiveMerchant #:nodoc:
|
|
|
183
195
|
|
|
184
196
|
def cc_stored_data_request(money, opts)
|
|
185
197
|
xml_document('ccStoredDataRequestV1') do |xml|
|
|
186
|
-
build_merchant_account(xml
|
|
198
|
+
build_merchant_account(xml)
|
|
187
199
|
xml.merchantRefNum opts[:order_id]
|
|
188
200
|
xml.confirmationNumber opts[:confirmationNumber]
|
|
189
201
|
xml.amount(money/100.0)
|
|
@@ -194,14 +206,14 @@ module ActiveMerchant #:nodoc:
|
|
|
194
206
|
#
|
|
195
207
|
# def cc_cancel_request(opts)
|
|
196
208
|
# xml_document('ccCancelRequestV1') do |xml|
|
|
197
|
-
# build_merchant_account(xml
|
|
209
|
+
# build_merchant_account(xml)
|
|
198
210
|
# xml.confirmationNumber opts[:confirmationNumber]
|
|
199
211
|
# end
|
|
200
212
|
# end
|
|
201
213
|
#
|
|
202
214
|
# def cc_payment_request(money, opts)
|
|
203
215
|
# xml_document('ccPaymentRequestV1') do |xml|
|
|
204
|
-
# build_merchant_account(xml
|
|
216
|
+
# build_merchant_account(xml)
|
|
205
217
|
# xml.merchantRefNum opts[:order_id]
|
|
206
218
|
# xml.amount(money/100.0)
|
|
207
219
|
# build_card(xml, opts)
|
|
@@ -211,7 +223,7 @@ module ActiveMerchant #:nodoc:
|
|
|
211
223
|
#
|
|
212
224
|
# def cc_authenticate_request(opts)
|
|
213
225
|
# xml_document('ccAuthenticateRequestV1') do |xml|
|
|
214
|
-
# build_merchant_account(xml
|
|
226
|
+
# build_merchant_account(xml)
|
|
215
227
|
# xml.confirmationNumber opts[:confirmationNumber]
|
|
216
228
|
# xml.paymentResponse 'myPaymentResponse'
|
|
217
229
|
# end
|
|
@@ -224,11 +236,11 @@ module ActiveMerchant #:nodoc:
|
|
|
224
236
|
}
|
|
225
237
|
end
|
|
226
238
|
|
|
227
|
-
def build_merchant_account(xml
|
|
239
|
+
def build_merchant_account(xml)
|
|
228
240
|
xml.tag! 'merchantAccount' do
|
|
229
|
-
xml.tag! 'accountNum' ,
|
|
230
|
-
xml.tag! 'storeID' ,
|
|
231
|
-
xml.tag! 'storePwd' ,
|
|
241
|
+
xml.tag! 'accountNum' , @options[:account_number]
|
|
242
|
+
xml.tag! 'storeID' , @options[:store_id]
|
|
243
|
+
xml.tag! 'storePwd' , @options[:password]
|
|
232
244
|
end
|
|
233
245
|
end
|
|
234
246
|
|
|
@@ -264,20 +276,20 @@ module ActiveMerchant #:nodoc:
|
|
|
264
276
|
|
|
265
277
|
def build_address(xml, addr, email=nil)
|
|
266
278
|
if addr[:name]
|
|
267
|
-
xml.tag! 'firstName',
|
|
268
|
-
xml.tag! 'lastName' ,
|
|
279
|
+
xml.tag! 'firstName', addr[:name].split(' ').first
|
|
280
|
+
xml.tag! 'lastName' , addr[:name].split(' ').last
|
|
269
281
|
end
|
|
270
|
-
xml.tag! 'street' ,
|
|
271
|
-
xml.tag! 'street2',
|
|
272
|
-
xml.tag! 'city' ,
|
|
282
|
+
xml.tag! 'street' , addr[:address1] if addr[:address1].present?
|
|
283
|
+
xml.tag! 'street2', addr[:address2] if addr[:address2].present?
|
|
284
|
+
xml.tag! 'city' , addr[:city] if addr[:city].present?
|
|
273
285
|
if addr[:state].present?
|
|
274
286
|
state_tag = %w(US CA).include?(addr[:country]) ? 'state' : 'region'
|
|
275
|
-
xml.tag! state_tag,
|
|
287
|
+
xml.tag! state_tag, addr[:state]
|
|
276
288
|
end
|
|
277
|
-
xml.tag! 'country',
|
|
278
|
-
xml.tag! 'zip' ,
|
|
279
|
-
xml.tag! 'phone' ,
|
|
280
|
-
xml.tag! 'email',
|
|
289
|
+
xml.tag! 'country', addr[:country] if addr[:country].present?
|
|
290
|
+
xml.tag! 'zip' , addr[:zip] if addr[:zip].present?
|
|
291
|
+
xml.tag! 'phone' , addr[:phone] if addr[:phone].present?
|
|
292
|
+
xml.tag! 'email', email if email
|
|
281
293
|
end
|
|
282
294
|
|
|
283
295
|
def card_type(key)
|
|
@@ -294,4 +306,3 @@ module ActiveMerchant #:nodoc:
|
|
|
294
306
|
end
|
|
295
307
|
end
|
|
296
308
|
end
|
|
297
|
-
|
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
require File.dirname(__FILE__) + '/orbital/orbital_soft_descriptors'
|
|
2
|
-
require File.dirname(__FILE__) + '/orbital/avs_result'
|
|
3
|
-
require File.dirname(__FILE__) + '/orbital/cvv_result'
|
|
4
2
|
require "rexml/document"
|
|
5
3
|
|
|
6
4
|
module ActiveMerchant #:nodoc:
|
|
@@ -226,13 +224,13 @@ module ActiveMerchant #:nodoc:
|
|
|
226
224
|
end
|
|
227
225
|
|
|
228
226
|
def credit(money, authorization, options= {})
|
|
229
|
-
deprecated CREDIT_DEPRECATION_MESSAGE
|
|
227
|
+
ActiveMerchant.deprecated CREDIT_DEPRECATION_MESSAGE
|
|
230
228
|
refund(money, authorization, options)
|
|
231
229
|
end
|
|
232
230
|
|
|
233
231
|
def void(authorization, options = {}, deprecated = {})
|
|
234
232
|
if(!options.kind_of?(Hash))
|
|
235
|
-
deprecated("Calling the void method with an amount parameter is deprecated and will be removed in a future version.")
|
|
233
|
+
ActiveMerchant.deprecated("Calling the void method with an amount parameter is deprecated and will be removed in a future version.")
|
|
236
234
|
return void(options, deprecated.merge(:amount => authorization))
|
|
237
235
|
end
|
|
238
236
|
|
|
@@ -403,6 +401,8 @@ module ActiveMerchant #:nodoc:
|
|
|
403
401
|
|
|
404
402
|
def add_managed_billing(xml, options)
|
|
405
403
|
if mb = options[:managed_billing]
|
|
404
|
+
ActiveMerchant.deprecated RECURRING_DEPRECATION_MESSAGE
|
|
405
|
+
|
|
406
406
|
# default to recurring (R). Other option is deferred (D).
|
|
407
407
|
xml.tag! :MBType, mb[:type] || RECURRING
|
|
408
408
|
# default to Customer Reference Number
|
|
@@ -679,6 +679,123 @@ module ActiveMerchant #:nodoc:
|
|
|
679
679
|
end
|
|
680
680
|
xml.target!
|
|
681
681
|
end
|
|
682
|
+
|
|
683
|
+
# Unfortunately, Orbital uses their own special codes for AVS responses
|
|
684
|
+
# that are different than the standard codes defined in
|
|
685
|
+
# <tt>ActiveMerchant::Billing::AVSResult</tt>.
|
|
686
|
+
#
|
|
687
|
+
# This class encapsulates the response codes shown on page 240 of their spec:
|
|
688
|
+
# http://download.chasepaymentech.com/docs/orbital/orbital_gateway_xml_specification.pdf
|
|
689
|
+
#
|
|
690
|
+
class AVSResult < ActiveMerchant::Billing::AVSResult
|
|
691
|
+
CODES = {
|
|
692
|
+
'1' => 'No address supplied',
|
|
693
|
+
'2' => 'Bill-to address did not pass Auth Host edit checks',
|
|
694
|
+
'3' => 'AVS not performed',
|
|
695
|
+
'4' => 'Issuer does not participate in AVS',
|
|
696
|
+
'5' => 'Edit-error - AVS data is invalid',
|
|
697
|
+
'6' => 'System unavailable or time-out',
|
|
698
|
+
'7' => 'Address information unavailable',
|
|
699
|
+
'8' => 'Transaction Ineligible for AVS',
|
|
700
|
+
'9' => 'Zip Match/Zip 4 Match/Locale match',
|
|
701
|
+
'A' => 'Zip Match/Zip 4 Match/Locale no match',
|
|
702
|
+
'B' => 'Zip Match/Zip 4 no Match/Locale match',
|
|
703
|
+
'C' => 'Zip Match/Zip 4 no Match/Locale no match',
|
|
704
|
+
'D' => 'Zip No Match/Zip 4 Match/Locale match',
|
|
705
|
+
'E' => 'Zip No Match/Zip 4 Match/Locale no match',
|
|
706
|
+
'F' => 'Zip No Match/Zip 4 No Match/Locale match',
|
|
707
|
+
'G' => 'No match at all',
|
|
708
|
+
'H' => 'Zip Match/Locale match',
|
|
709
|
+
'J' => 'Issuer does not participate in Global AVS',
|
|
710
|
+
'JA' => 'International street address and postal match',
|
|
711
|
+
'JB' => 'International street address match. Postal code not verified',
|
|
712
|
+
'JC' => 'International street address and postal code not verified',
|
|
713
|
+
'JD' => 'International postal code match. Street address not verified',
|
|
714
|
+
'M1' => 'Cardholder name matches',
|
|
715
|
+
'M2' => 'Cardholder name, billing address, and postal code matches',
|
|
716
|
+
'M3' => 'Cardholder name and billing code matches',
|
|
717
|
+
'M4' => 'Cardholder name and billing address match',
|
|
718
|
+
'M5' => 'Cardholder name incorrect, billing address and postal code match',
|
|
719
|
+
'M6' => 'Cardholder name incorrect, billing postal code matches',
|
|
720
|
+
'M7' => 'Cardholder name incorrect, billing address matches',
|
|
721
|
+
'M8' => 'Cardholder name, billing address and postal code are all incorrect',
|
|
722
|
+
'N3' => 'Address matches, ZIP not verified',
|
|
723
|
+
'N4' => 'Address and ZIP code not verified due to incompatible formats',
|
|
724
|
+
'N5' => 'Address and ZIP code match (International only)',
|
|
725
|
+
'N6' => 'Address not verified (International only)',
|
|
726
|
+
'N7' => 'ZIP matches, address not verified',
|
|
727
|
+
'N8' => 'Address and ZIP code match (International only)',
|
|
728
|
+
'N9' => 'Address and ZIP code match (UK only)',
|
|
729
|
+
'R' => 'Issuer does not participate in AVS',
|
|
730
|
+
'UK' => 'Unknown',
|
|
731
|
+
'X' => 'Zip Match/Zip 4 Match/Address Match',
|
|
732
|
+
'Z' => 'Zip Match/Locale no match',
|
|
733
|
+
}
|
|
734
|
+
|
|
735
|
+
# Map vendor's AVS result code to a postal match code
|
|
736
|
+
ORBITAL_POSTAL_MATCH_CODE = {
|
|
737
|
+
'Y' => %w( 9 A B C H JA JD M2 M3 M5 N5 N8 N9 X Z ),
|
|
738
|
+
'N' => %w( D E F G M8 ),
|
|
739
|
+
'X' => %w( 4 J R ),
|
|
740
|
+
nil => %w( 1 2 3 5 6 7 8 JB JC M1 M4 M6 M7 N3 N4 N6 N7 UK )
|
|
741
|
+
}.inject({}) do |map, (type, codes)|
|
|
742
|
+
codes.each { |code| map[code] = type }
|
|
743
|
+
map
|
|
744
|
+
end
|
|
745
|
+
|
|
746
|
+
# Map vendor's AVS result code to a street match code
|
|
747
|
+
ORBITAL_STREET_MATCH_CODE = {
|
|
748
|
+
'Y' => %w( 9 B D F H JA JB M2 M4 M5 M6 M7 N3 N5 N7 N8 N9 X ),
|
|
749
|
+
'N' => %w( A C E G M8 Z ),
|
|
750
|
+
'X' => %w( 4 J R ),
|
|
751
|
+
nil => %w( 1 2 3 5 6 7 8 JC JD M1 M3 N4 N6 UK )
|
|
752
|
+
}.inject({}) do |map, (type, codes)|
|
|
753
|
+
codes.each { |code| map[code] = type }
|
|
754
|
+
map
|
|
755
|
+
end
|
|
756
|
+
|
|
757
|
+
def self.messages
|
|
758
|
+
CODES
|
|
759
|
+
end
|
|
760
|
+
|
|
761
|
+
def initialize(code)
|
|
762
|
+
@code = (code.blank? ? nil : code.to_s.strip.upcase)
|
|
763
|
+
if @code
|
|
764
|
+
@message = CODES[@code]
|
|
765
|
+
@postal_match = ORBITAL_POSTAL_MATCH_CODE[@code]
|
|
766
|
+
@street_match = ORBITAL_STREET_MATCH_CODE[@code]
|
|
767
|
+
end
|
|
768
|
+
end
|
|
769
|
+
end
|
|
770
|
+
|
|
771
|
+
# Unfortunately, Orbital uses their own special codes for CVV responses
|
|
772
|
+
# that are different than the standard codes defined in
|
|
773
|
+
# <tt>ActiveMerchant::Billing::CVVResult</tt>.
|
|
774
|
+
#
|
|
775
|
+
# This class encapsulates the response codes shown on page 255 of their spec:
|
|
776
|
+
# http://download.chasepaymentech.com/docs/orbital/orbital_gateway_xml_specification.pdf
|
|
777
|
+
#
|
|
778
|
+
class CVVResult < ActiveMerchant::Billing::CVVResult
|
|
779
|
+
MESSAGES = {
|
|
780
|
+
'M' => 'Match',
|
|
781
|
+
'N' => 'No match',
|
|
782
|
+
'P' => 'Not processed',
|
|
783
|
+
'S' => 'Should have been present',
|
|
784
|
+
'U' => 'Unsupported by issuer/Issuer unable to process request',
|
|
785
|
+
'I' => 'Invalid',
|
|
786
|
+
'Y' => 'Invalid',
|
|
787
|
+
'' => 'Not applicable'
|
|
788
|
+
}
|
|
789
|
+
|
|
790
|
+
def self.messages
|
|
791
|
+
MESSAGES
|
|
792
|
+
end
|
|
793
|
+
|
|
794
|
+
def initialize(code)
|
|
795
|
+
@code = code.blank? ? '' : code.upcase
|
|
796
|
+
@message = MESSAGES[@code]
|
|
797
|
+
end
|
|
798
|
+
end
|
|
682
799
|
end
|
|
683
800
|
end
|
|
684
801
|
end
|
|
@@ -1,23 +1,21 @@
|
|
|
1
1
|
module ActiveMerchant #:nodoc:
|
|
2
2
|
module Billing #:nodoc:
|
|
3
|
-
class OrbitalSoftDescriptors
|
|
4
|
-
include Validateable
|
|
5
|
-
|
|
3
|
+
class OrbitalSoftDescriptors < Model
|
|
6
4
|
PHONE_FORMAT_1 = /\A\d{3}-\d{3}-\d{4}\z/
|
|
7
5
|
PHONE_FORMAT_2 = /\A\d{3}-\w{7}\z/
|
|
8
|
-
|
|
6
|
+
|
|
9
7
|
# ==== Tampa PNS Soft Descriptors
|
|
10
|
-
# The support for Soft Descriptors via the PNS Host is only for customers processing through Chase
|
|
11
|
-
# Paymentech Canada.
|
|
8
|
+
# The support for Soft Descriptors via the PNS Host is only for customers processing through Chase
|
|
9
|
+
# Paymentech Canada.
|
|
12
10
|
|
|
13
|
-
# Unlike Salem, the only value that gets passed on the cardholder statement is the Merchant Name field.
|
|
14
|
-
# And for these customers, it is a maximum of 25 bytes of data.
|
|
15
|
-
#
|
|
16
|
-
# All other Soft Descriptor fields can optionally be sent, but will not be submitted to the settlement host
|
|
11
|
+
# Unlike Salem, the only value that gets passed on the cardholder statement is the Merchant Name field.
|
|
12
|
+
# And for these customers, it is a maximum of 25 bytes of data.
|
|
13
|
+
#
|
|
14
|
+
# All other Soft Descriptor fields can optionally be sent, but will not be submitted to the settlement host
|
|
17
15
|
# and will not display on the cardholder statement.
|
|
18
|
-
|
|
16
|
+
|
|
19
17
|
attr_accessor :merchant_name, :product_description, :merchant_city, :merchant_phone, :merchant_url, :merchant_email
|
|
20
|
-
|
|
18
|
+
|
|
21
19
|
def initialize(options = {})
|
|
22
20
|
self.merchant_name = options[:merchant_name]
|
|
23
21
|
self.merchant_city = options[:merchant_city]
|
|
@@ -25,22 +23,25 @@ module ActiveMerchant #:nodoc:
|
|
|
25
23
|
self.merchant_url = options[:merchant_url]
|
|
26
24
|
self.merchant_email = options[:merchant_email]
|
|
27
25
|
end
|
|
28
|
-
|
|
26
|
+
|
|
29
27
|
def validate
|
|
30
|
-
errors
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
28
|
+
errors = []
|
|
29
|
+
|
|
30
|
+
errors << [:merchant_name, "is required"] if self.merchant_name.blank?
|
|
31
|
+
errors << [:merchant_name, "is required to be 25 bytes or less"] if self.merchant_name.bytesize > 25
|
|
32
|
+
|
|
33
|
+
if(!empty?(self.merchant_phone) && !self.merchant_phone.match(PHONE_FORMAT_1) && !self.merchant_phone.match(PHONE_FORMAT_2))
|
|
34
|
+
errors << [:merchant_phone, "is required to follow \"NNN-NNN-NNNN\" or \"NNN-AAAAAAA\" format"]
|
|
35
35
|
end
|
|
36
|
-
|
|
36
|
+
|
|
37
37
|
[:merchant_email, :merchant_url].each do |attr|
|
|
38
38
|
unless self.send(attr).blank?
|
|
39
|
-
errors
|
|
39
|
+
errors << [attr, "is required to be 13 bytes or less"] if(self.send(attr).bytesize > 13)
|
|
40
40
|
end
|
|
41
41
|
end
|
|
42
|
+
|
|
43
|
+
errors_hash(errors)
|
|
42
44
|
end
|
|
43
|
-
|
|
44
45
|
end
|
|
45
46
|
end
|
|
46
47
|
end
|