tanga_activemerchant 1.37.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/CHANGELOG +1202 -0
- data/CONTRIBUTORS +414 -0
- data/MIT-LICENSE +20 -0
- data/README.md +221 -0
- data/gem-public_cert.pem +20 -0
- data/lib/active_merchant/billing/avs_result.rb +98 -0
- data/lib/active_merchant/billing/base.rb +57 -0
- data/lib/active_merchant/billing/check.rb +69 -0
- data/lib/active_merchant/billing/credit_card.rb +283 -0
- data/lib/active_merchant/billing/credit_card_formatting.rb +21 -0
- data/lib/active_merchant/billing/credit_card_methods.rb +143 -0
- data/lib/active_merchant/billing/cvv_result.rb +38 -0
- data/lib/active_merchant/billing/expiry_date.rb +34 -0
- data/lib/active_merchant/billing/gateway.rb +181 -0
- data/lib/active_merchant/billing/gateways/authorize_net.rb +725 -0
- data/lib/active_merchant/billing/gateways/authorize_net_cim.rb +956 -0
- data/lib/active_merchant/billing/gateways/balanced.rb +468 -0
- data/lib/active_merchant/billing/gateways/banwire.rb +105 -0
- data/lib/active_merchant/billing/gateways/barclays_epdq.rb +314 -0
- data/lib/active_merchant/billing/gateways/barclays_epdq_extra_plus.rb +15 -0
- data/lib/active_merchant/billing/gateways/beanstream/beanstream_core.rb +393 -0
- data/lib/active_merchant/billing/gateways/beanstream.rb +169 -0
- data/lib/active_merchant/billing/gateways/beanstream_interac.rb +54 -0
- data/lib/active_merchant/billing/gateways/blue_pay.rb +501 -0
- data/lib/active_merchant/billing/gateways/bogus.rb +142 -0
- data/lib/active_merchant/billing/gateways/braintree/braintree_common.rb +9 -0
- data/lib/active_merchant/billing/gateways/braintree.rb +19 -0
- data/lib/active_merchant/billing/gateways/braintree_blue.rb +401 -0
- data/lib/active_merchant/billing/gateways/braintree_orange.rb +19 -0
- data/lib/active_merchant/billing/gateways/card_save.rb +23 -0
- data/lib/active_merchant/billing/gateways/card_stream.rb +225 -0
- data/lib/active_merchant/billing/gateways/card_stream_modern.rb +155 -0
- data/lib/active_merchant/billing/gateways/cc5.rb +156 -0
- data/lib/active_merchant/billing/gateways/certo_direct.rb +277 -0
- data/lib/active_merchant/billing/gateways/cyber_source.rb +639 -0
- data/lib/active_merchant/billing/gateways/data_cash.rb +591 -0
- data/lib/active_merchant/billing/gateways/efsnet.rb +230 -0
- data/lib/active_merchant/billing/gateways/elavon.rb +312 -0
- data/lib/active_merchant/billing/gateways/epay.rb +275 -0
- data/lib/active_merchant/billing/gateways/evo_ca.rb +308 -0
- data/lib/active_merchant/billing/gateways/eway.rb +225 -0
- data/lib/active_merchant/billing/gateways/eway_managed.rb +291 -0
- data/lib/active_merchant/billing/gateways/eway_rapid.rb +320 -0
- data/lib/active_merchant/billing/gateways/exact.rb +218 -0
- data/lib/active_merchant/billing/gateways/fat_zebra.rb +173 -0
- data/lib/active_merchant/billing/gateways/federated_canada.rb +167 -0
- data/lib/active_merchant/billing/gateways/finansbank.rb +22 -0
- data/lib/active_merchant/billing/gateways/first_pay.rb +176 -0
- data/lib/active_merchant/billing/gateways/firstdata_e4.rb +314 -0
- data/lib/active_merchant/billing/gateways/garanti.rb +257 -0
- data/lib/active_merchant/billing/gateways/hdfc.rb +207 -0
- data/lib/active_merchant/billing/gateways/iats_payments.rb +35 -0
- data/lib/active_merchant/billing/gateways/ideal/ideal_base.rb +249 -0
- data/lib/active_merchant/billing/gateways/ideal/ideal_rabobank.pem +13 -0
- data/lib/active_merchant/billing/gateways/ideal/ideal_response.rb +29 -0
- data/lib/active_merchant/billing/gateways/ideal_rabobank.rb +66 -0
- data/lib/active_merchant/billing/gateways/inspire.rb +221 -0
- data/lib/active_merchant/billing/gateways/instapay.rb +163 -0
- data/lib/active_merchant/billing/gateways/iridium.rb +262 -0
- data/lib/active_merchant/billing/gateways/itransact.rb +448 -0
- data/lib/active_merchant/billing/gateways/jetpay.rb +275 -0
- data/lib/active_merchant/billing/gateways/linkpoint.rb +447 -0
- data/lib/active_merchant/billing/gateways/litle.rb +554 -0
- data/lib/active_merchant/billing/gateways/merchant_e_solutions.rb +176 -0
- data/lib/active_merchant/billing/gateways/merchant_one.rb +115 -0
- data/lib/active_merchant/billing/gateways/merchant_ware.rb +322 -0
- data/lib/active_merchant/billing/gateways/merchant_ware_version_four.rb +275 -0
- data/lib/active_merchant/billing/gateways/merchant_warrior.rb +191 -0
- data/lib/active_merchant/billing/gateways/mercury.rb +311 -0
- data/lib/active_merchant/billing/gateways/metrics_global.rb +322 -0
- data/lib/active_merchant/billing/gateways/migs/migs_codes.rb +100 -0
- data/lib/active_merchant/billing/gateways/migs.rb +265 -0
- data/lib/active_merchant/billing/gateways/modern_payments.rb +37 -0
- data/lib/active_merchant/billing/gateways/modern_payments_cim.rb +219 -0
- data/lib/active_merchant/billing/gateways/moneris.rb +244 -0
- data/lib/active_merchant/billing/gateways/moneris_us.rb +208 -0
- data/lib/active_merchant/billing/gateways/nab_transact.rb +277 -0
- data/lib/active_merchant/billing/gateways/net_registry.rb +193 -0
- data/lib/active_merchant/billing/gateways/netaxept.rb +181 -0
- data/lib/active_merchant/billing/gateways/netbilling.rb +197 -0
- data/lib/active_merchant/billing/gateways/netpay.rb +223 -0
- data/lib/active_merchant/billing/gateways/nmi.rb +20 -0
- data/lib/active_merchant/billing/gateways/ogone.rb +421 -0
- data/lib/active_merchant/billing/gateways/optimal_payment.rb +297 -0
- data/lib/active_merchant/billing/gateways/orbital/avs_result.rb +93 -0
- data/lib/active_merchant/billing/gateways/orbital/orbital_soft_descriptors.rb +46 -0
- data/lib/active_merchant/billing/gateways/orbital.rb +633 -0
- data/lib/active_merchant/billing/gateways/pay_gate_xml.rb +261 -0
- data/lib/active_merchant/billing/gateways/pay_junction.rb +396 -0
- data/lib/active_merchant/billing/gateways/pay_secure.rb +119 -0
- data/lib/active_merchant/billing/gateways/paybox_direct.rb +196 -0
- data/lib/active_merchant/billing/gateways/payflow/payflow_common_api.rb +209 -0
- data/lib/active_merchant/billing/gateways/payflow/payflow_express_response.rb +39 -0
- data/lib/active_merchant/billing/gateways/payflow/payflow_response.rb +13 -0
- data/lib/active_merchant/billing/gateways/payflow.rb +268 -0
- data/lib/active_merchant/billing/gateways/payflow_express.rb +224 -0
- data/lib/active_merchant/billing/gateways/payflow_express_uk.rb +15 -0
- data/lib/active_merchant/billing/gateways/payflow_uk.rb +21 -0
- data/lib/active_merchant/billing/gateways/payment_express.rb +353 -0
- data/lib/active_merchant/billing/gateways/paymill.rb +179 -0
- data/lib/active_merchant/billing/gateways/paypal/paypal_common_api.rb +670 -0
- data/lib/active_merchant/billing/gateways/paypal/paypal_express_response.rb +61 -0
- data/lib/active_merchant/billing/gateways/paypal/paypal_recurring_api.rb +248 -0
- data/lib/active_merchant/billing/gateways/paypal.rb +106 -0
- data/lib/active_merchant/billing/gateways/paypal_ca.rb +13 -0
- data/lib/active_merchant/billing/gateways/paypal_digital_goods.rb +43 -0
- data/lib/active_merchant/billing/gateways/paypal_express.rb +239 -0
- data/lib/active_merchant/billing/gateways/paypal_express_common.rb +30 -0
- data/lib/active_merchant/billing/gateways/paystation.rb +199 -0
- data/lib/active_merchant/billing/gateways/payway.rb +207 -0
- data/lib/active_merchant/billing/gateways/pin.rb +165 -0
- data/lib/active_merchant/billing/gateways/plugnpay.rb +294 -0
- data/lib/active_merchant/billing/gateways/psigate.rb +227 -0
- data/lib/active_merchant/billing/gateways/psl_card.rb +303 -0
- data/lib/active_merchant/billing/gateways/qbms.rb +292 -0
- data/lib/active_merchant/billing/gateways/quantum.rb +276 -0
- data/lib/active_merchant/billing/gateways/quickpay.rb +335 -0
- data/lib/active_merchant/billing/gateways/realex.rb +303 -0
- data/lib/active_merchant/billing/gateways/redsys.rb +394 -0
- data/lib/active_merchant/billing/gateways/sage/sage_bankcard.rb +93 -0
- data/lib/active_merchant/billing/gateways/sage/sage_core.rb +114 -0
- data/lib/active_merchant/billing/gateways/sage/sage_virtual_check.rb +102 -0
- data/lib/active_merchant/billing/gateways/sage.rb +152 -0
- data/lib/active_merchant/billing/gateways/sage_pay.rb +324 -0
- data/lib/active_merchant/billing/gateways/sallie_mae.rb +143 -0
- data/lib/active_merchant/billing/gateways/samurai.rb +118 -0
- data/lib/active_merchant/billing/gateways/secure_net.rb +261 -0
- data/lib/active_merchant/billing/gateways/secure_pay.rb +28 -0
- data/lib/active_merchant/billing/gateways/secure_pay_au.rb +279 -0
- data/lib/active_merchant/billing/gateways/secure_pay_tech.rb +112 -0
- data/lib/active_merchant/billing/gateways/skip_jack.rb +453 -0
- data/lib/active_merchant/billing/gateways/smart_ps.rb +272 -0
- data/lib/active_merchant/billing/gateways/spreedly_core.rb +233 -0
- data/lib/active_merchant/billing/gateways/stripe.rb +316 -0
- data/lib/active_merchant/billing/gateways/trans_first.rb +126 -0
- data/lib/active_merchant/billing/gateways/transax.rb +23 -0
- data/lib/active_merchant/billing/gateways/transnational.rb +239 -0
- data/lib/active_merchant/billing/gateways/trust_commerce.rb +421 -0
- data/lib/active_merchant/billing/gateways/usa_epay.rb +25 -0
- data/lib/active_merchant/billing/gateways/usa_epay_advanced.rb +1501 -0
- data/lib/active_merchant/billing/gateways/usa_epay_transaction.rb +201 -0
- data/lib/active_merchant/billing/gateways/verifi.rb +232 -0
- data/lib/active_merchant/billing/gateways/viaklix.rb +189 -0
- data/lib/active_merchant/billing/gateways/vindicia.rb +361 -0
- data/lib/active_merchant/billing/gateways/webpay.rb +57 -0
- data/lib/active_merchant/billing/gateways/wirecard.rb +313 -0
- data/lib/active_merchant/billing/gateways/worldpay.rb +303 -0
- data/lib/active_merchant/billing/gateways.rb +17 -0
- data/lib/active_merchant/billing/integrations/a1agregator/helper.rb +31 -0
- data/lib/active_merchant/billing/integrations/a1agregator/notification.rb +186 -0
- data/lib/active_merchant/billing/integrations/a1agregator/status.rb +38 -0
- data/lib/active_merchant/billing/integrations/a1agregator.rb +26 -0
- data/lib/active_merchant/billing/integrations/action_view_helper.rb +73 -0
- data/lib/active_merchant/billing/integrations/authorize_net_sim/helper.rb +229 -0
- data/lib/active_merchant/billing/integrations/authorize_net_sim/notification.rb +340 -0
- data/lib/active_merchant/billing/integrations/authorize_net_sim.rb +38 -0
- data/lib/active_merchant/billing/integrations/bogus/helper.rb +17 -0
- data/lib/active_merchant/billing/integrations/bogus/notification.rb +11 -0
- data/lib/active_merchant/billing/integrations/bogus/return.rb +10 -0
- data/lib/active_merchant/billing/integrations/bogus.rb +23 -0
- data/lib/active_merchant/billing/integrations/chronopay/helper.rb +120 -0
- data/lib/active_merchant/billing/integrations/chronopay/notification.rb +158 -0
- data/lib/active_merchant/billing/integrations/chronopay/return.rb +10 -0
- data/lib/active_merchant/billing/integrations/chronopay.rb +23 -0
- data/lib/active_merchant/billing/integrations/direc_pay/helper.rb +200 -0
- data/lib/active_merchant/billing/integrations/direc_pay/notification.rb +76 -0
- data/lib/active_merchant/billing/integrations/direc_pay/return.rb +32 -0
- data/lib/active_merchant/billing/integrations/direc_pay/status.rb +37 -0
- data/lib/active_merchant/billing/integrations/direc_pay.rb +41 -0
- data/lib/active_merchant/billing/integrations/directebanking/helper.rb +90 -0
- data/lib/active_merchant/billing/integrations/directebanking/notification.rb +120 -0
- data/lib/active_merchant/billing/integrations/directebanking/return.rb +11 -0
- data/lib/active_merchant/billing/integrations/directebanking.rb +47 -0
- data/lib/active_merchant/billing/integrations/dotpay/helper.rb +77 -0
- data/lib/active_merchant/billing/integrations/dotpay/notification.rb +86 -0
- data/lib/active_merchant/billing/integrations/dotpay/return.rb +11 -0
- data/lib/active_merchant/billing/integrations/dotpay.rb +22 -0
- data/lib/active_merchant/billing/integrations/dwolla/common.rb +23 -0
- data/lib/active_merchant/billing/integrations/dwolla/helper.rb +43 -0
- data/lib/active_merchant/billing/integrations/dwolla/notification.rb +64 -0
- data/lib/active_merchant/billing/integrations/dwolla/return.rb +49 -0
- data/lib/active_merchant/billing/integrations/dwolla.rb +23 -0
- data/lib/active_merchant/billing/integrations/e_payment_plans/helper.rb +34 -0
- data/lib/active_merchant/billing/integrations/e_payment_plans/notification.rb +84 -0
- data/lib/active_merchant/billing/integrations/e_payment_plans.rb +48 -0
- data/lib/active_merchant/billing/integrations/easy_pay/common.rb +40 -0
- data/lib/active_merchant/billing/integrations/easy_pay/helper.rb +36 -0
- data/lib/active_merchant/billing/integrations/easy_pay/notification.rb +59 -0
- data/lib/active_merchant/billing/integrations/easy_pay.rb +30 -0
- data/lib/active_merchant/billing/integrations/epay/helper.rb +55 -0
- data/lib/active_merchant/billing/integrations/epay/notification.rb +110 -0
- data/lib/active_merchant/billing/integrations/epay.rb +21 -0
- data/lib/active_merchant/billing/integrations/first_data/helper.rb +61 -0
- data/lib/active_merchant/billing/integrations/first_data/notification.rb +56 -0
- data/lib/active_merchant/billing/integrations/first_data.rb +38 -0
- data/lib/active_merchant/billing/integrations/gestpay/common.rb +42 -0
- data/lib/active_merchant/billing/integrations/gestpay/helper.rb +70 -0
- data/lib/active_merchant/billing/integrations/gestpay/notification.rb +85 -0
- data/lib/active_merchant/billing/integrations/gestpay/return.rb +10 -0
- data/lib/active_merchant/billing/integrations/gestpay.rb +25 -0
- data/lib/active_merchant/billing/integrations/helper.rb +117 -0
- data/lib/active_merchant/billing/integrations/hi_trust/helper.rb +58 -0
- data/lib/active_merchant/billing/integrations/hi_trust/notification.rb +59 -0
- data/lib/active_merchant/billing/integrations/hi_trust/return.rb +67 -0
- data/lib/active_merchant/billing/integrations/hi_trust.rb +27 -0
- data/lib/active_merchant/billing/integrations/ipay88/helper.rb +114 -0
- data/lib/active_merchant/billing/integrations/ipay88/return.rb +95 -0
- data/lib/active_merchant/billing/integrations/ipay88.rb +19 -0
- data/lib/active_merchant/billing/integrations/liqpay/helper.rb +43 -0
- data/lib/active_merchant/billing/integrations/liqpay/notification.rb +89 -0
- data/lib/active_merchant/billing/integrations/liqpay/return.rb +83 -0
- data/lib/active_merchant/billing/integrations/liqpay.rb +30 -0
- data/lib/active_merchant/billing/integrations/maksuturva/helper.rb +119 -0
- data/lib/active_merchant/billing/integrations/maksuturva/notification.rb +48 -0
- data/lib/active_merchant/billing/integrations/maksuturva.rb +86 -0
- data/lib/active_merchant/billing/integrations/moneybookers/helper.rb +75 -0
- data/lib/active_merchant/billing/integrations/moneybookers/notification.rb +129 -0
- data/lib/active_merchant/billing/integrations/moneybookers.rb +26 -0
- data/lib/active_merchant/billing/integrations/nochex/helper.rb +68 -0
- data/lib/active_merchant/billing/integrations/nochex/notification.rb +94 -0
- data/lib/active_merchant/billing/integrations/nochex/return.rb +10 -0
- data/lib/active_merchant/billing/integrations/nochex.rb +88 -0
- data/lib/active_merchant/billing/integrations/notification.rb +71 -0
- data/lib/active_merchant/billing/integrations/paxum/common.rb +24 -0
- data/lib/active_merchant/billing/integrations/paxum/helper.rb +42 -0
- data/lib/active_merchant/billing/integrations/paxum/notification.rb +33 -0
- data/lib/active_merchant/billing/integrations/paxum.rb +44 -0
- data/lib/active_merchant/billing/integrations/pay_fast/common.rb +42 -0
- data/lib/active_merchant/billing/integrations/pay_fast/helper.rb +50 -0
- data/lib/active_merchant/billing/integrations/pay_fast/notification.rb +134 -0
- data/lib/active_merchant/billing/integrations/pay_fast/return.rb +10 -0
- data/lib/active_merchant/billing/integrations/pay_fast.rb +70 -0
- data/lib/active_merchant/billing/integrations/payflow_link/helper.rb +116 -0
- data/lib/active_merchant/billing/integrations/payflow_link/notification.rb +78 -0
- data/lib/active_merchant/billing/integrations/payflow_link.rb +21 -0
- data/lib/active_merchant/billing/integrations/paypal/helper.rb +119 -0
- data/lib/active_merchant/billing/integrations/paypal/notification.rb +227 -0
- data/lib/active_merchant/billing/integrations/paypal/return.rb +10 -0
- data/lib/active_merchant/billing/integrations/paypal.rb +39 -0
- data/lib/active_merchant/billing/integrations/paypal_payments_advanced/helper.rb +15 -0
- data/lib/active_merchant/billing/integrations/paypal_payments_advanced.rb +20 -0
- data/lib/active_merchant/billing/integrations/paysbuy/helper.rb +15 -0
- data/lib/active_merchant/billing/integrations/paysbuy/notification.rb +28 -0
- data/lib/active_merchant/billing/integrations/paysbuy.rb +36 -0
- data/lib/active_merchant/billing/integrations/payu_in/helper.rb +74 -0
- data/lib/active_merchant/billing/integrations/payu_in/notification.rb +165 -0
- data/lib/active_merchant/billing/integrations/payu_in/return.rb +36 -0
- data/lib/active_merchant/billing/integrations/payu_in.rb +43 -0
- data/lib/active_merchant/billing/integrations/platron/helper.rb +32 -0
- data/lib/active_merchant/billing/integrations/platron/notification.rb +113 -0
- data/lib/active_merchant/billing/integrations/platron.rb +28 -0
- data/lib/active_merchant/billing/integrations/pxpay/helper.rb +112 -0
- data/lib/active_merchant/billing/integrations/pxpay/notification.rb +157 -0
- data/lib/active_merchant/billing/integrations/pxpay/return.rb +25 -0
- data/lib/active_merchant/billing/integrations/pxpay.rb +31 -0
- data/lib/active_merchant/billing/integrations/quickpay/helper.rb +74 -0
- data/lib/active_merchant/billing/integrations/quickpay/notification.rb +137 -0
- data/lib/active_merchant/billing/integrations/quickpay.rb +21 -0
- data/lib/active_merchant/billing/integrations/rbkmoney/helper.rb +23 -0
- data/lib/active_merchant/billing/integrations/rbkmoney/notification.rb +91 -0
- data/lib/active_merchant/billing/integrations/rbkmoney.rb +17 -0
- data/lib/active_merchant/billing/integrations/return.rb +42 -0
- data/lib/active_merchant/billing/integrations/robokassa/common.rb +19 -0
- data/lib/active_merchant/billing/integrations/robokassa/helper.rb +50 -0
- data/lib/active_merchant/billing/integrations/robokassa/notification.rb +55 -0
- data/lib/active_merchant/billing/integrations/robokassa/return.rb +17 -0
- data/lib/active_merchant/billing/integrations/robokassa.rb +49 -0
- data/lib/active_merchant/billing/integrations/sage_pay_form/encryption.rb +33 -0
- data/lib/active_merchant/billing/integrations/sage_pay_form/helper.rb +136 -0
- data/lib/active_merchant/billing/integrations/sage_pay_form/notification.rb +210 -0
- data/lib/active_merchant/billing/integrations/sage_pay_form/return.rb +31 -0
- data/lib/active_merchant/billing/integrations/sage_pay_form.rb +37 -0
- data/lib/active_merchant/billing/integrations/two_checkout/helper.rb +91 -0
- data/lib/active_merchant/billing/integrations/two_checkout/notification.rb +139 -0
- data/lib/active_merchant/billing/integrations/two_checkout/return.rb +17 -0
- data/lib/active_merchant/billing/integrations/two_checkout.rb +44 -0
- data/lib/active_merchant/billing/integrations/valitor/helper.rb +86 -0
- data/lib/active_merchant/billing/integrations/valitor/notification.rb +13 -0
- data/lib/active_merchant/billing/integrations/valitor/response_fields.rb +97 -0
- data/lib/active_merchant/billing/integrations/valitor/return.rb +13 -0
- data/lib/active_merchant/billing/integrations/valitor.rb +33 -0
- data/lib/active_merchant/billing/integrations/verkkomaksut/helper.rb +88 -0
- data/lib/active_merchant/billing/integrations/verkkomaksut/notification.rb +59 -0
- data/lib/active_merchant/billing/integrations/verkkomaksut.rb +20 -0
- data/lib/active_merchant/billing/integrations/web_pay/common.rb +50 -0
- data/lib/active_merchant/billing/integrations/web_pay/helper.rb +68 -0
- data/lib/active_merchant/billing/integrations/web_pay/notification.rb +51 -0
- data/lib/active_merchant/billing/integrations/web_pay.rb +45 -0
- data/lib/active_merchant/billing/integrations/webmoney/common.rb +17 -0
- data/lib/active_merchant/billing/integrations/webmoney/helper.rb +40 -0
- data/lib/active_merchant/billing/integrations/webmoney/notification.rb +47 -0
- data/lib/active_merchant/billing/integrations/webmoney.rb +43 -0
- data/lib/active_merchant/billing/integrations/world_pay/helper.rb +101 -0
- data/lib/active_merchant/billing/integrations/world_pay/notification.rb +160 -0
- data/lib/active_merchant/billing/integrations/world_pay.rb +34 -0
- data/lib/active_merchant/billing/integrations.rb +17 -0
- data/lib/active_merchant/billing/response.rb +77 -0
- data/lib/active_merchant/billing.rb +9 -0
- data/lib/active_merchant/version.rb +3 -0
- data/lib/active_merchant.rb +63 -0
- data/lib/activemerchant.rb +1 -0
- data/lib/support/gateway_support.rb +65 -0
- data/lib/support/outbound_hosts.rb +25 -0
- data/lib/support/ssl_verify.rb +93 -0
- metadata +506 -0
@@ -0,0 +1,95 @@
|
|
1
|
+
require "digest/sha1"
|
2
|
+
|
3
|
+
module ActiveMerchant #:nodoc:
|
4
|
+
module Billing #:nodoc:
|
5
|
+
module Integrations #:nodoc:
|
6
|
+
module Ipay88
|
7
|
+
class Return < ActiveMerchant::Billing::Integrations::Return
|
8
|
+
include ActiveMerchant::PostsData
|
9
|
+
|
10
|
+
def account
|
11
|
+
params["MerchantCode"]
|
12
|
+
end
|
13
|
+
|
14
|
+
def payment
|
15
|
+
params["PaymentId"].to_i
|
16
|
+
end
|
17
|
+
|
18
|
+
def order
|
19
|
+
params["RefNo"]
|
20
|
+
end
|
21
|
+
|
22
|
+
def amount
|
23
|
+
params["Amount"]
|
24
|
+
end
|
25
|
+
|
26
|
+
def currency
|
27
|
+
params["Currency"]
|
28
|
+
end
|
29
|
+
|
30
|
+
def remark
|
31
|
+
params["Remark"]
|
32
|
+
end
|
33
|
+
|
34
|
+
def transaction
|
35
|
+
params["TransId"]
|
36
|
+
end
|
37
|
+
|
38
|
+
def auth_code
|
39
|
+
params["AuthCode"]
|
40
|
+
end
|
41
|
+
|
42
|
+
def status
|
43
|
+
params["Status"]
|
44
|
+
end
|
45
|
+
|
46
|
+
def error
|
47
|
+
params["ErrDesc"]
|
48
|
+
end
|
49
|
+
|
50
|
+
def signature
|
51
|
+
params["Signature"]
|
52
|
+
end
|
53
|
+
|
54
|
+
def secure?
|
55
|
+
self.generated_signature == self.signature
|
56
|
+
end
|
57
|
+
|
58
|
+
def success?
|
59
|
+
self.secure? && self.requery == "00" && self.status == "1"
|
60
|
+
end
|
61
|
+
|
62
|
+
protected
|
63
|
+
|
64
|
+
def generated_signature
|
65
|
+
Helper.sign(self.sig_components)
|
66
|
+
end
|
67
|
+
|
68
|
+
def sig_components
|
69
|
+
components = [@options[:credential2]]
|
70
|
+
[:account, :payment, :order, :amount_in_cents, :currency, :status].each do |i|
|
71
|
+
components << self.send(i)
|
72
|
+
end
|
73
|
+
components.join
|
74
|
+
end
|
75
|
+
|
76
|
+
def requery
|
77
|
+
data = { "MerchantCode" => self.account, "RefNo" => self.order, "Amount" => self.amount }
|
78
|
+
params = parameterize(data)
|
79
|
+
ssl_post Ipay88.service_url, params, { "Content-Length" => params.size.to_s, "User-Agent" => "Active Merchant -- http://activemerchant.org" }
|
80
|
+
end
|
81
|
+
|
82
|
+
private
|
83
|
+
|
84
|
+
def parameterize(params)
|
85
|
+
params.reject { |k, v| v.blank? }.keys.sort.collect { |key| "#{key}=#{CGI.escape(params[key].to_s)}" }.join("&")
|
86
|
+
end
|
87
|
+
|
88
|
+
def amount_in_cents
|
89
|
+
@amount_in_cents ||= (self.amount || "").gsub(/[.,]/, "")
|
90
|
+
end
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
end
|
95
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module ActiveMerchant #:nodoc:
|
2
|
+
module Billing #:nodoc:
|
3
|
+
module Integrations #:nodoc:
|
4
|
+
module Ipay88
|
5
|
+
autoload :Return, "active_merchant/billing/integrations/ipay88/return.rb"
|
6
|
+
autoload :Helper, "active_merchant/billing/integrations/ipay88/helper.rb"
|
7
|
+
autoload :Notification, "active_merchant/billing/integrations/ipay88/notification.rb"
|
8
|
+
|
9
|
+
def self.service_url
|
10
|
+
"https://www.mobile88.com/epayment/entry.asp"
|
11
|
+
end
|
12
|
+
|
13
|
+
def self.return(query_string, options={})
|
14
|
+
Return.new(query_string, options)
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,43 @@
|
|
1
|
+
module ActiveMerchant #:nodoc:
|
2
|
+
module Billing #:nodoc:
|
3
|
+
module Integrations #:nodoc:
|
4
|
+
module Liqpay
|
5
|
+
class Helper < ActiveMerchant::Billing::Integrations::Helper
|
6
|
+
def initialize(order, account, options = {})
|
7
|
+
@secret = options.delete(:secret)
|
8
|
+
super
|
9
|
+
|
10
|
+
add_field 'version', '1.2'
|
11
|
+
end
|
12
|
+
|
13
|
+
def form_fields
|
14
|
+
xml = "<request>
|
15
|
+
<version>1.2</version>
|
16
|
+
<result_url>#{@fields["result_url"]}</result_url>
|
17
|
+
<server_url>#{@fields["server_url"]}</server_url>
|
18
|
+
<merchant_id>#{@fields["merchant_id"]}</merchant_id>
|
19
|
+
<order_id>#{@fields["order_id"]}</order_id>
|
20
|
+
<amount>#{@fields["amount"]}</amount>
|
21
|
+
<currency>#{@fields["currency"]}</currency>
|
22
|
+
<description>#{@fields["description"]}</description>
|
23
|
+
<default_phone>#{@fields["default_phone"]}</default_phone>
|
24
|
+
<pay_way>card</pay_way>
|
25
|
+
</request>".strip
|
26
|
+
sign = Base64.encode64(Digest::SHA1.digest("#{@secret}#{xml}#{@secret}")).strip
|
27
|
+
{"operation_xml" => Base64.encode64(xml), "signature" => sign}
|
28
|
+
end
|
29
|
+
|
30
|
+
mapping :account, 'merchant_id'
|
31
|
+
mapping :amount, 'amount'
|
32
|
+
mapping :currency, 'currency'
|
33
|
+
mapping :order, 'order_id'
|
34
|
+
mapping :description, 'description'
|
35
|
+
mapping :phone, 'default_phone'
|
36
|
+
|
37
|
+
mapping :notify_url, 'server_url'
|
38
|
+
mapping :return_url, 'result_url'
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
@@ -0,0 +1,89 @@
|
|
1
|
+
require 'net/http'
|
2
|
+
|
3
|
+
module ActiveMerchant #:nodoc:
|
4
|
+
module Billing #:nodoc:
|
5
|
+
module Integrations #:nodoc:
|
6
|
+
module Liqpay
|
7
|
+
class Notification < ActiveMerchant::Billing::Integrations::Notification
|
8
|
+
def self.recognizes?(params)
|
9
|
+
params.has_key?('amount') && params.has_key?('order_id')
|
10
|
+
end
|
11
|
+
|
12
|
+
def initialize(post, options = {})
|
13
|
+
raise ArgumentError if post.blank?
|
14
|
+
super
|
15
|
+
@params.merge!(Hash.from_xml(Base64.decode64(xml))["response"])
|
16
|
+
end
|
17
|
+
|
18
|
+
def xml
|
19
|
+
@params["operation_xml"]
|
20
|
+
end
|
21
|
+
|
22
|
+
def complete?
|
23
|
+
status == 'success'
|
24
|
+
end
|
25
|
+
|
26
|
+
def account
|
27
|
+
params['merchant_id']
|
28
|
+
end
|
29
|
+
|
30
|
+
def amount
|
31
|
+
BigDecimal.new(gross)
|
32
|
+
end
|
33
|
+
|
34
|
+
def item_id
|
35
|
+
params['order_id']
|
36
|
+
end
|
37
|
+
|
38
|
+
def transaction_id
|
39
|
+
params['transaction_id']
|
40
|
+
end
|
41
|
+
|
42
|
+
def action_name
|
43
|
+
params['action_name'] # either 'result_url' or 'server_url'
|
44
|
+
end
|
45
|
+
|
46
|
+
def version
|
47
|
+
params['version']
|
48
|
+
end
|
49
|
+
|
50
|
+
def sender_phone
|
51
|
+
params['sender_phone']
|
52
|
+
end
|
53
|
+
|
54
|
+
def security_key
|
55
|
+
params[ActiveMerchant::Billing::Integrations::Liqpay.signature_parameter_name]
|
56
|
+
end
|
57
|
+
|
58
|
+
def gross
|
59
|
+
params['amount']
|
60
|
+
end
|
61
|
+
|
62
|
+
def currency
|
63
|
+
params['currency']
|
64
|
+
end
|
65
|
+
|
66
|
+
def status
|
67
|
+
params['status'] # 'success', 'failure' or 'wait_secure'
|
68
|
+
end
|
69
|
+
|
70
|
+
def code
|
71
|
+
params['code']
|
72
|
+
end
|
73
|
+
|
74
|
+
def generate_signature_string
|
75
|
+
"#{@options[:secret]}#{Base64.decode64(xml)}#{@options[:secret]}"
|
76
|
+
end
|
77
|
+
|
78
|
+
def generate_signature
|
79
|
+
Base64.encode64(Digest::SHA1.digest(generate_signature_string)).strip
|
80
|
+
end
|
81
|
+
|
82
|
+
def acknowledge
|
83
|
+
security_key == generate_signature
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
@@ -0,0 +1,83 @@
|
|
1
|
+
module ActiveMerchant #:nodoc:
|
2
|
+
module Billing #:nodoc:
|
3
|
+
module Integrations #:nodoc:
|
4
|
+
module Liqpay
|
5
|
+
class Return < ActiveMerchant::Billing::Integrations::Return
|
6
|
+
def self.recognizes?(params)
|
7
|
+
params.has_key?('amount') && params.has_key?('order_id')
|
8
|
+
end
|
9
|
+
|
10
|
+
def initialize(post)
|
11
|
+
super
|
12
|
+
xml = Base64.decode64(@params["operation_xml"])
|
13
|
+
@params.merge!(Hash.from_xml(xml)["response"])
|
14
|
+
end
|
15
|
+
|
16
|
+
def complete?
|
17
|
+
status == 'success'
|
18
|
+
end
|
19
|
+
|
20
|
+
def account
|
21
|
+
params['merchant_id']
|
22
|
+
end
|
23
|
+
|
24
|
+
def amount
|
25
|
+
BigDecimal.new(gross)
|
26
|
+
end
|
27
|
+
|
28
|
+
def item_id
|
29
|
+
params['order_id']
|
30
|
+
end
|
31
|
+
|
32
|
+
def transaction_id
|
33
|
+
params['transaction_id']
|
34
|
+
end
|
35
|
+
|
36
|
+
def action_name
|
37
|
+
params['action_name'] # either 'result_url' or 'server_url'
|
38
|
+
end
|
39
|
+
|
40
|
+
def version
|
41
|
+
params['version']
|
42
|
+
end
|
43
|
+
|
44
|
+
def sender_phone
|
45
|
+
params['sender_phone']
|
46
|
+
end
|
47
|
+
|
48
|
+
def security_key
|
49
|
+
params[ActiveMerchant::Billing::Integrations::Liqpay.signature_parameter_name]
|
50
|
+
end
|
51
|
+
|
52
|
+
def gross
|
53
|
+
params['amount']
|
54
|
+
end
|
55
|
+
|
56
|
+
def currency
|
57
|
+
params['currency']
|
58
|
+
end
|
59
|
+
|
60
|
+
def status
|
61
|
+
params['status'] # 'success', 'failure' or 'wait_secure'
|
62
|
+
end
|
63
|
+
|
64
|
+
def code
|
65
|
+
params['code']
|
66
|
+
end
|
67
|
+
|
68
|
+
def generate_signature_string
|
69
|
+
['', version, @options[:secret], action_name, sender_phone, account, gross, currency, item_id, transaction_id, status, code, ''].flatten.compact.join('|')
|
70
|
+
end
|
71
|
+
|
72
|
+
def generate_signature
|
73
|
+
Base64.encode64(Digest::SHA1.digest(generate_signature_string)).gsub(/\n/, '')
|
74
|
+
end
|
75
|
+
|
76
|
+
def acknowledge
|
77
|
+
security_key == generate_signature
|
78
|
+
end
|
79
|
+
end
|
80
|
+
end
|
81
|
+
end
|
82
|
+
end
|
83
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
module ActiveMerchant #:nodoc:
|
2
|
+
module Billing #:nodoc:
|
3
|
+
module Integrations #:nodoc:
|
4
|
+
# Documentation: https://www.liqpay.com/?do=pages&p=cnb10
|
5
|
+
module Liqpay
|
6
|
+
autoload :Helper, File.dirname(__FILE__) + '/liqpay/helper.rb'
|
7
|
+
autoload :Notification, File.dirname(__FILE__) + '/liqpay/notification.rb'
|
8
|
+
autoload :Return, File.dirname(__FILE__) + '/liqpay/return.rb'
|
9
|
+
|
10
|
+
mattr_accessor :service_url
|
11
|
+
self.service_url = 'https://liqpay.com/?do=clickNbuy'
|
12
|
+
|
13
|
+
mattr_accessor :signature_parameter_name
|
14
|
+
self.signature_parameter_name = 'signature'
|
15
|
+
|
16
|
+
def self.helper(order, account, options = {})
|
17
|
+
Helper.new(order, account, options)
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.notification(query_string, options = {})
|
21
|
+
Notification.new(query_string, options)
|
22
|
+
end
|
23
|
+
|
24
|
+
def self.return(query_string)
|
25
|
+
Return.new(query_string)
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,119 @@
|
|
1
|
+
module ActiveMerchant #:nodoc:
|
2
|
+
module Billing #:nodoc:
|
3
|
+
module Integrations #:nodoc:
|
4
|
+
module Maksuturva
|
5
|
+
class Helper < ActiveMerchant::Billing::Integrations::Helper
|
6
|
+
def initialize(order, account, options = {})
|
7
|
+
md5secret options.delete(:credential2)
|
8
|
+
super
|
9
|
+
add_field("pmt_action", "NEW_PAYMENT_EXTENDED")
|
10
|
+
add_field("pmt_version", "0004")
|
11
|
+
add_field("pmt_sellerid", account)
|
12
|
+
add_field("pmt_hashversion", "MD5")
|
13
|
+
end
|
14
|
+
|
15
|
+
def md5secret(value)
|
16
|
+
@md5secret = value
|
17
|
+
end
|
18
|
+
|
19
|
+
def form_fields
|
20
|
+
@fields.merge("pmt_hash" => generate_md5string)
|
21
|
+
end
|
22
|
+
|
23
|
+
def generate_md5string
|
24
|
+
fields = [@fields["pmt_action"], @fields["pmt_version"]]
|
25
|
+
fields += [@fields["pmt_selleriban"]] unless @fields["pmt_selleriban"].nil?
|
26
|
+
fields += [@fields["pmt_id"], @fields["pmt_orderid"], @fields["pmt_reference"], @fields["pmt_duedate"],
|
27
|
+
@fields["pmt_amount"], @fields["pmt_currency"], @fields["pmt_okreturn"], @fields["pmt_errorreturn"], @fields["pmt_cancelreturn"],
|
28
|
+
@fields["pmt_delayedpayreturn"], @fields["pmt_escrow"], @fields["pmt_escrowchangeallowed"]]
|
29
|
+
|
30
|
+
fields += [@fields["pmt_invoicefromseller"]] unless @fields["pmt_invoicefromseller"].nil?
|
31
|
+
fields += [@fields["pmt_paymentmethod"]] unless @fields["pmt_paymentmethod"].nil?
|
32
|
+
fields += [@fields["pmt_buyeridentificationcode"]] unless @fields["pmt_buyeridentificationcode"].nil?
|
33
|
+
|
34
|
+
|
35
|
+
fields += [@fields["pmt_buyername"], @fields["pmt_buyeraddress"], @fields["pmt_buyerpostalcode"], @fields["pmt_buyercity"],
|
36
|
+
@fields["pmt_buyercountry"], @fields["pmt_deliveryname"], @fields["pmt_deliveryaddress"], @fields["pmt_deliverypostalcode"], @fields["pmt_deliverycity"],
|
37
|
+
@fields["pmt_deliverycountry"], @fields["pmt_sellercosts"]]
|
38
|
+
|
39
|
+
(1..@fields["pmt_rows"].to_i).each do |i|
|
40
|
+
fields += [@fields["pmt_row_name#{i}"], @fields["pmt_row_desc#{i}"], @fields["pmt_row_quantity#{i}"]]
|
41
|
+
fields += [@fields["pmt_row_articlenr#{i}"]] unless @fields["pmt_row_articlenr#{i}"].nil?
|
42
|
+
fields += [@fields["pmt_row_unit#{i}"]] unless @fields["pmt_row_unit#{i}"].nil?
|
43
|
+
fields += [@fields["pmt_row_deliverydate#{i}"]]
|
44
|
+
fields += [@fields["pmt_row_price_gross#{i}"]] unless @fields["pmt_row_price_gross#{i}"].nil?
|
45
|
+
fields += [@fields["pmt_row_price_net#{i}"]] unless @fields["pmt_row_price_net#{i}"].nil?
|
46
|
+
fields += [@fields["pmt_row_vat#{i}"], @fields["pmt_row_discountpercentage#{i}"], @fields["pmt_row_type#{i}"]]
|
47
|
+
end
|
48
|
+
fields += [@md5secret]
|
49
|
+
fields = fields.join("&") + "&"
|
50
|
+
Digest::MD5.hexdigest(fields).upcase
|
51
|
+
end
|
52
|
+
|
53
|
+
mapping :pmt_selleriban, "pmt_selleriban"
|
54
|
+
mapping :pmt_reference, "pmt_reference"
|
55
|
+
mapping :pmt_duedate, "pmt_duedate"
|
56
|
+
mapping :pmt_userlocale, "pmt_userlocale"
|
57
|
+
mapping :pmt_escrow, "pmt_escrow"
|
58
|
+
mapping :pmt_escrowchangeallowed, "pmt_escrowchangeallowed"
|
59
|
+
mapping :pmt_invoicefromseller, "pmt_invoicefromseller"
|
60
|
+
mapping :pmt_paymentmethod, "pmt_paymentmethod"
|
61
|
+
mapping :pmt_buyeridentificationcode, "pmt_buyeridentificationcode"
|
62
|
+
mapping :pmt_buyername, "pmt_buyername"
|
63
|
+
|
64
|
+
mapping :account, ''
|
65
|
+
mapping :currency, 'pmt_currency'
|
66
|
+
mapping :amount, 'pmt_amount'
|
67
|
+
|
68
|
+
mapping :order, 'pmt_id'
|
69
|
+
mapping :pmt_orderid, 'pmt_orderid'
|
70
|
+
mapping :pmt_deliveryname, "pmt_deliveryname"
|
71
|
+
mapping :pmt_deliveryaddress, "pmt_deliveryaddress"
|
72
|
+
mapping :pmt_deliverypostalcode, "pmt_deliverypostalcode"
|
73
|
+
mapping :pmt_deliverycity, "pmt_deliverycity"
|
74
|
+
mapping :pmt_deliverycountry, "pmt_deliverycountry"
|
75
|
+
mapping :pmt_sellercosts, "pmt_sellercosts"
|
76
|
+
mapping :pmt_rows, "pmt_rows"
|
77
|
+
|
78
|
+
(1..499.to_i).each do |i|
|
79
|
+
mapping "pmt_row_name#{i}".to_sym, "pmt_row_name#{i}"
|
80
|
+
mapping "pmt_row_desc#{i}".to_sym, "pmt_row_desc#{i}"
|
81
|
+
mapping "pmt_row_quantity#{i}".to_sym, "pmt_row_quantity#{i}"
|
82
|
+
mapping "pmt_row_articlenr#{i}".to_sym, "pmt_row_articlenr#{i}"
|
83
|
+
mapping "pmt_row_unit#{i}".to_sym, "pmt_row_unit#{i}"
|
84
|
+
mapping "pmt_row_deliverydate#{i}".to_sym, "pmt_row_deliverydate#{i}"
|
85
|
+
mapping "pmt_row_price_gross#{i}".to_sym, "pmt_row_price_gross#{i}"
|
86
|
+
mapping "pmt_row_price_net#{i}".to_sym, "pmt_row_price_net#{i}"
|
87
|
+
mapping "pmt_row_vat#{i}".to_sym, "pmt_row_vat#{i}"
|
88
|
+
mapping "pmt_row_discountpercentage#{i}".to_sym, "pmt_row_discountpercentage#{i}"
|
89
|
+
mapping "pmt_row_type#{i}".to_sym, "pmt_row_type#{i}"
|
90
|
+
end
|
91
|
+
|
92
|
+
mapping :pmt_charset, "pmt_charset"
|
93
|
+
mapping :pmt_charsethttp, "pmt_charsethttp"
|
94
|
+
mapping :pmt_hashversion, "pmt_hashversion"
|
95
|
+
mapping :pmt_keygeneration, "pmt_keygeneration"
|
96
|
+
mapping :customer, :email => 'pmt_buyeremail',
|
97
|
+
:phone => 'pmt_buyerphone'
|
98
|
+
|
99
|
+
mapping :billing_address, :city => 'pmt_buyercity',
|
100
|
+
:address1 => "pmt_buyeraddress",
|
101
|
+
:address2 => '',
|
102
|
+
:state => '',
|
103
|
+
:zip => "pmt_buyerpostalcode",
|
104
|
+
:country => 'pmt_buyercountry'
|
105
|
+
|
106
|
+
mapping :notify_url, ''
|
107
|
+
mapping :return_url, 'pmt_okreturn'
|
108
|
+
mapping :pmt_errorreturn, 'pmt_errorreturn'
|
109
|
+
mapping :pmt_delayedpayreturn, 'pmt_delayedpayreturn'
|
110
|
+
mapping :cancel_return_url, 'pmt_cancelreturn'
|
111
|
+
|
112
|
+
mapping :description, ''
|
113
|
+
mapping :tax, ''
|
114
|
+
mapping :shipping, ''
|
115
|
+
end
|
116
|
+
end
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
require "net/http"
|
2
|
+
|
3
|
+
module ActiveMerchant #:nodoc:
|
4
|
+
module Billing #:nodoc:
|
5
|
+
module Integrations #:nodoc:
|
6
|
+
module Maksuturva
|
7
|
+
class Notification < ActiveMerchant::Billing::Integrations::Notification
|
8
|
+
def complete?
|
9
|
+
true
|
10
|
+
end
|
11
|
+
|
12
|
+
def transaction_id
|
13
|
+
params["pmt_id"]
|
14
|
+
end
|
15
|
+
|
16
|
+
def security_key
|
17
|
+
params["pmt_hash"]
|
18
|
+
end
|
19
|
+
|
20
|
+
def gross
|
21
|
+
params["pmt_amount"]
|
22
|
+
end
|
23
|
+
|
24
|
+
def currency
|
25
|
+
params["pmt_currency"]
|
26
|
+
end
|
27
|
+
|
28
|
+
def status
|
29
|
+
"PAID"
|
30
|
+
end
|
31
|
+
|
32
|
+
def acknowledge(authcode)
|
33
|
+
return_authcode = [params["pmt_action"], params["pmt_version"], params["pmt_id"], params["pmt_reference"], params["pmt_amount"], params["pmt_currency"], params["pmt_sellercosts"], params["pmt_paymentmethod"], params["pmt_escrow"], authcode].join("&")
|
34
|
+
(Digest::MD5.hexdigest(return_authcode + "&").upcase == params["pmt_hash"])
|
35
|
+
end
|
36
|
+
|
37
|
+
private
|
38
|
+
|
39
|
+
def parse(post)
|
40
|
+
post.each do |key, value|
|
41
|
+
params[key] = value
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,86 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/maksuturva/helper.rb'
|
2
|
+
require File.dirname(__FILE__) + '/maksuturva/notification.rb'
|
3
|
+
|
4
|
+
# USAGE:
|
5
|
+
#
|
6
|
+
# First define Maksuturva seller id and authcode in an initializer:
|
7
|
+
#
|
8
|
+
# MAKSUTURVA_SELLERID = "testikauppias"
|
9
|
+
# MAKSUTURVA_AUTHCODE = "11223344556677889900"
|
10
|
+
#
|
11
|
+
# Then in view do something like this (use dynamic values for your app)
|
12
|
+
#
|
13
|
+
# <% payment_service_for 2, MAKSUTURVA_SELLERID,
|
14
|
+
# :amount => "200,00", :currency => 'EUR', :credential2 => MAKSUTURVA_AUTHCODE,
|
15
|
+
# :service => :maksuturva do |service|
|
16
|
+
# service.pmt_reference = "134662"
|
17
|
+
# service.pmt_duedate = "24.06.2012"
|
18
|
+
# service.customer :phone => "0405051909",
|
19
|
+
# :email => "antti@example.com"
|
20
|
+
# service.billing_address :city => "Helsinki",
|
21
|
+
# :address1 => "Lorem street",
|
22
|
+
# :state => "-",
|
23
|
+
# :country => 'Finland',
|
24
|
+
# :zip => "00530"
|
25
|
+
# service.pmt_orderid = "2"
|
26
|
+
# service.pmt_buyername = "Antti Akonniemi"
|
27
|
+
# service.pmt_deliveryname = "Antti Akonniemi"
|
28
|
+
# service.pmt_deliveryaddress = "Köydenpunojankatu 13"
|
29
|
+
# service.pmt_deliverypostalcode = "00180"
|
30
|
+
# service.pmt_deliverycity = "Helsinki"
|
31
|
+
# service.pmt_deliverycountry = "FI"
|
32
|
+
# service.pmt_rows = 1
|
33
|
+
# service.pmt_row_name1 = "testi"
|
34
|
+
# service.pmt_row_desc1 = "Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum."
|
35
|
+
# service.pmt_row_articlenr1 = "1"
|
36
|
+
# service.pmt_row_quantity1 = "1"
|
37
|
+
# service.pmt_row_deliverydate1 = "26.6.2012"
|
38
|
+
# service.pmt_row_price_gross1 = "200,00"
|
39
|
+
# service.pmt_row_vat1= "23,00"
|
40
|
+
# service.pmt_row_discountpercentage1 = "0,00"
|
41
|
+
# service.pmt_row_type1 = "1"
|
42
|
+
# service.pmt_charset = "UTF-8"
|
43
|
+
# service.pmt_charsethttp = "UTF-8"
|
44
|
+
#
|
45
|
+
# service.return_url "http://localhost:3000/process"
|
46
|
+
# service.cancel_return_url "http://example.com"
|
47
|
+
# service.pmt_errorreturn "http://example.com"
|
48
|
+
#
|
49
|
+
# service.pmt_delayedpayreturn "http://example.com"
|
50
|
+
# service.pmt_escrow "N"
|
51
|
+
# service.pmt_escrowchangeallowed "N"
|
52
|
+
# service.pmt_sellercosts "0,00"
|
53
|
+
# service.pmt_keygeneration "001"
|
54
|
+
# %>
|
55
|
+
#
|
56
|
+
# Then in the controller handle the return with something like this
|
57
|
+
#
|
58
|
+
# def ipn
|
59
|
+
# notify = ActiveMerchant::Billing::Integrations::Maksuturva::Notification.new(params)
|
60
|
+
#
|
61
|
+
# if notify.acknowledge(MAKSUTURVA_AUTHCODE)
|
62
|
+
# # Process order
|
63
|
+
# else
|
64
|
+
# # Show error
|
65
|
+
# end
|
66
|
+
# end
|
67
|
+
#
|
68
|
+
# For full list of available parameters etc check the integration documents
|
69
|
+
# here:
|
70
|
+
#
|
71
|
+
# https://www.maksuturva.fi/services/vendor_services/integration_guidelines.html
|
72
|
+
|
73
|
+
module ActiveMerchant #:nodoc:
|
74
|
+
module Billing #:nodoc:
|
75
|
+
module Integrations #:nodoc:
|
76
|
+
module Maksuturva
|
77
|
+
mattr_accessor :service_url
|
78
|
+
self.service_url = 'https://www.maksuturva.fi/NewPaymentExtended.pmt'
|
79
|
+
|
80
|
+
def self.notification(post)
|
81
|
+
Notification.new(post)
|
82
|
+
end
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
end
|