activemerchant 1.42.6 → 1.90.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +5 -13
- data/CHANGELOG +1420 -2
- data/CONTRIBUTORS +106 -0
- data/README.md +107 -103
- data/lib/active_merchant/billing/apple_pay_payment_token.rb +22 -0
- data/lib/active_merchant/billing/avs_result.rb +12 -13
- data/lib/active_merchant/billing/base.rb +13 -16
- data/lib/active_merchant/billing/check.rb +35 -24
- data/lib/active_merchant/billing/compatibility.rb +117 -0
- data/lib/active_merchant/billing/credit_card.rb +196 -81
- data/lib/active_merchant/billing/credit_card_formatting.rb +6 -4
- data/lib/active_merchant/billing/credit_card_methods.rb +199 -75
- data/lib/active_merchant/billing/cvv_result.rb +15 -15
- data/lib/active_merchant/billing/gateway.rb +171 -39
- data/lib/active_merchant/billing/gateways/adyen.rb +380 -0
- data/lib/active_merchant/billing/gateways/allied_wallet.rb +205 -0
- data/lib/active_merchant/billing/gateways/authorize_net.rb +933 -604
- data/lib/active_merchant/billing/gateways/authorize_net_arb.rb +417 -0
- data/lib/active_merchant/billing/gateways/authorize_net_cim.rb +74 -54
- data/lib/active_merchant/billing/gateways/axcessms.rb +181 -0
- data/lib/active_merchant/billing/gateways/balanced.rb +130 -370
- data/lib/active_merchant/billing/gateways/bank_frick.rb +225 -0
- data/lib/active_merchant/billing/gateways/banwire.rb +23 -12
- data/lib/active_merchant/billing/gateways/barclaycard_smartpay.rb +351 -0
- data/lib/active_merchant/billing/gateways/barclays_epdq_extra_plus.rb +6 -6
- data/lib/active_merchant/billing/gateways/be2bill.rb +2 -2
- data/lib/active_merchant/billing/gateways/beanstream/beanstream_core.rb +109 -32
- data/lib/active_merchant/billing/gateways/beanstream.rb +59 -13
- data/lib/active_merchant/billing/gateways/beanstream_interac.rb +12 -9
- data/lib/active_merchant/billing/gateways/blue_pay.rb +520 -498
- data/lib/active_merchant/billing/gateways/blue_snap.rb +347 -0
- data/lib/active_merchant/billing/gateways/bogus.rb +80 -46
- data/lib/active_merchant/billing/gateways/borgun.rb +220 -0
- data/lib/active_merchant/billing/gateways/bpoint.rb +277 -0
- data/lib/active_merchant/billing/gateways/braintree/braintree_common.rb +15 -2
- data/lib/active_merchant/billing/gateways/braintree.rb +2 -2
- data/lib/active_merchant/billing/gateways/braintree_blue.rb +311 -121
- data/lib/active_merchant/billing/gateways/braintree_orange.rb +4 -4
- data/lib/active_merchant/billing/gateways/bridge_pay.rb +244 -0
- data/lib/active_merchant/billing/gateways/cams.rb +230 -0
- data/lib/active_merchant/billing/gateways/card_connect.rb +311 -0
- data/lib/active_merchant/billing/gateways/card_save.rb +6 -7
- data/lib/active_merchant/billing/gateways/card_stream.rb +235 -89
- data/lib/active_merchant/billing/gateways/cardknox.rb +327 -0
- data/lib/active_merchant/billing/gateways/cardprocess.rb +254 -0
- data/lib/active_merchant/billing/gateways/cashnet.rb +219 -0
- data/lib/active_merchant/billing/gateways/cc5.rb +50 -8
- data/lib/active_merchant/billing/gateways/cecabank.rb +27 -14
- data/lib/active_merchant/billing/gateways/cenpos.rb +327 -0
- data/lib/active_merchant/billing/gateways/checkout.rb +214 -0
- data/lib/active_merchant/billing/gateways/checkout_v2.rb +233 -0
- data/lib/active_merchant/billing/gateways/citrus_pay.rb +22 -0
- data/lib/active_merchant/billing/gateways/clearhaus.rb +220 -0
- data/lib/active_merchant/billing/gateways/commercegate.rb +142 -0
- data/lib/active_merchant/billing/gateways/conekta.rb +91 -97
- data/lib/active_merchant/billing/gateways/creditcall.rb +271 -0
- data/lib/active_merchant/billing/gateways/credorax.rb +356 -0
- data/lib/active_merchant/billing/gateways/ct_payment.rb +268 -0
- data/lib/active_merchant/billing/gateways/culqi.rb +277 -0
- data/lib/active_merchant/billing/gateways/cyber_source.rb +294 -158
- data/lib/active_merchant/billing/gateways/d_local.rb +226 -0
- data/lib/active_merchant/billing/gateways/data_cash.rb +59 -347
- data/lib/active_merchant/billing/gateways/dibs.rb +199 -0
- data/lib/active_merchant/billing/gateways/digitzs.rb +292 -0
- data/lib/active_merchant/billing/gateways/ebanx.rb +296 -0
- data/lib/active_merchant/billing/gateways/efsnet.rb +24 -39
- data/lib/active_merchant/billing/gateways/elavon.rb +146 -147
- data/lib/active_merchant/billing/gateways/element.rb +356 -0
- data/lib/active_merchant/billing/gateways/epay.rb +41 -31
- data/lib/active_merchant/billing/gateways/evo_ca.rb +1 -1
- data/lib/active_merchant/billing/gateways/eway.rb +79 -78
- data/lib/active_merchant/billing/gateways/eway_managed.rb +35 -36
- data/lib/active_merchant/billing/gateways/eway_rapid.rb +369 -228
- data/lib/active_merchant/billing/gateways/exact.rb +32 -26
- data/lib/active_merchant/billing/gateways/ezic.rb +195 -0
- data/lib/active_merchant/billing/gateways/fat_zebra.rb +90 -64
- data/lib/active_merchant/billing/gateways/federated_canada.rb +6 -14
- data/lib/active_merchant/billing/gateways/finansbank.rb +3 -3
- data/lib/active_merchant/billing/gateways/first_giving.rb +142 -0
- data/lib/active_merchant/billing/gateways/first_pay.rb +128 -122
- data/lib/active_merchant/billing/gateways/firstdata_e4.rb +190 -64
- data/lib/active_merchant/billing/gateways/firstdata_e4_v27.rb +446 -0
- data/lib/active_merchant/billing/gateways/flo2cash.rb +215 -0
- data/lib/active_merchant/billing/gateways/flo2cash_simple.rb +20 -0
- data/lib/active_merchant/billing/gateways/forte.rb +270 -0
- data/lib/active_merchant/billing/gateways/garanti.rb +29 -27
- data/lib/active_merchant/billing/gateways/global_collect.rb +340 -0
- data/lib/active_merchant/billing/gateways/global_transport.rb +194 -0
- data/lib/active_merchant/billing/gateways/hdfc.rb +35 -36
- data/lib/active_merchant/billing/gateways/hps.rb +305 -0
- data/lib/active_merchant/billing/gateways/iats_payments.rb +271 -16
- data/lib/active_merchant/billing/gateways/in_context_paypal_express.rb +15 -0
- data/lib/active_merchant/billing/gateways/inspire.rb +29 -32
- data/lib/active_merchant/billing/gateways/instapay.rb +5 -6
- data/lib/active_merchant/billing/gateways/ipp.rb +175 -0
- data/lib/active_merchant/billing/gateways/iridium.rb +247 -41
- data/lib/active_merchant/billing/gateways/itransact.rb +4 -5
- data/lib/active_merchant/billing/gateways/iveri.rb +251 -0
- data/lib/active_merchant/billing/gateways/jetpay.rb +198 -71
- data/lib/active_merchant/billing/gateways/jetpay_v2.rb +437 -0
- data/lib/active_merchant/billing/gateways/komoju.rb +115 -0
- data/lib/active_merchant/billing/gateways/kushki.rb +219 -0
- data/lib/active_merchant/billing/gateways/latitude19.rb +411 -0
- data/lib/active_merchant/billing/gateways/linkpoint.rb +45 -43
- data/lib/active_merchant/billing/gateways/litle.rb +328 -444
- data/lib/active_merchant/billing/gateways/mastercard.rb +267 -0
- data/lib/active_merchant/billing/gateways/maxipago.rb +145 -115
- data/lib/active_merchant/billing/gateways/mercado_pago.rb +277 -0
- data/lib/active_merchant/billing/gateways/merchant_e_solutions.rb +37 -19
- data/lib/active_merchant/billing/gateways/merchant_one.rb +13 -15
- data/lib/active_merchant/billing/gateways/merchant_partners.rb +245 -0
- data/lib/active_merchant/billing/gateways/merchant_ware.rb +57 -60
- data/lib/active_merchant/billing/gateways/merchant_ware_version_four.rb +59 -48
- data/lib/active_merchant/billing/gateways/merchant_warrior.rb +38 -19
- data/lib/active_merchant/billing/gateways/mercury.rb +77 -54
- data/lib/active_merchant/billing/gateways/metrics_global.rb +11 -30
- data/lib/active_merchant/billing/gateways/micropayment.rb +183 -0
- data/lib/active_merchant/billing/gateways/migs.rb +81 -22
- data/lib/active_merchant/billing/gateways/modern_payments.rb +3 -3
- data/lib/active_merchant/billing/gateways/modern_payments_cim.rb +23 -25
- data/lib/active_merchant/billing/gateways/monei.rb +307 -0
- data/lib/active_merchant/billing/gateways/moneris.rb +146 -64
- data/lib/active_merchant/billing/gateways/moneris_us.rb +197 -53
- data/lib/active_merchant/billing/gateways/money_movers.rb +6 -15
- data/lib/active_merchant/billing/gateways/mundipagg.rb +292 -0
- data/lib/active_merchant/billing/gateways/nab_transact.rb +86 -64
- data/lib/active_merchant/billing/gateways/ncr_secure_pay.rb +165 -0
- data/lib/active_merchant/billing/gateways/net_registry.rb +11 -5
- data/lib/active_merchant/billing/gateways/netaxept.rb +21 -22
- data/lib/active_merchant/billing/gateways/netbanx.rb +290 -0
- data/lib/active_merchant/billing/gateways/netbilling.rb +70 -35
- data/lib/active_merchant/billing/gateways/netpay.rb +5 -6
- data/lib/active_merchant/billing/gateways/network_merchants.rb +241 -0
- data/lib/active_merchant/billing/gateways/nmi.rb +274 -10
- data/lib/active_merchant/billing/gateways/ogone.rb +90 -47
- data/lib/active_merchant/billing/gateways/omise.rb +324 -0
- data/lib/active_merchant/billing/gateways/openpay.rb +48 -20
- data/lib/active_merchant/billing/gateways/opp.rb +369 -0
- data/lib/active_merchant/billing/gateways/optimal_payment.rb +79 -44
- data/lib/active_merchant/billing/gateways/orbital/orbital_soft_descriptors.rb +22 -21
- data/lib/active_merchant/billing/gateways/orbital.rb +346 -102
- data/lib/active_merchant/billing/gateways/pac_net_raven.rb +48 -29
- data/lib/active_merchant/billing/gateways/pagarme.rb +246 -0
- data/lib/active_merchant/billing/gateways/pago_facil.rb +122 -0
- data/lib/active_merchant/billing/gateways/pay_conex.rb +245 -0
- data/lib/active_merchant/billing/gateways/pay_gate_xml.rb +67 -48
- data/lib/active_merchant/billing/gateways/pay_hub.rb +213 -0
- data/lib/active_merchant/billing/gateways/pay_junction.rb +20 -26
- data/lib/active_merchant/billing/gateways/pay_junction_v2.rb +188 -0
- data/lib/active_merchant/billing/gateways/pay_secure.rb +7 -15
- data/lib/active_merchant/billing/gateways/paybox_direct.rb +40 -36
- data/lib/active_merchant/billing/gateways/payeezy.rb +410 -0
- data/lib/active_merchant/billing/gateways/payex.rb +38 -30
- data/lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb +62 -36
- data/lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb +11 -7
- data/lib/active_merchant/billing/gateways/payflow/payflow_response.rb +3 -3
- data/lib/active_merchant/billing/gateways/payflow.rb +74 -27
- data/lib/active_merchant/billing/gateways/payflow_express.rb +77 -81
- data/lib/active_merchant/billing/gateways/payflow_express_uk.rb +2 -3
- data/lib/active_merchant/billing/gateways/payflow_uk.rb +5 -6
- data/lib/active_merchant/billing/gateways/payment_express.rb +54 -45
- data/lib/active_merchant/billing/gateways/paymentez.rb +304 -0
- data/lib/active_merchant/billing/gateways/paymill.rb +160 -66
- data/lib/active_merchant/billing/gateways/paypal/paypal_common_api.rb +54 -7
- data/lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb +4 -0
- data/lib/active_merchant/billing/gateways/paypal/paypal_recurring_api.rb +17 -3
- data/lib/active_merchant/billing/gateways/paypal.rb +36 -27
- data/lib/active_merchant/billing/gateways/paypal_ca.rb +1 -1
- data/lib/active_merchant/billing/gateways/paypal_digital_goods.rb +7 -6
- data/lib/active_merchant/billing/gateways/paypal_express.rb +32 -4
- data/lib/active_merchant/billing/gateways/paypal_express_common.rb +3 -3
- data/lib/active_merchant/billing/gateways/payscout.rb +2 -13
- data/lib/active_merchant/billing/gateways/paystation.rb +96 -88
- data/lib/active_merchant/billing/gateways/payu_in.rb +248 -0
- data/lib/active_merchant/billing/gateways/payu_latam.rb +445 -0
- data/lib/active_merchant/billing/gateways/payway.rb +8 -8
- data/lib/active_merchant/billing/gateways/pin.rb +74 -18
- data/lib/active_merchant/billing/gateways/plugnpay.rb +66 -76
- data/lib/active_merchant/billing/gateways/pro_pay.rb +326 -0
- data/lib/active_merchant/billing/gateways/psigate.rb +30 -30
- data/lib/active_merchant/billing/gateways/psl_card.rb +27 -34
- data/lib/active_merchant/billing/gateways/qbms.rb +65 -54
- data/lib/active_merchant/billing/gateways/quantum.rb +18 -18
- data/lib/active_merchant/billing/gateways/quickbooks.rb +290 -0
- data/lib/active_merchant/billing/gateways/quickpay/quickpay_common.rb +184 -0
- data/lib/active_merchant/billing/gateways/quickpay/quickpay_v10.rb +295 -0
- data/lib/active_merchant/billing/gateways/quickpay/quickpay_v4to7.rb +226 -0
- data/lib/active_merchant/billing/gateways/quickpay.rb +10 -350
- data/lib/active_merchant/billing/gateways/qvalent.rb +236 -0
- data/lib/active_merchant/billing/gateways/realex.rb +78 -48
- data/lib/active_merchant/billing/gateways/redsys.rb +310 -170
- data/lib/active_merchant/billing/gateways/s5.rb +246 -0
- data/lib/active_merchant/billing/gateways/safe_charge.rb +262 -0
- data/lib/active_merchant/billing/gateways/sage.rb +415 -119
- data/lib/active_merchant/billing/gateways/sage_pay.rb +195 -90
- data/lib/active_merchant/billing/gateways/sallie_mae.rb +11 -12
- data/lib/active_merchant/billing/gateways/secure_net.rb +51 -43
- data/lib/active_merchant/billing/gateways/secure_pay.rb +182 -10
- data/lib/active_merchant/billing/gateways/secure_pay_au.rb +25 -14
- data/lib/active_merchant/billing/gateways/secure_pay_tech.rb +10 -18
- data/lib/active_merchant/billing/gateways/securion_pay.rb +264 -0
- data/lib/active_merchant/billing/gateways/skip_jack.rb +35 -38
- data/lib/active_merchant/billing/gateways/smart_ps.rb +50 -42
- data/lib/active_merchant/billing/gateways/so_easy_pay.rb +9 -9
- data/lib/active_merchant/billing/gateways/spreedly_core.rb +62 -12
- data/lib/active_merchant/billing/gateways/stripe.rb +536 -103
- data/lib/active_merchant/billing/gateways/swipe_checkout.rb +12 -18
- data/lib/active_merchant/billing/gateways/telr.rb +274 -0
- data/lib/active_merchant/billing/gateways/tns.rb +22 -0
- data/lib/active_merchant/billing/gateways/trans_first.rb +143 -30
- data/lib/active_merchant/billing/gateways/trans_first_transaction_express.rb +608 -0
- data/lib/active_merchant/billing/gateways/transact_pro.rb +224 -0
- data/lib/active_merchant/billing/gateways/transax.rb +5 -6
- data/lib/active_merchant/billing/gateways/transnational.rb +2 -232
- data/lib/active_merchant/billing/gateways/trexle.rb +218 -0
- data/lib/active_merchant/billing/gateways/trust_commerce.rb +86 -57
- data/lib/active_merchant/billing/gateways/usa_epay.rb +4 -4
- data/lib/active_merchant/billing/gateways/usa_epay_advanced.rb +196 -89
- data/lib/active_merchant/billing/gateways/usa_epay_transaction.rb +157 -32
- data/lib/active_merchant/billing/gateways/vanco.rb +294 -0
- data/lib/active_merchant/billing/gateways/verifi.rb +42 -49
- data/lib/active_merchant/billing/gateways/viaklix.rb +11 -24
- data/lib/active_merchant/billing/gateways/visanet_peru.rb +233 -0
- data/lib/active_merchant/billing/gateways/webpay.rb +26 -28
- data/lib/active_merchant/billing/gateways/wepay.rb +237 -0
- data/lib/active_merchant/billing/gateways/wirecard.rb +153 -31
- data/lib/active_merchant/billing/gateways/world_net.rb +344 -0
- data/lib/active_merchant/billing/gateways/worldpay.rb +207 -63
- data/lib/active_merchant/billing/gateways/worldpay_online_payments.rb +215 -0
- data/lib/active_merchant/billing/gateways/worldpay_us.rb +221 -0
- data/lib/active_merchant/billing/gateways.rb +8 -11
- data/lib/active_merchant/billing/model.rb +30 -0
- data/lib/active_merchant/billing/network_tokenization_credit_card.rb +39 -0
- data/lib/active_merchant/billing/payment_token.rb +21 -0
- data/lib/active_merchant/billing/rails.rb +3 -0
- data/lib/active_merchant/billing/response.rb +31 -24
- data/lib/active_merchant/billing.rb +7 -1
- data/lib/active_merchant/connection.rb +195 -0
- data/lib/active_merchant/country.rb +335 -0
- data/lib/active_merchant/empty.rb +20 -0
- data/lib/active_merchant/errors.rb +35 -0
- data/lib/active_merchant/net_http_ssl_connection.rb +10 -0
- data/lib/active_merchant/network_connection_retries.rb +80 -0
- data/lib/active_merchant/post_data.rb +25 -0
- data/lib/active_merchant/posts_data.rb +92 -0
- data/lib/active_merchant/version.rb +1 -1
- data/lib/active_merchant.rb +23 -27
- data/lib/activemerchant.rb +1 -1
- data/lib/certs/cacert.pem +3988 -0
- data/lib/support/gateway_support.rb +7 -9
- data/lib/support/outbound_hosts.rb +13 -10
- data/lib/support/ssl_verify.rb +6 -7
- data/lib/support/ssl_version.rb +87 -0
- metadata +148 -323
- checksums.yaml.gz.sig +0 -0
- data/gem-public_cert.pem +0 -21
- data/lib/active_merchant/billing/expiry_date.rb +0 -34
- data/lib/active_merchant/billing/gateways/app55.rb +0 -185
- data/lib/active_merchant/billing/gateways/barclays_epdq.rb +0 -314
- data/lib/active_merchant/billing/gateways/certo_direct.rb +0 -277
- data/lib/active_merchant/billing/gateways/ideal/ideal_base.rb +0 -249
- data/lib/active_merchant/billing/gateways/ideal/ideal_rabobank.pem +0 -13
- data/lib/active_merchant/billing/gateways/ideal/ideal_response.rb +0 -29
- data/lib/active_merchant/billing/gateways/ideal_rabobank.rb +0 -66
- data/lib/active_merchant/billing/gateways/orbital/avs_result.rb +0 -93
- data/lib/active_merchant/billing/gateways/orbital/cvv_result.rb +0 -34
- data/lib/active_merchant/billing/gateways/sage/sage_bankcard.rb +0 -93
- data/lib/active_merchant/billing/gateways/sage/sage_core.rb +0 -114
- data/lib/active_merchant/billing/gateways/sage/sage_virtual_check.rb +0 -102
- data/lib/active_merchant/billing/gateways/samurai.rb +0 -118
- data/lib/active_merchant/billing/gateways/vindicia.rb +0 -361
- data/lib/active_merchant/billing/integrations/a1agregator/helper.rb +0 -31
- data/lib/active_merchant/billing/integrations/a1agregator/notification.rb +0 -186
- data/lib/active_merchant/billing/integrations/a1agregator/status.rb +0 -38
- data/lib/active_merchant/billing/integrations/a1agregator.rb +0 -26
- data/lib/active_merchant/billing/integrations/action_view_helper.rb +0 -74
- data/lib/active_merchant/billing/integrations/alipay/helper.rb +0 -34
- data/lib/active_merchant/billing/integrations/alipay/notification.rb +0 -101
- data/lib/active_merchant/billing/integrations/alipay.rb +0 -18
- data/lib/active_merchant/billing/integrations/authorize_net_sim/helper.rb +0 -229
- data/lib/active_merchant/billing/integrations/authorize_net_sim/notification.rb +0 -340
- data/lib/active_merchant/billing/integrations/authorize_net_sim.rb +0 -38
- data/lib/active_merchant/billing/integrations/bit_pay/helper.rb +0 -64
- data/lib/active_merchant/billing/integrations/bit_pay/notification.rb +0 -74
- data/lib/active_merchant/billing/integrations/bit_pay/return.rb +0 -10
- data/lib/active_merchant/billing/integrations/bit_pay.rb +0 -30
- data/lib/active_merchant/billing/integrations/bogus/helper.rb +0 -17
- data/lib/active_merchant/billing/integrations/bogus/notification.rb +0 -11
- data/lib/active_merchant/billing/integrations/bogus/return.rb +0 -10
- data/lib/active_merchant/billing/integrations/bogus.rb +0 -23
- data/lib/active_merchant/billing/integrations/chronopay/helper.rb +0 -120
- data/lib/active_merchant/billing/integrations/chronopay/notification.rb +0 -158
- data/lib/active_merchant/billing/integrations/chronopay/return.rb +0 -10
- data/lib/active_merchant/billing/integrations/chronopay.rb +0 -23
- data/lib/active_merchant/billing/integrations/citrus/helper.rb +0 -40
- data/lib/active_merchant/billing/integrations/citrus/notification.rb +0 -133
- data/lib/active_merchant/billing/integrations/citrus/return.rb +0 -40
- data/lib/active_merchant/billing/integrations/citrus.rb +0 -51
- data/lib/active_merchant/billing/integrations/direc_pay/helper.rb +0 -200
- data/lib/active_merchant/billing/integrations/direc_pay/notification.rb +0 -76
- data/lib/active_merchant/billing/integrations/direc_pay/return.rb +0 -32
- data/lib/active_merchant/billing/integrations/direc_pay/status.rb +0 -37
- data/lib/active_merchant/billing/integrations/direc_pay.rb +0 -41
- data/lib/active_merchant/billing/integrations/directebanking/helper.rb +0 -90
- data/lib/active_merchant/billing/integrations/directebanking/notification.rb +0 -120
- data/lib/active_merchant/billing/integrations/directebanking/return.rb +0 -11
- data/lib/active_merchant/billing/integrations/directebanking.rb +0 -47
- data/lib/active_merchant/billing/integrations/doku/helper.rb +0 -102
- data/lib/active_merchant/billing/integrations/doku/notification.rb +0 -69
- data/lib/active_merchant/billing/integrations/doku/return.rb +0 -10
- data/lib/active_merchant/billing/integrations/doku.rb +0 -24
- data/lib/active_merchant/billing/integrations/dotpay/helper.rb +0 -77
- data/lib/active_merchant/billing/integrations/dotpay/notification.rb +0 -86
- data/lib/active_merchant/billing/integrations/dotpay/return.rb +0 -11
- data/lib/active_merchant/billing/integrations/dotpay.rb +0 -22
- data/lib/active_merchant/billing/integrations/dwolla/common.rb +0 -23
- data/lib/active_merchant/billing/integrations/dwolla/helper.rb +0 -43
- data/lib/active_merchant/billing/integrations/dwolla/notification.rb +0 -64
- data/lib/active_merchant/billing/integrations/dwolla/return.rb +0 -49
- data/lib/active_merchant/billing/integrations/dwolla.rb +0 -23
- data/lib/active_merchant/billing/integrations/e_payment_plans/helper.rb +0 -34
- data/lib/active_merchant/billing/integrations/e_payment_plans/notification.rb +0 -84
- data/lib/active_merchant/billing/integrations/e_payment_plans.rb +0 -48
- data/lib/active_merchant/billing/integrations/easy_pay/common.rb +0 -40
- data/lib/active_merchant/billing/integrations/easy_pay/helper.rb +0 -36
- data/lib/active_merchant/billing/integrations/easy_pay/notification.rb +0 -59
- data/lib/active_merchant/billing/integrations/easy_pay.rb +0 -30
- data/lib/active_merchant/billing/integrations/epay/helper.rb +0 -55
- data/lib/active_merchant/billing/integrations/epay/notification.rb +0 -110
- data/lib/active_merchant/billing/integrations/epay.rb +0 -21
- data/lib/active_merchant/billing/integrations/first_data/helper.rb +0 -61
- data/lib/active_merchant/billing/integrations/first_data/notification.rb +0 -56
- data/lib/active_merchant/billing/integrations/first_data.rb +0 -38
- data/lib/active_merchant/billing/integrations/gestpay/common.rb +0 -42
- data/lib/active_merchant/billing/integrations/gestpay/helper.rb +0 -70
- data/lib/active_merchant/billing/integrations/gestpay/notification.rb +0 -85
- data/lib/active_merchant/billing/integrations/gestpay/return.rb +0 -10
- data/lib/active_merchant/billing/integrations/gestpay.rb +0 -25
- data/lib/active_merchant/billing/integrations/helper.rb +0 -117
- data/lib/active_merchant/billing/integrations/hi_trust/helper.rb +0 -58
- data/lib/active_merchant/billing/integrations/hi_trust/notification.rb +0 -59
- data/lib/active_merchant/billing/integrations/hi_trust/return.rb +0 -68
- data/lib/active_merchant/billing/integrations/hi_trust.rb +0 -27
- data/lib/active_merchant/billing/integrations/ipay88/helper.rb +0 -118
- data/lib/active_merchant/billing/integrations/ipay88/notification.rb +0 -103
- data/lib/active_merchant/billing/integrations/ipay88/return.rb +0 -29
- data/lib/active_merchant/billing/integrations/ipay88.rb +0 -23
- data/lib/active_merchant/billing/integrations/liqpay/helper.rb +0 -43
- data/lib/active_merchant/billing/integrations/liqpay/notification.rb +0 -89
- data/lib/active_merchant/billing/integrations/liqpay/return.rb +0 -83
- data/lib/active_merchant/billing/integrations/liqpay.rb +0 -30
- data/lib/active_merchant/billing/integrations/maksuturva/helper.rb +0 -119
- data/lib/active_merchant/billing/integrations/maksuturva/notification.rb +0 -48
- data/lib/active_merchant/billing/integrations/maksuturva.rb +0 -86
- data/lib/active_merchant/billing/integrations/moneybookers/helper.rb +0 -75
- data/lib/active_merchant/billing/integrations/moneybookers/notification.rb +0 -123
- data/lib/active_merchant/billing/integrations/moneybookers.rb +0 -26
- data/lib/active_merchant/billing/integrations/nochex/helper.rb +0 -68
- data/lib/active_merchant/billing/integrations/nochex/notification.rb +0 -94
- data/lib/active_merchant/billing/integrations/nochex/return.rb +0 -10
- data/lib/active_merchant/billing/integrations/nochex.rb +0 -88
- data/lib/active_merchant/billing/integrations/notification.rb +0 -71
- data/lib/active_merchant/billing/integrations/paxum/common.rb +0 -24
- data/lib/active_merchant/billing/integrations/paxum/helper.rb +0 -42
- data/lib/active_merchant/billing/integrations/paxum/notification.rb +0 -33
- data/lib/active_merchant/billing/integrations/paxum.rb +0 -44
- data/lib/active_merchant/billing/integrations/pay_fast/common.rb +0 -42
- data/lib/active_merchant/billing/integrations/pay_fast/helper.rb +0 -50
- data/lib/active_merchant/billing/integrations/pay_fast/notification.rb +0 -134
- data/lib/active_merchant/billing/integrations/pay_fast/return.rb +0 -10
- data/lib/active_merchant/billing/integrations/pay_fast.rb +0 -70
- data/lib/active_merchant/billing/integrations/paydollar/helper.rb +0 -41
- data/lib/active_merchant/billing/integrations/paydollar/notification.rb +0 -60
- data/lib/active_merchant/billing/integrations/paydollar/return.rb +0 -15
- data/lib/active_merchant/billing/integrations/paydollar.rb +0 -59
- data/lib/active_merchant/billing/integrations/payflow_link/helper.rb +0 -116
- data/lib/active_merchant/billing/integrations/payflow_link/notification.rb +0 -78
- data/lib/active_merchant/billing/integrations/payflow_link.rb +0 -21
- data/lib/active_merchant/billing/integrations/paypal/helper.rb +0 -119
- data/lib/active_merchant/billing/integrations/paypal/notification.rb +0 -227
- data/lib/active_merchant/billing/integrations/paypal/return.rb +0 -10
- data/lib/active_merchant/billing/integrations/paypal.rb +0 -39
- data/lib/active_merchant/billing/integrations/paypal_payments_advanced/helper.rb +0 -15
- data/lib/active_merchant/billing/integrations/paypal_payments_advanced.rb +0 -20
- data/lib/active_merchant/billing/integrations/paysbuy/helper.rb +0 -15
- data/lib/active_merchant/billing/integrations/paysbuy/notification.rb +0 -39
- data/lib/active_merchant/billing/integrations/paysbuy.rb +0 -36
- data/lib/active_merchant/billing/integrations/payu_in/helper.rb +0 -76
- data/lib/active_merchant/billing/integrations/payu_in/notification.rb +0 -154
- data/lib/active_merchant/billing/integrations/payu_in/return.rb +0 -36
- data/lib/active_merchant/billing/integrations/payu_in.rb +0 -36
- data/lib/active_merchant/billing/integrations/payu_in_paisa/helper.rb +0 -19
- data/lib/active_merchant/billing/integrations/payu_in_paisa/notification.rb +0 -13
- data/lib/active_merchant/billing/integrations/payu_in_paisa/return.rb +0 -16
- data/lib/active_merchant/billing/integrations/payu_in_paisa.rb +0 -30
- data/lib/active_merchant/billing/integrations/platron/helper.rb +0 -32
- data/lib/active_merchant/billing/integrations/platron/notification.rb +0 -113
- data/lib/active_merchant/billing/integrations/platron.rb +0 -28
- data/lib/active_merchant/billing/integrations/pxpay/helper.rb +0 -112
- data/lib/active_merchant/billing/integrations/pxpay/notification.rb +0 -157
- data/lib/active_merchant/billing/integrations/pxpay/return.rb +0 -25
- data/lib/active_merchant/billing/integrations/pxpay.rb +0 -31
- data/lib/active_merchant/billing/integrations/quickpay/helper.rb +0 -96
- data/lib/active_merchant/billing/integrations/quickpay/notification.rb +0 -137
- data/lib/active_merchant/billing/integrations/quickpay.rb +0 -21
- data/lib/active_merchant/billing/integrations/rbkmoney/helper.rb +0 -23
- data/lib/active_merchant/billing/integrations/rbkmoney/notification.rb +0 -91
- data/lib/active_merchant/billing/integrations/rbkmoney.rb +0 -17
- data/lib/active_merchant/billing/integrations/return.rb +0 -42
- data/lib/active_merchant/billing/integrations/robokassa/common.rb +0 -19
- data/lib/active_merchant/billing/integrations/robokassa/helper.rb +0 -50
- data/lib/active_merchant/billing/integrations/robokassa/notification.rb +0 -55
- data/lib/active_merchant/billing/integrations/robokassa/return.rb +0 -17
- data/lib/active_merchant/billing/integrations/robokassa.rb +0 -49
- data/lib/active_merchant/billing/integrations/sage_pay_form/encryption.rb +0 -33
- data/lib/active_merchant/billing/integrations/sage_pay_form/helper.rb +0 -136
- data/lib/active_merchant/billing/integrations/sage_pay_form/notification.rb +0 -210
- data/lib/active_merchant/billing/integrations/sage_pay_form/return.rb +0 -31
- data/lib/active_merchant/billing/integrations/sage_pay_form.rb +0 -37
- data/lib/active_merchant/billing/integrations/two_checkout/helper.rb +0 -107
- data/lib/active_merchant/billing/integrations/two_checkout/notification.rb +0 -171
- data/lib/active_merchant/billing/integrations/two_checkout/return.rb +0 -58
- data/lib/active_merchant/billing/integrations/two_checkout.rb +0 -44
- data/lib/active_merchant/billing/integrations/valitor/helper.rb +0 -86
- data/lib/active_merchant/billing/integrations/valitor/notification.rb +0 -13
- data/lib/active_merchant/billing/integrations/valitor/response_fields.rb +0 -97
- data/lib/active_merchant/billing/integrations/valitor/return.rb +0 -13
- data/lib/active_merchant/billing/integrations/valitor.rb +0 -33
- data/lib/active_merchant/billing/integrations/verkkomaksut/helper.rb +0 -88
- data/lib/active_merchant/billing/integrations/verkkomaksut/notification.rb +0 -59
- data/lib/active_merchant/billing/integrations/verkkomaksut.rb +0 -20
- data/lib/active_merchant/billing/integrations/web_pay/common.rb +0 -50
- data/lib/active_merchant/billing/integrations/web_pay/helper.rb +0 -68
- data/lib/active_merchant/billing/integrations/web_pay/notification.rb +0 -51
- data/lib/active_merchant/billing/integrations/web_pay.rb +0 -45
- data/lib/active_merchant/billing/integrations/webmoney/common.rb +0 -17
- data/lib/active_merchant/billing/integrations/webmoney/helper.rb +0 -40
- data/lib/active_merchant/billing/integrations/webmoney/notification.rb +0 -47
- data/lib/active_merchant/billing/integrations/webmoney.rb +0 -43
- data/lib/active_merchant/billing/integrations/wirecard_checkout_page/common.rb +0 -104
- data/lib/active_merchant/billing/integrations/wirecard_checkout_page/helper.rb +0 -145
- data/lib/active_merchant/billing/integrations/wirecard_checkout_page/notification.rb +0 -101
- data/lib/active_merchant/billing/integrations/wirecard_checkout_page/return.rb +0 -35
- data/lib/active_merchant/billing/integrations/wirecard_checkout_page.rb +0 -39
- data/lib/active_merchant/billing/integrations/world_pay/helper.rb +0 -101
- data/lib/active_merchant/billing/integrations/world_pay/notification.rb +0 -160
- data/lib/active_merchant/billing/integrations/world_pay.rb +0 -34
- data/lib/active_merchant/billing/integrations.rb +0 -17
- data.tar.gz.sig +0 -0
- metadata.gz.sig +0 -1
|
@@ -1,76 +0,0 @@
|
|
|
1
|
-
module ActiveMerchant #:nodoc:
|
|
2
|
-
module Billing #:nodoc:
|
|
3
|
-
module Integrations #:nodoc:
|
|
4
|
-
module PayuIn
|
|
5
|
-
class Helper < ActiveMerchant::Billing::Integrations::Helper
|
|
6
|
-
|
|
7
|
-
CHECKSUM_FIELDS = [ 'txnid', 'amount', 'productinfo', 'firstname', 'email', 'udf1', 'udf2', 'udf3', 'udf4',
|
|
8
|
-
'udf5', 'udf6', 'udf7', 'udf8', 'udf9', 'udf10']
|
|
9
|
-
|
|
10
|
-
mapping :amount, 'amount'
|
|
11
|
-
mapping :account, 'key'
|
|
12
|
-
mapping :order, 'txnid'
|
|
13
|
-
mapping :description, 'productinfo'
|
|
14
|
-
|
|
15
|
-
mapping :customer, :first_name => 'firstname',
|
|
16
|
-
:last_name => 'lastname',
|
|
17
|
-
:email => 'email',
|
|
18
|
-
:phone => 'phone'
|
|
19
|
-
|
|
20
|
-
mapping :billing_address, :city => 'city',
|
|
21
|
-
:address1 => 'address1',
|
|
22
|
-
:address2 => 'address2',
|
|
23
|
-
:state => 'state',
|
|
24
|
-
:zip => 'zip',
|
|
25
|
-
:country => 'country'
|
|
26
|
-
|
|
27
|
-
# Which tab you want to be open default on PayU
|
|
28
|
-
# CC (CreditCard) or NB (NetBanking)
|
|
29
|
-
mapping :mode, 'pg'
|
|
30
|
-
|
|
31
|
-
mapping :notify_url, 'notify_url'
|
|
32
|
-
mapping :return_url, ['surl', 'furl']
|
|
33
|
-
mapping :cancel_return_url, 'curl'
|
|
34
|
-
mapping :checksum, 'hash'
|
|
35
|
-
|
|
36
|
-
mapping :user_defined, { :var1 => 'udf1',
|
|
37
|
-
:var2 => 'udf2',
|
|
38
|
-
:var3 => 'udf3',
|
|
39
|
-
:var4 => 'udf4',
|
|
40
|
-
:var5 => 'udf5',
|
|
41
|
-
:var6 => 'udf6',
|
|
42
|
-
:var7 => 'udf7',
|
|
43
|
-
:var8 => 'udf8',
|
|
44
|
-
:var9 => 'udf9',
|
|
45
|
-
:var10 => 'udf10'
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
def initialize(order, account, options = {})
|
|
49
|
-
super
|
|
50
|
-
@options = options
|
|
51
|
-
self.pg = 'CC'
|
|
52
|
-
end
|
|
53
|
-
|
|
54
|
-
def form_fields
|
|
55
|
-
sanitize_fields
|
|
56
|
-
@fields.merge(mappings[:checksum] => generate_checksum)
|
|
57
|
-
end
|
|
58
|
-
|
|
59
|
-
def generate_checksum
|
|
60
|
-
checksum_payload_items = CHECKSUM_FIELDS.map { |field| @fields[field] }
|
|
61
|
-
|
|
62
|
-
PayuIn.checksum(@fields["key"], @options[:credential2], checksum_payload_items )
|
|
63
|
-
end
|
|
64
|
-
|
|
65
|
-
def sanitize_fields
|
|
66
|
-
['address1', 'address2', 'city', 'state', 'country', 'productinfo', 'email', 'phone'].each do |field|
|
|
67
|
-
@fields[field].gsub!(/[^a-zA-Z0-9\-_@\/\s.]/, '') if @fields[field]
|
|
68
|
-
end
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
end
|
|
72
|
-
|
|
73
|
-
end
|
|
74
|
-
end
|
|
75
|
-
end
|
|
76
|
-
end
|
|
@@ -1,154 +0,0 @@
|
|
|
1
|
-
module ActiveMerchant #:nodoc:
|
|
2
|
-
module Billing #:nodoc:
|
|
3
|
-
module Integrations #:nodoc:
|
|
4
|
-
module PayuIn
|
|
5
|
-
class Notification < ActiveMerchant::Billing::Integrations::Notification
|
|
6
|
-
|
|
7
|
-
def initialize(post, options = {})
|
|
8
|
-
super(post, options)
|
|
9
|
-
@merchant_id = options[:credential1]
|
|
10
|
-
@secret_key = options[:credential2]
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
def complete?
|
|
14
|
-
status == "Completed"
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
def status
|
|
18
|
-
case transaction_status.downcase
|
|
19
|
-
when 'success' then 'Completed'
|
|
20
|
-
when 'failure' then 'Failed'
|
|
21
|
-
when 'pending' then 'Pending'
|
|
22
|
-
end
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
def invoice_ok?( order_id )
|
|
26
|
-
order_id.to_s == invoice.to_s
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
# Order amount should be equal to gross - discount
|
|
30
|
-
def amount_ok?( order_amount, order_discount = BigDecimal.new( '0.0' ) )
|
|
31
|
-
BigDecimal.new( gross ) == order_amount && BigDecimal.new( discount.to_s ) == order_discount
|
|
32
|
-
end
|
|
33
|
-
|
|
34
|
-
# Status of transaction return from the PayU. List of possible values:
|
|
35
|
-
# <tt>SUCCESS</tt>::
|
|
36
|
-
# <tt>PENDING</tt>::
|
|
37
|
-
# <tt>FAILURE</tt>::
|
|
38
|
-
def transaction_status
|
|
39
|
-
params['status']
|
|
40
|
-
end
|
|
41
|
-
|
|
42
|
-
# ID of this transaction (PayU.in number)
|
|
43
|
-
def transaction_id
|
|
44
|
-
params['mihpayid']
|
|
45
|
-
end
|
|
46
|
-
|
|
47
|
-
# Mode of Payment
|
|
48
|
-
#
|
|
49
|
-
# 'CC' for credit-card
|
|
50
|
-
# 'NB' for net-banking
|
|
51
|
-
# 'CD' for cheque or DD
|
|
52
|
-
# 'CO' for Cash Pickup
|
|
53
|
-
def type
|
|
54
|
-
params['mode']
|
|
55
|
-
end
|
|
56
|
-
|
|
57
|
-
# What currency have we been dealing with
|
|
58
|
-
def currency
|
|
59
|
-
'INR'
|
|
60
|
-
end
|
|
61
|
-
|
|
62
|
-
def item_id
|
|
63
|
-
params['txnid']
|
|
64
|
-
end
|
|
65
|
-
|
|
66
|
-
# This is the invoice which you passed to PayU.in
|
|
67
|
-
def invoice
|
|
68
|
-
params['txnid']
|
|
69
|
-
end
|
|
70
|
-
|
|
71
|
-
# Merchant Id provided by the PayU.in
|
|
72
|
-
def account
|
|
73
|
-
params['key']
|
|
74
|
-
end
|
|
75
|
-
|
|
76
|
-
# original amount send by merchant
|
|
77
|
-
def gross
|
|
78
|
-
params['amount']
|
|
79
|
-
end
|
|
80
|
-
|
|
81
|
-
# This is discount given to user - based on promotion set by merchants.
|
|
82
|
-
def discount
|
|
83
|
-
params['discount']
|
|
84
|
-
end
|
|
85
|
-
|
|
86
|
-
# Description offer for what PayU given the offer to user - based on promotion set by merchants.
|
|
87
|
-
def offer_description
|
|
88
|
-
params['offer']
|
|
89
|
-
end
|
|
90
|
-
|
|
91
|
-
# Information about the product as send by merchant
|
|
92
|
-
def product_info
|
|
93
|
-
params['productinfo']
|
|
94
|
-
end
|
|
95
|
-
|
|
96
|
-
# Email of the customer
|
|
97
|
-
def customer_email
|
|
98
|
-
params['email']
|
|
99
|
-
end
|
|
100
|
-
|
|
101
|
-
# Phone of the customer
|
|
102
|
-
def customer_phone
|
|
103
|
-
params['phone']
|
|
104
|
-
end
|
|
105
|
-
|
|
106
|
-
# Firstname of the customer
|
|
107
|
-
def customer_first_name
|
|
108
|
-
params['firstname']
|
|
109
|
-
end
|
|
110
|
-
|
|
111
|
-
# Lastname of the customer
|
|
112
|
-
def customer_last_name
|
|
113
|
-
params['lastname']
|
|
114
|
-
end
|
|
115
|
-
|
|
116
|
-
# Full address of the customer
|
|
117
|
-
def customer_address
|
|
118
|
-
{ :address1 => params['address1'], :address2 => params['address2'],
|
|
119
|
-
:city => params['city'], :state => params['state'],
|
|
120
|
-
:country => params['country'], :zipcode => params['zipcode'] }
|
|
121
|
-
end
|
|
122
|
-
|
|
123
|
-
def user_defined
|
|
124
|
-
@user_defined ||= 10.times.map { |i| params["udf#{i + 1}"] }
|
|
125
|
-
end
|
|
126
|
-
|
|
127
|
-
def checksum
|
|
128
|
-
params['hash']
|
|
129
|
-
end
|
|
130
|
-
|
|
131
|
-
def message
|
|
132
|
-
@message || params['error']
|
|
133
|
-
end
|
|
134
|
-
|
|
135
|
-
def acknowledge(authcode = nil)
|
|
136
|
-
checksum_ok?
|
|
137
|
-
end
|
|
138
|
-
|
|
139
|
-
def checksum_ok?
|
|
140
|
-
checksum_fields = [transaction_status, *user_defined.reverse, customer_email, customer_first_name, product_info, gross, invoice]
|
|
141
|
-
|
|
142
|
-
unless Digest::SHA512.hexdigest([@secret_key, *checksum_fields, @merchant_id].join("|")) == checksum
|
|
143
|
-
@message = 'Return checksum not matching the data provided'
|
|
144
|
-
return false
|
|
145
|
-
end
|
|
146
|
-
true
|
|
147
|
-
end
|
|
148
|
-
|
|
149
|
-
end
|
|
150
|
-
end
|
|
151
|
-
end
|
|
152
|
-
end
|
|
153
|
-
end
|
|
154
|
-
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
module ActiveMerchant #:nodoc:
|
|
2
|
-
module Billing #:nodoc:
|
|
3
|
-
module Integrations #:nodoc:
|
|
4
|
-
module PayuIn
|
|
5
|
-
class Return < ActiveMerchant::Billing::Integrations::Return
|
|
6
|
-
|
|
7
|
-
def initialize(query_string, options = {})
|
|
8
|
-
super
|
|
9
|
-
@notification = Notification.new(query_string, options)
|
|
10
|
-
end
|
|
11
|
-
|
|
12
|
-
def transaction_id
|
|
13
|
-
@notification.transaction_id
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
def status( order_id, order_amount )
|
|
17
|
-
if @notification.invoice_ok?( order_id ) && @notification.amount_ok?( BigDecimal.new(order_amount) )
|
|
18
|
-
@notification.status
|
|
19
|
-
else
|
|
20
|
-
'Mismatch'
|
|
21
|
-
end
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
def success?
|
|
25
|
-
status( @params['txnid'], @params['amount'] ) == 'Completed'
|
|
26
|
-
end
|
|
27
|
-
|
|
28
|
-
def message
|
|
29
|
-
@notification.message
|
|
30
|
-
end
|
|
31
|
-
|
|
32
|
-
end
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
end
|
|
36
|
-
end
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
require 'digest/sha2'
|
|
2
|
-
require 'bigdecimal'
|
|
3
|
-
|
|
4
|
-
module ActiveMerchant #:nodoc:
|
|
5
|
-
module Billing #:nodoc:
|
|
6
|
-
module Integrations #:nodoc:
|
|
7
|
-
module PayuIn
|
|
8
|
-
autoload :Return, 'active_merchant/billing/integrations/payu_in/return.rb'
|
|
9
|
-
autoload :Helper, 'active_merchant/billing/integrations/payu_in/helper.rb'
|
|
10
|
-
autoload :Notification, 'active_merchant/billing/integrations/payu_in/notification.rb'
|
|
11
|
-
|
|
12
|
-
mattr_accessor :test_url
|
|
13
|
-
mattr_accessor :production_url
|
|
14
|
-
|
|
15
|
-
self.test_url = 'https://test.payu.in/_payment.php'
|
|
16
|
-
self.production_url = 'https://secure.payu.in/_payment.php'
|
|
17
|
-
|
|
18
|
-
def self.service_url
|
|
19
|
-
ActiveMerchant::Billing::Base.integration_mode == :production ? self.production_url : self.test_url
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
def self.notification(post, options = {})
|
|
23
|
-
Notification.new(post, options)
|
|
24
|
-
end
|
|
25
|
-
|
|
26
|
-
def self.return(post, options = {})
|
|
27
|
-
Return.new(post, options)
|
|
28
|
-
end
|
|
29
|
-
|
|
30
|
-
def self.checksum(merchant_id, secret_key, payload_items )
|
|
31
|
-
Digest::SHA512.hexdigest([merchant_id, *payload_items, secret_key].join("|"))
|
|
32
|
-
end
|
|
33
|
-
end
|
|
34
|
-
end
|
|
35
|
-
end
|
|
36
|
-
end
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
module ActiveMerchant
|
|
2
|
-
module Billing
|
|
3
|
-
module Integrations
|
|
4
|
-
module PayuInPaisa
|
|
5
|
-
|
|
6
|
-
class Helper < PayuIn::Helper
|
|
7
|
-
mapping :service_provider, 'service_provider'
|
|
8
|
-
|
|
9
|
-
def initialize(order, account, options = {})
|
|
10
|
-
super
|
|
11
|
-
self.service_provider = 'payu_paisa'
|
|
12
|
-
self.user_defined = { :var2 => order }
|
|
13
|
-
end
|
|
14
|
-
end
|
|
15
|
-
|
|
16
|
-
end
|
|
17
|
-
end
|
|
18
|
-
end
|
|
19
|
-
end
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
module ActiveMerchant
|
|
2
|
-
module Billing
|
|
3
|
-
module Integrations
|
|
4
|
-
module PayuInPaisa
|
|
5
|
-
|
|
6
|
-
class Return < PayuIn::Return
|
|
7
|
-
def initialize(query_string, options = {})
|
|
8
|
-
super
|
|
9
|
-
@notification = Notification.new(query_string, options)
|
|
10
|
-
end
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
end
|
|
14
|
-
end
|
|
15
|
-
end
|
|
16
|
-
end
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
module ActiveMerchant
|
|
2
|
-
module Billing
|
|
3
|
-
module Integrations
|
|
4
|
-
module PayuInPaisa
|
|
5
|
-
|
|
6
|
-
autoload :Return, 'active_merchant/billing/integrations/payu_in_paisa/return.rb'
|
|
7
|
-
autoload :Helper, 'active_merchant/billing/integrations/payu_in_paisa/helper.rb'
|
|
8
|
-
autoload :Notification, 'active_merchant/billing/integrations/payu_in_paisa/notification.rb'
|
|
9
|
-
|
|
10
|
-
mattr_accessor :test_url
|
|
11
|
-
mattr_accessor :production_url
|
|
12
|
-
|
|
13
|
-
self.test_url = 'https://test.payu.in/_payment.php'
|
|
14
|
-
self.production_url = 'https://secure.payu.in/_payment.php'
|
|
15
|
-
|
|
16
|
-
def self.service_url
|
|
17
|
-
ActiveMerchant::Billing::Base.integration_mode == :production ? self.production_url : self.test_url
|
|
18
|
-
end
|
|
19
|
-
|
|
20
|
-
def self.notification(post, options = {})
|
|
21
|
-
Notification.new(post, options)
|
|
22
|
-
end
|
|
23
|
-
|
|
24
|
-
def self.return(post, options = {})
|
|
25
|
-
Return.new(post, options)
|
|
26
|
-
end
|
|
27
|
-
end
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
end
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
module ActiveMerchant #:nodoc:
|
|
2
|
-
module Billing #:nodoc:
|
|
3
|
-
module Integrations #:nodoc:
|
|
4
|
-
module Platron
|
|
5
|
-
class Helper < ActiveMerchant::Billing::Integrations::Helper
|
|
6
|
-
def initialize(order, account, options = {})
|
|
7
|
-
@secret_key = options.delete(:secret)
|
|
8
|
-
@path = options.delete(:path)
|
|
9
|
-
description = options.delete(:description)
|
|
10
|
-
super
|
|
11
|
-
self.add_field('pg_salt', rand(36**15).to_s(36))
|
|
12
|
-
self.add_field('pg_description', description)
|
|
13
|
-
end
|
|
14
|
-
|
|
15
|
-
def form_fields
|
|
16
|
-
@fields.merge('pg_sig' => Common.generate_signature(@fields, @path, @secret_key))
|
|
17
|
-
end
|
|
18
|
-
|
|
19
|
-
def params
|
|
20
|
-
@fields
|
|
21
|
-
end
|
|
22
|
-
|
|
23
|
-
mapping :account, 'pg_merchant_id'
|
|
24
|
-
mapping :amount, 'pg_amount'
|
|
25
|
-
mapping :order, 'pg_order_id'
|
|
26
|
-
mapping :description, 'pg_description'
|
|
27
|
-
mapping :currency, 'pg_currency'
|
|
28
|
-
end
|
|
29
|
-
end
|
|
30
|
-
end
|
|
31
|
-
end
|
|
32
|
-
end
|
|
@@ -1,113 +0,0 @@
|
|
|
1
|
-
require 'builder'
|
|
2
|
-
|
|
3
|
-
module ActiveMerchant #:nodoc:
|
|
4
|
-
module Billing #:nodoc:
|
|
5
|
-
module Integrations #:nodoc:
|
|
6
|
-
module Platron
|
|
7
|
-
class Notification < ActiveMerchant::Billing::Integrations::Notification
|
|
8
|
-
def initialize(*args)
|
|
9
|
-
super
|
|
10
|
-
@signature = params.delete('pg_sig')
|
|
11
|
-
end
|
|
12
|
-
|
|
13
|
-
def complete?
|
|
14
|
-
params['pg_result']
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
def order_id
|
|
18
|
-
params['pg_order_id']
|
|
19
|
-
end
|
|
20
|
-
|
|
21
|
-
def platron_payment_id
|
|
22
|
-
params['pg_payment_id']
|
|
23
|
-
end
|
|
24
|
-
|
|
25
|
-
def currency
|
|
26
|
-
params['pg_ps_currency']
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
def payment_system
|
|
30
|
-
params['pg_payment_system']
|
|
31
|
-
end
|
|
32
|
-
|
|
33
|
-
def user_phone
|
|
34
|
-
params['pg_user_phone']
|
|
35
|
-
end
|
|
36
|
-
|
|
37
|
-
def card_brand
|
|
38
|
-
params['pg_card_brand']
|
|
39
|
-
end
|
|
40
|
-
|
|
41
|
-
def captured
|
|
42
|
-
params['pg_captured']
|
|
43
|
-
end
|
|
44
|
-
|
|
45
|
-
def overpayment
|
|
46
|
-
params['pg_overpayment']
|
|
47
|
-
end
|
|
48
|
-
|
|
49
|
-
def failure_code
|
|
50
|
-
params['pg_failure_code']
|
|
51
|
-
end
|
|
52
|
-
|
|
53
|
-
def failure_description
|
|
54
|
-
params['pg_failure_description']
|
|
55
|
-
end
|
|
56
|
-
|
|
57
|
-
def payment_date
|
|
58
|
-
params['pg_payment_date']
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
def salt
|
|
62
|
-
params['pg_salt']
|
|
63
|
-
end
|
|
64
|
-
|
|
65
|
-
def signature
|
|
66
|
-
@signature
|
|
67
|
-
end
|
|
68
|
-
|
|
69
|
-
def net_amount
|
|
70
|
-
params['pg_net_amount']
|
|
71
|
-
end
|
|
72
|
-
|
|
73
|
-
def ps_amount
|
|
74
|
-
params['pg_ps_amount']
|
|
75
|
-
end
|
|
76
|
-
|
|
77
|
-
def ps_full_amount
|
|
78
|
-
params['pg_ps_full_amount']
|
|
79
|
-
end
|
|
80
|
-
|
|
81
|
-
def amount
|
|
82
|
-
params['pg_amount']
|
|
83
|
-
end
|
|
84
|
-
|
|
85
|
-
def secret
|
|
86
|
-
@options[:secret]
|
|
87
|
-
end
|
|
88
|
-
|
|
89
|
-
def path
|
|
90
|
-
@options[:path]
|
|
91
|
-
end
|
|
92
|
-
|
|
93
|
-
def acknowledge(authcode = nil)
|
|
94
|
-
signature == Platron.generate_signature(params, path, secret)
|
|
95
|
-
end
|
|
96
|
-
|
|
97
|
-
def success_response(path,secret)
|
|
98
|
-
salt = rand(36**15).to_s(36)
|
|
99
|
-
xml = ""
|
|
100
|
-
doc = Builder::XmlMarkup.new(:target => xml)
|
|
101
|
-
sign = Platron.generate_signature({:pg_status => 'ok', :pg_salt => salt}, path, secret)
|
|
102
|
-
doc.response do
|
|
103
|
-
doc.pg_status 'ok'
|
|
104
|
-
doc.pg_salt salt
|
|
105
|
-
doc.pg_sig sign
|
|
106
|
-
end
|
|
107
|
-
xml
|
|
108
|
-
end
|
|
109
|
-
end
|
|
110
|
-
end
|
|
111
|
-
end
|
|
112
|
-
end
|
|
113
|
-
end
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
module ActiveMerchant #:nodoc:
|
|
2
|
-
module Billing #:nodoc:
|
|
3
|
-
module Integrations #:nodoc:
|
|
4
|
-
# Platron API: www.platron.ru/PlatronAPI.pdf
|
|
5
|
-
module Platron
|
|
6
|
-
autoload :Helper, File.dirname(__FILE__) + '/platron/helper.rb'
|
|
7
|
-
autoload :Notification, File.dirname(__FILE__) + '/platron/notification.rb'
|
|
8
|
-
autoload :Common, File.dirname(__FILE__) + '/platron/common.rb'
|
|
9
|
-
|
|
10
|
-
mattr_accessor :service_url
|
|
11
|
-
self.service_url = 'https://www.platron.ru/payment.php'
|
|
12
|
-
|
|
13
|
-
def self.notification(raw_post)
|
|
14
|
-
Notification.new(raw_post)
|
|
15
|
-
end
|
|
16
|
-
|
|
17
|
-
def self.generate_signature_string(params, path, secret)
|
|
18
|
-
sorted_params = params.sort_by{|k,v| k.to_s}.collect{|k,v| v}
|
|
19
|
-
[path, sorted_params, secret].flatten.compact.join(';')
|
|
20
|
-
end
|
|
21
|
-
|
|
22
|
-
def self.generate_signature(params, path, secret)
|
|
23
|
-
Digest::MD5.hexdigest(generate_signature_string(params, path, secret))
|
|
24
|
-
end
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
end
|
|
28
|
-
end
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
require 'active_support/version' # for ActiveSupport2.3
|
|
2
|
-
require 'active_support/core_ext/float/rounding.rb' unless ActiveSupport::VERSION::MAJOR > 3 # Float#round(precision)
|
|
3
|
-
|
|
4
|
-
module ActiveMerchant #:nodoc:
|
|
5
|
-
module Billing #:nodoc:
|
|
6
|
-
module Integrations #:nodoc:
|
|
7
|
-
module Pxpay
|
|
8
|
-
# An example. Note the username as a parameter and transaction key you
|
|
9
|
-
# will want to use later. The amount that you pass in will be *rounded*,
|
|
10
|
-
# so preferably pass in X.2 decimal so that no rounding occurs. You need
|
|
11
|
-
# to set :credential2 to your PxPay secret key.
|
|
12
|
-
#
|
|
13
|
-
# PxPay accounts have Failproof Notification enabled by default which means
|
|
14
|
-
# in addition to the user being redirected to your return_url, the return_url will
|
|
15
|
-
# be accessed by the PxPay servers directly, immediately after transaction success.
|
|
16
|
-
#
|
|
17
|
-
# payment_service_for('order_id', 'pxpay_user_ID', :service => :pxpay,
|
|
18
|
-
# :amount => 157.0, :currency => 'USD', :credential2 => 'pxpay_key') do |service|
|
|
19
|
-
#
|
|
20
|
-
# service.customer :email => 'customer@email.com'
|
|
21
|
-
#
|
|
22
|
-
# service.description 'Order 123 for MyStore'
|
|
23
|
-
#
|
|
24
|
-
# # Must specify both a return_url or PxPay will show an error instead of
|
|
25
|
-
# # capturing credit card details.
|
|
26
|
-
#
|
|
27
|
-
# service.return_url "http://t/pxpay/payment_received_notification_sub_step"
|
|
28
|
-
#
|
|
29
|
-
# # These fields will be copied verbatim to the Notification
|
|
30
|
-
# service.custom1 'custom text 1'
|
|
31
|
-
# service.custom2 ''
|
|
32
|
-
# service.custom3 ''
|
|
33
|
-
# # See the helper.rb file for various custom fields
|
|
34
|
-
# end
|
|
35
|
-
|
|
36
|
-
class Helper < ActiveMerchant::Billing::Integrations::Helper
|
|
37
|
-
include PostsData
|
|
38
|
-
mapping :account, 'PxPayUserId'
|
|
39
|
-
mapping :credential2, 'PxPayKey'
|
|
40
|
-
mapping :currency, 'CurrencyInput'
|
|
41
|
-
mapping :description, 'MerchantReference'
|
|
42
|
-
mapping :order, 'TxnId'
|
|
43
|
-
mapping :customer, :email => 'EmailAddress'
|
|
44
|
-
|
|
45
|
-
mapping :custom1, 'TxnData1'
|
|
46
|
-
mapping :custom2, 'TxnData2'
|
|
47
|
-
mapping :custom3, 'TxnData3'
|
|
48
|
-
|
|
49
|
-
def initialize(order, account, options = {})
|
|
50
|
-
super
|
|
51
|
-
add_field 'AmountInput', "%.2f" % options[:amount].to_f.round(2)
|
|
52
|
-
add_field 'EnableAddBillCard', '0'
|
|
53
|
-
add_field 'TxnType', 'Purchase'
|
|
54
|
-
end
|
|
55
|
-
|
|
56
|
-
def return_url(url)
|
|
57
|
-
add_field 'UrlSuccess', url
|
|
58
|
-
add_field 'UrlFail', url
|
|
59
|
-
end
|
|
60
|
-
|
|
61
|
-
def form_fields
|
|
62
|
-
# if either return URLs are blank PxPay will generate a token but redirect user to error page.
|
|
63
|
-
raise "error - must specify return_url" if @fields['UrlSuccess'].blank?
|
|
64
|
-
raise "error - must specify cancel_return_url" if @fields['UrlFail'].blank?
|
|
65
|
-
|
|
66
|
-
result = request_secure_redirect
|
|
67
|
-
raise "error - failed to get token - message was #{result[:redirect]}" unless result[:valid] == "1"
|
|
68
|
-
|
|
69
|
-
url = URI.parse(result[:redirect])
|
|
70
|
-
|
|
71
|
-
CGI.parse(url.query)
|
|
72
|
-
end
|
|
73
|
-
|
|
74
|
-
def form_method
|
|
75
|
-
"GET"
|
|
76
|
-
end
|
|
77
|
-
|
|
78
|
-
private
|
|
79
|
-
def generate_request
|
|
80
|
-
xml = REXML::Document.new
|
|
81
|
-
root = xml.add_element('GenerateRequest')
|
|
82
|
-
|
|
83
|
-
@fields.each do | k, v |
|
|
84
|
-
v = v.slice(0, 50) if k == "MerchantReference"
|
|
85
|
-
root.add_element(k).text = v
|
|
86
|
-
end
|
|
87
|
-
|
|
88
|
-
xml.to_s
|
|
89
|
-
end
|
|
90
|
-
|
|
91
|
-
def request_secure_redirect
|
|
92
|
-
request = generate_request
|
|
93
|
-
|
|
94
|
-
response = ssl_post(Pxpay.token_url, request)
|
|
95
|
-
xml = REXML::Document.new(response)
|
|
96
|
-
root = REXML::XPath.first(xml, "//Request")
|
|
97
|
-
valid = root.attributes["valid"]
|
|
98
|
-
redirect = root.elements["URI"].text
|
|
99
|
-
|
|
100
|
-
# example positive response:
|
|
101
|
-
# <Request valid="1"><URI>https://sec.paymentexpress.com/pxpay/pxpay.aspx?userid=PxpayUser&request=REQUEST_TOKEN</URI></Request>
|
|
102
|
-
|
|
103
|
-
# example negative response:
|
|
104
|
-
# <Request valid="0"><URI>Invalid TxnType</URI></Request>
|
|
105
|
-
|
|
106
|
-
{:valid => valid, :redirect => redirect}
|
|
107
|
-
end
|
|
108
|
-
end
|
|
109
|
-
end
|
|
110
|
-
end
|
|
111
|
-
end
|
|
112
|
-
end
|