Payment takes into account the amount when it is given (Closes #1567)
authorBrice Gelineau <brice.gelineau@polytechnique.org>
Fri, 18 Nov 2011 17:14:13 +0000 (18:14 +0100)
committerBrice Gelineau <brice.gelineau@polytechnique.org>
Fri, 18 Nov 2011 17:14:13 +0000 (18:14 +0100)
Signed-off-by: Brice Gelineau <brice.gelineau@polytechnique.org>
modules/payment.php

index c338852..e183dc8 100644 (file)
@@ -142,6 +142,9 @@ class PaymentModule extends PLModule
             $page->kill('La transaction selectionnée est périmée.');
         }
 
+        if (Env::has('montant')) {
+            $pay->amount_def = Env::v('montant');
+        }
         $val = (Post::v('amount') != 0) ? Post::v('amount') : $pay->amount_def;
 
         if (($error = $pay->check($val)) !== true) {