add emaildecline-exclude config option
authorivan <ivan>
Thu, 2 Oct 2003 14:20:24 +0000 (14:20 +0000)
committerivan <ivan>
Thu, 2 Oct 2003 14:20:24 +0000 (14:20 +0000)
FS/FS/Conf.pm
FS/FS/cust_bill.pm

index 71d9cf4..7a827dc 100644 (file)
@@ -965,6 +965,13 @@ httemplate/docs/config.html
   },
 
   {
+    'key'         => 'emaildecline-exclude',
+    'section'     => 'billing',
+    'description' => 'List of error messages that should not trigger email decline notices, one per line.',
+    'type'        => 'textarea',
+  },
+
+  {
     'key'         => 'cancelmessage',
     'section'     => 'billing',
     'description' => 'Template file for cancellation emails.',
index d5c3b9e..27c4178 100644 (file)
@@ -860,6 +860,8 @@ sub realtime_bop {
 
     if ( !$realtime_bop_decline_quiet && $conf->exists('emaildecline')
          && grep { $_ ne 'POST' } $cust_main->invoicing_list
+         && ! grep { $_ eq $transaction->error_message }
+                   $conf->config('emaildecline-exclude')
     ) {
       my @templ = $conf->config('declinetemplate');
       my $template = new Text::Template (