[freeside-commits] freeside/FS/FS/ClientAPI Signup.pm, 1.64.2.8, 1.64.2.9

Ivan,,, ivan at wavetail.420.am
Fri Jul 15 14:10:22 PDT 2011


Update of /home/cvs/cvsroot/freeside/FS/FS/ClientAPI
In directory wavetail.420.am:/tmp/cvs-serv5187/FS/FS/ClientAPI

Modified Files:
      Tag: FREESIDE_2_1_BRANCH
	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.64.2.8
retrieving revision 1.64.2.9
diff -u -w -d -r1.64.2.8 -r1.64.2.9
--- Signup.pm	12 May 2011 19:57:10 -0000	1.64.2.8
+++ Signup.pm	15 Jul 2011 21:10:20 -0000	1.64.2.9
@@ -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