File Coverage

blib/lib/Stancer.pm
Criterion Covered Total %
statement 38 38 100.0
branch n/a
condition n/a
subroutine 13 13 100.0
pod n/a
total 51 51 100.0


line stmt bran cond sub pod time code
1             package Stancer;
2              
3 1     1   216660 use 5.020;
  1         5  
4 1     1   8 use strict;
  1         2  
  1         38  
5 1     1   6 use warnings;
  1         2  
  1         122  
6              
7             # ABSTRACT: Stancer Perl library
8             our $VERSION = '1.0.3'; # VERSION
9              
10 1     1   1112 use namespace::clean;
  1         24210  
  1         8  
11              
12 1     1   557 use Stancer::Auth;
  1         6  
  1         57  
13 1     1   802 use Stancer::Card;
  1         6  
  1         96  
14 1     1   11 use Stancer::Config;
  1         3  
  1         33  
15 1     1   764 use Stancer::Customer;
  1         5  
  1         47  
16 1     1   729 use Stancer::Device;
  1         5  
  1         58  
17 1     1   752 use Stancer::Dispute;
  1         7  
  1         56  
18 1     1   10 use Stancer::Payment::Status;
  1         2  
  1         31  
19 1     1   7 use Stancer::Refund;
  1         2  
  1         25  
20 1     1   5 use Stancer::Sepa;
  1         2  
  1         49  
21              
22              
23             1;
24              
25             __END__
26              
27             =pod
28              
29             =encoding UTF-8
30              
31             =head1 NAME
32              
33             Stancer - Stancer Perl library
34              
35             =head1 VERSION
36              
37             version 1.0.3
38              
39             =head1 SYNOPSIS
40              
41             Stancer::Config->init($secret_key);
42              
43             my $payment = Stancer::Payment->new(amount => 100, currency = 'eur');
44             $payment->send();
45              
46             =head1 DESCRIPTION
47              
48             This module provides common bindings for the Stancer API.
49              
50             Every API object has a module representation:
51              
52             =over
53              
54             =item L<Auth|Stancer::Auth>
55              
56             =item L<Card|Stancer::Card>
57              
58             =item L<Customer|Stancer::Customer>
59              
60             =item L<Device|Stancer::Device>
61              
62             =item L<Dispute|Stancer::Dispute>
63              
64             =item L<Payment|Stancer::Payment>
65              
66             =item L<Refund|Stancer::Refund>
67              
68             =item L<Sepa|Stancer::Sepa>
69              
70             =back
71              
72             =head1 REPOSITORY
73              
74             L<https://gitlab.com/wearestancer/library/lib-perl>
75              
76             =head1 SEE ALSO
77              
78             Documentation L<http://stancer.com/documentation/>
79              
80             =head1 USAGE
81              
82             =head2 Logging
83              
84              
85              
86             We use the L<Log::Any> framework for logging events.
87             You may tell where it should log using any available L<Log::Any::Adapter> module.
88              
89             For example, to log everything to a file you just have to add a line to your script, like this:
90             #! /usr/bin/env perl
91             use Log::Any::Adapter (File => '/var/log/payment.log');
92             use Stancer;
93              
94             You must import C<Log::Any::Adapter> before our libraries, to initialize the logger instance before use.
95              
96             You can choose your log level on import directly:
97             use Log::Any::Adapter (File => '/var/log/payment.log', log_level => 'info');
98              
99             Read the L<Log::Any> documentation to know what other options you have.
100              
101             =cut
102              
103             =head1 SECURITY
104              
105             =over
106              
107             =item *
108              
109             Never, never, NEVER register a card or a bank account number in your database.
110              
111             =item *
112              
113             Always uses HTTPS in card/SEPA in communication.
114              
115             =item *
116              
117             Our API will never give you a complete card/SEPA number, only the last four digits.
118             If you need to keep track, use these last four digit.
119              
120             =back
121              
122             =cut
123              
124             =head1 BUGS
125              
126             Please report any bugs or feature requests on the bugtracker website
127             L<https://gitlab.com/wearestancer/library/lib-perl/-/issues> or by email to
128             L<bug-stancer@rt.cpan.org|mailto:bug-stancer@rt.cpan.org>.
129              
130             When submitting a bug or request, please include a test-file or a
131             patch to an existing test-file that illustrates the bug or desired
132             feature.
133              
134             =head1 AUTHOR
135              
136             Joel Da Silva <jdasilva@cpan.org>
137              
138             =head1 CONTRIBUTORS
139              
140             =for stopwords Joël DA SILVA Nicolas VINOT
141              
142             =over 4
143              
144             =item *
145              
146             Joël DA SILVA <jdasilva@corp.free.fr>
147              
148             =item *
149              
150             Nicolas VINOT <nvinot@stancer.com>
151              
152             =back
153              
154             =head1 COPYRIGHT AND LICENSE
155              
156             This software is Copyright (c) 2018-2024 by Stancer / Iliad78.
157              
158             This is free software, licensed under:
159              
160             The Artistic License 2.0 (GPL Compatible)
161              
162             =cut