PaymentsAdvanced/Mocker/PayflowLink.pm

filter: Statementstmt 80.0% 8 / 10 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 66.6% 2 / 3 Podpod 100% 1 / 1 totaltotal 78.5% 11 / 14 CC 1 SCAR 2.9
CC
1
Cov
80%
__ANON__
2.0
BEGIN
1.0
to_app
1.0
CRAP 1.3
« PaymentsAdvanced/Role/HasCreditCard.pm ↑ Summary PaymentsAdvanced/Role/HasPayPal.pm »
1 package WebService::PayPal::PaymentsAdvanced::Mocker::PayflowLink;
2  
3 6 ▶use Mojolicious::Lite;
Subroutine BEGIN: called CC=1 SCAR=0.0
4  
5 6 our $VERSION = '0.000028';
6  
7 # A GET request will be a request for the hosted form.
8  
9 0 ▶get '/' => sub {
Subroutine __ANON__: not called CC=1 SCAR=6.9
10 0 my $c = shift;
11 0 $c->render( text => 'Hosted form would be here' );
12 6 };
13  
14 29 ▶sub to_app {
Subroutine to_app: called CC=1 SCAR=0.0
Pod documented
15 ## no critic (RequireExplicitInclusion)
16 29 app->secrets( ['Tempus fugit'] );
17 29 app->start;
18 }
19  
20 6 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__
« PaymentsAdvanced/Role/HasCreditCard.pm ↑ Summary PaymentsAdvanced/Role/HasPayPal.pm »