summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorivan <ivan>2010-01-17 03:31:52 +0000
committerivan <ivan>2010-01-17 03:31:52 +0000
commit82515e96b3b6e572e453d1cec69085ee09ccfb3f (patch)
treebe60e3178fc5b18a52bdc4cc639356a3fd493013 /FS
parentf379188e8ba1388c4735de69defd794c3d96bcf6 (diff)
return an error for 0 amount payments to avoid a $0 payment getting stuck in declined or captured status, RT#6993
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/cust_main.pm2
1 files changed, 2 insertions, 0 deletions
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm
index fc16f14a6..50c840c51 100644
--- a/FS/FS/cust_main.pm
+++ b/FS/FS/cust_main.pm
@@ -4107,6 +4107,8 @@ sub realtime_bop {
warn " $_ => $options{$_}\n" foreach keys %options;
}
+ return "Amount must be greater than 0" unless $amount > 0;
+
unless ( $options{'description'} ) {
if ( $conf->exists('business-onlinepayment-description') ) {
my $dtempl = $conf->config('business-onlinepayment-description');