summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2003-10-02 14:20:29 +0000
committerivan <ivan>2003-10-02 14:20:29 +0000
commit1e9ae4ab4387c8d646476df989e2e92c15ce468d (patch)
tree334dc5c78e8c14e78ab89c7649b3d1201c7463c0
parent2563e2d621c76a1fe9987e99e68fbe33e3f7aa7e (diff)
add emaildecline-exclude config option
-rw-r--r--FS/FS/Conf.pm7
-rw-r--r--FS/FS/cust_main.pm2
2 files changed, 9 insertions, 0 deletions
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index 400de69d6..51feb3847 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -958,6 +958,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.',
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm
index de22ab5c5..2ee8a42f0 100644
--- a/FS/FS/cust_main.pm
+++ b/FS/FS/cust_main.pm
@@ -1774,6 +1774,8 @@ sub realtime_bop {
if ( !$options{'quiet'} && !$realtime_bop_decline_quiet
&& $conf->exists('emaildecline')
&& grep { $_ ne 'POST' } $self->invoicing_list
+ && ! grep { $_ eq $transaction->error_message }
+ $conf->config('emaildecline-exclude')
) {
my @templ = $conf->config('declinetemplate');
my $template = new Text::Template (