summaryrefslogtreecommitdiff
path: root/httemplate/misc/process
diff options
context:
space:
mode:
authorivan <ivan>2007-11-29 02:55:11 +0000
committerivan <ivan>2007-11-29 02:55:11 +0000
commit7d1a133f207a54f9a996e860edd74b16e936c27c (patch)
tree3751b5b76445d2ab4f0fe8af843e8f38ce25bc79 /httemplate/misc/process
parent7054cae12e246c80dbb239cc71bc28b89d58ef2c (diff)
even more reliable multiple-payment/double-click/concurrent-payment-form protection
Diffstat (limited to 'httemplate/misc/process')
-rw-r--r--httemplate/misc/process/payment.cgi5
1 files changed, 5 insertions, 0 deletions
diff --git a/httemplate/misc/process/payment.cgi b/httemplate/misc/process/payment.cgi
index 71a4891cf..889670d12 100644
--- a/httemplate/misc/process/payment.cgi
+++ b/httemplate/misc/process/payment.cgi
@@ -56,6 +56,10 @@ $cgi->param('payunique') =~ /^([\w \!\@\#\$\%\&\(\)\-\+\;\:\'\"\,\.\?\/\=]*)$/
or errorpage(gettext('illegal_text'). " payunique: ". $cgi->param('payunique'));
my $payunique = $1;
+$cgi->param('balance') =~ /^\s*(\-?\s*\d*(\.\d\d)?)\s*$/
+ or errorpage("illegal balance");
+my $balance = $1;
+
my $payinfo;
my $paycvv = '';
if ( $payby eq 'CHEK' ) {
@@ -125,6 +129,7 @@ if ( $cgi->param('batch') ) {
$error = $cust_main->realtime_bop( $FS::payby::payby2bop{$payby}, $amount,
'quiet' => 1,
'manual' => 1,
+ 'balance' => $balance,
'payinfo' => $payinfo,
'paydate' => "$year-$month-01",
'payname' => $payname,