File Coverage

blib/lib/Stancer/Auth/Status.pm
Criterion Covered Total %
statement 17 17 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod n/a
total 23 23 100.0


line stmt bran cond sub pod time code
1             package Stancer::Auth::Status;
2              
3 19     19   414397 use 5.020;
  19         76  
4 19     19   112 use strict;
  19         45  
  19         617  
5 19     19   96 use warnings;
  19         74  
  19         2700  
6              
7             # ABSTRACT: Auth status values
8             our $VERSION = '1.0.3'; # VERSION
9              
10 19     19   1252 use Moo;
  19         21334  
  19         174  
11 19     19   11042 use namespace::clean;
  19         46407  
  19         133  
12              
13             use constant {
14 19         2994 ATTEMPTED => 'attempted',
15             AVAILABLE => 'available',
16             DECLINED => 'declined',
17             EXPIRED => 'expired',
18             FAILED => 'failed',
19             REQUEST => 'request',
20             REQUESTED => 'requested',
21             SUCCESS => 'success',
22             UNAVAILABLE => 'unavailable',
23 19     19   6633 };
  19         58  
24              
25              
26             1;
27              
28             __END__
29              
30             =pod
31              
32             =encoding UTF-8
33              
34             =head1 NAME
35              
36             Stancer::Auth::Status - Auth status values
37              
38             =head1 VERSION
39              
40             version 1.0.3
41              
42             =head1 Constants
43              
44             =head2 attempted
45              
46             Customer was redirected to his bank for authentication.
47              
48             =head2 available
49              
50             Customer strong authentication is possible.
51              
52             =head2 declined
53              
54             Authentication declined.
55              
56             =head2 expired
57              
58             Authentication sessions expired after 6 hours.
59              
60             =head2 failed
61              
62             Authentication failed.
63              
64             =head2 requested
65              
66             A strong authentication is awaiting for more information.
67              
68             =head2 success
69              
70             Authentication succeeded, processing can continue.
71              
72             =head2 unavailable
73              
74             The strong authentication is not available for this payment method.
75              
76             =head1 USAGE
77              
78             =head2 Logging
79              
80              
81              
82             We use the L<Log::Any> framework for logging events.
83             You may tell where it should log using any available L<Log::Any::Adapter> module.
84              
85             For example, to log everything to a file you just have to add a line to your script, like this:
86             #! /usr/bin/env perl
87             use Log::Any::Adapter (File => '/var/log/payment.log');
88             use Stancer::Auth::Status;
89              
90             You must import C<Log::Any::Adapter> before our libraries, to initialize the logger instance before use.
91              
92             You can choose your log level on import directly:
93             use Log::Any::Adapter (File => '/var/log/payment.log', log_level => 'info');
94              
95             Read the L<Log::Any> documentation to know what other options you have.
96              
97             =cut
98              
99             =head1 SECURITY
100              
101             =over
102              
103             =item *
104              
105             Never, never, NEVER register a card or a bank account number in your database.
106              
107             =item *
108              
109             Always uses HTTPS in card/SEPA in communication.
110              
111             =item *
112              
113             Our API will never give you a complete card/SEPA number, only the last four digits.
114             If you need to keep track, use these last four digit.
115              
116             =back
117              
118             =cut
119              
120             =head1 BUGS
121              
122             Please report any bugs or feature requests on the bugtracker website
123             L<https://gitlab.com/wearestancer/library/lib-perl/-/issues> or by email to
124             L<bug-stancer@rt.cpan.org|mailto:bug-stancer@rt.cpan.org>.
125              
126             When submitting a bug or request, please include a test-file or a
127             patch to an existing test-file that illustrates the bug or desired
128             feature.
129              
130             =head1 AUTHOR
131              
132             Joel Da Silva <jdasilva@cpan.org>
133              
134             =head1 COPYRIGHT AND LICENSE
135              
136             This software is Copyright (c) 2018-2024 by Stancer / Iliad78.
137              
138             This is free software, licensed under:
139              
140             The Artistic License 2.0 (GPL Compatible)
141              
142             =cut