added stuff for selfservice_server-quiet, signup_server-quiet, and
authorsteve <steve>
Mon, 23 Dec 2002 14:24:06 +0000 (14:24 +0000)
committersteve <steve>
Mon, 23 Dec 2002 14:24:06 +0000 (14:24 +0000)
emailcancel messages.

FS/FS/Conf.pm
FS/FS/cust_bill.pm

index 6de3115..f0a4c9f 100644 (file)
@@ -880,6 +880,20 @@ httemplate/docs/config.html
   },
 
   {
+    'key'         => 'selfservice_server-quiet',
+    'section'     => '',
+    'description' => 'Disable decline and cancel emails generated by transactions initiated by the selfservice server. Not recommended, unless the customer will get instant feedback from a customer service UI, and receiving an email would be confusing/overkill.',
+    'type'        => 'checkbox',
+  },
+
+  {
+    'key'         => 'signup_server-quiet',
+    'section'     => '',
+    'description' => 'Disable decline and cancel emails generated by transactions initiated by the signup server. Not recommended, unless the customer will get instant feedback from a customer service UI, and receiving an email would be confusing/overkill. Does not disable welcome emails.',
+    'type'        => 'checkbox',
+  },
+
+  {
     'key'         => 'signup_server-payby',
     'section'     => '',
     'description' => 'Acceptable payment types for the signup server',
@@ -924,6 +938,27 @@ httemplate/docs/config.html
   },
 
   {
+    'key'         => 'cancelmessage',
+    'section'     => 'billing',
+    'description' => 'Template file for cancellation emails.',
+    'type'        => 'textarea',
+  },
+
+  {
+    'key'         => 'cancelsubject',
+    'section'     => 'billing',
+    'description' => 'Subject line for cancellation emails.',
+    'type'        => 'text',
+  },
+
+  {
+    'key'         => 'emailcancel',
+    'section'     => 'billing',
+    'description' => 'Enable emailing of cancellation notices.',
+    'type'        => 'checkbox',
+  },
+
+  {
     'key'         => 'require_cardname',
     'section'     => 'billing',
     'description' => 'Require an "Exact name on card" to be entered explicitly; don\'t default to using the first and last name.',
index 23e8731..4831519 100644 (file)
@@ -7,6 +7,7 @@ use vars qw( $xaction $E_NoErr );
 use vars qw( $bop_processor $bop_login $bop_password $bop_action @bop_options );
 use vars qw( $ach_processor $ach_login $ach_password $ach_action @ach_options );
 use vars qw( $invoice_lines @buf ); #yuck
+use vars qw( $quiet );
 use Date::Format;
 use Mail::Internet 1.44;
 use Mail::Header;
@@ -823,7 +824,7 @@ sub realtime_bop {
     my $perror = "$processor error, invnum #". $self->invnum. ': '.
                  $transaction->result_code. ": ". $transaction->error_message;
 
-    if ( $conf->exists('emaildecline')
+    if ( !$quiet && $conf->exists('emaildecline')
          && grep { $_ ne 'POST' } $cust_main->invoicing_list
     ) {
       my @templ = $conf->config('declinetemplate');
@@ -1119,7 +1120,7 @@ sub print_text {
 
 =head1 VERSION
 
-$Id: cust_bill.pm,v 1.57 2002-12-17 21:31:20 ivan Exp $
+$Id: cust_bill.pm,v 1.58 2002-12-23 14:22:48 steve Exp $
 
 =head1 BUGS