From 92cf674731966846021279e4b422e7f6fc12a70d Mon Sep 17 00:00:00 2001 From: ivan Date: Thu, 2 Oct 2003 14:20:24 +0000 Subject: [PATCH] add emaildecline-exclude config option --- FS/FS/Conf.pm | 7 +++++++ FS/FS/cust_bill.pm | 2 ++ 2 files changed, 9 insertions(+) diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index 71d9cf417..7a827dc55 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -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.', diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index d5c3b9e92..27c4178d9 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -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 ( -- 2.11.0