diff --git a/README.markdown b/README.markdown index 5dbbd6d..a117aba 100644 --- a/README.markdown +++ b/README.markdown @@ -32,7 +32,7 @@ script/plugin install git://github.com/novelys/paiementcic.git ### in order controller : - helper :paiement_cic + helper :'paiement_cic/form' ### in the payment by card view : diff --git a/init.rb b/init.rb index a4d18c5..3ae6e16 100644 --- a/init.rb +++ b/init.rb @@ -1,2 +1,2 @@ require "paiement_cic" -require "paiement_cic_helper" +require "paiement_cic/form_helper" diff --git a/lib/paiement_cic.rb b/lib/paiement_cic.rb index 487a4dc..90c5af5 100644 --- a/lib/paiement_cic.rb +++ b/lib/paiement_cic.rb @@ -14,6 +14,8 @@ class String end class PaiementCic + autoload :FormHelper, "paiement_cic/form_helper" + @@version = "3.0" # clé extraite grâce à extract2HmacSha1.html fourni par le Crédit Mutuel cattr_accessor :version diff --git a/lib/paiement_cic_helper.rb b/lib/paiement_cic/form_helper.rb similarity index 98% rename from lib/paiement_cic_helper.rb rename to lib/paiement_cic/form_helper.rb index 7cec90e..a171310 100644 --- a/lib/paiement_cic_helper.rb +++ b/lib/paiement_cic/form_helper.rb @@ -1,5 +1,5 @@ ## refactor this -module PaiementCicHelper +module PaiementCic::FormHelper def paiement_cic_hidden_fields(order, price, order_transaction, options = {}) oa = PaiementCic.config(price, order_transaction.reference)