summaryrefslogtreecommitdiff
path: root/FraudDetect.pm
diff options
context:
space:
mode:
authorlawrence <lawrence>2006-08-17 00:39:34 +0000
committerlawrence <lawrence>2006-08-17 00:39:34 +0000
commitd1ffb1dddfef66b75320f92929616df6a784d821 (patch)
treef2fbbde33261f1d79f012c48fb72aa3901ef251e /FraudDetect.pm
parente4baa8fbc931498d1cf7cc3bdcf32f8dbea21186 (diff)
added POD
Diffstat (limited to 'FraudDetect.pm')
-rw-r--r--FraudDetect.pm75
1 files changed, 75 insertions, 0 deletions
diff --git a/FraudDetect.pm b/FraudDetect.pm
index 834e135..3624f5a 100644
--- a/FraudDetect.pm
+++ b/FraudDetect.pm
@@ -8,3 +8,78 @@ $VERSION = '0.01';
@ISA = qw / Business::OnlinePayment /;
1;
+
+=pod
+
+=head1 NAME
+
+Business::FraudDetect - A cohort to Business::OnlinePayment
+
+=head1 SYNOPSIS
+
+ my %processor_info = ( risk_Management => 'preCharge',
+ maximum_risk => 500,
+ risk_management_params => {
+ preCharge_id => '1000000000000001',
+ preCharge_security1 => 'abcdef0123',
+ preCharge_security2 => '3210fedcba',
+ },
+ )
+ my $transaction = new Business::OnlinePayment($processor, %processor_info);
+ $transaction->content(
+ type => 'Visa',
+ amount => '49.95',
+ cardnumber => '1234123412341238',
+ expiration => '0100',
+ name => 'John Q Doe',
+ );
+ $transaction->submit();
+
+ if($transaction->is_success()) {
+ print "Card processed successfully: ".$transaction->authorization()."\n";
+ } else {
+ print "Card was rejected: ".$transaction->error_message()."\n";
+ }
+
+=head1 DESCRIPTION
+
+This is a module that adds functionality to Business::OnlinePayment. See L<Business::OnlinePayment>.
+
+The user instantiates a Business::OnlinePayment object per usual, adding in three processor directives
+
+=over 4
+
+=item * risk_Management
+
+Which Fraud Detection module to use.
+
+=item * maximum_risk
+
+FraudDetection drivers are expected to return a numeric "risk" factor, this parameter allows you to set the threshold to reject the transaction based on that risk. Higher numbers are "riskier" transactions.
+
+=item * risk_management_params
+
+Driver-specific parameters. Extant module uses this to pass in identity/authorization credentials.
+
+=back
+
+The $tx->submit() method is overridden to interpose a FraudDetection phase. A subordinate object is created using the same content as the parent OnlinePayment object, and a I<Fraud Detect> action is run against that subordinate object. If the resulting fraud score is less than or equal to the maximum_risk parameter, the parent transaction will be allowed to proceed. Otherwise, a failure state will exist with a suitable error message.
+
+=head1 METHODS
+
+This module provides no new methods. It does, however override the
+submit method to interpose an additional Fraud Detection phase.
+
+=head1 AUTHORS
+
+Lawrence Statton <lawrence@cluon.com>
+
+=head1 DISCLAIMER
+
+THIS SOFTWARE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+
+=head1 SEE ALSO
+
+http://420.am/business-onlinepayment
+
+=cut