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
|
@@ -7,12 +7,12 @@ module ActiveMerchant #:nodoc:
|
|
|
7
7
|
class PaypalGateway < Gateway
|
|
8
8
|
include PaypalCommonAPI
|
|
9
9
|
include PaypalRecurringApi
|
|
10
|
-
|
|
10
|
+
|
|
11
11
|
self.supported_cardtypes = [:visa, :master, :american_express, :discover]
|
|
12
12
|
self.supported_countries = ['US']
|
|
13
13
|
self.homepage_url = 'https://www.paypal.com/us/webapps/mpp/paypal-payments-pro'
|
|
14
14
|
self.display_name = 'PayPal Payments Pro (US)'
|
|
15
|
-
|
|
15
|
+
|
|
16
16
|
def authorize(money, credit_card_or_referenced_id, options = {})
|
|
17
17
|
requires!(options, :ip)
|
|
18
18
|
commit define_transaction_type(credit_card_or_referenced_id), build_sale_or_authorization_request('Authorization', money, credit_card_or_referenced_id, options)
|
|
@@ -22,13 +22,24 @@ module ActiveMerchant #:nodoc:
|
|
|
22
22
|
requires!(options, :ip)
|
|
23
23
|
commit define_transaction_type(credit_card_or_referenced_id), build_sale_or_authorization_request('Sale', money, credit_card_or_referenced_id, options)
|
|
24
24
|
end
|
|
25
|
-
|
|
25
|
+
|
|
26
|
+
def verify(credit_card, options = {})
|
|
27
|
+
if %w(visa master).include?(credit_card.brand)
|
|
28
|
+
authorize(0, credit_card, options)
|
|
29
|
+
else
|
|
30
|
+
MultiResponse.run(:use_first_response) do |r|
|
|
31
|
+
r.process { authorize(100, credit_card, options) }
|
|
32
|
+
r.process(:ignore_result) { void(r.authorization, options) }
|
|
33
|
+
end
|
|
34
|
+
end
|
|
35
|
+
end
|
|
36
|
+
|
|
26
37
|
def express
|
|
27
38
|
@express ||= PaypalExpressGateway.new(@options)
|
|
28
39
|
end
|
|
29
|
-
|
|
40
|
+
|
|
30
41
|
private
|
|
31
|
-
|
|
42
|
+
|
|
32
43
|
def define_transaction_type(transaction_arg)
|
|
33
44
|
if transaction_arg.is_a?(String)
|
|
34
45
|
return 'DoReferenceTransaction'
|
|
@@ -36,14 +47,14 @@ module ActiveMerchant #:nodoc:
|
|
|
36
47
|
return 'DoDirectPayment'
|
|
37
48
|
end
|
|
38
49
|
end
|
|
39
|
-
|
|
50
|
+
|
|
40
51
|
def build_sale_or_authorization_request(action, money, credit_card_or_referenced_id, options)
|
|
41
52
|
transaction_type = define_transaction_type(credit_card_or_referenced_id)
|
|
42
53
|
reference_id = credit_card_or_referenced_id if transaction_type == "DoReferenceTransaction"
|
|
43
|
-
|
|
54
|
+
|
|
44
55
|
billing_address = options[:billing_address] || options[:address]
|
|
45
56
|
currency_code = options[:currency] || currency(money)
|
|
46
|
-
|
|
57
|
+
|
|
47
58
|
xml = Builder::XmlMarkup.new :indent => 2
|
|
48
59
|
xml.tag! transaction_type + 'Req', 'xmlns' => PAYPAL_NAMESPACE do
|
|
49
60
|
xml.tag! transaction_type + 'Request', 'xmlns:n2' => EBAY_NAMESPACE do
|
|
@@ -58,9 +69,9 @@ module ActiveMerchant #:nodoc:
|
|
|
58
69
|
end
|
|
59
70
|
end
|
|
60
71
|
|
|
61
|
-
xml.target!
|
|
72
|
+
xml.target!
|
|
62
73
|
end
|
|
63
|
-
|
|
74
|
+
|
|
64
75
|
def add_credit_card(xml, credit_card, address, options)
|
|
65
76
|
xml.tag! 'n2:CreditCard' do
|
|
66
77
|
xml.tag! 'n2:CreditCardType', credit_card_type(card_brand(credit_card))
|
|
@@ -68,19 +79,19 @@ module ActiveMerchant #:nodoc:
|
|
|
68
79
|
xml.tag! 'n2:ExpMonth', format(credit_card.month, :two_digits)
|
|
69
80
|
xml.tag! 'n2:ExpYear', format(credit_card.year, :four_digits)
|
|
70
81
|
xml.tag! 'n2:CVV2', credit_card.verification_value
|
|
71
|
-
|
|
82
|
+
|
|
72
83
|
if [ 'switch', 'solo' ].include?(card_brand(credit_card).to_s)
|
|
73
84
|
xml.tag! 'n2:StartMonth', format(credit_card.start_month, :two_digits) unless credit_card.start_month.blank?
|
|
74
85
|
xml.tag! 'n2:StartYear', format(credit_card.start_year, :four_digits) unless credit_card.start_year.blank?
|
|
75
86
|
xml.tag! 'n2:IssueNumber', format(credit_card.issue_number, :two_digits) unless credit_card.issue_number.blank?
|
|
76
87
|
end
|
|
77
|
-
|
|
88
|
+
|
|
78
89
|
xml.tag! 'n2:CardOwner' do
|
|
79
90
|
xml.tag! 'n2:PayerName' do
|
|
80
91
|
xml.tag! 'n2:FirstName', credit_card.first_name
|
|
81
92
|
xml.tag! 'n2:LastName', credit_card.last_name
|
|
82
93
|
end
|
|
83
|
-
|
|
94
|
+
|
|
84
95
|
xml.tag! 'n2:Payer', options[:email]
|
|
85
96
|
add_address(xml, 'n2:Address', address)
|
|
86
97
|
end
|
|
@@ -97,7 +108,7 @@ module ActiveMerchant #:nodoc:
|
|
|
97
108
|
when 'solo' then 'Solo'
|
|
98
109
|
end
|
|
99
110
|
end
|
|
100
|
-
|
|
111
|
+
|
|
101
112
|
def build_response(success, message, response, options = {})
|
|
102
113
|
Response.new(success, message, response, options)
|
|
103
114
|
end
|
|
@@ -122,7 +122,7 @@ module ActiveMerchant #:nodoc:
|
|
|
122
122
|
end
|
|
123
123
|
|
|
124
124
|
def credit(money, identification, options = {})
|
|
125
|
-
deprecated Gateway::CREDIT_DEPRECATION_MESSAGE
|
|
125
|
+
ActiveMerchant.deprecated Gateway::CREDIT_DEPRECATION_MESSAGE
|
|
126
126
|
refund(money, identification, options)
|
|
127
127
|
end
|
|
128
128
|
|
|
@@ -23,8 +23,10 @@ module ActiveMerchant #:nodoc:
|
|
|
23
23
|
# * <tt>:cycles</tt> -- Limit to certain # of cycles (OPTIONAL)
|
|
24
24
|
# * <tt>:start_date</tt> -- When does the charging starts (REQUIRED)
|
|
25
25
|
# * <tt>:description</tt> -- The description to appear in the profile (REQUIRED)
|
|
26
|
-
|
|
26
|
+
|
|
27
27
|
def recurring(amount, credit_card, options = {})
|
|
28
|
+
ActiveMerchant.deprecated Gateway::RECURRING_DEPRECATION_MESSAGE
|
|
29
|
+
|
|
28
30
|
options[:credit_card] = credit_card
|
|
29
31
|
options[:amount] = amount
|
|
30
32
|
requires!(options, :description, :start_date, :period, :frequency, :amount)
|
|
@@ -34,7 +36,7 @@ module ActiveMerchant #:nodoc:
|
|
|
34
36
|
# Update a recurring payment's details.
|
|
35
37
|
#
|
|
36
38
|
# This transaction updates an existing Recurring Billing Profile
|
|
37
|
-
# and the subscription must have already been created previously
|
|
39
|
+
# and the subscription must have already been created previously
|
|
38
40
|
# by calling +recurring()+. The ability to change certain
|
|
39
41
|
# details about a recurring payment is dependent on transaction history
|
|
40
42
|
# and the type of plan you're subscribed with paypal. Web Payment Pro
|
|
@@ -49,6 +51,8 @@ module ActiveMerchant #:nodoc:
|
|
|
49
51
|
# * <tt>:profile_id</tt> -- A string containing the <tt>:profile_id</tt>
|
|
50
52
|
# of the recurring payment already in place for a given credit card. (REQUIRED)
|
|
51
53
|
def update_recurring(options={})
|
|
54
|
+
ActiveMerchant.deprecated Gateway::RECURRING_DEPRECATION_MESSAGE
|
|
55
|
+
|
|
52
56
|
requires!(options, :profile_id)
|
|
53
57
|
opts = options.dup
|
|
54
58
|
commit 'UpdateRecurringPaymentsProfile', build_change_profile_request(opts.delete(:profile_id), opts)
|
|
@@ -65,6 +69,8 @@ module ActiveMerchant #:nodoc:
|
|
|
65
69
|
# recurring payment already in place for a given credit card. (REQUIRED)
|
|
66
70
|
# * <tt>options</tt> -- A hash with extra info ('note' for ex.)
|
|
67
71
|
def cancel_recurring(profile_id, options = {})
|
|
72
|
+
ActiveMerchant.deprecated Gateway::RECURRING_DEPRECATION_MESSAGE
|
|
73
|
+
|
|
68
74
|
raise_error_if_blank('profile_id', profile_id)
|
|
69
75
|
commit 'ManageRecurringPaymentsProfileStatus', build_manage_profile_request(profile_id, 'Cancel', options)
|
|
70
76
|
end
|
|
@@ -76,6 +82,8 @@ module ActiveMerchant #:nodoc:
|
|
|
76
82
|
# * <tt>profile_id</tt> -- A string containing the +profile_id+ of the
|
|
77
83
|
# recurring payment already in place for a given credit card. (REQUIRED)
|
|
78
84
|
def status_recurring(profile_id)
|
|
85
|
+
ActiveMerchant.deprecated Gateway::RECURRING_DEPRECATION_MESSAGE
|
|
86
|
+
|
|
79
87
|
raise_error_if_blank('profile_id', profile_id)
|
|
80
88
|
commit 'GetRecurringPaymentsProfileDetails', build_get_profile_details_request(profile_id)
|
|
81
89
|
end
|
|
@@ -87,6 +95,8 @@ module ActiveMerchant #:nodoc:
|
|
|
87
95
|
# * <tt>profile_id</tt> -- A string containing the +profile_id+ of the
|
|
88
96
|
# recurring payment already in place for a given credit card. (REQUIRED)
|
|
89
97
|
def suspend_recurring(profile_id, options = {})
|
|
98
|
+
ActiveMerchant.deprecated Gateway::RECURRING_DEPRECATION_MESSAGE
|
|
99
|
+
|
|
90
100
|
raise_error_if_blank('profile_id', profile_id)
|
|
91
101
|
commit 'ManageRecurringPaymentsProfileStatus', build_manage_profile_request(profile_id, 'Suspend', options)
|
|
92
102
|
end
|
|
@@ -98,6 +108,8 @@ module ActiveMerchant #:nodoc:
|
|
|
98
108
|
# * <tt>profile_id</tt> -- A string containing the +profile_id+ of the
|
|
99
109
|
# recurring payment already in place for a given credit card. (REQUIRED)
|
|
100
110
|
def reactivate_recurring(profile_id, options = {})
|
|
111
|
+
ActiveMerchant.deprecated Gateway::RECURRING_DEPRECATION_MESSAGE
|
|
112
|
+
|
|
101
113
|
raise_error_if_blank('profile_id', profile_id)
|
|
102
114
|
commit 'ManageRecurringPaymentsProfileStatus', build_manage_profile_request(profile_id, 'Reactivate', options)
|
|
103
115
|
end
|
|
@@ -109,6 +121,8 @@ commit 'ManageRecurringPaymentsProfileStatus', build_manage_profile_request(prof
|
|
|
109
121
|
# * <tt>profile_id</tt> -- A string containing the +profile_id+ of the
|
|
110
122
|
# recurring payment already in place for a given credit card. (REQUIRED)
|
|
111
123
|
def bill_outstanding_amount(profile_id, options = {})
|
|
124
|
+
ActiveMerchant.deprecated Gateway::RECURRING_DEPRECATION_MESSAGE
|
|
125
|
+
|
|
112
126
|
raise_error_if_blank('profile_id', profile_id)
|
|
113
127
|
commit 'BillOutstandingAmount', build_bill_outstanding_amount(profile_id, options)
|
|
114
128
|
end
|
|
@@ -11,9 +11,10 @@ module ActiveMerchant #:nodoc:
|
|
|
11
11
|
self.supported_countries = %w(AU CA CN FI GB ID IN IT MY NO NZ PH PL SE SG TH VN)
|
|
12
12
|
self.homepage_url = 'https://www.x.com/community/ppx/xspaces/digital_goods'
|
|
13
13
|
self.display_name = 'PayPal Express Checkout for Digital Goods'
|
|
14
|
-
|
|
14
|
+
|
|
15
15
|
def redirect_url_for(token, options = {})
|
|
16
|
-
|
|
16
|
+
options[:review] ||= false
|
|
17
|
+
super
|
|
17
18
|
end
|
|
18
19
|
|
|
19
20
|
# GATEWAY.setup_purchase(100,
|
|
@@ -67,6 +67,10 @@ module ActiveMerchant #:nodoc:
|
|
|
67
67
|
commit 'BAUpdate', build_cancel_billing_agreement_request(token)
|
|
68
68
|
end
|
|
69
69
|
|
|
70
|
+
def agreement_details(reference_id, options = {})
|
|
71
|
+
commit 'BAUpdate', build_details_billing_agreement_request(reference_id)
|
|
72
|
+
end
|
|
73
|
+
|
|
70
74
|
def authorize_reference_transaction(money, options = {})
|
|
71
75
|
requires!(options, :reference_id, :payment_type, :invoice_id, :description, :ip)
|
|
72
76
|
|
|
@@ -127,12 +131,14 @@ module ActiveMerchant #:nodoc:
|
|
|
127
131
|
if options[:max_amount]
|
|
128
132
|
xml.tag! 'n2:MaxAmount', localized_amount(options[:max_amount], currency_code), 'currencyID' => currency_code
|
|
129
133
|
end
|
|
134
|
+
xml.tag! 'n2:ReqBillingAddress', options[:req_billing_address] ? '1' : '0'
|
|
130
135
|
xml.tag! 'n2:NoShipping', options[:no_shipping] ? '1' : '0'
|
|
131
136
|
xml.tag! 'n2:AddressOverride', options[:address_override] ? '1' : '0'
|
|
132
137
|
xml.tag! 'n2:LocaleCode', locale_code(options[:locale]) unless options[:locale].blank?
|
|
133
138
|
xml.tag! 'n2:BrandName', options[:brand_name] unless options[:brand_name].blank?
|
|
134
139
|
# Customization of the payment page
|
|
135
140
|
xml.tag! 'n2:PageStyle', options[:page_style] unless options[:page_style].blank?
|
|
141
|
+
xml.tag! 'n2:cpp-logo-image', options[:logo_image] unless options[:logo_image].blank?
|
|
136
142
|
xml.tag! 'n2:cpp-header-image', options[:header_image] unless options[:header_image].blank?
|
|
137
143
|
xml.tag! 'n2:cpp-header-border-color', options[:header_border_color] unless options[:header_border_color].blank?
|
|
138
144
|
xml.tag! 'n2:cpp-header-back-color', options[:header_background_color] unless options[:header_background_color].blank?
|
|
@@ -154,6 +160,13 @@ module ActiveMerchant #:nodoc:
|
|
|
154
160
|
if !options[:allow_note].nil?
|
|
155
161
|
xml.tag! 'n2:AllowNote', options[:allow_note] ? '1' : '0'
|
|
156
162
|
end
|
|
163
|
+
|
|
164
|
+
if options[:funding_sources]
|
|
165
|
+
xml.tag! 'n2:FundingSourceDetails' do
|
|
166
|
+
xml.tag! 'n2:UserSelectedFundingSource', options[:funding_sources][:source]
|
|
167
|
+
end
|
|
168
|
+
end
|
|
169
|
+
|
|
157
170
|
xml.tag! 'n2:CallbackURL', options[:callback_url] unless options[:callback_url].blank?
|
|
158
171
|
|
|
159
172
|
add_payment_details(xml, money, currency_code, options)
|
|
@@ -205,6 +218,18 @@ module ActiveMerchant #:nodoc:
|
|
|
205
218
|
xml.target!
|
|
206
219
|
end
|
|
207
220
|
|
|
221
|
+
def build_details_billing_agreement_request(reference_id)
|
|
222
|
+
xml = Builder::XmlMarkup.new :indent => 2
|
|
223
|
+
xml.tag! 'BillAgreementUpdateReq', 'xmlns' => PAYPAL_NAMESPACE do
|
|
224
|
+
xml.tag! 'BAUpdateRequest', 'xmlns:n2' => EBAY_NAMESPACE do
|
|
225
|
+
xml.tag! 'n2:Version', API_VERSION
|
|
226
|
+
xml.tag! 'ReferenceID', reference_id
|
|
227
|
+
end
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
xml.target!
|
|
231
|
+
end
|
|
232
|
+
|
|
208
233
|
def build_reference_transaction_request(action, money, options)
|
|
209
234
|
currency_code = options[:currency] || currency(money)
|
|
210
235
|
|
|
@@ -155,16 +155,9 @@ module ActiveMerchant #:nodoc:
|
|
|
155
155
|
post[:password] = @options[:password]
|
|
156
156
|
post[:type] = action
|
|
157
157
|
|
|
158
|
-
request = post.merge(parameters).collect { |key, value| "#{key}=#{
|
|
158
|
+
request = post.merge(parameters).collect { |key, value| "#{key}=#{CGI.escape(value.to_s)}" }.join("&")
|
|
159
159
|
request
|
|
160
160
|
end
|
|
161
|
-
|
|
162
|
-
def expdate(creditcard)
|
|
163
|
-
year = sprintf("%.4i", creditcard.year)
|
|
164
|
-
month = sprintf("%.2i", creditcard.month)
|
|
165
|
-
|
|
166
|
-
"#{month}#{year[-2..-1]}"
|
|
167
|
-
end
|
|
168
161
|
end
|
|
169
162
|
end
|
|
170
163
|
end
|
|
@@ -28,8 +28,9 @@ module ActiveMerchant #:nodoc:
|
|
|
28
28
|
add_invoice(post, options)
|
|
29
29
|
add_creditcard(post, creditcard)
|
|
30
30
|
add_address(post, creditcard, options)
|
|
31
|
+
add_capture(post, options)
|
|
31
32
|
|
|
32
|
-
commit('charges', post, options)
|
|
33
|
+
commit(:post, 'charges', post, options)
|
|
33
34
|
end
|
|
34
35
|
|
|
35
36
|
# Create a customer and associated credit card. The token that is returned
|
|
@@ -40,17 +41,42 @@ module ActiveMerchant #:nodoc:
|
|
|
40
41
|
add_creditcard(post, creditcard)
|
|
41
42
|
add_customer_data(post, options)
|
|
42
43
|
add_address(post, creditcard, options)
|
|
43
|
-
commit('customers', post, options)
|
|
44
|
+
commit(:post, 'customers', post, options)
|
|
44
45
|
end
|
|
45
46
|
|
|
46
47
|
# Refund a transaction, note that the money attribute is ignored at the
|
|
47
48
|
# moment as the API does not support partial refunds. The parameter is
|
|
48
49
|
# kept for compatibility reasons
|
|
49
50
|
def refund(money, token, options = {})
|
|
50
|
-
commit("charges/#{CGI.escape(token)}/refunds", { :amount => amount(money) }, options)
|
|
51
|
+
commit(:post, "charges/#{CGI.escape(token)}/refunds", { :amount => amount(money) }, options)
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Authorize an amount on a credit card. Once authorized, you can later
|
|
55
|
+
# capture this charge using the charge token that is returned.
|
|
56
|
+
def authorize(money, creditcard, options = {})
|
|
57
|
+
options[:capture] = false
|
|
58
|
+
|
|
59
|
+
purchase(money, creditcard, options)
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
# Captures a previously authorized charge. Capturing a certin amount of the original
|
|
63
|
+
# authorization is currently not supported.
|
|
64
|
+
def capture(money, token, options = {})
|
|
65
|
+
commit(:put, "charges/#{CGI.escape(token)}/capture", {}, options)
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
# Updates the credit card for the customer.
|
|
69
|
+
def update(token, creditcard, options = {})
|
|
70
|
+
post = {}
|
|
71
|
+
|
|
72
|
+
add_creditcard(post, creditcard)
|
|
73
|
+
add_customer_data(post, options)
|
|
74
|
+
add_address(post, creditcard, options)
|
|
75
|
+
commit(:put, "customers/#{CGI.escape(token)}", post, options)
|
|
51
76
|
end
|
|
52
77
|
|
|
53
78
|
private
|
|
79
|
+
|
|
54
80
|
def add_amount(post, money, options)
|
|
55
81
|
post[:amount] = amount(money)
|
|
56
82
|
post[:currency] = (options[:currency] || currency(money))
|
|
@@ -58,8 +84,8 @@ module ActiveMerchant #:nodoc:
|
|
|
58
84
|
end
|
|
59
85
|
|
|
60
86
|
def add_customer_data(post, options)
|
|
61
|
-
post[:email] = options[:email]
|
|
62
|
-
post[:ip_address] = options[:ip]
|
|
87
|
+
post[:email] = options[:email] if options[:email]
|
|
88
|
+
post[:ip_address] = options[:ip] if options[:ip]
|
|
63
89
|
end
|
|
64
90
|
|
|
65
91
|
def add_address(post, creditcard, options)
|
|
@@ -81,6 +107,12 @@ module ActiveMerchant #:nodoc:
|
|
|
81
107
|
post[:description] = options[:description] || "Active Merchant Purchase"
|
|
82
108
|
end
|
|
83
109
|
|
|
110
|
+
def add_capture(post, options)
|
|
111
|
+
capture = options[:capture]
|
|
112
|
+
|
|
113
|
+
post[:capture] = capture == false ? false : true
|
|
114
|
+
end
|
|
115
|
+
|
|
84
116
|
def add_creditcard(post, creditcard)
|
|
85
117
|
if creditcard.respond_to?(:number)
|
|
86
118
|
post[:card] ||= {}
|
|
@@ -112,11 +144,11 @@ module ActiveMerchant #:nodoc:
|
|
|
112
144
|
result
|
|
113
145
|
end
|
|
114
146
|
|
|
115
|
-
def commit(action, params, options)
|
|
147
|
+
def commit(method, action, params, options)
|
|
116
148
|
url = "#{test? ? test_url : live_url}/#{action}"
|
|
117
149
|
|
|
118
150
|
begin
|
|
119
|
-
body = parse(
|
|
151
|
+
body = parse(ssl_request(method, url, post_data(params), headers(options)))
|
|
120
152
|
rescue ResponseError => e
|
|
121
153
|
body = parse(e.response.body)
|
|
122
154
|
end
|
|
@@ -153,7 +153,7 @@ module ActiveMerchant
|
|
|
153
153
|
add_amount(post, money, options)
|
|
154
154
|
|
|
155
155
|
if identification_or_creditcard.is_a?(String)
|
|
156
|
-
deprecated CREDIT_DEPRECATION_MESSAGE
|
|
156
|
+
ActiveMerchant.deprecated CREDIT_DEPRECATION_MESSAGE
|
|
157
157
|
refund(money, identification_or_creditcard, options)
|
|
158
158
|
else
|
|
159
159
|
add_creditcard(post, identification_or_creditcard)
|
|
@@ -268,17 +268,6 @@ module ActiveMerchant
|
|
|
268
268
|
post[:currency] = options[:currency] || currency(money)
|
|
269
269
|
end
|
|
270
270
|
|
|
271
|
-
# Make a ruby type out of the response string
|
|
272
|
-
def normalize(field)
|
|
273
|
-
case field
|
|
274
|
-
when "true" then true
|
|
275
|
-
when "false" then false
|
|
276
|
-
when "" then nil
|
|
277
|
-
when "null" then nil
|
|
278
|
-
else field
|
|
279
|
-
end
|
|
280
|
-
end
|
|
281
|
-
|
|
282
271
|
def message_from(results)
|
|
283
272
|
PAYMENT_GATEWAY_RESPONSES[results[:resp_code]]
|
|
284
273
|
end
|
|
@@ -70,7 +70,7 @@ module ActiveMerchant #:nodoc:
|
|
|
70
70
|
end
|
|
71
71
|
|
|
72
72
|
def credit(money, authorization, options = {})
|
|
73
|
-
deprecated CREDIT_DEPRECATION_MESSAGE
|
|
73
|
+
ActiveMerchant.deprecated CREDIT_DEPRECATION_MESSAGE
|
|
74
74
|
refund(money, authorization, options)
|
|
75
75
|
end
|
|
76
76
|
|
|
@@ -203,17 +203,6 @@ module ActiveMerchant #:nodoc:
|
|
|
203
203
|
end
|
|
204
204
|
end
|
|
205
205
|
|
|
206
|
-
# Make a ruby type out of the response string
|
|
207
|
-
def normalize(field)
|
|
208
|
-
case field
|
|
209
|
-
when "true" then true
|
|
210
|
-
when "false" then false
|
|
211
|
-
when "" then nil
|
|
212
|
-
when "null" then nil
|
|
213
|
-
else field
|
|
214
|
-
end
|
|
215
|
-
end
|
|
216
|
-
|
|
217
206
|
def split_authorization(authorization)
|
|
218
207
|
order_id, trans_ref_number = authorization.split(';')
|
|
219
208
|
[order_id, trans_ref_number]
|
|
@@ -100,7 +100,7 @@ module ActiveMerchant #:nodoc:
|
|
|
100
100
|
#
|
|
101
101
|
#
|
|
102
102
|
def credit(money, identification, options = {})
|
|
103
|
-
deprecated CREDIT_DEPRECATION_MESSAGE
|
|
103
|
+
ActiveMerchant.deprecated CREDIT_DEPRECATION_MESSAGE
|
|
104
104
|
refund(money, identification, options = {})
|
|
105
105
|
end
|
|
106
106
|
|
|
@@ -69,7 +69,7 @@ module ActiveMerchant #:nodoc:
|
|
|
69
69
|
end
|
|
70
70
|
|
|
71
71
|
def credit(money, identification, options = {})
|
|
72
|
-
deprecated CREDIT_DEPRECATION_MESSAGE
|
|
72
|
+
ActiveMerchant.deprecated CREDIT_DEPRECATION_MESSAGE
|
|
73
73
|
refund(money, identification, options)
|
|
74
74
|
end
|
|
75
75
|
|
|
@@ -241,7 +241,7 @@ module ActiveMerchant #:nodoc:
|
|
|
241
241
|
parse_element(reply, node)
|
|
242
242
|
end
|
|
243
243
|
end
|
|
244
|
-
rescue Exception
|
|
244
|
+
rescue Exception
|
|
245
245
|
reply[:request_status] = 'Failure'
|
|
246
246
|
reply[:request_message] = "Failure: There was a problem parsing the response XML"
|
|
247
247
|
end
|