example.pl untested

filter: Statementstmt 0.0% 0 / 15 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod n/a totaltotal 0.0% 0 / 18 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 #!/usr/bin/perl -Ilib -Iblib/lib
2  
3 use strict;
4 use Business::MaxMind::CreditCardFraudDetection;
5  
6 # Enter your license key here (non registered users limited to 20 lookups per day)
7 my $license_key = 'ENTER_LICENSE_KEY_HERE';
8  
9 # Constructor parameters:
10 # isSecure
11 # = 0 then use Regular HTTP
12 # = 1 then use Secure HTTP
13 # debug
14 # = 0 then print no debuging info
15 # = 1 then print debuging info
16 # timeout
17 # time in seconds to wait before timing out and returning
18  
19 my $ccfs = Business::MaxMind::CreditCardFraudDetection->new(
20 isSecure => 1,
21 debug => 1,
22 timeout => 5,
23 );
24  
25 # see http://www.maxmind.com/app/ccv for description of fields
26 $ccfs->input(
27  
28 # required fields
29 i => '24.24.24.24',
30 city => 'NewYork',
31 region => 'NY',
32 postal => '11434',
33 country => 'US',
34 license_key => $license_key,
35  
36 # recommended fields
37 domain => 'yahoo.com',
38 bin => '549099',
39 custPhone => '212-242',
40 forwardedIP => '24.24.24.25',
41  
42 # optional fields
43 binName => 'MBNA America Bank',
44 binPhone => '800-421-2110',
45 requested_type => 'premium',
46  
47 # Business::MaxMind::CreditCardFraudDetection will take
48 # MD5 hash of e-mail address passed to emailMD5 if it
49 # detects '@' in the string
50 emailMD5 => 'Adeeb@Hackstyle.com',
51 usernameMD5 => 'test_carder_username',
52 passwordMD5 => 'test_carder_password',
53 shipAddr => '145-50 157TH STREET',
54 shipCity => 'Jamaica',
55 shipRegion => 'NY',
56 shipPostal => '11434',
57 shipCountry => 'US',
58 txnID => '1234',
59 sessionID => 'abcd9876',
60 accept_language => 'de-de',
61 user_agent =>
62 'Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; Media Center PC 3.1; .NET CLR 1.1.4322)',
63 );
64 $ccfs->query;
65 my $hash_ref = $ccfs->output;
66  
67 use Data::Dumper;
68 print Dumper($hash_ref);