[freeside-commits] freeside/FS/FS/ClientAPI Signup.pm,1.72,1.73
Ivan,,,
ivan at wavetail.420.am
Fri Jul 15 14:10:08 PDT 2011
Update of /home/cvs/cvsroot/freeside/FS/FS/ClientAPI
In directory wavetail.420.am:/tmp/cvs-serv5168/FS/FS/ClientAPI
Modified Files:
Signup.pm
Log Message:
add signup-duplicate_cc-warn_hours to warn about duplicate signups in a time span, RT#12011
Index: Signup.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/ClientAPI/Signup.pm,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -w -d -r1.72 -r1.73
--- Signup.pm 12 May 2011 19:57:01 -0000 1.72
+++ Signup.pm 15 Jul 2011 21:10:06 -0000 1.73
@@ -22,6 +22,7 @@
use FS::queue;
use FS::reg_code;
use FS::payby;
+use FS::banned_pay;
$DEBUG = 0;
$me = '[FS::ClientAPI::Signup]';
@@ -562,6 +563,7 @@
payinfo paycvv paydate payname paystate paytype
paystart_month paystart_year payissue
payip
+ override_ban_warn
referral_custnum comments
)
@@ -807,6 +809,18 @@
$error = $placeholder->delete;
return { 'error' => $error } if $error;
+ if ( $conf->exists('signup-duplicate_cc-warn_hours') ) {
+ my $hours = $conf->config('signup-duplicate_cc-warn_hours');
+ my $ban = new FS::banned_pay $cust_main->_new_banned_pay_hashref;
+ $ban->end_date( int( time + $hours*3600 ) );
+ $ban->bantype('warn');
+ $ban->reason('signup-duplicate_cc-warn_hours');
+ $error = $ban->insert;
+ warn "WARNING: error inserting temporary banned_pay for ".
+ " signup-duplicate_cc-warn_hours (proceeding anyway): $error"
+ if $error;
+ }
+
my %return = ( 'error' => '',
'signup_service' => $svc_x,
'custnum' => $cust_main->custnum,
More information about the freeside-commits
mailing list