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
|
@@ -85,7 +85,7 @@ module ActiveMerchant #:nodoc:
|
|
|
85
85
|
end
|
|
86
86
|
|
|
87
87
|
def credit(money, reference, options = {})
|
|
88
|
-
deprecated CREDIT_DEPRECATION_MESSAGE
|
|
88
|
+
ActiveMerchant.deprecated CREDIT_DEPRECATION_MESSAGE
|
|
89
89
|
refund(money, reference)
|
|
90
90
|
end
|
|
91
91
|
|
|
@@ -142,7 +142,7 @@ module ActiveMerchant #:nodoc:
|
|
|
142
142
|
xml.instruct!
|
|
143
143
|
xml.tag! 'SecurePayMessage' do
|
|
144
144
|
xml.tag! 'MessageInfo' do
|
|
145
|
-
xml.tag! 'messageID',
|
|
145
|
+
xml.tag! 'messageID', SecureRandom.hex(15)
|
|
146
146
|
xml.tag! 'messageTimestamp', generate_timestamp
|
|
147
147
|
xml.tag! 'timeoutValue', request_timeout
|
|
148
148
|
xml.tag! 'apiVersion', API_VERSION
|
|
@@ -201,7 +201,7 @@ module ActiveMerchant #:nodoc:
|
|
|
201
201
|
xml.instruct!
|
|
202
202
|
xml.tag! 'SecurePayMessage' do
|
|
203
203
|
xml.tag! 'MessageInfo' do
|
|
204
|
-
xml.tag! 'messageID',
|
|
204
|
+
xml.tag! 'messageID', SecureRandom.hex(15)
|
|
205
205
|
xml.tag! 'messageTimestamp', generate_timestamp
|
|
206
206
|
xml.tag! 'timeoutValue', request_timeout
|
|
207
207
|
xml.tag! 'apiVersion', PERIODIC_API_VERSION
|
|
@@ -99,13 +99,6 @@ module ActiveMerchant #:nodoc:
|
|
|
99
99
|
post[:MerchantKey] = @options[:password]
|
|
100
100
|
post.to_s
|
|
101
101
|
end
|
|
102
|
-
|
|
103
|
-
def expdate(creditcard)
|
|
104
|
-
year = sprintf("%.4i", creditcard.year)
|
|
105
|
-
month = sprintf("%.2i", creditcard.month)
|
|
106
|
-
|
|
107
|
-
"#{month}#{year[-2..-1]}"
|
|
108
|
-
end
|
|
109
102
|
end
|
|
110
103
|
end
|
|
111
104
|
end
|
|
@@ -195,7 +195,6 @@ module ActiveMerchant #:nodoc:
|
|
|
195
195
|
end
|
|
196
196
|
|
|
197
197
|
def purchase(money, creditcard, options = {})
|
|
198
|
-
post = {}
|
|
199
198
|
authorization = authorize(money, creditcard, options)
|
|
200
199
|
if authorization.success?
|
|
201
200
|
capture(money, authorization.authorization)
|
|
@@ -240,7 +239,7 @@ module ActiveMerchant #:nodoc:
|
|
|
240
239
|
end
|
|
241
240
|
|
|
242
241
|
def credit(money, identification, options = {})
|
|
243
|
-
deprecated CREDIT_DEPRECATION_MESSAGE
|
|
242
|
+
ActiveMerchant.deprecated CREDIT_DEPRECATION_MESSAGE
|
|
244
243
|
refund(money, identification, options)
|
|
245
244
|
end
|
|
246
245
|
|
|
@@ -77,6 +77,12 @@ module ActiveMerchant #:nodoc:
|
|
|
77
77
|
commit('refund', money, post)
|
|
78
78
|
end
|
|
79
79
|
|
|
80
|
+
def verify(credit_card, options = {})
|
|
81
|
+
MultiResponse.run(:use_first_response) do |r|
|
|
82
|
+
r.process { authorize(100, credit_card, options) }
|
|
83
|
+
r.process(:ignore_result) { void(r.authorization, options) }
|
|
84
|
+
end
|
|
85
|
+
end
|
|
80
86
|
|
|
81
87
|
# Update the values (such as CC expiration) stored at
|
|
82
88
|
# the gateway. The CC number must be supplied in the
|
|
@@ -235,8 +241,8 @@ module ActiveMerchant #:nodoc:
|
|
|
235
241
|
end
|
|
236
242
|
|
|
237
243
|
def expdate(creditcard)
|
|
238
|
-
year = sprintf("%.04i", creditcard.year
|
|
239
|
-
month = sprintf("%.02i", creditcard.month
|
|
244
|
+
year = sprintf("%.04i", creditcard.year)
|
|
245
|
+
month = sprintf("%.02i", creditcard.month)
|
|
240
246
|
|
|
241
247
|
"#{month}#{year[-2..-1]}"
|
|
242
248
|
end
|
|
@@ -107,7 +107,7 @@ module ActiveMerchant #:nodoc:
|
|
|
107
107
|
end
|
|
108
108
|
|
|
109
109
|
private
|
|
110
|
-
|
|
110
|
+
|
|
111
111
|
def save_card(retain, credit_card, options)
|
|
112
112
|
request = build_xml_request('payment_method') do |doc|
|
|
113
113
|
add_credit_card(doc, credit_card, options)
|
|
@@ -142,6 +142,7 @@ module ActiveMerchant #:nodoc:
|
|
|
142
142
|
doc.amount amount(money)
|
|
143
143
|
doc.currency_code(options[:currency] || currency(money) || default_currency)
|
|
144
144
|
doc.order_id(options[:order_id])
|
|
145
|
+
doc.ip(options[:ip])
|
|
145
146
|
doc.description(options[:description])
|
|
146
147
|
end
|
|
147
148
|
|
|
@@ -24,7 +24,7 @@ module ActiveMerchant #:nodoc:
|
|
|
24
24
|
# Source: https://support.stripe.com/questions/which-zero-decimal-currencies-does-stripe-support
|
|
25
25
|
CURRENCIES_WITHOUT_FRACTIONS = ['BIF', 'CLP', 'DJF', 'GNF', 'JPY', 'KMF', 'KRW', 'MGA', 'PYG', 'RWF', 'VUV', 'XAF', 'XOF', 'XPF']
|
|
26
26
|
|
|
27
|
-
self.supported_countries = %w(
|
|
27
|
+
self.supported_countries = %w(AU BE CA CH DE ES FI FR GB IE IT LU NL US)
|
|
28
28
|
self.default_currency = 'USD'
|
|
29
29
|
self.money_format = :cents
|
|
30
30
|
self.supported_cardtypes = [:visa, :master, :american_express, :discover, :jcb, :diners_club]
|
|
@@ -84,7 +84,14 @@ module ActiveMerchant #:nodoc:
|
|
|
84
84
|
return r unless options[:refund_fee_amount]
|
|
85
85
|
|
|
86
86
|
r.process { fetch_application_fees(identification, options) }
|
|
87
|
-
r.process { refund_application_fee(options[:refund_fee_amount], application_fee_from_response(r), options) }
|
|
87
|
+
r.process { refund_application_fee(options[:refund_fee_amount], application_fee_from_response(r.responses.last), options) }
|
|
88
|
+
end
|
|
89
|
+
end
|
|
90
|
+
|
|
91
|
+
def verify(creditcard, options = {})
|
|
92
|
+
MultiResponse.run(:use_first_response) do |r|
|
|
93
|
+
r.process { authorize(50, creditcard, options) }
|
|
94
|
+
r.process(:ignore_result) { void(r.authorization, options) }
|
|
88
95
|
end
|
|
89
96
|
end
|
|
90
97
|
|
|
@@ -131,9 +138,8 @@ module ActiveMerchant #:nodoc:
|
|
|
131
138
|
end
|
|
132
139
|
end
|
|
133
140
|
|
|
134
|
-
def update(customer_id,
|
|
135
|
-
|
|
136
|
-
store(creditcard, options)
|
|
141
|
+
def update(customer_id, card_id, options = {})
|
|
142
|
+
commit(:post, "customers/#{CGI.escape(customer_id)}/cards/#{CGI.escape(card_id)}", options, options)
|
|
137
143
|
end
|
|
138
144
|
|
|
139
145
|
def update_customer(customer_id, options = {})
|
|
@@ -261,21 +267,13 @@ module ActiveMerchant #:nodoc:
|
|
|
261
267
|
end
|
|
262
268
|
|
|
263
269
|
def headers(options = {})
|
|
264
|
-
@@ua ||= JSON.dump({
|
|
265
|
-
:bindings_version => ActiveMerchant::VERSION,
|
|
266
|
-
:lang => 'ruby',
|
|
267
|
-
:lang_version => "#{RUBY_VERSION} p#{RUBY_PATCHLEVEL} (#{RUBY_RELEASE_DATE})",
|
|
268
|
-
:platform => RUBY_PLATFORM,
|
|
269
|
-
:publisher => 'active_merchant'
|
|
270
|
-
})
|
|
271
|
-
|
|
272
270
|
key = options[:key] || @api_key
|
|
273
271
|
version = options[:version] || @version
|
|
274
272
|
|
|
275
273
|
headers = {
|
|
276
274
|
"Authorization" => "Basic " + Base64.encode64(key.to_s + ":").strip,
|
|
277
275
|
"User-Agent" => "Stripe/v1 ActiveMerchantBindings/#{ActiveMerchant::VERSION}",
|
|
278
|
-
"X-Stripe-Client-User-Agent" =>
|
|
276
|
+
"X-Stripe-Client-User-Agent" => user_agent,
|
|
279
277
|
"X-Stripe-Client-User-Metadata" => {:ip => options[:ip]}.to_json
|
|
280
278
|
}
|
|
281
279
|
headers.merge!("Stripe-Version" => version) if version
|
|
@@ -301,11 +299,12 @@ module ActiveMerchant #:nodoc:
|
|
|
301
299
|
card = response["card"] || response["active_card"] || {}
|
|
302
300
|
avs_code = AVS_CODE_TRANSLATOR["line1: #{card["address_line1_check"]}, zip: #{card["address_zip_check"]}"]
|
|
303
301
|
cvc_code = CVC_CODE_TRANSLATOR[card["cvc_check"]]
|
|
302
|
+
|
|
304
303
|
Response.new(success,
|
|
305
304
|
success ? "Transaction approved" : response["error"]["message"],
|
|
306
305
|
response,
|
|
307
306
|
:test => response.has_key?("livemode") ? !response["livemode"] : false,
|
|
308
|
-
:authorization => response["id"],
|
|
307
|
+
:authorization => success ? response["id"] : response["error"]["charge"],
|
|
309
308
|
:avs_result => { :code => avs_code },
|
|
310
309
|
:cvv_result => cvc_code
|
|
311
310
|
)
|
|
@@ -119,7 +119,6 @@ module ActiveMerchant #:nodoc:
|
|
|
119
119
|
build_error_response(message, response)
|
|
120
120
|
end
|
|
121
121
|
rescue ResponseError => e
|
|
122
|
-
raw_response = e.response.body
|
|
123
122
|
build_error_response("ssl_post() with url #{url} raised ResponseError: #{e}")
|
|
124
123
|
rescue JSON::ParserError => e
|
|
125
124
|
msg = 'Invalid response received from the Swipe Checkout API. ' +
|
|
@@ -197,7 +197,7 @@ module ActiveMerchant #:nodoc:
|
|
|
197
197
|
end
|
|
198
198
|
|
|
199
199
|
def credit(money, identification, options = {})
|
|
200
|
-
deprecated CREDIT_DEPRECATION_MESSAGE
|
|
200
|
+
ActiveMerchant.deprecated CREDIT_DEPRECATION_MESSAGE
|
|
201
201
|
refund(money, identification, options)
|
|
202
202
|
end
|
|
203
203
|
|
|
@@ -235,6 +235,8 @@ module ActiveMerchant #:nodoc:
|
|
|
235
235
|
#
|
|
236
236
|
# You can optionally specify how long you want payments to continue using 'payments'
|
|
237
237
|
def recurring(money, creditcard, options = {})
|
|
238
|
+
ActiveMerchant.deprecated RECURRING_DEPRECATION_MESSAGE
|
|
239
|
+
|
|
238
240
|
requires!(options, [:periodicity, :bimonthly, :monthly, :biweekly, :weekly, :yearly, :daily] )
|
|
239
241
|
|
|
240
242
|
cycle = case options[:periodicity]
|
|
@@ -299,13 +301,6 @@ module ActiveMerchant #:nodoc:
|
|
|
299
301
|
end
|
|
300
302
|
end
|
|
301
303
|
|
|
302
|
-
def expdate(creditcard)
|
|
303
|
-
year = sprintf("%.4i", creditcard.year)
|
|
304
|
-
month = sprintf("%.2i", creditcard.month)
|
|
305
|
-
|
|
306
|
-
"#{month}#{year[-2..-1]}"
|
|
307
|
-
end
|
|
308
|
-
|
|
309
304
|
def add_creditcard(params, creditcard)
|
|
310
305
|
params[:media] = "cc"
|
|
311
306
|
params[:name] = creditcard.name
|
|
@@ -404,7 +399,7 @@ module ActiveMerchant #:nodoc:
|
|
|
404
399
|
end
|
|
405
400
|
|
|
406
401
|
def message_from(data)
|
|
407
|
-
|
|
402
|
+
case data["status"]
|
|
408
403
|
when "decline"
|
|
409
404
|
return DECLINE_CODES[data["declinetype"]]
|
|
410
405
|
when "baddata"
|
|
@@ -292,7 +292,7 @@ module ActiveMerchant #:nodoc:
|
|
|
292
292
|
end
|
|
293
293
|
|
|
294
294
|
def credit(money, identification, options={})
|
|
295
|
-
deprecated CREDIT_DEPRECATION_MESSAGE
|
|
295
|
+
ActiveMerchant.deprecated CREDIT_DEPRECATION_MESSAGE
|
|
296
296
|
refund(money, identification, options)
|
|
297
297
|
end
|
|
298
298
|
|
|
@@ -955,8 +955,8 @@ module ActiveMerchant #:nodoc:
|
|
|
955
955
|
'xmlns:xsd' => 'http://www.w3.org/2001/XMLSchema',
|
|
956
956
|
'xmlns:xsi' => 'http://www.w3.org/2001/XMLSchema-instance',
|
|
957
957
|
'xmlns:SOAP-ENC' => 'http://schemas.xmlsoap.org/soap/encoding/',
|
|
958
|
-
'SOAP-ENV:encodingStyle' => 'http://schemas.xmlsoap.org/soap/encoding/' do
|
|
959
|
-
soap.tag! "SOAP-ENV:Body" do
|
|
958
|
+
'SOAP-ENV:encodingStyle' => 'http://schemas.xmlsoap.org/soap/encoding/' do
|
|
959
|
+
soap.tag! "SOAP-ENV:Body" do
|
|
960
960
|
send("build_#{action}", soap, options)
|
|
961
961
|
end
|
|
962
962
|
end
|
|
@@ -972,9 +972,9 @@ module ActiveMerchant #:nodoc:
|
|
|
972
972
|
def build_token(soap, options)
|
|
973
973
|
seed = SecureRandom.base64(32)
|
|
974
974
|
hash = Digest::SHA1.hexdigest("#{@options[:login]}#{seed}#{@options[:password].to_s.strip}")
|
|
975
|
-
soap.Token 'xsi:type' => 'ns1:ueSecurityToken' do
|
|
975
|
+
soap.Token 'xsi:type' => 'ns1:ueSecurityToken' do
|
|
976
976
|
build_tag soap, :string, 'ClientIP', options[:client_ip]
|
|
977
|
-
soap.PinHash 'xsi:type' => 'ns1:ueHash' do
|
|
977
|
+
soap.PinHash 'xsi:type' => 'ns1:ueHash' do
|
|
978
978
|
build_tag soap, :string, "HashValue", hash
|
|
979
979
|
build_tag soap, :string, "Seed", seed
|
|
980
980
|
build_tag soap, :string, "Type", 'sha1'
|
|
@@ -986,7 +986,7 @@ module ActiveMerchant #:nodoc:
|
|
|
986
986
|
# Customer ======================================================
|
|
987
987
|
|
|
988
988
|
def build_add_customer(soap, options)
|
|
989
|
-
soap.tag! "ns1:addCustomer" do
|
|
989
|
+
soap.tag! "ns1:addCustomer" do
|
|
990
990
|
build_token soap, options
|
|
991
991
|
build_customer_data soap, options
|
|
992
992
|
build_tag soap, :double, 'Amount', amount(options[:amount])
|
|
@@ -996,7 +996,7 @@ module ActiveMerchant #:nodoc:
|
|
|
996
996
|
end
|
|
997
997
|
|
|
998
998
|
def build_customer(soap, options, type, add_customer_data=false)
|
|
999
|
-
soap.tag! "ns1:#{type}" do
|
|
999
|
+
soap.tag! "ns1:#{type}" do
|
|
1000
1000
|
build_token soap, options
|
|
1001
1001
|
build_tag soap, :integer, 'CustNum', options[:customer_number]
|
|
1002
1002
|
build_customer_data soap, options if add_customer_data
|
|
@@ -1020,7 +1020,7 @@ module ActiveMerchant #:nodoc:
|
|
|
1020
1020
|
end
|
|
1021
1021
|
|
|
1022
1022
|
def build_add_customer_payment_method(soap, options)
|
|
1023
|
-
soap.tag! "ns1:addCustomerPaymentMethod" do
|
|
1023
|
+
soap.tag! "ns1:addCustomerPaymentMethod" do
|
|
1024
1024
|
build_token soap, options
|
|
1025
1025
|
build_tag soap, :integer, 'CustNum', options[:customer_number]
|
|
1026
1026
|
build_customer_payment_methods soap, options
|
|
@@ -1030,7 +1030,7 @@ module ActiveMerchant #:nodoc:
|
|
|
1030
1030
|
end
|
|
1031
1031
|
|
|
1032
1032
|
def build_get_customer_payment_method(soap, options)
|
|
1033
|
-
soap.tag! 'ns1:getCustomerPaymentMethod' do
|
|
1033
|
+
soap.tag! 'ns1:getCustomerPaymentMethod' do
|
|
1034
1034
|
build_token soap, options
|
|
1035
1035
|
build_tag soap, :integer, 'CustNum', options[:customer_number]
|
|
1036
1036
|
build_tag soap, :integer, 'MethodID', options[:method_id]
|
|
@@ -1042,7 +1042,7 @@ module ActiveMerchant #:nodoc:
|
|
|
1042
1042
|
end
|
|
1043
1043
|
|
|
1044
1044
|
def build_update_customer_payment_method(soap, options)
|
|
1045
|
-
soap.tag! 'ns1:updateCustomerPaymentMethod' do
|
|
1045
|
+
soap.tag! 'ns1:updateCustomerPaymentMethod' do
|
|
1046
1046
|
build_token soap, options
|
|
1047
1047
|
build_customer_payment_methods soap, options
|
|
1048
1048
|
build_tag soap, :boolean, 'Verify', options[:verify]
|
|
@@ -1050,7 +1050,7 @@ module ActiveMerchant #:nodoc:
|
|
|
1050
1050
|
end
|
|
1051
1051
|
|
|
1052
1052
|
def build_delete_customer_payment_method(soap, options)
|
|
1053
|
-
soap.tag! "ns1:deleteCustomerPaymentMethod" do
|
|
1053
|
+
soap.tag! "ns1:deleteCustomerPaymentMethod" do
|
|
1054
1054
|
build_token soap, options
|
|
1055
1055
|
build_tag soap, :integer, 'Custnum', options[:customer_number]
|
|
1056
1056
|
build_tag soap, :integer, 'PaymentMethodID', options[:method_id]
|
|
@@ -1058,7 +1058,7 @@ module ActiveMerchant #:nodoc:
|
|
|
1058
1058
|
end
|
|
1059
1059
|
|
|
1060
1060
|
def build_run_customer_transaction(soap, options)
|
|
1061
|
-
soap.tag! "ns1:runCustomerTransaction" do
|
|
1061
|
+
soap.tag! "ns1:runCustomerTransaction" do
|
|
1062
1062
|
build_token soap, options
|
|
1063
1063
|
build_tag soap, :integer, 'CustNum', options[:customer_number]
|
|
1064
1064
|
build_tag soap, :integer, 'PaymentMethodID', options[:method_id] || 0
|
|
@@ -1069,56 +1069,56 @@ module ActiveMerchant #:nodoc:
|
|
|
1069
1069
|
# Transactions ==================================================
|
|
1070
1070
|
|
|
1071
1071
|
def build_run_transaction(soap, options)
|
|
1072
|
-
soap.tag! 'ns1:runTransaction' do
|
|
1072
|
+
soap.tag! 'ns1:runTransaction' do
|
|
1073
1073
|
build_token soap, options
|
|
1074
1074
|
build_transaction_request_object soap, options, 'Parameters'
|
|
1075
1075
|
end
|
|
1076
1076
|
end
|
|
1077
1077
|
|
|
1078
1078
|
def build_run_sale(soap, options)
|
|
1079
|
-
soap.tag! 'ns1:runSale' do
|
|
1079
|
+
soap.tag! 'ns1:runSale' do
|
|
1080
1080
|
build_token soap, options
|
|
1081
1081
|
build_transaction_request_object soap, options
|
|
1082
1082
|
end
|
|
1083
1083
|
end
|
|
1084
1084
|
|
|
1085
1085
|
def build_run_auth_only(soap, options)
|
|
1086
|
-
soap.tag! 'ns1:runAuthOnly' do
|
|
1086
|
+
soap.tag! 'ns1:runAuthOnly' do
|
|
1087
1087
|
build_token soap, options
|
|
1088
1088
|
build_transaction_request_object soap, options
|
|
1089
1089
|
end
|
|
1090
1090
|
end
|
|
1091
1091
|
|
|
1092
1092
|
def build_run_credit(soap, options)
|
|
1093
|
-
soap.tag! 'ns1:runCredit' do
|
|
1093
|
+
soap.tag! 'ns1:runCredit' do
|
|
1094
1094
|
build_token soap, options
|
|
1095
1095
|
build_transaction_request_object soap, options
|
|
1096
1096
|
end
|
|
1097
1097
|
end
|
|
1098
1098
|
|
|
1099
1099
|
def build_run_check_sale(soap, options)
|
|
1100
|
-
soap.tag! 'ns1:runCheckSale' do
|
|
1100
|
+
soap.tag! 'ns1:runCheckSale' do
|
|
1101
1101
|
build_token soap, options
|
|
1102
1102
|
build_transaction_request_object soap, options
|
|
1103
1103
|
end
|
|
1104
1104
|
end
|
|
1105
1105
|
|
|
1106
1106
|
def build_run_check_credit(soap, options)
|
|
1107
|
-
soap.tag! 'ns1:runCheckCredit' do
|
|
1107
|
+
soap.tag! 'ns1:runCheckCredit' do
|
|
1108
1108
|
build_token soap, options
|
|
1109
1109
|
build_transaction_request_object soap, options
|
|
1110
1110
|
end
|
|
1111
1111
|
end
|
|
1112
1112
|
|
|
1113
1113
|
def build_post_auth(soap, options)
|
|
1114
|
-
soap.tag! 'ns1:postAuth' do
|
|
1114
|
+
soap.tag! 'ns1:postAuth' do
|
|
1115
1115
|
build_token soap, options
|
|
1116
1116
|
build_transaction_request_object soap, options
|
|
1117
1117
|
end
|
|
1118
1118
|
end
|
|
1119
1119
|
|
|
1120
1120
|
def build_run_quick_sale(soap, options)
|
|
1121
|
-
soap.tag! 'ns1:runQuickSale' do
|
|
1121
|
+
soap.tag! 'ns1:runQuickSale' do
|
|
1122
1122
|
build_token soap, options
|
|
1123
1123
|
build_tag soap, :integer, 'RefNum', options[:reference_number]
|
|
1124
1124
|
build_transaction_detail soap, options
|
|
@@ -1127,7 +1127,7 @@ module ActiveMerchant #:nodoc:
|
|
|
1127
1127
|
end
|
|
1128
1128
|
|
|
1129
1129
|
def build_run_quick_credit(soap, options)
|
|
1130
|
-
soap.tag! 'ns1:runQuickCredit' do
|
|
1130
|
+
soap.tag! 'ns1:runQuickCredit' do
|
|
1131
1131
|
build_token soap, options
|
|
1132
1132
|
build_tag soap, :integer, 'RefNum', options[:reference_number]
|
|
1133
1133
|
build_transaction_detail soap, options
|
|
@@ -1135,21 +1135,21 @@ module ActiveMerchant #:nodoc:
|
|
|
1135
1135
|
end
|
|
1136
1136
|
|
|
1137
1137
|
def build_get_transaction(soap, options)
|
|
1138
|
-
soap.tag! "ns1:getTransaction" do
|
|
1138
|
+
soap.tag! "ns1:getTransaction" do
|
|
1139
1139
|
build_token soap, options
|
|
1140
1140
|
build_tag soap, :integer, 'RefNum', options[:reference_number]
|
|
1141
1141
|
end
|
|
1142
1142
|
end
|
|
1143
1143
|
|
|
1144
1144
|
def build_get_transaction_status(soap, options)
|
|
1145
|
-
soap.tag! "ns1:getTransactionStatus" do
|
|
1145
|
+
soap.tag! "ns1:getTransactionStatus" do
|
|
1146
1146
|
build_token soap, options
|
|
1147
1147
|
build_tag soap, :integer, 'RefNum', options[:reference_number]
|
|
1148
1148
|
end
|
|
1149
1149
|
end
|
|
1150
1150
|
|
|
1151
1151
|
def build_get_transaction_custom(soap, options)
|
|
1152
|
-
soap.tag! "ns1:getTransactionCustom" do
|
|
1152
|
+
soap.tag! "ns1:getTransactionCustom" do
|
|
1153
1153
|
build_token soap, options
|
|
1154
1154
|
build_tag soap, :integer, 'RefNum', options[:reference_number]
|
|
1155
1155
|
build_transaction_field_array soap, options
|
|
@@ -1157,14 +1157,14 @@ module ActiveMerchant #:nodoc:
|
|
|
1157
1157
|
end
|
|
1158
1158
|
|
|
1159
1159
|
def build_get_check_trace(soap, options)
|
|
1160
|
-
soap.tag! "ns1:getCheckTrace" do
|
|
1160
|
+
soap.tag! "ns1:getCheckTrace" do
|
|
1161
1161
|
build_token soap, options
|
|
1162
1162
|
build_tag soap, :integer, 'RefNum', options[:reference_number]
|
|
1163
1163
|
end
|
|
1164
1164
|
end
|
|
1165
1165
|
|
|
1166
1166
|
def build_capture_transaction(soap, options)
|
|
1167
|
-
soap.tag! "ns1:captureTransaction" do
|
|
1167
|
+
soap.tag! "ns1:captureTransaction" do
|
|
1168
1168
|
build_token soap, options
|
|
1169
1169
|
build_tag soap, :integer, 'RefNum', options[:reference_number]
|
|
1170
1170
|
build_tag soap, :double, 'Amount', amount(options[:amount])
|
|
@@ -1172,14 +1172,14 @@ module ActiveMerchant #:nodoc:
|
|
|
1172
1172
|
end
|
|
1173
1173
|
|
|
1174
1174
|
def build_void_transaction(soap, options)
|
|
1175
|
-
soap.tag! "ns1:voidTransaction" do
|
|
1175
|
+
soap.tag! "ns1:voidTransaction" do
|
|
1176
1176
|
build_token soap, options
|
|
1177
1177
|
build_tag soap, :integer, 'RefNum', options[:reference_number]
|
|
1178
1178
|
end
|
|
1179
1179
|
end
|
|
1180
1180
|
|
|
1181
1181
|
def build_refund_transaction(soap, options)
|
|
1182
|
-
soap.tag! "ns1:refundTransaction" do
|
|
1182
|
+
soap.tag! "ns1:refundTransaction" do
|
|
1183
1183
|
build_token soap, options
|
|
1184
1184
|
build_tag soap, :integer, 'RefNum', options[:reference_number]
|
|
1185
1185
|
build_tag soap, :integer, 'Amount', amount(options[:amount])
|
|
@@ -1187,7 +1187,7 @@ module ActiveMerchant #:nodoc:
|
|
|
1187
1187
|
end
|
|
1188
1188
|
|
|
1189
1189
|
def build_override_transaction(soap, options)
|
|
1190
|
-
soap.tag! "ns1:overrideTransaction" do
|
|
1190
|
+
soap.tag! "ns1:overrideTransaction" do
|
|
1191
1191
|
build_token soap, options
|
|
1192
1192
|
build_tag soap, :integer, 'RefNum', options[:reference_number]
|
|
1193
1193
|
build_tag soap, :string, 'Reason', options[:reason]
|
|
@@ -1197,7 +1197,7 @@ module ActiveMerchant #:nodoc:
|
|
|
1197
1197
|
# Account =======================================================
|
|
1198
1198
|
|
|
1199
1199
|
def build_get_account_details(soap, options)
|
|
1200
|
-
soap.tag! "ns1:getAccountDetails" do
|
|
1200
|
+
soap.tag! "ns1:getAccountDetails" do
|
|
1201
1201
|
build_token soap, options
|
|
1202
1202
|
end
|
|
1203
1203
|
end
|
|
@@ -1219,7 +1219,7 @@ module ActiveMerchant #:nodoc:
|
|
|
1219
1219
|
if options[:payment_methods]
|
|
1220
1220
|
length = options[:payment_methods].length
|
|
1221
1221
|
soap.PaymentMethods 'SOAP-ENC:arrayType' => "ns1:PaymentMethod[#{length}]",
|
|
1222
|
-
'xsi:type' =>"ns1:PaymentMethodArray" do
|
|
1222
|
+
'xsi:type' =>"ns1:PaymentMethodArray" do
|
|
1223
1223
|
build_customer_payment_methods soap, options
|
|
1224
1224
|
end
|
|
1225
1225
|
end
|
|
@@ -1266,7 +1266,7 @@ module ActiveMerchant #:nodoc:
|
|
|
1266
1266
|
def build_customer_payment_methods(soap, options)
|
|
1267
1267
|
payment_methods, tag_name = extract_methods_and_tag(options)
|
|
1268
1268
|
payment_methods.each do |payment_method|
|
|
1269
|
-
soap.tag! tag_name, 'xsi:type' => "ns1:PaymentMethod" do
|
|
1269
|
+
soap.tag! tag_name, 'xsi:type' => "ns1:PaymentMethod" do
|
|
1270
1270
|
build_tag soap, :integer, 'MethodID', payment_method[:method_id]
|
|
1271
1271
|
build_tag soap, :string, 'MethodType', payment_method[:type]
|
|
1272
1272
|
build_tag soap, :string, 'MethodName', payment_method[:name]
|
|
@@ -1277,7 +1277,7 @@ module ActiveMerchant #:nodoc:
|
|
|
1277
1277
|
end
|
|
1278
1278
|
|
|
1279
1279
|
def build_customer_transaction(soap, options)
|
|
1280
|
-
soap.Parameters 'xsi:type' => "ns1:CustomerTransactionRequest" do
|
|
1280
|
+
soap.Parameters 'xsi:type' => "ns1:CustomerTransactionRequest" do
|
|
1281
1281
|
build_transaction_detail soap, options
|
|
1282
1282
|
CUSTOMER_TRANSACTION_REQUEST_OPTIONS.each do |k,v|
|
|
1283
1283
|
build_tag soap, v[0], v[1], options[k]
|
|
@@ -1290,7 +1290,7 @@ module ActiveMerchant #:nodoc:
|
|
|
1290
1290
|
# Transaction Helpers ===========================================
|
|
1291
1291
|
|
|
1292
1292
|
def build_transaction_request_object(soap, options, name='Params')
|
|
1293
|
-
soap.tag! name, 'xsi:type' => "ns1:TransactionRequestObject" do
|
|
1293
|
+
soap.tag! name, 'xsi:type' => "ns1:TransactionRequestObject" do
|
|
1294
1294
|
TRANSACTION_REQUEST_OBJECT_OPTIONS.each do |k,v|
|
|
1295
1295
|
build_tag soap, v[0], v[1], options[k]
|
|
1296
1296
|
end
|
|
@@ -1313,7 +1313,7 @@ module ActiveMerchant #:nodoc:
|
|
|
1313
1313
|
end
|
|
1314
1314
|
|
|
1315
1315
|
def build_transaction_detail(soap, options)
|
|
1316
|
-
soap.Details 'xsi:type' => "ns1:TransactionDetail" do
|
|
1316
|
+
soap.Details 'xsi:type' => "ns1:TransactionDetail" do
|
|
1317
1317
|
TRANSACTION_DETAIL_OPTIONS.each do |k,v|
|
|
1318
1318
|
build_tag soap, v[0], v[1], options[k]
|
|
1319
1319
|
end
|
|
@@ -1324,7 +1324,7 @@ module ActiveMerchant #:nodoc:
|
|
|
1324
1324
|
end
|
|
1325
1325
|
|
|
1326
1326
|
def build_credit_card_data(soap, options)
|
|
1327
|
-
soap.CreditCardData 'xsi:type' => "ns1:CreditCardData" do
|
|
1327
|
+
soap.CreditCardData 'xsi:type' => "ns1:CreditCardData" do
|
|
1328
1328
|
build_tag soap, :string, 'CardNumber', options[:payment_method].number
|
|
1329
1329
|
build_tag soap, :string, 'CardExpiration', build_card_expiration(options)
|
|
1330
1330
|
if options[:billing_address]
|
|
@@ -1348,7 +1348,7 @@ module ActiveMerchant #:nodoc:
|
|
|
1348
1348
|
end
|
|
1349
1349
|
|
|
1350
1350
|
def build_check_data(soap, options)
|
|
1351
|
-
soap.CheckData 'xsi:type' => "ns1:CheckData" do
|
|
1351
|
+
soap.CheckData 'xsi:type' => "ns1:CheckData" do
|
|
1352
1352
|
build_tag soap, :integer, 'CheckNumber', options[:payment_method].number
|
|
1353
1353
|
build_tag soap, :string, 'Account', options[:payment_method].account_number
|
|
1354
1354
|
build_tag soap, :string, 'Routing', options[:payment_method].routing_number
|
|
@@ -1361,7 +1361,7 @@ module ActiveMerchant #:nodoc:
|
|
|
1361
1361
|
|
|
1362
1362
|
def build_recurring_billing(soap, options)
|
|
1363
1363
|
if options[:recurring]
|
|
1364
|
-
soap.RecurringBilling 'xsi:type' => "ns1:RecurringBilling" do
|
|
1364
|
+
soap.RecurringBilling 'xsi:type' => "ns1:RecurringBilling" do
|
|
1365
1365
|
build_tag soap, :double, 'Amount', amount(options[:recurring][:amount])
|
|
1366
1366
|
build_tag soap, :string, 'Next', options[:recurring][:next].strftime("%Y-%m-%d") if options[:recurring][:next]
|
|
1367
1367
|
build_tag soap, :string, 'Expire', options[:recurring][:expire].strftime("%Y-%m-%d") if options[:recurring][:expire]
|
|
@@ -1373,7 +1373,7 @@ module ActiveMerchant #:nodoc:
|
|
|
1373
1373
|
end
|
|
1374
1374
|
|
|
1375
1375
|
def build_transaction_field_array(soap, options)
|
|
1376
|
-
soap.Fields 'SOAP-ENC:arryType' => "xsd:string[#{options[:fields].length}]", 'xsi:type' => 'ns1:stringArray' do
|
|
1376
|
+
soap.Fields 'SOAP-ENC:arryType' => "xsd:string[#{options[:fields].length}]", 'xsi:type' => 'ns1:stringArray' do
|
|
1377
1377
|
options[:fields].each do |field|
|
|
1378
1378
|
build_tag soap, :string, 'item', field
|
|
1379
1379
|
end
|
|
@@ -1427,7 +1427,7 @@ module ActiveMerchant #:nodoc:
|
|
|
1427
1427
|
soap = error.response.body
|
|
1428
1428
|
end
|
|
1429
1429
|
|
|
1430
|
-
|
|
1430
|
+
build_response(action, soap)
|
|
1431
1431
|
end
|
|
1432
1432
|
|
|
1433
1433
|
def build_response(action, soap)
|
|
@@ -1435,9 +1435,12 @@ module ActiveMerchant #:nodoc:
|
|
|
1435
1435
|
|
|
1436
1436
|
response_params.merge!('soap_response' => soap) if @options[:soap_response]
|
|
1437
1437
|
|
|
1438
|
-
|
|
1439
|
-
success,
|
|
1440
|
-
|
|
1438
|
+
Response.new(
|
|
1439
|
+
success,
|
|
1440
|
+
message,
|
|
1441
|
+
response_params,
|
|
1442
|
+
:test => test?,
|
|
1443
|
+
:authorization => authorization,
|
|
1441
1444
|
:avs_result => avs_from(avs),
|
|
1442
1445
|
:cvv_result => cvv
|
|
1443
1446
|
)
|