- _risk_detect(): explicity set return value
authorplobbes <plobbes>
Mon, 20 Nov 2006 06:49:06 +0000 (06:49 +0000)
committerplobbes <plobbes>
Mon, 20 Nov 2006 06:49:06 +0000 (06:49 +0000)
- _pre_submit(): explicity set return value
- BUG: _pre_submit() returns success if fraud detection is used but not found!
  this behavior is unchanged but this is probably a bug / bad behavior (Ivan?)

OnlinePayment.pm

index 3f95cd1..c8f7438 100644 (file)
@@ -83,13 +83,13 @@ sub _risk_detect {
        if ( $risk_transaction->fraud_score <= $self->maximum_fraud_score()) {
            return 1;
        } else {
-           $self->is_success(0);
            $self->error_message('Excessive risk from risk management');
        }
     } else {
        $self->error_message('Error in risk detection stage: ' .  $risk_transaction->error_message);
-       $self->is_success(0);
     }
+    $self->is_success(0);
+    return 0;
 }
 
 sub _pre_submit {
@@ -119,6 +119,7 @@ sub _pre_submit {
            }
        }
     }
+    return 1; # BUG?: success if fraud_detection module not found!
 }
 
 sub content {