Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git] / FS / FS / ClientAPI / Signup.pm
index bc69a5f..a178bec 100644 (file)
@@ -694,6 +694,9 @@ sub new_customer {
         map { $_ => $packet->{$_} }
           qw( username _password sec_phrase popnum domsvc ),
       };
+      
+      my $error = $svc->is_password_allowed($packet->{_password});
+      return { error => $error } if $error;
 
       my @acct_snarf;
       my $snarfnum = 1;
@@ -830,8 +833,8 @@ sub new_customer {
 
       #this used to apply a credit, but now we can void invoices...
       foreach my $cust_bill (@cust_bill) {
-        my $voiderror = $cust_bill->void();
-        warn "Error voiding cust bill after decline: $voiderror";
+        my $voiderror = $cust_bill->void('automatic payment failed');
+        warn "Error voiding cust bill after decline: $voiderror" if $voiderror;
       }
 
       #should check list for errors...