From 910b448448b9cdfc224f1242727329818bd8ed49 Mon Sep 17 00:00:00 2001 From: David Bourguignon Date: Mon, 30 Jan 2012 11:26:07 +0100 Subject: [PATCH] use options hash for return urls --- lib/paiement_cic/form_helper.rb | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/paiement_cic/form_helper.rb b/lib/paiement_cic/form_helper.rb index 15dbbff..32b768c 100644 --- a/lib/paiement_cic/form_helper.rb +++ b/lib/paiement_cic/form_helper.rb @@ -8,6 +8,10 @@ module PaiementCic::FormHelper chaine = [oMac.tpe, sDate, oa["montant"], oa["reference"].to_s, oa["texte-libre"], oMac.version, "FR", oMac.societe, "", "", "", "", "", "", "", "", "", "", ""].join("*") chaineMAC = oMac.computeHMACSHA1(chaine) + url_retour = options[:url_retour] || bank_callback_order_transactions_url + url_retour_ok = options[:url_retour_ok] || bank_callback_order_transactions_url(order) + url_retour_err = options[:url_retour_err] || bank_err_order_transaction_url(order) + html = ' @@ -15,9 +19,9 @@ module PaiementCic::FormHelper - - - + + +