line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package WebService::MinFraud::Data::Rx::Type::CCToken; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
43
|
use 5.010; |
|
2
|
|
|
|
|
6
|
|
4
|
|
|
|
|
|
|
|
5
|
2
|
|
|
2
|
|
11
|
use strict; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
36
|
|
6
|
2
|
|
|
2
|
|
9
|
use warnings; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
49
|
|
7
|
2
|
|
|
2
|
|
10
|
use namespace::autoclean; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
19
|
|
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
our $VERSION = '1.009001'; |
10
|
|
|
|
|
|
|
|
11
|
2
|
|
|
2
|
|
174
|
use parent 'Data::Rx::CommonType::EasyNew'; |
|
2
|
|
|
|
|
5
|
|
|
2
|
|
|
|
|
29
|
|
12
|
|
|
|
|
|
|
|
13
|
2
|
|
|
2
|
|
161
|
use List::Util qw( all ); |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
147
|
|
14
|
2
|
|
|
2
|
|
12
|
use Role::Tiny::With; |
|
2
|
|
|
|
|
11
|
|
|
2
|
|
|
|
|
394
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
with 'WebService::MinFraud::Role::Data::Rx::Type'; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub assert_valid { |
19
|
5
|
|
|
5
|
0
|
438
|
my ( $self, $value ) = @_; |
20
|
|
|
|
|
|
|
|
21
|
5
|
100
|
66
|
|
|
45
|
return 1 |
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
22
|
|
|
|
|
|
|
if $value |
23
|
|
|
|
|
|
|
&& ( length($value) < 256 ) |
24
|
|
|
|
|
|
|
&& ( $value !~ m/^[0-9]{1,19}$/ ) |
25
|
|
|
|
|
|
|
&& ( $value =~ m/^[\x21-\x7E]+$/ ); |
26
|
|
|
|
|
|
|
|
27
|
4
|
|
|
|
|
28
|
$self->fail( |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
error => [qw(type)], |
30
|
|
|
|
|
|
|
message => |
31
|
|
|
|
|
|
|
'Found value is not considered a valid credit card token.', |
32
|
|
|
|
|
|
|
value => $value, |
33
|
|
|
|
|
|
|
} |
34
|
|
|
|
|
|
|
); |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub type_uri { |
38
|
|
|
|
|
|
|
## no critic(ValuesAndExpressions::ProhibitCommaSeparatedStatements) |
39
|
40
|
|
|
40
|
0
|
24701
|
'tag:maxmind.com,MAXMIND:rx/cctoken'; |
40
|
|
|
|
|
|
|
} |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
1; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
# ABSTRACT: A type to check for what MaxMind considers a valid credit card token |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
__END__ |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=pod |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
=encoding UTF-8 |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
=head1 NAME |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
WebService::MinFraud::Data::Rx::Type::CCToken - A type to check for what MaxMind considers a valid credit card token |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 VERSION |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
version 1.009001 |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=head1 SUPPORT |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
Bugs may be submitted through L<https://github.com/maxmind/minfraud-api-perl/issues>. |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
=head1 AUTHOR |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
Mateu Hunter <mhunter@maxmind.com> |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
This software is copyright (c) 2015 - 2019 by MaxMind, Inc. |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
73
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=cut |