don't say that an account was locked when it wasn't

changes/49/3949/1
Richard Fuchs 13 years ago committed by Kirill Solomko
parent 24923afc9d
commit 559a3031ac

@ -62,14 +62,16 @@ for my $e (@$a) {
my $cur = sprintf('%.2f', $e->{cash_balance_interval} / 100); my $cur = sprintf('%.2f', $e->{cash_balance_interval} / 100);
my $max = sprintf('%.2f', $e->{fraud_interval_limit} / 100); my $max = sprintf('%.2f', $e->{fraud_interval_limit} / 100);
my $body; my ($subject, $body);
if ($e->{fraud_interval_lock}) { if ($e->{fraud_interval_lock}) {
$body = "Account ID " . $e->{id} . " has been locked due to exceeding the configured" . "\n" $body = "Account ID " . $e->{id} . " has been locked due to exceeding the configured" . "\n"
. "credit balance threshold ($cur >= $max ).\n\n"; . "credit balance threshold ($cur >= $max ).\n\n";
$subject = 'Account ID ' . $e->{id} . ' locked by fraud detection';
} }
else { else {
$body = "Account ID " . $e->{id} . " is currently exceeding the configured credit balance" . "\n" $body = "Account ID " . $e->{id} . " is currently exceeding the configured credit balance" . "\n"
. "threshold ($cur >= $max), but has not been locked due to configuration.\n\n"; . "threshold ($cur >= $max), but has not been locked due to configuration.\n\n";
$subject = 'Account ID ' . $e->{id} . ' exceeding fraud detection limit';
} }
if (!$subs || !@$subs) { if (!$subs || !@$subs) {
@ -88,7 +90,7 @@ for my $e (@$a) {
header => [ header => [
To => $e->{fraud_interval_notify}, To => $e->{fraud_interval_notify},
From => $$conf{adminmail}, From => $$conf{adminmail},
Subject => 'Account ID ' . $e->{id} . 'locked by fraud detection', Subject => $subject,
], ],
body => $body, body => $body,
)); ));

Loading…
Cancel
Save