File Coverage

blib/lib/WebService/PayPal/PaymentsAdvanced/Mocker/PayflowLink.pm
Criterion Covered Total %
statement 5 5 100.0
branch n/a
condition n/a
subroutine 2 2 100.0
pod 1 1 100.0
total 8 8 100.0


line stmt bran cond sub pod time code
1             package WebService::PayPal::PaymentsAdvanced::Mocker::PayflowLink;
2              
3 6     6   2952 use Mojolicious::Lite;
  6         3104572  
  6         41  
4              
5             our $VERSION = '0.000028';
6              
7             # A GET request will be a request for the hosted form.
8              
9             get '/' => sub {
10             my $c = shift;
11             $c->render( text => 'Hosted form would be here' );
12             };
13              
14             sub to_app {
15             ## no critic (RequireExplicitInclusion)
16 29     29 1 201 app->secrets( ['Tempus fugit'] );
17 29         662 app->start;
18             }
19              
20             1;
21              
22             =pod
23              
24             =encoding UTF-8
25              
26             =head1 NAME
27              
28             WebService::PayPal::PaymentsAdvanced::Mocker::PayflowLink - A simple app to enable easy Payflow Link (hosted form) mocking
29              
30             =head1 VERSION
31              
32             version 0.000028
33              
34             =head1 DESCRIPTION
35              
36             A simple app to enable easy Payflow Link (hosted form) mocking.
37              
38             =head2 to_app
39              
40             use WebService::PayPal::PaymentsAdvanced::Mocker::PayflowLink;
41             my $app = WebService::PayPal::PaymentsAdvanced::Mocker::PayflowLink->to_app;
42              
43             If you require a Plack app to be returned, you'll need to give Mojo the correct
44             hint:
45              
46             use WebService::PayPal::PaymentsAdvanced::Mocker::PayflowLink;
47              
48             local $ENV{PLACK_ENV} = 'development'; #
49             my $app = WebService::PayPal::PaymentsAdvanced::Mocker::PayflowLink->to_app;
50              
51             =head1 SUPPORT
52              
53             Bugs may be submitted through L<https://github.com/maxmind/webservice-paypal-paymentsadvanced/issues>.
54              
55             =head1 AUTHOR
56              
57             Olaf Alders <olaf@wundercounter.com>
58              
59             =head1 COPYRIGHT AND LICENSE
60              
61             This software is copyright (c) 2022 by MaxMind, Inc.
62              
63             This is free software; you can redistribute it and/or modify it under
64             the same terms as the Perl 5 programming language system itself.
65              
66             =cut
67              
68             __END__
69              
70             # ABSTRACT: A simple app to enable easy Payflow Link (hosted form) mocking
71