1
package Business::FraudDetect;
5
use vars qw / $VERSION @ISA /;
8
@ISA = qw / Business::OnlinePayment /;
16
Business::FraudDetect - A cohort to Business::OnlinePayment
20
my %processor_info = ( fraud_detection => 'preCharge',
21
maximum_fraud_score => 500,
22
preCharge_id => '1000000000000001',
23
preCharge_security1 => 'abcdef0123',
24
preCharge_security2 => '3210fedcba',
26
my $transaction = new Business::OnlinePayment($processor, %processor_info);
27
$transaction->content(
30
cardnumber => '1234123412341238',
34
$transaction->submit();
36
if($transaction->is_success()) {
37
print "Card processed successfully: ".$transaction->authorization()."\n";
39
print "Card was rejected: ".$transaction->error_message()."\n";
44
This is a module that adds functionality to Business::OnlinePayment. See L<Business::OnlinePayment>.
46
The user instantiates a Business::OnlinePayment object per usual, adding in three processor directives
50
=item * fraud_detection
52
Which Fraud Detection module to use.
54
=item * maximum_fraud_score
56
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.
58
=item * other driver-specific parameters.
60
Consult the specific Fraud Detection module you intend to use for its required parameters.
64
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.
68
This module provides no new methods. It does, however override the
69
submit method to interpose an additional Fraud Detection phase.
73
Lawrence Statton <lawrence@cluon.com>
77
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.
81
http://420.am/business-onlinepayment