line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Business::Payment::Processor::Test::False; |
2
|
|
|
|
|
|
|
|
3
|
2
|
|
|
2
|
|
2059
|
use Moose; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
13
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
with 'Business::Payment::Processor'; |
6
|
|
|
|
|
|
|
|
7
|
2
|
|
|
2
|
|
8598
|
use Business::Payment::Result; |
|
2
|
|
|
|
|
280
|
|
|
2
|
|
|
|
|
103
|
|
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
1
|
0
|
4
|
sub request { return ( 'OK', 'OK' ); } |
10
|
1
|
|
|
1
|
0
|
2
|
sub prepare_data { return {} }; |
11
|
|
|
|
|
|
|
|
12
|
2
|
|
|
2
|
|
9
|
no Moose; |
|
2
|
|
|
|
|
3
|
|
|
2
|
|
|
|
|
11
|
|
13
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 NAME |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
Business::Payment::Processor::Test::False - Test Processor |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 SYNOPSIS |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
use Business::Payment; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
my $bp = Business::Payment->new( |
24
|
|
|
|
|
|
|
processor => Business::Payment::Processor::Test::False->new |
25
|
|
|
|
|
|
|
); |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
my $charge = Business::Payment::Charge->new( |
28
|
|
|
|
|
|
|
amount => 10.00 # Something Math::Currency can parse |
29
|
|
|
|
|
|
|
); |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
my $result = $bp->handle($charge); |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
print "Failed: ".$result->error_code.": ".$result->error_message."\n"; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 DESCRIPTION |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
Business::Payment::Processor::Test::False is test processor that always fails. |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 AUTHOR |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Cory G Watson, C<< <gphat@cpan.org> >> |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=head1 COPYRIGHT & LICENSE |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
Copyright 2009 Cold Hard Code, LLC, all rights reserved. |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
48
|
|
|
|
|
|
|
under the same terms as Perl itself. |