FraudDetect(3pm)
π΅οΈβοΈ FraudDetect β the Business::FraudDetect(3pm) manual, but make it a vibe
okay so bestie, gather round π this is the manual page for Business::FraudDetect, which the original describes as "A cohort to Business::OnlinePayment". It's a Perl module, it lives in the 3pm section, and it is literally just Business::OnlinePayment with a fraud-detection glow-up. Slay.
β¨ NAME β¨
Business::FraudDetect β a cohort to Business::OnlinePayment π«Ά
β¨ SYNOPSIS β¨
Here's the whole flex, verbatim, no cap:
my %processor_info = ( fraud_detection => 'preCharge',
maximum_fraud_score => 500,
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";
}
likeβ¦ the whole fraud check just happens inside that submit() and you get a yes/no at the end. main character energy tbh π
πΈ DESCRIPTION πΈ
This is the module that adds functionality to Business::OnlinePayment. Go read Business::OnlinePayment too, it's the parent situation π
So the way this works: you instantiate a Business::OnlinePayment object like you always do, except you slide in three processor directives. Three. That's the whole trick. Obsessed.
fraud_detectionβ tells it which Fraud Detection module to use.maximum_fraud_scoreβ FraudDetection drivers are expected to return a numeric "risk" factor, and this parameter is your threshold for rejecting the transaction based on that risk. Heads up bestie: higher numbers are "riskier" transactions. ππ- other driver-specific parameters β yeah these exist too. Consult the specific Fraud Detection module you intend to use for its required parameters, because I do not know them and neither does this page.
okay now the actual β¨magicβ¨. The $tx->submit() method is overridden to interpose a FraudDetection phase. A subordinate object gets created using the same content as the parent OnlinePayment object, and then a Fraud Detect action is run against that subordinate object.
- if the resulting fraud score is less than or equal to the
maximum_riskparameter β the parent transaction is allowed to proceed, we love to see it π - otherwise β a failure state will exist, with a suitable error message. it's giving rejected. π
ngl the exact boundary matters: less than or equal to passes, anything above gets denied. Don't be sloppy about it.
π METHODS π
Real talk: this module provides no new methods. Zero. None. π
What it does do is override the submit method to interpose an additional Fraud Detection phase. That's it. That's the whole contribution. And honestly? iconic.
π AUTHORS π
- Original author: Lawrence Statton
<lawrence@cluon.com> - Current maintainer: Ivan Kohler
<ivan-bop@420.am>as part of the Business::OnlinePayment distribution.
shoutout to the people keeping this alive, fr fr π«Ά
π DISCLAIMER π
Read this one carefully, it's the serious bit:
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.
translation: no promises, no guarantees, you're on your own bestie π
π SEE ALSO π
- Business::OnlinePayment
http://perl.business/onlinepayment
and that's the whole page, bestie! π this was perl v5.36.0, dated 2023-01-22, and it's FraudDetect(3pm) β go forth and detect some fraud, you absolute legend β¨π¦πΈ
π¦ where this page comes from
- debian bookworm: libbusiness-onlinepayment-perl 3.05-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libbusiness-onlinepayment-perl 3.05-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libbusiness-onlinepayment-perl 3.05-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libbusiness-onlinepayment-perl 3.05-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libbusiness-onlinepayment-perl 3.05-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms