From: plobbes Date: Mon, 20 Nov 2006 06:49:06 +0000 (+0000) Subject: - _risk_detect(): explicity set return value X-Git-Tag: BUSINESS_ONLINEPAYMENT_3_00_05~3 X-Git-Url: http://git.freeside.biz/gitweb/?p=Business-OnlinePayment.git;a=commitdiff_plain;h=b5883afef1f9e6b50c76ec6de39980fb820248fb - _risk_detect(): explicity set return value - _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?) --- diff --git a/OnlinePayment.pm b/OnlinePayment.pm index 3f95cd1..c8f7438 100644 --- a/OnlinePayment.pm +++ b/OnlinePayment.pm @@ -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 {